feat: allow placing any pickup item on pedestals #64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "noahg/feat-allow-placing-any-pickup-item-on-pedestals"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thank you for working on this, most of it seems to be working, but this introduces a crash when entering the drop point while carrying an item:
This seems to happen for any sell-able object, as well as objects that shouldn't be sell-able like the keycard.
I think it would be best to take the refactor one step further, and turn 'sculpture_puzzle_piece_slot.gd' into 'item_slot.gd'
This could be a base class that fires signals for
place_itemandremove_iteminstead of directly handling the logic, then the sculpture puzzle could be set up to subscribe to these signals in a more generic way.This would also allow for designers to make new puzzles very easily, as well as use the item slot system for entirely new use-cases.
@ -70,3 +82,3 @@var sculpture_puzzle_piece_slot := focusable_object as SculpturePuzzlePieceSlotif sculpture_puzzle_piece_slot and _held_item is SculpturePuzzlePiece:if sculpture_puzzle_piece_slot and _held_item:suggestion: As long as things are being made more generic and interchangeable with other systems in this PR, it would be could to eliminate specific wording around "sculpture puzzle piece", maybe call this "item_slot".
Good idea! Done.
@ -10,3 +10,3 @@update_configuration_warnings()var _current_sculpture: SculpturePuzzlePiecevar _current_pickup_item: PickupItemsuggestion: even though the class this is referring to is called
PickupItemthe wording is getting a little confusing due to sentences like "Cannot remove pickup item from empty slot" - which is it? remove or pick up?it might be simpler to just call this
_current_item, and use wording like: "Cannot remove item from empty slot"I completely agree. Done.
f88410dee6to9c11a29f07@xury wrote in #64 (comment):
This should be resolved now. Looking into the other requests now.
9c11a29f07todb95bef602Addressed requested changes and rebased on
dev.db95bef602to442ff0bd85Thanks, this is looking really close now.
I did notice the console is being spammed with errors during regular gameplay:
The sculpture_puzzle_piece scenes ended up with packed art asset mesh data inside of them, so they show up like this in the review:
Horrible, sorry I couldn't leave a comment in-place since the files weren't displayable in the review.
Let me push an update to these assets into
devto fix their art so that the data is referenced from the .gltf file instead of duplicated and packed into these scenes. Then we can rebase this PR on that.@ -0,0 +4,4 @@signal solution_status_changed@export var _solution_item: PickupItem:I think this should be separated one more level, I think this is a good case for inheritance - ItemSlot will likely get used for lots of things that have nothing to do with puzzles, and therefore shouldn't have a "solution".
I think an inherited class is the right call here:
PuzzleItemSlot- and it should be the thing to implement _solution_item.Signals for when an item is placed / picked up from a slot are still valuable for the base ItemSlot class though.
That's a good point. I'll split this into one more class.
Done! Now there is an
ItemSlotclass and a separatePuzzleItemSlotclass.I made the
pedestal_item_slot.tscnscene inherit fromitem_slot_base.tscn, and in the statue room I override the script on the pedestal item slots with thePuzzleItemSlotclass script.442ff0bd85to7e8e67e1ca@xury wrote in #64 (comment):
This should now be resolved. It was an order of operations issue where I was trying to set
global_positionbefore the node was part of the tree. I realized I only needed to set the local position. After making that change this error went away.@xury wrote in #64 (comment):
I rebuilt the new nodes using their respective sculpture's pre-made scene and froze the RigidBody3D so they stay put. This should make it easier to rebase on your next changes.
7e8e67e1cato8f22fcfcceRebased on
dev.8f22fcfccetod32c726920Rebased on
devand incorporated the latest rebuilt statue scenes into the puzzle piece scenes.d32c726920to390dfce5aaRebased on dev.
390dfce5aato9b02ab11979b02ab1197todcf8885ecbGreat work, this is a huge improvement for the sculpture room!