aedenthorn / ValheimMods

Other
148 stars 104 forks source link

Add support for CargoCrates in AutoFuel #21

Closed Stealthii closed 3 years ago

Stealthii commented 3 years ago

CargoCrates are the prefabs spawned by carts, boats, etc. when destroyed. This change allows them to be considered as containers by AutoFuel, if the config option "AllowCargoCrates" is enabled.

Part of this change includes more specific detection of chests vs. cargo crates on their specified layers.

Stealthii commented 3 years ago

I've decided not to include support for vehicle cargo in this PR - I've another branch with more concrete detection of chests/crates vs. boat/cart cargo, along with separate adjustable ranges for these (and the option to disable private chests).

aedenthorn commented 3 years ago

Does this find containers named Container? Like in ships and carts?

Stealthii commented 3 years ago

Nope - I only added support for dropped cargo crates in this PR, as they are a common decorative item used in bases. Vehicles are doable, but ideally more changes / configurability are needed to make that work in a way people would be happy with.

For example, do vehicles refuel when parked/unparked - example case would be someone wanting to refuel torches from a cart they are running along a bridge with (unparked), or wanting a ship to unload only when uncontrolled (parked)

Stealthii commented 3 years ago

This PR has been updated to fix conflicts with the latest changes.

aedenthorn commented 3 years ago

This still doesn't allow for containers named Container afaics