Merge pull request #9844 from Putnam3145/dynamic-midround-wizard-tweak
Dynamic summon events tweaks
This commit is contained in:
@@ -283,6 +283,7 @@
|
|||||||
/datum/dynamic_ruleset/midround/from_ghosts/wizard
|
/datum/dynamic_ruleset/midround/from_ghosts/wizard
|
||||||
name = "Wizard"
|
name = "Wizard"
|
||||||
config_tag = "midround_wizard"
|
config_tag = "midround_wizard"
|
||||||
|
persistent = TRUE
|
||||||
antag_datum = /datum/antagonist/wizard
|
antag_datum = /datum/antagonist/wizard
|
||||||
antag_flag = ROLE_WIZARD
|
antag_flag = ROLE_WIZARD
|
||||||
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
|
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
|
||||||
@@ -293,6 +294,7 @@
|
|||||||
requirements = list(90,90,70,50,50,50,50,40,30,30)
|
requirements = list(90,90,70,50,50,50,50,40,30,30)
|
||||||
high_population_requirement = 30
|
high_population_requirement = 30
|
||||||
repeatable = TRUE
|
repeatable = TRUE
|
||||||
|
var/datum/mind/wizard
|
||||||
|
|
||||||
/datum/dynamic_ruleset/midround/from_ghosts/wizard/ready(forced = FALSE)
|
/datum/dynamic_ruleset/midround/from_ghosts/wizard/ready(forced = FALSE)
|
||||||
if (required_candidates > (dead_players.len + list_observers.len))
|
if (required_candidates > (dead_players.len + list_observers.len))
|
||||||
@@ -307,6 +309,20 @@
|
|||||||
..()
|
..()
|
||||||
new_character.forceMove(pick(GLOB.wizardstart))
|
new_character.forceMove(pick(GLOB.wizardstart))
|
||||||
|
|
||||||
|
/datum/dynamic_ruleset/midround/from_ghosts/wizard/rule_process() // i can literally copy this from are_special_antags_dead it's great
|
||||||
|
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
for(var/obj/item/phylactery/P in GLOB.poi_list) //TODO : IsProperlyDead()
|
||||||
|
if(P.mind && P.mind.has_antag_datum(/datum/antagonist/wizard))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if(SSevents.wizardmode) //If summon events was active, turn it off
|
||||||
|
SSevents.toggleWizardmode()
|
||||||
|
SSevents.resetFrequency()
|
||||||
|
|
||||||
|
return RULESET_STOP_PROCESSING
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
// //
|
// //
|
||||||
// NUCLEAR OPERATIVES (MIDROUND) //
|
// NUCLEAR OPERATIVES (MIDROUND) //
|
||||||
|
|||||||
@@ -149,6 +149,7 @@
|
|||||||
/datum/dynamic_ruleset/roundstart/wizard
|
/datum/dynamic_ruleset/roundstart/wizard
|
||||||
name = "Wizard"
|
name = "Wizard"
|
||||||
config_tag = "wizard"
|
config_tag = "wizard"
|
||||||
|
persistent = TRUE
|
||||||
antag_flag = ROLE_WIZARD
|
antag_flag = ROLE_WIZARD
|
||||||
antag_datum = /datum/antagonist/wizard
|
antag_datum = /datum/antagonist/wizard
|
||||||
minimum_required_age = 14
|
minimum_required_age = 14
|
||||||
@@ -183,8 +184,25 @@
|
|||||||
for(var/datum/mind/M in assigned)
|
for(var/datum/mind/M in assigned)
|
||||||
M.current.forceMove(pick(GLOB.wizardstart))
|
M.current.forceMove(pick(GLOB.wizardstart))
|
||||||
M.add_antag_datum(new antag_datum())
|
M.add_antag_datum(new antag_datum())
|
||||||
|
roundstart_wizards += M
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
/datum/dynamic_ruleset/roundstart/wizard/rule_process() // i can literally copy this from are_special_antags_dead it's great
|
||||||
|
for(var/datum/mind/wizard in roundstart_wizards)
|
||||||
|
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
for(var/obj/item/phylactery/P in GLOB.poi_list) //TODO : IsProperlyDead()
|
||||||
|
if(P.mind && P.mind.has_antag_datum(/datum/antagonist/wizard))
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if(SSevents.wizardmode) //If summon events was active, turn it off
|
||||||
|
SSevents.toggleWizardmode()
|
||||||
|
SSevents.resetFrequency()
|
||||||
|
|
||||||
|
return RULESET_STOP_PROCESSING
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
// //
|
// //
|
||||||
// BLOOD CULT //
|
// BLOOD CULT //
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
/datum/round_event_control/wizard
|
/datum/round_event_control/wizard
|
||||||
wizardevent = 1
|
wizardevent = 1
|
||||||
|
var/can_be_midround_wizard = TRUE
|
||||||
|
|
||||||
// Checks if the event can be spawned. Used by event controller and "false alarm" event.
|
// Checks if the event can be spawned. Used by event controller and "false alarm" event.
|
||||||
// Admin-created events override this.
|
// Admin-created events override this.
|
||||||
@@ -54,6 +55,13 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
/datum/round_event_control/wizard/canSpawnEvent(var/players_amt, var/gamemode)
|
||||||
|
if(istype(SSticker.mode, /datum/game_mode/dynamic))
|
||||||
|
var/var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||||
|
if (locate(/datum/dynamic_ruleset/midround/from_ghosts/wizard) in mode.executed_rules)
|
||||||
|
return can_be_midround_wizard && ..()
|
||||||
|
return ..()
|
||||||
|
|
||||||
/datum/round_event_control/proc/preRunEvent()
|
/datum/round_event_control/proc/preRunEvent()
|
||||||
if(!ispath(typepath, /datum/round_event))
|
if(!ispath(typepath, /datum/round_event))
|
||||||
return EVENT_CANT_RUN
|
return EVENT_CANT_RUN
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
typepath = /datum/round_event/wizard/cursed_items
|
typepath = /datum/round_event/wizard/cursed_items
|
||||||
max_occurrences = 3
|
max_occurrences = 3
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE
|
||||||
|
|
||||||
//Note about adding items to this: Because of how NODROP_1 works if an item spawned to the hands can also be equiped to a slot
|
//Note about adding items to this: Because of how NODROP_1 works if an item spawned to the hands can also be equiped to a slot
|
||||||
//it will be able to be put into that slot from the hand, but then get stuck there. To avoid this make a new subtype of any
|
//it will be able to be put into that slot from the hand, but then get stuck there. To avoid this make a new subtype of any
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
typepath = /datum/round_event/wizard/deprevolt
|
typepath = /datum/round_event/wizard/deprevolt
|
||||||
max_occurrences = 1
|
max_occurrences = 1
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE // not removing it completely yet
|
||||||
|
|
||||||
/datum/round_event/wizard/deprevolt/start()
|
/datum/round_event/wizard/deprevolt/start()
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
typepath = /datum/round_event/wizard/race
|
typepath = /datum/round_event/wizard/race
|
||||||
max_occurrences = 5
|
max_occurrences = 5
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE
|
||||||
|
|
||||||
/datum/round_event/wizard/race
|
/datum/round_event/wizard/race
|
||||||
var/list/stored_name
|
var/list/stored_name
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
typepath = /datum/round_event/wizard/shuffleloc
|
typepath = /datum/round_event/wizard/shuffleloc
|
||||||
max_occurrences = 5
|
max_occurrences = 5
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE // not removing it completely yet
|
||||||
|
|
||||||
/datum/round_event/wizard/shuffleloc/start()
|
/datum/round_event/wizard/shuffleloc/start()
|
||||||
var/list/moblocs = list()
|
var/list/moblocs = list()
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
typepath = /datum/round_event/wizard/shufflenames
|
typepath = /datum/round_event/wizard/shufflenames
|
||||||
max_occurrences = 5
|
max_occurrences = 5
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE // not removing it completely yet
|
||||||
|
|
||||||
/datum/round_event/wizard/shufflenames/start()
|
/datum/round_event/wizard/shufflenames/start()
|
||||||
var/list/mobnames = list()
|
var/list/mobnames = list()
|
||||||
@@ -77,6 +79,7 @@
|
|||||||
typepath = /datum/round_event/wizard/shuffleminds
|
typepath = /datum/round_event/wizard/shuffleminds
|
||||||
max_occurrences = 3
|
max_occurrences = 3
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE // not removing it completely yet
|
||||||
|
|
||||||
/datum/round_event/wizard/shuffleminds/start()
|
/datum/round_event/wizard/shuffleminds/start()
|
||||||
var/list/mobs = list()
|
var/list/mobs = list()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
typepath = /datum/round_event/wizard/summonguns
|
typepath = /datum/round_event/wizard/summonguns
|
||||||
max_occurrences = 1
|
max_occurrences = 1
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE // not removing it completely yet
|
||||||
|
|
||||||
/datum/round_event_control/wizard/summonguns/New()
|
/datum/round_event_control/wizard/summonguns/New()
|
||||||
if(CONFIG_GET(flag/no_summon_guns))
|
if(CONFIG_GET(flag/no_summon_guns))
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
typepath = /datum/round_event/wizard/summonmagic
|
typepath = /datum/round_event/wizard/summonmagic
|
||||||
max_occurrences = 1
|
max_occurrences = 1
|
||||||
earliest_start = 0 MINUTES
|
earliest_start = 0 MINUTES
|
||||||
|
can_be_midround_wizard = FALSE // not removing it completely yet
|
||||||
|
|
||||||
/datum/round_event_control/wizard/summonmagic/New()
|
/datum/round_event_control/wizard/summonmagic/New()
|
||||||
if(CONFIG_GET(flag/no_summon_magic))
|
if(CONFIG_GET(flag/no_summon_magic))
|
||||||
|
|||||||
Reference in New Issue
Block a user