when i set take_result = nil, it defaults to using name of the prototype.
is there a way to have an equipment removed from an armor give no item?
can armor equiment have no take_result?
-
- Burner Inserter
- Posts: 10
- Joined: Sun Jun 10, 2018 1:24 pm
- Contact:
Re: can armor equiment have no take_result?
Setting a value to nil in LUA is how you remove it from a table, thus making Factorio use the default. Sometimes an empty string works to signify nothing, but it looks like Factorio requires equipment to have a take_result. You can work around it a bit by using the on_equipment_removed event to remove the item from the player's cursor/inventory.
Note if you just want the player to not be able to change equipment in a grid at all, there's an equipment_grid.locked property for that.
Note if you just want the player to not be able to change equipment in a grid at all, there's an equipment_grid.locked property for that.
-
- Burner Inserter
- Posts: 10
- Joined: Sun Jun 10, 2018 1:24 pm
- Contact:
Re: can armor equiment have no take_result?
on_equipment_removed is the way.
thanks
thanks
