allows badmins to be midround badmins once again (#23245)

This commit is contained in:
Paul Ritter
2019-06-13 15:08:38 +02:00
committed by ShiftyRail
parent 1a69151b26
commit cee027c70b
2 changed files with 4 additions and 3 deletions

View File

@@ -391,7 +391,7 @@ var/stacking_limit = 90
return 1
return 0
/datum/gamemode/dynamic/proc/picking_specific_rule(var/ruletype,var/forced=0)//an experimental proc to allow admins to call rules on the fly or have rules call other rules
/datum/gamemode/dynamic/proc/picking_specific_rule(var/ruletype,var/forced=0,var/caller)//an experimental proc to allow admins to call rules on the fly or have rules call other rules
var/datum/dynamic_ruleset/midround/new_rule
if(ispath(ruletype))
new_rule = new ruletype()//you should only use it to call midround rules though.
@@ -400,6 +400,8 @@ var/stacking_limit = 90
else
message_admins("The specific ruleset failed beacuse a type other than a path or rule was sent.")
return
if(caller)
new_rule.calledBy = caller
update_playercounts()
var/list/current_players = list(CURRENT_LIVING_PLAYERS, CURRENT_LIVING_ANTAGS, CURRENT_DEAD_PLAYERS, CURRENT_OBSERVERS)
current_players[CURRENT_LIVING_PLAYERS] = living_players.Copy()

View File

@@ -1549,10 +1549,9 @@
var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in midround_rules
if (added_rule)
var/datum/gamemode/dynamic/mode = ticker.mode
midround_rules[added_rule].calledBy = "[key_name(usr)]"
log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
message_admins("[key_name(usr)] executed the [added_rule] ruleset.", 1)
mode.picking_specific_rule(midround_rules[added_rule],1)
mode.picking_specific_rule(midround_rules[added_rule],1,"[key_name(usr)]")
// -- Opens up the option window --
else if (href_list["f_dynamic_options"])