Skip to content

Commit

Permalink
this is making me so fucking agitated
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasint committed Dec 2, 2023
1 parent 5146015 commit 16296dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions code/datums/votes/_vote_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
6 changes: 2 additions & 4 deletions monkestation/code/modules/goonimizations/shuttle_votes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 16296dd

Please sign in to comment.