Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare Ready -> Join Game [when game has already started] #17580

Merged
merged 1 commit into from Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions code/datums/gameticker.dm
Expand Up @@ -256,6 +256,15 @@ var/global/current_state = GAME_STATE_INVALID
logTheThing(LOG_STATION, null, "<b>Current round begins</b>")
boutput(world, "<FONT class='notice'><B>Enjoy the game!</B></FONT>")

for(var/mob/new_player/lobby_player in mobs)
if(lobby_player.client)
if(lobby_player.client.antag_tokens > 0)
winset(lobby_player, "joinmenu", "size=240x200")
winset(lobby_player, "joinmenu.observe", "pos=18,136")
winset(lobby_player, "joinmenu.button_ready_antag", "is-disabled=true;is-visible=false")
winset(lobby_player, "joinmenu.button_joingame", "is-disabled=false;is-visible=true")
winset(lobby_player, "joinmenu.button_ready", "is-disabled=true;is-visible=false")

//Setup the hub site logging
var hublog_filename = "data/stats/data.txt"
if (fexists(hublog_filename))
Expand Down
7 changes: 6 additions & 1 deletion code/mob/new_player.dm
Expand Up @@ -141,7 +141,12 @@ var/global/datum/mutex/limited/latespawning = new(5 SECONDS)
winset(src, "joinmenu.button_charsetup", "is-disabled=false")
// drsingh i put the extra ifs here. i think its dumb but there's a bad client error here so maybe it's somehow going away in winset because byond is shitty
if(client)
winset(src, "joinmenu.button_ready", "is-disabled=false;is-visible=true")
if(ticker && current_state >= GAME_STATE_PLAYING)
winset(src, "joinmenu.button_joingame", "is-disabled=false;is-visible=true")
winset(src, "joinmenu.button_ready", "is-disabled=true;is-visible=false")
else
winset(src, "joinmenu.button_ready", "is-disabled=false;is-visible=true")
winset(src, "joinmenu.button_joingame", "is-disabled=true;is-visible=false")
if(client)
winset(src, "joinmenu.button_cancel", "is-disabled=true;is-visible=false")
if(client)
Expand Down
Binary file added icons/ui/join-game.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions interface/skin.dmf
Expand Up @@ -685,6 +685,19 @@ window "joinmenu"
text = ""
image = 'icons\\ui\\declare-ready.png'
command = ".ready"
elem "button_joingame"
type = BUTTON
pos = 18,80
size = 200x40
anchor1 = none
anchor2 = none
font-family = "Verdana"
font-size = 10
font-style = "bold"
saved-params = "is-checked"
text = ""
image = 'icons\\ui\\join-game.png'
command = ".ready"
elem "button_charsetup"
type = BUTTON
pos = 18,24
Expand Down