jeremyshannon / Exile

This repo is parked, moved to codeberg.org
https://codeberg.org/Mantar/Exile
GNU General Public License v3.0
16 stars 12 forks source link

Protection Nails; Chest Labels; Crafted By labels; infotext management #218

Closed Izzyb1234 closed 1 year ago

Izzyb1234 commented 1 year ago

Draft PR of new protection using protection nails to add protection to any node. Protection Nails item can be crafted 8 per iron ingot. Produces enough nails to nail down 8 times.

Further updates will remove auto protection of things like crafting stations in favor of needing to nail them to add protection. Iron doors and chests will still have protection by default. Same with special items from the city.

Izzyb1234 commented 1 year ago

Still working out some bugs but looking good overall. The code is running on ex9 for anyone wanting to test it out. https://exile.planetofnix.com/wiki/pmwiki.php?n=Dev.Servers

Currently auto protection has been removed from most nodes. Glass and artifacts from the city are exceptions. Same with iron doors and chests. anything already protected remains protected until dug.

Any node can be nailed down setting ownership. Digging a node that was nailed will give you back your nails in addition to the node. Some bugs still exist here; sticks for example can get nailed but connected sticks under it can knock it down losing the nail. Same with tilling soil after its been nailed.

Labels for chests are mostly working. Not on bags yet. You can now set a label and it will keep it even after digging the chest. It should display in infotext but doesn't when first placed. You'll see it in the edit box and hitting enter will update the infotext. It isn't clear you have to hit enter to save the changes to the label. Need to extend this to backpacks also. And want the label to appear in item name when in inventory.

Izzyb1234 commented 1 year ago

Infotext is mostly finished; Most places now use the new library. Some more testing is needed to confirm no bugs.

Protection Nails work. Connected nodes may still have issues. replaced set_node with swap_node in most places so it should be transparent to other mods. Digging a node that was nailed will return a nail in addition to the node. Some more testing needed

Crafted by labels show up on craft stations and chests. Preserving of meta data between node and item is now handled transparently for all mods via minimal.overrides. formspecs for crafting tables and storage devices have been updated

Storage devices now have an input field to add a label to them. Labels appear in infotext and item descriptions.

More testing is needed and some additional features to be added, but for now just working to test and debug any issues in the mod as is for merging.

Izzyb1234 commented 1 year ago

Think this is working well enough to be ready for review now.

Izzyb1234 commented 1 year ago

I've tested all major functions in the game and confirmed everything appears to be functioning normally. Removed debugging messages. Think this PR is ready to merge unless you see anything I should change.