Celtic Minstrel
1c2636e989
fix whitespace
2021-06-19 11:07:53 -04:00
Celtic Minstrel
9a74447946
Update deprecated stuff in [store_time_of_day]
2021-06-19 11:07:53 -04:00
Celtic Minstrel
96b5bf43ef
Move shroud/fog ops to wesnoth.sides and change the API somewhat
...
- place_shroud and remove_shroud no longer accept a shroud data string or the special string "all"
- new functions are added to convert between lists of locations and shroud data strings
- place_fog, remove_fog, is_fogged, and is_shrouded aren't changed, only moved
2021-06-19 11:07:53 -04:00
Celtic Minstrel
a03d59d7eb
Lua: Add a new schedule module
...
The primary components of this are:
- wesnoth.current.schedule
- wesnoth.map.get_time_area()
- wesnoth.schedule module
2021-06-19 11:07:53 -04:00
Celtic Minstrel
67ba27b8a3
Move the end level data accessors to wesnoth.scenario ( #5861 )
2021-06-17 20:41:48 -04:00
Elvish_Hunter
525d65bc2f
Ported [store_time_of_day] to Lua
2021-06-17 22:19:01 +02:00
Celtic Minstrel
131ad43e3e
Move wesnoth.get_traits into wesnoth.game_config as global_traits
2021-06-15 09:57:30 -04:00
Celtic Minstrel
7e2d9cba28
Move wesnoth.teleport into wesnoth.units
2021-06-15 09:56:04 -04:00
Celtic Minstrel
3c8de46771
There were some old functions that are now covered by the wesnoth.scenario module, so deprecate them
2021-06-06 13:42:54 -04:00
Celtic Minstrel
1122ed00fb
Fix broken global_vars table
2021-05-17 20:35:27 -04:00
Celtic Minstrel
49bc5cc6db
Fix missing deprecation for wesnoth.random
2021-05-17 19:35:06 -04:00
Celtic Minstrel
bf318a6e23
math.random wasn't even supposed to be deprecated at all
2021-05-15 17:31:12 -04:00
Celtic Minstrel
cc42e00e4b
Fix a deprecation typo
2021-05-15 13:32:40 -04:00
Celtic Minstrel
eab8645e90
Fix incorrect deprecation wrapper for wesnoth.color_adjust
...
The source function wasn't public API, but it can't hurt to make it work.
2021-05-13 19:22:31 -04:00
Celtic Minstrel
6584302d41
Merge pull request #5537 from wesnoth/lua_reorg
...
Various Lua reorganization work
2021-05-11 19:12:40 -04:00
Celtic Minstrel
0970880910
whitespace fixes
2021-05-11 14:52:22 -04:00
Celtic Minstrel
574bc1a36e
Resolve [terrain_mask]mask_file= relative to the [binary_path] like map_file= is
2021-05-11 14:52:22 -04:00
Celtic Minstrel
ccb9f4f0e9
Update mainline uses of have_file and read_file
2021-05-11 14:52:21 -04:00
Celtic Minstrel
45cb8dc428
Add a filesystem module
...
This currently contains have_file, read_file, canonical_path, get_image_size, and new functions that work with binary_path files.
2021-05-11 14:52:21 -04:00
Celtic Minstrel
bf746a0207
Update mainline content to use the wesnoth.scenario module
2021-05-11 14:52:21 -04:00
Celtic Minstrel
1410b5cef9
Allow accessing variables through the new APIs in the mapgen kernel
...
This also reverses the deprecation of wml.tovconfig and friends in the mapgen kernel.
2021-05-11 14:52:20 -04:00
Celtic Minstrel
05b0b7a1df
Update uses of wesnoth.fire
2021-05-11 14:52:20 -04:00
Celtic Minstrel
e8381ea9da
Update uses of eval_conditional
2021-05-11 14:52:20 -04:00
Celtic Minstrel
2ea92baa13
Move some more functions to the wml module
...
- eval_conditional and fire
- the internal set|get_variable functions
2021-05-11 14:52:20 -04:00
Celtic Minstrel
603ecdfb99
Move the deprecation for wesnoth.modify_ai to Lua so that it honours --strict-lua
2021-05-11 14:52:19 -04:00
Celtic Minstrel
9bf189a615
Move wesnoth.create_side -> wesnoth.sides.create
2021-05-11 14:52:19 -04:00
Celtic Minstrel
1205e3fd25
Move the Lua global variable helpers from WC to a new "experimental" module
2021-05-11 14:52:19 -04:00
Celtic Minstrel
c88e60b98e
Now color_adjust takes three arguments instead of a config
...
Consider it part of the public API now.
2021-05-11 14:52:19 -04:00
Celtic Minstrel
ea5367de17
Move create_animator and create_weapon into the units module
2021-05-11 14:52:18 -04:00
Celtic Minstrel
7b2ceb863c
Move open_help to the gui module (as show_help)
...
This also exposes it in kernels besides the game kernel.
2021-05-11 14:52:18 -04:00
Celtic Minstrel
6e9826cfcd
Update mainline content to use the wesnoth.audio module
2021-05-11 14:52:18 -04:00
Celtic Minstrel
dddd551765
Add an audio module
2021-05-11 14:52:17 -04:00
Celtic Minstrel
2a1fc43860
Add a versions userdata for a cleaner way to compare and manipulate game versions
2021-05-11 14:50:29 -04:00
Hejnewar
16c8fcc49c
Remove remaining uses of wesnoth.special_locations
2021-05-10 11:26:12 +02:00
Hejnewar
e1a79988b4
Fix deprecation message
2021-05-10 11:23:54 +02:00
Celtic Minstrel
1dccc3ad76
Update mainline content to use the mathx module
2021-05-08 17:20:49 -04:00
Celtic Minstrel
1fc31c23d0
Replace all uses of get_time_stamp -> ms_since_init
2021-05-08 17:20:49 -04:00
Celtic Minstrel
7e1f3bc27f
Rename get_time_stamp to ms_since_init
...
This better reflects what it actually does - it is not and has never been a timestamp.
2021-05-08 17:20:49 -04:00
Celtic Minstrel
a09f88c1c9
Start a Lua mathx module to hold round, shuffle, random, and a few other things
2021-05-08 17:20:47 -04:00
Celtic Minstrel
900c576fe8
Fix bug in wesnoth.map.read_location
2021-05-08 17:15:02 -04:00
sigurdfdragon
f67f28d7a9
Fix deprecation message
2021-05-03 11:26:40 -04:00
Steve Cotton
24e2f8f767
Whitespace fixes for no newline at end of file
...
The new CI script whitespace-checking script changes these, but not on Linux.
2021-05-03 11:52:40 +02:00
Pentarctagon
454130fd94
Fix trailing whitespace.
2021-04-25 21:58:20 -05:00
Celtic Minstrel
31421f3558
Add a Lua unit_test module only available in [test] scenarios ( #5708 )
...
It contains fire_wml_menu_item along with a set of new assert functions
2021-04-25 21:04:50 -04:00
Pentarctagon
d203b061f9
Whitespace cleanup of lua files.
2021-04-25 15:11:09 -05:00
Hejnewar
f5ea3b0906
Update code of [unstore_unit]
2021-04-22 01:32:06 +02:00
Steve Cotton
ad1c42ca8f
Make [store_reachable_locations]range=vision calculate vision
...
Previously it calculated max movement, and then added the adjacent hexes. This
version should correctly handle:
* units with vp different to max mp
* units with vision costs different to movement costs
* jamming by enemy units
Draft changelog entry for this:
* `[store_reachable_locations]range=vision` now calculates vision, instead of using movement costs and max movement points (issue #4179 )
2021-04-16 02:05:42 +02:00
Steve Cotton
147cd90527
Move lua implementation of [store_reachable_locations] to its own file
2021-04-16 02:05:42 +02:00
Celtic Minstrel
f737013203
Fix some issues with wesnoth.map.read_location and wesnoth.map.get
2021-03-28 10:55:03 -04:00
Celtic Minstrel
96fba6b833
Fix wesnoth.set_terrain without a mode
2021-03-19 21:02:56 -04:00