Fixed an oversight where not all parallax layers got their parallaxLock
status cleared in case the map file was missing this attribute, or not all
affected layers were listed there.
The editor does now no longer switch to a layer when hiding it
(Alt+Layer key). It is still possible to edit invisible layers, though.
Sometimes the glow render object was added to an array position before
darkness on the layer, which made the glow never visible and never light
up the screen.
Added the same fix to createQuad() Lua func - nodes which spawned a quad
on the dark layer in their init() function had the same problem.
Mods with a <Properties hasWorldMap="1"> tag in their XML definition
can now open a native world map like the original game.
Fixed an oversight that the world map visited area was updated
while the editor was open.
Fixed missing field in worldmap.txt saving.
Removed the limitation that world map tiles had to be 256x256 -
all tile sizes work now.
The game does now read _mods/#/data/stringbank.txt from a mod and merges
it with the main stringbank.txt, and uses _mods/#/data/worldmap.txt
as a full replacement.
Load _mods/#/[map|premap]_mapname.lua scripts to properly
initialize the Naija map token.
Improved the builtin worldmap editor a little.
== Script interface changes: ==
Removed entity_setClampOnSwitchDir(), which was a no-op.
Added entity_getFlag() function, for fairness, as nodes already have one.
Added node_getLabel() function, which does not return the _full_ node string, but only the first part before parameters.
dofile() supports relative paths now, and it is no longer necessary to use appendUserDataPath() + full path from a mod.
entity_color() does now support all interpolation functions that similar vector-manipulation functions support (loop, ping-pong, ease).
added entity_getVel() function (an entity_setVel() can be emulated with entity_clearVel(), followed by entity_addVel()).
*_getNearestNode() and *_getNearestEntity() allow an optional ignore parameter.
node_getNearestNode() allowed to specify a node to exclude from the search,
the others not -- now the interface is more consistent.
Deprecated entity_[incr/decr]TargetLeaches(entity) - the attached leach amount was never handled
by any entity other than Naija. Replaced them with avatar_[incr/decr]Leaches(), but kept the old
ames for now, too. Should be removed in a while.
== Script interface & related fixes: ==
Added bool loudScriptErrors to control displaying script syntax error and global variable usage warnings.
So far, syntax errors always went do debugLog(), but it is less time consuming when writing scripts
to have them displayed right away.
*_getNearestNode now scan by label, and not full name.
This allows searching for nodes but ignoring its parameters. The original game scripts never search
for nodes that have parameters, so this does not break anything,
but allows modding without an exploding amount of specialized node scripts.
entity_setBoneLock() failed for certain entites with throwLuaErrors=true,
allowing to burst through them (gears, grouper, big mithalas jelly, probably more).
Removed unnecessary int-casts in entity_setHealth(), entity_changeHealth(), and a few others,
which truncated float fractional parts.
Fixed possible crashes in many functions due to missing NULL-pointer checks,
if wrong data were passed to Lua.
Optimized entity_getNearestEntity() a little - do nocasecmp() after checking all other params
UPPERCASE global variables as used in mod include files are now tolerated, even with all warnings on.
This makes sense because it was impossible to include a custom flags definition file
(which _must_ have globals, otherwise the including scripts won't see them) in a mod without beeing buried in spam.
They won't change, or clobber any states, and UPPERCASE sort of implies a constant/#define, imho.
Added better control over warnings about not-existing files. map_*.lua and premap_*.lua files are optional,
and no warning should be given if they do not exist. Missing Entity scripts and mod-init.lua must be
warned about, however.
Fixed a crash in global variable access warning (NULL pushed into std::ostringstream)
Fixed 2 random warnings i found in scrips
== Misc stuff: ==
Related to the changes above, cleaned out unused variables from the Entity class,
and removed the code that had to do with them somehow. Some parts of the removed code
were still in use, although totally unnecessary.
Saves a few bytes of memory per entity, and less code that can cause headache.
Added Shift+Mousewheel as faster alternative to E and R for tile selection
(had to change the undocumented and probably unused Shift+R action to Alt+R).
Allow applying element effects (numpad 0-9) to multiple selected tiles,
and not only one.
A new node does no longer have "NewPath" as default text when created,
which always forces the user to hammer backspace 6 times before own text can be entered.
Mods with a <Properties hasWorldMap="1"> tag in their XML definition
can now open a native world map like the original game.
Fixed an oversight that the world map visited area was
updated while the editor was open; fixed worldmap.txt saving;
removed the limitation that world map tiles had to be 256x256 -
all tile sizes work now.
Improved the builtin worldmap editor a little.
The game does now read _mods/#/data/stringbank.txt from a mod and merges
it with the main stringbank.txt, and uses _mods/#/data/worldmap.txt
as a full replacement.
Load _mods/#/[map|premap]_mapname.lua scripts to properly
initialize the Naija map token.