098ea0d10a
Introduces an `on_blast(luaobj, damage)` callback that mods can attach to an entity def. The function will get called with the damage that TNT would make. The function should return three values: bool do_damage, bool do_knockback, table drops do_damage allows the mod to tell the TNT code to perform damage on the entity for the mod. The mod code should not do anything with the entity HP. The entity should not be immortal. If false, then the entity will not be damaged by the TNT mod. do_knockback allows the mod to tell the TNT mod to perform an entity knockback effect. If false, no knockback effect is applied to the entity. the drops table is a list of items to drop. It may be nil. E.g. { "wool:red" }. I've documented both on_blast() API methods in game_api.txt. It is a better place than lua_api.txt. |
||
---|---|---|
.. | ||
beds | ||
boats | ||
bones | ||
bucket | ||
creative | ||
default | ||
doors | ||
dye | ||
farming | ||
fire | ||
flowers | ||
give_initial_stuff | ||
screwdriver | ||
sethome | ||
stairs | ||
tnt | ||
vessels | ||
walls | ||
wool | ||
xpanes |