HDest-Community / Ugly-as-Sin

Enhancement modules for Hideous Destructor
zlib License
21 stars 17 forks source link

[Request] Allow 'invalid' items to be put into consumable packages. #185

Closed ckver0 closed 2 years ago

ckver0 commented 2 years ago

Was working on making a pack using the consumable packaging system to have packs of glowsticks, second flesh cartridges, and flares, but they're tagged as invalid items because they're not a consumable. Would it be possible to have this limitation removed for modding capabilites?

caligari87 commented 2 years ago

I've attempted to remove the restriction in an experimental branch. Be aware this is experimental and subject to be reverted if it breaks things significantly. On the surface it seems to work okay; I added a glowstick to the basic MRE template class and got expected results, but I don't have time to test it completely.

https://github.com/caligari87/Ugly-as-Sin/archive/refs/heads/package_items_test.zip removed

Use this build of UaS from the package_items_test branch. You can do summon uas_basicmre in the console to see an example. Please test thoroughly, including bulk values, recursion, and various item classes as much as possible. If it works for your needs and doesn't exhibit bad or breaking behavior for normal use cases, I can merge it to master.

ckver0 commented 2 years ago

Tested various packages of items, from 2F cartridges, glowsticks, flares, ammunition, armour, weapons, and modded weapons/ammunition/items.

Bulk values seem to work fine for everything but the bulkiest of items; armour and the BFG.

Tested this build and a test pack with a friend with a run through a mapset, encountering a few of the test packages without issue.

I'd expect anybody wanting to have hammerspace-esque BFG's or Battle Armour at a moments notice would just cheat them in regardless, so as such, I don't really see any outstanding issues for normal use cases of fairly standard items, weapons and ammunition.

caligari87 commented 2 years ago

Alright cool. I'll look over the code once more later today and see if perhaps it'd be worthwhile to make a "package" superclass that can be used independent of "food" implications, and get it merged to main.

caligari87 commented 2 years ago

Actually just going ahead and merging. Let me know if anything crops up.