Terasology / LightAndShadow

Light & Shadow is an experimental game type set in a quirky Alice in Wonderland inspired setting
Apache License 2.0
8 stars 22 forks source link

Allows all players to restart the game after 10 seconds #160

Closed ahv15 closed 4 years ago

ahv15 commented 4 years ago

Contains

"Fixes #154" Allows all the players to restart the game. The restart button appears after 10 seconds allowing the players to check their stats in the mean time.

How to test

Host and Join a multiplayer game using 2 or more host/clients and once the game is completed everybody should be able to restart the game.

Outstanding before merging

stefaniamak commented 4 years ago

Also, it would be cool to have a timer which would indicate when the button will be active! But that is deffinitelly for a next PR.

ahv15 commented 4 years ago

This is very weird the restart button should not be visible for 10 seconds even for the host

stefaniamak commented 4 years ago

This is very weird the restart button should not be visible for 10 seconds even for the host

huh 🤔 I did had it right away for the host. Was there maybe any other step to test this other than joining with local clients to a game?

ahv15 commented 4 years ago

It works fine when I run it from my workspace Screenshot (410) Screenshot (411) This is how it looks for me just checked it out again.

stefaniamak commented 4 years ago

Note: there is a hasRestartPermission Boolean variable at GameOverEvent.java, could you consider removing it as well if it is not needed elsewhere?

Cervator commented 4 years ago

Can confirm the tweak from @stefaniamak did the final trick and collapsed the quantum code state into one that works all the time, not just all the time for some and none of the time for others 😁

The last few bits of the restart permission were trivial to remove so I did it real quick and added it to a commit here. 5 total commits with 4 contributors, now that's team work. Well done everybody and thank you! Realistically replayable LaS in headless multiplayer FTW!