Reduced vote to just extended vs calm vs chaos.

This commit is contained in:
Putnam
2019-11-06 00:07:52 -08:00
parent bb9b0ce312
commit 401bbbd8ab

View File

@@ -124,11 +124,8 @@ SUBSYSTEM_DEF(vote)
message_admins(admintext)
return .
#define PEACE2 "Very calm"
#define PEACE1 "Somewhat calm"
#define BALANCED "Balanced"
#define CHAOS1 "Somewhat chaotic"
#define CHAOS2 "Very chaotic"
#define PEACE "calm"
#define CHAOS "chaotic"
/datum/controller/subsystem/vote/proc/result()
. = announce_result()
@@ -157,14 +154,14 @@ SUBSYSTEM_DEF(vote)
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
GLOB.master_mode = "dynamic"
if(voted.len==0)
return message_admins("Nobody voted in the extended vote; using default dynamic settings.")
return message_admins("Nobody voted in the dynamic vote; using default dynamic settings.")
GLOB.dynamic_forced_extended = choices["extended"]/voted.len > 0.5
if(GLOB.dynamic_forced_extended)
return message_admins("Dynamic extended has been voted for.")
var/mean = (choices["extended"]*-2+choices[PEACE2]*-2+choices[PEACE1]*-1+choices[CHAOS1]*1+choices[CHAOS2]*2)/voted.len
var/variance=(((-2-mean)**2)*choices["extended"]+((-2-mean)**2)*choices[PEACE2]+((-1-mean)**2)*choices[PEACE1]+((0-mean)**2)*choices[BALANCED]+((1-mean)**2)*choices[CHAOS1]+((2-mean)**2)*choices[CHAOS2])/voted.len //Sorry. Im sorry. Im trying to remove it
GLOB.dynamic_curve_centre = mean*(5/2)
GLOB.dynamic_curve_width = max(variance,0.5)
var/mean = (choices["extended"]*-1+choices[PEACE]*-1+choices[CHAOS])/voted.len
GLOB.dynamic_curve_centre = mean*5
var/variance=(((-1-mean)**2)*choices["extended"]+((-1-mean)**2)*choices[PEACE]+((1-mean)**2)*choices[CHAOS])/voted.len //Sorry. Im sorry. Im trying to remove it
GLOB.dynamic_curve_width = CLAMP(variance*4,0.5,4)
message_admins("Dynamic curve centre set to [GLOB.dynamic_curve_centre] and width set to [GLOB.dynamic_curve_width]")
log_admin("Dynamic curve centre set to [GLOB.dynamic_curve_centre] and width set to [GLOB.dynamic_curve_width]")
if("map")
@@ -235,7 +232,7 @@ SUBSYSTEM_DEF(vote)
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
choices.Add("secret", "extended")
if("dynamic")
choices.Add("extended",PEACE2,PEACE1,BALANCED,CHAOS1,CHAOS2)
choices.Add("extended",PEACE,CHAOS)
if("custom")
question = stripped_input(usr,"What is the vote for?")
if(!question)