Closed TecCheck closed 1 year ago
as a note, if its not already done, when you pop the equipped items, you need to heal the player to full stats.
I didn't know that. Thanks 👍
I just noticed, that I reformatted InventoryComponent.cs
and InventoryHandler.cs
. Is that OK or should I revert that?
I think this is ready for review. If everything works, I'll remove all or most of the log statements
Btw, not a new issue I think, just something to note & be fixed at some point, doesn't need to be now:
If you close your client while building (I did because mine froze, but I couldn't reproduce that) and restart, you can walk around with the thinking cap on & a rocket part in your arms. You can enter + leave the building area again to get rid of it. I think ideally it should call ModularBuilderComponent.ConfirmBuildExit() so that the player gets their original rocket back instead of the loose parts.
I think ideally it should call ModularBuilderComponent.ConfirmBuildExit() so that the player gets their original rocket back instead of the loose parts.
I think, I will implement this as well. It fits the PR.
EDIT: Btw you can just hit ALT
F4
to close the game and it will end up in the same state as you described.
Ok never mind. Currently it's not possible to revert the state of the player once they left because the server crashes when it tries to send messages to that player. For this to work, the server would need to catch null pointer and just not send anyting
This fixes a few issues that my old code had. It's almost a complete rewrite. Not sure if
BuildBorderComponent
is needed.TODOs:
BuildMode
enumMaybe removeBuildBorderComponent
PushEquippedItemState
andPopEquippedItemState
Exit build session if player leaves serverModularBuildingHandler
ModularBuilderComponent