Merge pull request #683 from Jay-Sparrow/Dynamic2

Anonymous voting
This commit is contained in:
Dahlular
2020-11-14 18:25:17 -07:00
committed by GitHub
4 changed files with 10 additions and 7 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
#define DYNAMIC_DEFAULT_CHAOS 1.5 //The default chaos value for low pop low vote rounds
#define DYNAMIC_DEFAULT_CHAOS 1.0 //The default chaos value for low pop low vote rounds
#define DYNAMIC_VOTE_NORMALIZATION 5 //If there are fewer than this many votes, the average will be skewed towards the default
SUBSYSTEM_DEF(vote)
@@ -158,7 +158,7 @@ SUBSYSTEM_DEF(vote)
. = (total / v)
if(total == 0)//If statements down the road break if total is allowed to be 0 and it defaults to normal extended.
. = 0.1
text += "\n<b>Chaos level [obfuscated ? "???" : .]</b>"
text += "\n<b>Chaos level [.]</b>"
if(mode != "custom" && mode != "dynamic")
if(winners.len > 1 && !obfuscated) //CIT CHANGE - adds obfuscated votes
@@ -285,6 +285,7 @@ SUBSYSTEM_DEF(vote)
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
choices.Add("secret", "extended")
if("dynamic")
obfuscated = TRUE
choices.Add("0","1","2","3","4","5")
if("custom")
question = stripped_input(usr,"What is the vote for?")
+4 -3
View File
@@ -125,9 +125,10 @@ GLOBAL_VAR_INIT(dynamic_chaos_level, 1.5)
/datum/game_mode/dynamic/admin_panel()
var/list/dat = list("<html><head><title>Game Mode Panel</title></head><body><h1><B>Game Mode Panel</B></h1>")
dat += "Dynamic Mode <a href='?_src_=vars;[HrefToken()];Vars=[REF(src)]'>\[VV\]</A><BR>"
dat += "Threat Level: <b>[threat_level]</b><br/>"
dat += "Threat to Spend: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "Chaos Level: <b>[GLOB.dynamic_chaos_level]</b><br/>"
//dat += "Threat Level: <b>[threat_level]</b><br/>"
//dat += "Threat to Spend: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "Threat Level: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
dat += "<br/>"
dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
//dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
@@ -290,7 +290,7 @@
requirements = list(10,10,10,10,10,10,10,10,10,10)
high_population_requirement = 10
chaos_min = 0.1
chaos_max = 2.5
chaos_max = 2.0
admin_required = TRUE
//vars for execution
var/list/mob/living/carbon/human/lewd_candidates = list()
@@ -591,6 +591,7 @@
/datum/dynamic_ruleset/midround/from_ghosts/nightmare
name = "Nightmare"
antag_datum = /datum/antagonist/nightmare
controller = /datum/round_event_control/nightmare
antag_flag = "Nightmare"
antag_flag_override = ROLE_ALIEN
enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
@@ -81,7 +81,7 @@
requirements = list(10,10,10,10,10,10,10,10,10,10)
high_population_requirement = 10
chaos_min = 0.1
chaos_max = 2.5
chaos_max = 2.0
admin_required = TRUE
//vars for execution
var/list/mob/living/carbon/human/lewd_candidates = list()