mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
Gamemode Vote in the Lobby (#46)
* ;^) * auto gamemode vote in the lobby
This commit is contained in:
@@ -36,6 +36,7 @@ var/datum/subsystem/ticker/ticker
|
|||||||
|
|
||||||
var/triai = 0 //Global holder for Triumvirate
|
var/triai = 0 //Global holder for Triumvirate
|
||||||
var/tipped = 0 //Did we broadcast the tip of the day yet?
|
var/tipped = 0 //Did we broadcast the tip of the day yet?
|
||||||
|
var/modevoted = 0 //Have we sent a vote for the gamemode?
|
||||||
var/selected_tip // What will be the tip of the day?
|
var/selected_tip // What will be the tip of the day?
|
||||||
|
|
||||||
var/timeLeft = 1200 //pregame timer
|
var/timeLeft = 1200 //pregame timer
|
||||||
@@ -88,6 +89,10 @@ var/datum/subsystem/ticker/ticker
|
|||||||
return
|
return
|
||||||
timeLeft -= wait
|
timeLeft -= wait
|
||||||
|
|
||||||
|
if(timeLeft <= 1200 && !modevoted) //Vote for the round type
|
||||||
|
send_gamemode_vote()
|
||||||
|
modevoted = TRUE
|
||||||
|
|
||||||
if(timeLeft <= 300 && !tipped)
|
if(timeLeft <= 300 && !tipped)
|
||||||
send_tip_of_the_round()
|
send_tip_of_the_round()
|
||||||
tipped = TRUE
|
tipped = TRUE
|
||||||
@@ -545,3 +550,7 @@ var/datum/subsystem/ticker/ticker
|
|||||||
queued_players = ticker.queued_players
|
queued_players = ticker.queued_players
|
||||||
cinematic = ticker.cinematic
|
cinematic = ticker.cinematic
|
||||||
maprotatechecked = ticker.maprotatechecked
|
maprotatechecked = ticker.maprotatechecked
|
||||||
|
|
||||||
|
/datum/subsystem/ticker/proc/send_gamemode_vote(var/)
|
||||||
|
SSvote.initiate_vote("roundtype","server")
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,13 @@ var/datum/subsystem/vote/SSvote
|
|||||||
restart = 1
|
restart = 1
|
||||||
else
|
else
|
||||||
master_mode = .
|
master_mode = .
|
||||||
|
if("roundtype")
|
||||||
|
if (ticker && ticker.mode)
|
||||||
|
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
|
||||||
|
master_mode = .
|
||||||
|
log_admin("Mode has been voted for and switched to: [master_mode].")
|
||||||
|
world << "<span class='adminnotice'><b>The mode is now: [master_mode]</b></span>"
|
||||||
|
world.save_mode(master_mode)
|
||||||
if(restart)
|
if(restart)
|
||||||
var/active_admins = 0
|
var/active_admins = 0
|
||||||
for(var/client/C in admins)
|
for(var/client/C in admins)
|
||||||
@@ -169,6 +176,9 @@ var/datum/subsystem/vote/SSvote
|
|||||||
choices.Add("Restart Round","Continue Playing")
|
choices.Add("Restart Round","Continue Playing")
|
||||||
if("gamemode")
|
if("gamemode")
|
||||||
choices.Add(config.votable_modes)
|
choices.Add(config.votable_modes)
|
||||||
|
if("roundtype")
|
||||||
|
choices.Add("secret")
|
||||||
|
choices.Add("extended")
|
||||||
if("custom")
|
if("custom")
|
||||||
question = stripped_input(usr,"What is the vote for?")
|
question = stripped_input(usr,"What is the vote for?")
|
||||||
if(!question)
|
if(!question)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
new /obj/effect/spider/stickyweb(T)
|
new /obj/effect/spider/stickyweb(T)
|
||||||
|
|
||||||
if(ANTIDOTE_NEEDED)
|
if(ANTIDOTE_NEEDED)
|
||||||
var/virus_type = pick(/datum/disease/beesease, /datum/disease/brainrot, /datum/disease/fluspanish)
|
var/virus_type = pick(/datum/disease/beesease, /datum/disease/brainrot, /datum/disease/fluspanish, /datum/disease/transformation/xeno)
|
||||||
var/turf/T
|
var/turf/T
|
||||||
for(var/i=0, i<10, i++)
|
for(var/i=0, i<10, i++)
|
||||||
if(prob(15))
|
if(prob(15))
|
||||||
|
|||||||
Reference in New Issue
Block a user