SimpleItemStack to LuaItemStack
- Ranakastrasz
- Smart Inserter
- Posts: 2129
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
SimpleItemStack to LuaItemStack
I need to, on item mined/robot item mined event, to look at the item prototype. It returns a Simple item Stack however, and I think I need the Lua Item Stack instead.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: SimpleItemStack to LuaItemStack
If you have a SimpleItemStack, you have a name. You can get at the prototype via game.item_prototypes[item_name].
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
- Ranakastrasz
- Smart Inserter
- Posts: 2129
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: SimpleItemStack to LuaItemStack
That will help.
Thanks.
Edit:
Darvit.
Apprently while a health of zero prevents attacking it, aoe damages it, and there is no way to set the health when you pick it up, since it always says 0% even if you set health to 1.0
Guess I will have to stick with the indestructable tag via script, even if it isn't undo-able
Thanks.
Edit:
Darvit.
Apprently while a health of zero prevents attacking it, aoe damages it, and there is no way to set the health when you pick it up, since it always says 0% even if you set health to 1.0
Guess I will have to stick with the indestructable tag via script, even if it isn't undo-able
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16