mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Auto-transfer voting!
This commit is contained in:
@@ -46,6 +46,10 @@ datum/controller/vote
|
|||||||
|
|
||||||
voting.Cut()
|
voting.Cut()
|
||||||
|
|
||||||
|
proc/autotransfer()
|
||||||
|
initiate_vote("crew_transfer","the server")
|
||||||
|
|
||||||
|
|
||||||
proc/reset()
|
proc/reset()
|
||||||
initiator = null
|
initiator = null
|
||||||
time_remaining = 0
|
time_remaining = 0
|
||||||
@@ -202,7 +206,7 @@ datum/controller/vote
|
|||||||
return 0
|
return 0
|
||||||
choices.Add(config.votable_modes)
|
choices.Add(config.votable_modes)
|
||||||
if("crew_transfer")
|
if("crew_transfer")
|
||||||
if(check_rights(R_ADMIN) || check_rights(R_MOD))
|
if check_rights(R_ADMIN) || check_rights(R_MOD)
|
||||||
question = "End the shift?"
|
question = "End the shift?"
|
||||||
choices.Add("Initiate Crew Transfer", "Continue The Round")
|
choices.Add("Initiate Crew Transfer", "Continue The Round")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
|
|
||||||
var/triai = 0//Global holder for Triumvirate
|
var/triai = 0//Global holder for Triumvirate
|
||||||
|
|
||||||
|
var/initialtpass = 0 //holder for inital autotransfer vote timer
|
||||||
|
|
||||||
/datum/controller/gameticker/proc/pregame()
|
/datum/controller/gameticker/proc/pregame()
|
||||||
login_music = pick(\
|
login_music = pick(\
|
||||||
'sound/music/space.ogg',\
|
'sound/music/space.ogg',\
|
||||||
@@ -56,6 +58,18 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
current_state = GAME_STATE_SETTING_UP
|
current_state = GAME_STATE_SETTING_UP
|
||||||
while (!setup())
|
while (!setup())
|
||||||
|
|
||||||
|
/datum/controller/gameticker/proc/votetimer()
|
||||||
|
var/timerbuffer = 0
|
||||||
|
if (initialtpass == 0)
|
||||||
|
timerbuffer = config.vote_autotransfer_initial
|
||||||
|
else
|
||||||
|
timerbuffer = config.vote_autotransfer_interval
|
||||||
|
sleep(timerbuffer)
|
||||||
|
vote.autotransfer()
|
||||||
|
initialtpass = 1
|
||||||
|
votetimer()
|
||||||
|
|
||||||
|
|
||||||
/datum/controller/gameticker/proc/setup()
|
/datum/controller/gameticker/proc/setup()
|
||||||
//Create and announce mode
|
//Create and announce mode
|
||||||
if(master_mode=="secret")
|
if(master_mode=="secret")
|
||||||
@@ -119,6 +133,7 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
data_core.manifest()
|
data_core.manifest()
|
||||||
current_state = GAME_STATE_PLAYING
|
current_state = GAME_STATE_PLAYING
|
||||||
|
|
||||||
|
|
||||||
//here to initialize the random events nicely at round start
|
//here to initialize the random events nicely at round start
|
||||||
setup_economy()
|
setup_economy()
|
||||||
|
|
||||||
@@ -153,6 +168,7 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
spawn(3000)
|
spawn(3000)
|
||||||
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE
|
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE
|
||||||
|
|
||||||
|
votetimer()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/controller/gameticker
|
/datum/controller/gameticker
|
||||||
|
|||||||
Reference in New Issue
Block a user