mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Makes the autotransfer subsystem a bit more optional.
This commit is contained in:
@@ -82,7 +82,9 @@
|
|||||||
config_entry_value = 600
|
config_entry_value = 600
|
||||||
min_val = 0
|
min_val = 0
|
||||||
|
|
||||||
/datum/config_entry/number/vote_autotransfer_initial //length of time before the first autotransfer vote is called (deciseconds, default 2 hours)
|
/// Length of time before the first autotransfer vote is called (deciseconds, default 2 hours)
|
||||||
|
/// Set to 0 to disable the subsystem altogether.
|
||||||
|
/datum/config_entry/number/vote_autotransfer_initial
|
||||||
config_entry_value = 72000
|
config_entry_value = 72000
|
||||||
min_val = 0
|
min_val = 0
|
||||||
|
|
||||||
@@ -90,7 +92,7 @@
|
|||||||
config_entry_value = 18000
|
config_entry_value = 18000
|
||||||
min_val = 0
|
min_val = 0
|
||||||
|
|
||||||
/datum/config_entry/number/vote_autotransfer_maximum // maximum extensions until the round autoends
|
/datum/config_entry/number/vote_autotransfer_maximum // maximum extensions until the round autoends, set to 0 to disable.
|
||||||
config_entry_value = 4
|
config_entry_value = 4
|
||||||
min_val = 0
|
min_val = 0
|
||||||
|
|
||||||
|
|||||||
@@ -7,18 +7,27 @@ SUBSYSTEM_DEF(autotransfer)
|
|||||||
var/targettime
|
var/targettime
|
||||||
var/voteinterval
|
var/voteinterval
|
||||||
var/maxvotes
|
var/maxvotes
|
||||||
var/curvotes
|
var/curvotes = 0
|
||||||
|
|
||||||
/datum/controller/subsystem/autotransfer/Initialize(timeofday)
|
/datum/controller/subsystem/autotransfer/Initialize(timeofday)
|
||||||
|
var/init_vote = CONFIG_GET(number/vote_autotransfer_initial)
|
||||||
|
if(init_vote == 0) //Autotransfer voting disabled.
|
||||||
|
can_fire = FALSE
|
||||||
|
return ..()
|
||||||
starttime = world.time
|
starttime = world.time
|
||||||
targettime = starttime + CONFIG_GET(number/vote_autotransfer_initial)
|
targettime = starttime + init_vote
|
||||||
voteinterval = CONFIG_GET(number/vote_autotransfer_interval)
|
voteinterval = CONFIG_GET(number/vote_autotransfer_interval)
|
||||||
maxvotes = CONFIG_GET(number/vote_autotransfer_maximum)
|
maxvotes = CONFIG_GET(number/vote_autotransfer_maximum)
|
||||||
curvotes = 0
|
curvotes = 0
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/datum/controller/subsystem/autotransfer/Recover()
|
||||||
|
starttime = SSautotransfer.starttime
|
||||||
|
voteinterval = SSautotransfer.voteinterval
|
||||||
|
curvotes = SSautotransfer.curvotes
|
||||||
|
|
||||||
/datum/controller/subsystem/autotransfer/fire()
|
/datum/controller/subsystem/autotransfer/fire()
|
||||||
if(maxvotes > curvotes)
|
if(!maxvotes || maxvotes > curvotes)
|
||||||
if(world.time > targettime)
|
if(world.time > targettime)
|
||||||
SSvote.initiate_vote("transfer","server")
|
SSvote.initiate_vote("transfer","server")
|
||||||
targettime = targettime + voteinterval
|
targettime = targettime + voteinterval
|
||||||
|
|||||||
@@ -17,9 +17,10 @@
|
|||||||
penalty += roundstart_quit_limit - world.time
|
penalty += roundstart_quit_limit - world.time
|
||||||
if(penalty)
|
if(penalty)
|
||||||
penalty += world.realtime
|
penalty += world.realtime
|
||||||
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
if(SSautotransfer.can_fire && SSautotransfer.max_votes)
|
||||||
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
||||||
penalty = CANT_REENTER_ROUND
|
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
||||||
|
penalty = CANT_REENTER_ROUND
|
||||||
if(!(M.ckey in timeouts))
|
if(!(M.ckey in timeouts))
|
||||||
timeouts += M.ckey
|
timeouts += M.ckey
|
||||||
timeouts[M.ckey] = 0
|
timeouts[M.ckey] = 0
|
||||||
|
|||||||
@@ -292,9 +292,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES
|
var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES
|
||||||
if(world.time < roundstart_quit_limit)
|
if(world.time < roundstart_quit_limit)
|
||||||
penalty += roundstart_quit_limit - world.time
|
penalty += roundstart_quit_limit - world.time
|
||||||
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
if(SSautotransfer.can_fire && SSautotransfer.max_votes)
|
||||||
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
||||||
penalty = CANT_REENTER_ROUND
|
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
||||||
|
penalty = CANT_REENTER_ROUND
|
||||||
|
|
||||||
if(SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, (stat == DEAD) ? TRUE : FALSE, FALSE, (stat == DEAD)? penalty : 0, (stat == DEAD)? TRUE : FALSE) & COMPONENT_BLOCK_GHOSTING)
|
if(SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, (stat == DEAD) ? TRUE : FALSE, FALSE, (stat == DEAD)? penalty : 0, (stat == DEAD)? TRUE : FALSE) & COMPONENT_BLOCK_GHOSTING)
|
||||||
return
|
return
|
||||||
@@ -327,9 +328,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
|||||||
var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES
|
var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES
|
||||||
if(world.time < roundstart_quit_limit)
|
if(world.time < roundstart_quit_limit)
|
||||||
penalty += roundstart_quit_limit - world.time
|
penalty += roundstart_quit_limit - world.time
|
||||||
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
if(SSautotransfer.can_fire && SSautotransfer.max_votes)
|
||||||
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
var/maximumRoundEnd = SSautotransfer.starttime + SSautotransfer.voteinterval * SSautotransfer.maxvotes
|
||||||
penalty = CANT_REENTER_ROUND
|
if(penalty - SSshuttle.realtimeofstart > maximumRoundEnd + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime)
|
||||||
|
penalty = CANT_REENTER_ROUND
|
||||||
|
|
||||||
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
|
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
|
||||||
if(response != "Ghost")
|
if(response != "Ghost")
|
||||||
|
|||||||
@@ -185,12 +185,13 @@ VOTE_DELAY 6000
|
|||||||
VOTE_PERIOD 600
|
VOTE_PERIOD 600
|
||||||
|
|
||||||
## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes)
|
## autovote initial delay (deciseconds) before first automatic transfer vote call (default 120 minutes)
|
||||||
|
## Set to 0 to disable the subsystem altogether.
|
||||||
VOTE_AUTOTRANSFER_INITIAL 72000
|
VOTE_AUTOTRANSFER_INITIAL 72000
|
||||||
|
|
||||||
## autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes)
|
## autovote delay (deciseconds) before sequential automatic transfer votes are called (default 30 minutes)
|
||||||
VOTE_AUTOTRANSFER_INTERVAL 18000
|
VOTE_AUTOTRANSFER_INTERVAL 18000
|
||||||
|
|
||||||
## autovote maximum votes until automatic transfer call (default 4)
|
## autovote maximum votes until automatic transfer call, set to 0 to disable. (default 4)
|
||||||
VOTE_AUTOTRANSFER_MAXIMUM 4
|
VOTE_AUTOTRANSFER_MAXIMUM 4
|
||||||
|
|
||||||
## prevents dead players from voting or starting votes
|
## prevents dead players from voting or starting votes
|
||||||
|
|||||||
Reference in New Issue
Block a user