Auto Resource Redux


Automatic resource distribution between machines - for RTS like/combat focused gameplay

Overhaul
6 months ago
1.1
524
Logistics Cheats

i [Fixed] Missing Items

8 months ago

Hi.
Today I put together a small mod pack to try out your mod a little. So far I have noticed the following things that are not being collected.

I need the armor because of Klonan's Kombat Drones mod. (https://mods.factorio.com/mod/Kombat_Drones)
It would be great if these items could be included. But I'll definitely write more here if I find more.

8 months ago

This limitation is mentioned on the mod page:

Most items can be stored, aside from ones that contain other items - like armours or vehicles (storing these would strip them of their contents, as the items are removed from the game world when they are stored).

The full list of blacklisted item types can be viewed in the code: https://github.com/udf/factorio-auto-resource-redux/blob/624cb551e49c2782855f82f5b69c7e12901e87f5/auto-resource-redux/src/Storage.lua#L7-L18


I could do a more granular check on armours instead of blanket blacklisting all of them - only the ones with equipment grids can't be stored. So you could store light and heavy armour but none of the modular ones.

But I think a better approach would be to "unpack" such items. So when you store a modular armour with a bunch of equipment, all the equipment gets taken out of the armour and stored.

8 months ago

oh, I totally missed that. (I just went through the whole text 2 more times before I found it..)
But vehicles lose their contents anyway when you dismantle them. So vehicles shouldn't actually be a problem. (Except for Spidertrons, as they have an equipment grid)

8 months ago

Not only spidertrons, many other mods add vehicles with equipment grids or even add grids to existing vehicles, but the API doesn't currently have a way to check if a vehicle item prototype has a grid - it can only be checked on the actual item, so I can't answer the question "Does this vehicle type have an equipment grid?" without first creating a vehicle item. So the unpacking idea really does seem like the best way to handle it.

Though I do wonder why the fish breeding device's item has the same type as vehicles ("item-with-entity-data"). It doesn't seem like it can have a grid since it's an assembling machine (which don't have way to set extra data like a name or a colour). I'd have to check the code to see what's going on there - it's probably unintended.

8 months ago

Ok.. Just out of interest. Would it be possible to do it like in the Reverse Factory mod? So making it possible using a setting. (Which is of course disabled by default)

6 months ago

Added in 0.0.9 (an option to toggle the behaviour doesn't seem necessary to me so I didn't add one)

New response