Page 1 of 1

Armor/Vehicle with equipment used in recipe check

Posted: Wed Sep 28, 2016 10:25 am
by bobingabout
Not sure where the best place to put this is, since technically it isn't a bug, but...
viewtopic.php?f=51&t=9256&start=240#p210615
When you have recipes, like in my mods, that take an armor/vehicle as an ingredient to make an upgraded version, the game does not seem to check if there is any equipment in the grid, and consumes it with all the equipment along with it.

It would be a reasonable request to ask if the game should check if there is equipment in an item before using it, and either remove the equipment and return it, or simply refuse to use the item.


Unrelated to the titled topic, but it could also be worth considering what happens if damaged equipment is used in the process too, since both Armors and Vehicles can be damaged, and their item retains this damage.

Re: Armor/Vehicle with equipment used in recipe check

Posted: Wed Sep 28, 2016 11:57 am
by ssilk
I think (in the first moment you will wonder, but it is all about itemhandling) this is strongly related to this subject: viewtopic.php?f=80&t=19343 Boxing / Packaging / Container / Cargobox : Pre-Filling

Re: Armor/Vehicle with equipment used in recipe check

Posted: Wed Sep 28, 2016 6:18 pm
by Rseding91
The entire crafting system has no logic to it when it comes to items. It simply checks if the item is the correct type (same ID as the recipe) and uses it.

In order to add any kind of logic like what you're asking for the entire thing would need to be re-done which isn't something that any of us are looking to do any time soon.

Re: Armor/Vehicle with equipment used in recipe check

Posted: Wed Sep 28, 2016 10:41 pm
by Deadly-Bagel
Please don't mind my ignorance but is there a way to have like an "armour upgrade" building that you insert armour into and it "manually" does the recipe, handling equipment in the process? Not the tidiest solution I know but if you need a workaround...

Re: Armor/Vehicle with equipment used in recipe check

Posted: Thu Sep 29, 2016 1:00 pm
by bobucles
The only way I can see this working is if the vehicle is forced to dump its inventory before it enters another inventory.

This means that players can't run alternate sets of suit armor, since they can only hold onto empty suits.

There is a potential memory leak if an inventory holder is destroyed in an unusual way (like being eaten for a recipe) and the inventory doesn't get cleaned up.

Re: Armor/Vehicle with equipment used in recipe check

Posted: Thu Sep 29, 2016 2:28 pm
by bobingabout
So, the only real solution available "any time soon" is to re-write the recipe to not take the previous tier item.
Now I don't mind changing things to be like that, but it leaves you with the "dead end" items, which is the reason why the splitters(or was it underground belts?) recipe was changed to require the previous tier and materials, rather than them requiring the same tier belts, and materials.