Page 1 of 1

register_on_entity_inventory_changed()

Posted: Sun Jun 14, 2020 10:14 pm
by billbo99
In 0.18.31 .. LuaBootstrap::register_on_entity_destroyed() .. was added.

I was hoping that a DEV would add .. register_on_entity_inventory_changed() .. as a means for modders that want to keep an eye on the inventory of a specific entity, instead of keep polling on Tick updates looking for changes.

My personal desire is to be able to register a logistics chest to raise an event when its inventory has been updated. But this could also apply to players, vehicles and cargo-wagons.

With the assocaiated event on_entity_inventory_changed() returning
  • The entity that made the change, so you could tell if it was a bot, script or player.
  • What was added or removed as a list of stacks. With positive stack counts for items added, and negative stack counts for items removed.

Re: register_on_entity_inventory_changed()

Posted: Sun Jun 14, 2020 10:38 pm
by Rseding91
Sorry but this isn't going to happen.