- New function
world.tileIsOccupied(tile, tileLayer, includeEphemeral)
tile
(vec2) the position to checktileLayer
(boolean, optional, default=true) the tile layer to check (true
for foreground,false
for background)includeEphemeral
(boolean, optional, default=false) include held but unplaced objects such as a player's object placement preview- returns true when the specified tile position contains a material or a placed object
- New function
world.farmableStage(entityId)
returns the current growth stage of the specified farmable object as an integer, or nil if the object is not a valid farmable - Added
entity.applyMovementParameters
andentity.applyMovementModifiers
to monster context, with functionality similar to thetech
functions of the same name - Objects will now retain their
storage
table when broken into items - Container objects can now specify a hook to be called when the inventory is changed (by players or scripts).
- The
object
table accessible from object scripts has been renamed toentity
for consistency - Object scripts receive an argument in
init
which is true when the object is being previewed and false when it is placed in the world - Wire objects can now use
getInboundNodeIds(nodeIndex)
andgetOutboundNodeIds(nodeIndex)
to get a table of entityIds for all objects connected to the specified wire node - Object scripts can now define a function
die()
to be called when the object is broken or destroyed - Added an
entityProxy
wrapper function to make more entity functions available (details here: https://www.irccloud.com/pastebin/ZQBDj4ou) - Added
entity.setDropPool
for monsters to allow changing theirdropPool
parameter from scripts, which can also be set tonil
to disable drops - Added
world.damageTiles
andworld.placeMaterial
for tile manipulation