From da0e7b595ad4c93b34f9f9f884806c1ce271cda0 Mon Sep 17 00:00:00 2001 From: IK3I Date: Sun, 11 Mar 2018 19:41:21 -0500 Subject: [PATCH 1/4] Adds a preround antag roll toggle --- code/game/gamemodes/game_mode.dm | 9 +++++---- code/modules/mob/new_player/new_player.dm | 9 ++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 42fb3105f18..cb0e9fef25d 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -281,10 +281,11 @@ // Get a list of all the people who want to be the antagonist for this round, except those with incompatible species for(var/mob/new_player/player in players) - if((role in player.client.prefs.be_special) && !(player.client.prefs.species in protected_species)) - player_draft_log += "[player.key] had [roletext] enabled, so we are drafting them." - candidates += player.mind - players -= player + if(!player.skip_antag) + if((role in player.client.prefs.be_special) && !(player.client.prefs.species in protected_species)) + player_draft_log += "[player.key] had [roletext] enabled, so we are drafting them." + candidates += player.mind + players -= player // If we don't have enough antags, draft people who voted for the round. if(candidates.len < recommended_enemies) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 9d16d66a64c..c52e7c2947c 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -1,6 +1,7 @@ /mob/new_player var/ready = 0 - var/spawning = 0//Referenced when you want to delete the new_player later on in the code. + var/skip_antag = 0 //For declining an antag roll this round. + var/spawning = 0 //Referenced when you want to delete the new_player later on in the code. var/totalPlayers = 0 //Player counts for the Lobby tab var/totalPlayersReady = 0 universal_speak = 1 @@ -31,6 +32,8 @@ if(!ready) output += "

Declare Ready

" else output += "

You are ready (Cancel)

" + if(!skip_antag) output += "

Rolling For Antag

" + else output += "

Antag Roll Off (Cancel)

" else output += "

View the Crew Manifest

" output += "

Join Game!

" @@ -112,6 +115,10 @@ ready = !ready new_player_panel_proc() + if(href_list["skip_antag"]) + skip_antag = !skip_antag + new_player_panel_proc() + if(href_list["refresh"]) src << browse(null, "window=playersetup") //closes the player setup window new_player_panel_proc() From 404150ba8ff2dcd54f61ecc605cf5474829b1d58 Mon Sep 17 00:00:00 2001 From: IK3I Date: Tue, 13 Mar 2018 00:45:26 -0500 Subject: [PATCH 2/4] For the sake of clarity --- code/modules/mob/new_player/new_player.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index c52e7c2947c..2dcaa837d8a 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -32,8 +32,9 @@ if(!ready) output += "

Declare Ready

" else output += "

You are ready (Cancel)

" - if(!skip_antag) output += "

Rolling For Antag

" - else output += "

Antag Roll Off (Cancel)

" + if(!skip_antag) output += "

Toggle Antag Rolling" + else output += "

Toggle Antag Rolling" + output += "
[skip_antag ? "Disabled" : "Enabled"]

" else output += "

View the Crew Manifest

" output += "

Join Game!

" From e635f7cbf3b693110ee16a4ce8b254bdeb243d80 Mon Sep 17 00:00:00 2001 From: IK3I Date: Wed, 21 Mar 2018 18:43:52 -0500 Subject: [PATCH 3/4] Antag Toggle now appears only after antags are chosen in preferences. --- code/modules/mob/new_player/new_player.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 2dcaa837d8a..a3ee342091c 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -32,9 +32,11 @@ if(!ready) output += "

Declare Ready

" else output += "

You are ready (Cancel)

" - if(!skip_antag) output += "

Toggle Antag Rolling" - else output += "

Toggle Antag Rolling" - output += "
[skip_antag ? "Disabled" : "Enabled"]

" + var/list/antags = client.prefs.be_special + if(antags && antags.len) + if(!skip_antag) output += "

Toggle Antag Rolling" + else output += "

Toggle Antag Rolling" + output += "
[skip_antag ? "Disabled" : "Enabled"]

" else output += "

View the Crew Manifest

" output += "

Join Game!

" From 1350dfa0c20d11b23d1b000eed1484a0cd06ea1d Mon Sep 17 00:00:00 2001 From: IK3I Date: Sun, 1 Apr 2018 22:30:50 -0500 Subject: [PATCH 4/4] Updates wording --- code/modules/mob/new_player/new_player.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a3ee342091c..0db7535c97b 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -34,9 +34,9 @@ var/list/antags = client.prefs.be_special if(antags && antags.len) - if(!skip_antag) output += "

Toggle Antag Rolling" - else output += "

Toggle Antag Rolling" - output += "
[skip_antag ? "Disabled" : "Enabled"]

" + if(!skip_antag) output += "

Global Antag Candidancy" + else output += "

Global Antag Candidancy" + output += "
You are [skip_antag ? "ineligable" : "eligable"] for all antag roles.

" else output += "

View the Crew Manifest

" output += "

Join Game!

"