Skip to content

Commit

Permalink
Flexible ERT argument
Browse files Browse the repository at this point in the history
Fix CMB black market heat call
  • Loading branch information
Drulikar committed Feb 19, 2024
1 parent 1bc0fa5 commit e1bcb75
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
20 changes: 17 additions & 3 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,26 @@
return chosen_call

/datum/game_mode/proc/get_specific_call(call_name, quiet_launch = FALSE, announce_incoming = TRUE, info = "")
for(var/datum/emergency_call/E in all_calls) //Loop through all potential candidates
if(E.name == call_name)
var/datum/emergency_call/em_call = new E.type()
if(ispath(call_name, /datum/emergency_call))
var/datum/emergency_call/em_call = new call_name
em_call.objective_info = info
em_call.activate(quiet_launch, announce_incoming)
return

var/call_path = text2path(call_name)
if(ispath(call_path, /datum/emergency_call))
var/datum/emergency_call/em_call = new call_path
em_call.objective_info = info
em_call.activate(quiet_launch, announce_incoming)
return

for(var/datum/emergency_call/cur_em_call in all_calls) //Loop through all potential candidates
if(cur_em_call.name == call_name)
var/datum/emergency_call/em_call = new cur_em_call.type()
em_call.objective_info = info
em_call.activate(quiet_launch, announce_incoming)
return

error("get_specific_call could not find emergency call '[call_name]'")
return

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
continue

if(groundside_humans > (groundside_xenos * GROUNDSIDE_XENO_MULTIPLIER))
SSticker.mode.get_specific_call("Xenomorphs Groundside (Forsaken)", TRUE, FALSE)
SSticker.mode.get_specific_call(/datum/emergency_call/forsaken_xenos, TRUE, FALSE) // "Xenomorphs Groundside (Forsaken)"

TIMER_COOLDOWN_START(src, COOLDOWN_HIJACK_GROUND_CHECK, 1 MINUTES)

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
announce_xeno_wave(wave)
if(xeno_wave == 7)
//Wave when Marines get reinforcements!
get_specific_call("Marine Reinforcements (Squad)", FALSE, TRUE)
get_specific_call(/datum/emergency_call/wo, FALSE, TRUE) // "Marine Reinforcements (Squad)"
xeno_wave = min(xeno_wave + 1, WO_MAX_WAVE)


Expand Down
2 changes: 1 addition & 1 deletion code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())

/datum/controller/supply/proc/black_market_investigation()
black_market_heat = -1
SSticker.mode.get_specific_call("Inspection - Colonial Marshal Ledger Investigation Team", TRUE, TRUE)
SSticker.mode.get_specific_call(/datum/emergency_call/inspection_cmb/black_market, TRUE, TRUE) // "Inspection - Colonial Marshals Ledger Investigation Team"
log_game("Black Market Inspection auto-triggered.")

/obj/structure/machinery/computer/supplycomp/proc/is_buyable(datum/supply_packs/supply_pack)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_tech/techs/marine/tier3/cryo_spec.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

/datum/tech/cryomarine/on_unlock()
. = ..()
SSticker.mode.get_specific_call("Marine Cryo Reinforcement (Spec)", TRUE, FALSE)
SSticker.mode.get_specific_call(/datum/emergency_call/cryo_spec, TRUE, FALSE) // "Marine Cryo Reinforcement (Spec)"
2 changes: 1 addition & 1 deletion code/modules/cm_tech/techs/marine/tier3/cryorine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

/datum/tech/repeatable/cryomarine/on_unlock()
. = ..()
SSticker.mode.get_specific_call("Marine Cryo Reinforcements (Tech)", TRUE, FALSE)
SSticker.mode.get_specific_call(/datum/emergency_call/cryo_squad/tech, TRUE, FALSE) // "Marine Cryo Reinforcements (Tech)"
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry_properties/prop_special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
H.contract_disease(new /datum/disease/xeno_transformation(0),1) //This is the real reason PMCs are being sent to retrieve it.

/datum/chem_property/special/DNA_Disintegrating/trigger()
SSticker.mode.get_specific_call("Weyland-Yutani Goon (Chemical Investigation Squad)", TRUE, FALSE, holder.name)
SSticker.mode.get_specific_call(/datum/emergency_call/goon/chem_retrieval, TRUE, FALSE, holder.name) // "Weyland-Yutani Goon (Chemical Investigation Squad)"
GLOB.chemical_data.update_credits(10)
message_admins("The research department has discovered DNA_Disintegrating in [holder.name] adding 10 bonus tech points.")
var/datum/techtree/tree = GET_TREE(TREE_MARINE)
Expand Down

0 comments on commit e1bcb75

Please sign in to comment.