From 16296dd21ae54b3d52e7d07556d98f025d79ffb3 Mon Sep 17 00:00:00 2001 From: dwasint <82520990+dwasint@users.noreply.github.com> Date: Fri, 1 Dec 2023 19:37:57 -0500 Subject: [PATCH] this is making me so fucking agitated --- code/controllers/subsystem/vote.dm | 4 +++- code/datums/votes/_vote_datum.dm | 4 ++++ monkestation/code/modules/goonimizations/shuttle_votes.dm | 6 ++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 787748405aaa..7de488589ae2 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -206,7 +206,9 @@ SUBSYSTEM_DEF(vote) if(vote_initiator) to_chat(vote_initiator, span_warning("Invalid voting choice.")) return FALSE - + + if(!to_vote.player_startable) + return FALSE // Vote can't be initiated in our circumstances? No vote if(!to_vote.can_be_initiated(vote_initiator, unlimited_vote_power)) return FALSE diff --git a/code/datums/votes/_vote_datum.dm b/code/datums/votes/_vote_datum.dm index e4de78af5b53..7721184184d7 100644 --- a/code/datums/votes/_vote_datum.dm +++ b/code/datums/votes/_vote_datum.dm @@ -33,6 +33,8 @@ /// Multipliers donators get for this vote type var/donator_multiplier = 0 + // can we start this vote by a player + var/player_startable = TRUE /** * Used to determine if this vote is a possible @@ -78,6 +80,8 @@ */ /datum/vote/proc/can_be_initiated(mob/by_who, forced = FALSE) SHOULD_CALL_PARENT(TRUE) + if(!player_startable) + return FALSE if(started_time) var/next_allowed_time = (started_time + CONFIG_GET(number/vote_delay)) diff --git a/monkestation/code/modules/goonimizations/shuttle_votes.dm b/monkestation/code/modules/goonimizations/shuttle_votes.dm index 74ea8cfb01a7..d98ea004c9d4 100644 --- a/monkestation/code/modules/goonimizations/shuttle_votes.dm +++ b/monkestation/code/modules/goonimizations/shuttle_votes.dm @@ -28,6 +28,8 @@ SUBSYSTEM_DEF(autotransfer) /datum/vote/shuttle_call name = "Call Shuttle" message = "Should we go home?!" + default_choices = list("Yes", "No") + player_startable = FALSE /datum/vote/shuttle_call/can_be_initiated(mob/by_who, forced = FALSE) . = ..() @@ -58,10 +60,6 @@ SUBSYSTEM_DEF(autotransfer) if(length(GLOB.player_list) < 25) return FALSE -/datum/vote/shuttle_call/New() - . = ..() - default_choices = list("Yes", "No") - /datum/vote/shuttle_call/finalize_vote(winning_option) if(SSautotransfer.called)