UchuServer / Uchu

LEGO Universe server written in C#
GNU Affero General Public License v3.0
85 stars 20 forks source link

Modular building rework #351

Closed TecCheck closed 1 year ago

TecCheck commented 1 year ago

This fixes a few issues that my old code had. It's almost a complete rewrite. Not sure if BuildBorderComponent is needed.

TODOs:

EmosewaMC commented 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.

TecCheck commented 1 year ago

I didn't know that. Thanks 👍

TecCheck commented 1 year ago

I just noticed, that I reformatted InventoryComponent.cs and InventoryHandler.cs. Is that OK or should I revert that?

TecCheck commented 1 year ago

I think this is ready for review. If everything works, I'll remove all or most of the log statements

enteryournamehere commented 1 year ago

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. Screenshot_20230910_163457

TecCheck commented 1 year ago

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.

TecCheck commented 1 year ago

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