diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 974a0c0e88..f1db37d9fa 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -371,19 +371,18 @@ for(var/T in storyteller_cache) var/datum/dynamic_storyteller/S = T var/config_tag = initial(S.config_tag) - var/final_weight = initial(S.weight) - if(probabilities[config_tag]<=0) + var/probability = (config_tag in probabilities) ? probabilities[config_tag] : initial(S.weight) + if(probability <= 0) continue - final_weight = probabilities[config_tag] - if(SSpersistence.saved_storytellers.len == 3 && repeated_mode_adjust.len == 3) + if(SSpersistence.saved_storytellers.len == repeated_mode_adjust.len) var/name = initial(S.name) var/recent_round = min(SSpersistence.saved_storytellers.Find(name),3) var/adjustment = 0 while(recent_round) adjustment += repeated_mode_adjust[recent_round] recent_round = SSpersistence.saved_modes.Find(name,recent_round+1,0) - final_weight *= ((100-adjustment)/100) - runnable_storytellers[S] = final_weight + probability *= ((100-adjustment)/100) + runnable_storytellers[S] = probability return runnable_storytellers diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 20e0d647c5..a5e3c9e706 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -370,7 +370,7 @@ SUBSYSTEM_DEF(vote) var/list/runnable_storytellers = config.get_runnable_storytellers() for(var/T in runnable_storytellers) var/datum/dynamic_storyteller/S = T - runnable_storytellers[S] *= stored_gamemode_votes[initial(S.name)] + runnable_storytellers[S] *= round(stored_gamemode_votes[initial(S.name)]*100000,1) var/datum/dynamic_storyteller/S = pickweightAllowZero(runnable_storytellers) GLOB.dynamic_storyteller_type = S if("map")