mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-10 15:36:56 +01:00
Revert "Dynamic Mode"
Gotta remove some config files
This commit is contained in:
@@ -364,5 +364,3 @@
|
||||
/datum/config_entry/number/auto_transfer_delay
|
||||
config_entry_value = 72000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/dynamic_mode
|
||||
@@ -52,8 +52,6 @@ SUBSYSTEM_DEF(events)
|
||||
//decides which world.time we should select another random event at.
|
||||
/datum/controller/subsystem/events/proc/reschedule()
|
||||
scheduled = world.time + rand(frequency_lower, max(frequency_lower,frequency_upper))
|
||||
if(GLOB.master_mode == "dynamic")
|
||||
scheduled = INFINITY //HYPER CHANGE - Easy way to bypass the basic event handler.
|
||||
|
||||
//selects a random event based on whether it can occur and it's 'weight'(probability)
|
||||
/datum/controller/subsystem/events/proc/spawnEvent()
|
||||
|
||||
@@ -478,12 +478,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(SSticker.timeLeft < 900)
|
||||
SSticker.timeLeft = 900
|
||||
SSticker.modevoted = TRUE
|
||||
var/dynamic = CONFIG_GET(flag/dynamic_mode) //WORK DAMN YOU
|
||||
//var/dynamic = TRUE //FUCK IT
|
||||
if(!dynamic)
|
||||
SSvote.initiate_vote("roundtype","server",TRUE)
|
||||
else
|
||||
SSvote.initiate_vote("dynamic","server",TRUE)
|
||||
SSvote.initiate_vote("roundtype","server",TRUE)
|
||||
|
||||
/datum/controller/subsystem/ticker/Recover()
|
||||
current_state = SSticker.current_state
|
||||
|
||||
@@ -53,23 +53,11 @@ SUBSYSTEM_DEF(vote)
|
||||
//get the highest number of votes
|
||||
var/greatest_votes = 0
|
||||
var/total_votes = 0
|
||||
|
||||
//Catch for dynamic vote. We want to return all the votes.
|
||||
if(mode == "dynamic")
|
||||
return choices //Just return everything to handle
|
||||
/*
|
||||
. = list()
|
||||
for(var/option in choices)
|
||||
. += option
|
||||
return .
|
||||
*/
|
||||
else
|
||||
for (var/option in choices)
|
||||
var/votes = choices[option]
|
||||
total_votes += votes
|
||||
if(votes > greatest_votes)
|
||||
greatest_votes = votes
|
||||
|
||||
for(var/option in choices)
|
||||
var/votes = choices[option]
|
||||
total_votes += votes
|
||||
if(votes > greatest_votes)
|
||||
greatest_votes = votes
|
||||
//default-vote for everyone who didn't vote
|
||||
if(!CONFIG_GET(flag/default_no_vote) && choices.len)
|
||||
var/list/non_voters = GLOB.directory.Copy()
|
||||
@@ -119,43 +107,7 @@ SUBSYSTEM_DEF(vote)
|
||||
if(was_roundtype_vote)
|
||||
stored_gamemode_votes[choices[i]] = votes
|
||||
text += "\n<b>[choices[i]]:</b> [obfuscated ? "???" : votes]" //CIT CHANGE - adds obfuscated votes
|
||||
|
||||
//Dynamic mode
|
||||
if(mode == "dynamic")
|
||||
text = "\n<b> Dynamic Chaos Vote: </b>"
|
||||
var/numbers = list()
|
||||
var/v = 0
|
||||
for (var/option in winners) //Everyone is a winner in aggregate vote
|
||||
//We returned choices, which is now winners. So syntax and variables gets a little weird here.
|
||||
switch(option) //If there is a proc for string to digits, I couldn't find it. Might clean this later.
|
||||
if("0")
|
||||
v += winners[option] //Add the number votes to the pool
|
||||
numbers += (winners[option]*0) //Add the value of the vote to numbers
|
||||
if("1")
|
||||
v += winners[option] //Add the number votes to the pool
|
||||
numbers += (winners[option]*1) //Add the value of the vote to numbers
|
||||
if("2")
|
||||
v += winners[option] //Add the number votes to the pool
|
||||
numbers += (winners[option]*2) //Add the value of the vote to numbers
|
||||
if("3")
|
||||
v += winners[option] //Add the number votes to the pool
|
||||
numbers += (winners[option]*3) //Add the value of the vote to numbers
|
||||
if("4")
|
||||
v += winners[option] //Add the number votes to the pool
|
||||
numbers += (winners[option]*4) //Add the value of the vote to numbers
|
||||
if("5")
|
||||
v += winners[option] //Add the number votes to the pool
|
||||
numbers += (winners[option]*5) //Add the value of the vote to numbers
|
||||
if (v == 0)
|
||||
. = 2.5 //Default no vote value. Will change to define later
|
||||
else
|
||||
var/total = 0
|
||||
for (var/i in numbers)
|
||||
total += i
|
||||
. = (total / v)
|
||||
text += "\n<b>Chaos level [obfuscated ? "???" : .]</b>"
|
||||
|
||||
if(mode != "custom" && mode != "dynamic")
|
||||
if(mode != "custom")
|
||||
if(winners.len > 1 && !obfuscated) //CIT CHANGE - adds obfuscated votes
|
||||
text = "\n<b>Vote Tied Between:</b>"
|
||||
for(var/option in winners)
|
||||
@@ -189,9 +141,6 @@ SUBSYSTEM_DEF(vote)
|
||||
SSticker.save_mode(.)
|
||||
message_admins("The gamemode has been voted for, and has been changed to: [GLOB.master_mode]")
|
||||
log_admin("Gamemode has been voted for and switched to: [GLOB.master_mode].")
|
||||
if("dynamic")
|
||||
GLOB.master_mode = "dynamic"
|
||||
GLOB.dynamic_chaos_level = .
|
||||
if("restart")
|
||||
if(. == "Restart Round")
|
||||
restart = 1
|
||||
@@ -279,8 +228,6 @@ SUBSYSTEM_DEF(vote)
|
||||
choices.Add("Initiate Crew Transfer","Continue Playing") // austation end
|
||||
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
|
||||
choices.Add("secret", "extended")
|
||||
if("dynamic")
|
||||
choices.Add("0","1","2","3","4","5")
|
||||
if("custom")
|
||||
question = stripped_input(usr,"What is the vote for?")
|
||||
if(!question)
|
||||
|
||||
Reference in New Issue
Block a user