A map element ("tile") can now be tagged with an int.
In the editor:
Ctrl+Numpad to quickly set tag 0-9
Ctrl+T to input tag number for selection
This tag can be used by scripts for more advanced tile
manipulation compared to the old node_setElementsInLayerActive().
This function now takes a 4th parameter, the tag.
If 0 or omitted, the behavior is unchanged.
Otherwise, only affect tiles with that tag.
Add Lua func refreshElementsWithTagCallback(tag, callback):
Call callback(templateIdx:int, texture:str, active:bool, layer:int, tag:int),
and the tile is set to active when the return value is true.
refreshElementsOnLayerCallback(tag, callback) is also changed to use
the same callback.
Also fix UB (dangling pointer)in Element::render()
that never even caused a single problem.
- does no longer depend on collision mask
- remove global Game::lastCollideMaskIndex
- remove the horribly convoluted and now unused RenderObject::getInvRotPosition()
+ Lua func entity_getBoneLockDelay()
+ Lua func entity_setBoneLockDelay()
This takes out the last of the RenderObject mutables.
This also fixes the long-standing editor bug that map tiles
that are once moved to parallax layers and then back to a
normal layer keep their scroll factor until the tile is deleted
or the map saved and reloaded.
- Lua func node_activate() is now variadic and can pass any params to the target's activate()
- Add Lua func entity_activate() that works in the same manner
- Activating nodes/entities via RMB now passes (naija ptr, int input source) to activate()
- Don't delay entity activation by 1 frame
- Minor cleanups to some Lua functions; no functional changes there
The game used to unconditionally enforce shots to go at close to their max speed;
it is now possible to turn that behavior off if needed:
In a shot txt file, set AlwaysMaxSpeed = 0
New Lua functions:
+ shot_setAlwaysMaxSpeed()
+ shot_isAlwaysMaxSpeed
Like this:
size_t x;
if(is >> x) {...}
This used to return true despite x never being populated, because
is was casted to bool, which is fine to shift by uninitialized, and
likely returned true. Whatever.