[MIRROR] Many new global signals from downstream (#12051)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-11-27 20:37:30 -07:00
committed by GitHub
parent 9c25b75d6c
commit 408eeaa5d1
15 changed files with 50 additions and 8 deletions

View File

@@ -29,7 +29,7 @@
#define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed"
/// Supply shuttle selling, before all items are sold, called by /datum/controller/subsystem/supply/proc/sell() : (/list/area/supply_shuttle_areas)
#define COMSIG_GLOB_SUPPLY_SHUTTLE_DEPART "!sell_supply_shuttle"
/// Supply shuttle selling, for each item sold, called by /datum/controller/subsystem/supply/proc/sell() : (atom/movable/sold_item, sold_successfully, datum/exported_crate/export_data, area/shuttle_subarea)
/// Supply shuttle selling, for each item sold, called by /datum/controller/subsystem/supply/proc/sell() : (atom/movable/sold_item, list/things_sold_successfully, datum/exported_crate/export_data, area/shuttle_subarea)
#define COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM "!supply_shuttle_sell_item"
/// Mind inserted into body: (mob/new_owner, /datum/mind/assigned_mind)
#define COMSIG_GLOB_RESLEEVED_MIND "!resleeved_mind_into_body"
@@ -45,6 +45,26 @@
#define COMSIG_GLOB_BORGIFY "!borgify_mob"
/// brain removed from body, called by /obj/item/organ/internal/brain/proc/transfer_identity() : (mob/living/carbon/brain/brainmob)
#define COMSIG_GLOB_BRAIN_REMOVED "!brain_removed_from_mob"
// base /decl/emote/proc/do_emote() : (mob/user, extra_params)
#define COMSIG_GLOB_EMOTE_PERFORMED "!emote_performed"
// base /proc/say_dead_direct() : (message)
#define COMSIG_GLOB_DEAD_SAY "!dead_say"
// base /turf/wash() : ()
#define COMSIG_GLOB_WASHED_FLOOR "!washed_floor"
// base /obj/machinery/artifact_harvester/proc/harvest() : (obj/item/anobattery/inserted_battery, mob/user)
#define COMSIG_GLOB_HARVEST_ARTIFACT "!harvest_artifact"
// upon harvesting a slime's extract : (obj/item/slime_extract/newly_made_core)
#define COMSIG_GLOB_HARVEST_SLIME_CORE "!harvest_slime_core"
// base /datum/recipe/proc/make_food() : (obj/container, list/results)
#define COMSIG_GLOB_FOOD_PREPARED "!recipe_food_completed"
// base /datum/construction/proc/spawn_result() : (/obj/mecha/result_mech)
#define COMSIG_GLOB_MECH_CONSTRUCTED "!mecha_constructed"
// when trashpiles are successfully searched : (mob/living/user, list/searched_by)
#define COMSIG_GLOB_TRASHPILE_SEARCHED "!trash_pile_searched"
// base /obj/item/autopsy_scanner/do_surgery() : (mob/user, mob/target)
#define COMSIG_GLOB_AUTOPSY_PERFORMED "!performed_autopsy"
// upon forensics swap or sample kit forensics collection : (atom/target, mob/user)
#define COMSIG_GLOB_FORENSICS_COLLECTED "!performed_forensics_collection"
/// signals from globally accessible objects
@@ -813,6 +833,11 @@
///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
#define COMSIG_GIBS_STREAK "gibs_streak"
//Autopsy
//from base of /obj/item/autopsy_scanner/do_surgery() : (mob/user, mob/target)
#define COMSIG_AUTOPSY_PERFORMED "performed_autopsy"
//Mood
///called when you send a mood event from anywhere in the code.

View File

@@ -80,7 +80,7 @@ SUBSYSTEM_DEF(supply)
var/base_value = 0
// Most items must be in a crate!
var/sold_successfully = FALSE
var/list/things_sold_successfully = list()
if(istype(MA,/obj/structure/closet/crate))
var/obj/structure/closet/crate/CR = MA
@@ -90,12 +90,14 @@ SUBSYSTEM_DEF(supply)
// For each thing in the crate, get the value and quantity
for(var/atom/A in CR)
sold_successfully = SEND_SIGNAL(A,COMSIG_ITEM_SOLD,EC,TRUE)
if(SEND_SIGNAL(A,COMSIG_ITEM_SOLD,EC,TRUE))
things_sold_successfully += A
else
// Selling things that are not in crates.
// Usually it just makes a log that it wasn't shipped properly, and so isn't worth anything
sold_successfully = SEND_SIGNAL(MA,COMSIG_ITEM_SOLD,EC,FALSE)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM, MA, sold_successfully, EC, subarea)
if(SEND_SIGNAL(MA,COMSIG_ITEM_SOLD,EC,FALSE))
things_sold_successfully += MA
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_SUPPLY_SHUTTLE_SELL_ITEM, MA, things_sold_successfully, EC, subarea)
exported_crates += EC
points += EC.value

View File

@@ -74,7 +74,7 @@
/datum/construction/proc/spawn_result()
if(result)
new result(get_turf(holder))
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MECH_CONSTRUCTED, new result(get_turf(holder)))
spawn()
qdel(holder)
return

View File

@@ -180,5 +180,7 @@
M.visible_message(span_infoplain(span_bold("\The [user]") + " scans the wounds on [M]'s [S.name] with [src]"))
src.add_data(S)
SEND_SIGNAL(src,COMSIG_AUTOPSY_PERFORMED, user, M)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_AUTOPSY_PERFORMED, user, M)
return 1

View File

@@ -47,6 +47,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
busy = TRUE
if(do_after(user, rand(4 SECONDS,6 SECONDS), target = src))
SEND_SIGNAL(src,COMSIG_LOOT_REWARD,L,searchedby)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_TRASHPILE_SEARCHED,L,searchedby)
busy = FALSE
else
return ..()

View File

@@ -129,6 +129,7 @@
to_chat(user,span_danger("Some sort of creature leaps out of \the [src]!"))
else
SEND_SIGNAL(src,COMSIG_LOOT_REWARD,user,searchedby, 5)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_TRASHPILE_SEARCHED,user,searchedby)
busy = FALSE
else
return ..()

View File

@@ -520,6 +520,8 @@
if(istype(src, /turf/simulated))
var/turf/simulated/T = src
if(T.dirt > 0)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_WASHED_FLOOR)
T.dirt = 0
for(var/am in src)

View File

@@ -137,6 +137,7 @@
/obj/item/forensics/sample_kit/proc/take_sample(var/mob/user, var/atom/supplied)
var/obj/item/sample/S = new evidence_path(get_turf(user), supplied)
to_chat(user, span_notice("You transfer [S.evidence.len] [S.evidence.len > 1 ? "[evidence_type]s" : "[evidence_type]"] to \the [S]."))
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_FORENSICS_COLLECTED, supplied, user)
/obj/item/forensics/sample_kit/afterattack(var/atom/A, var/mob/user, var/proximity)
if(!proximity)

View File

@@ -114,6 +114,7 @@
if(sample_type)
user.visible_message("\The [user] swabs \the [A] for a sample.", "You swab \the [A] for a sample.")
set_used(sample_type, A)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_FORENSICS_COLLECTED, A, user)
/obj/item/forensics/swab/proc/set_used(var/sample_str, var/atom/source)
name = "[initial(name)] ([sample_str] - [source])"

View File

@@ -147,6 +147,7 @@
do_extra(user, target)
do_sound(user)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_EMOTE_PERFORMED, user, extra_params)
/decl/emote/proc/replace_target_tokens(var/msg, var/atom/target)
. = msg

View File

@@ -270,6 +270,8 @@
result_obj.reagents.trans_to(holder, result_obj.reagents.total_volume)
tally++
if(results.len)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_FOOD_PREPARED, container, results)
switch(reagent_mix)
if (RECIPE_REAGENT_REPLACE)

View File

@@ -470,6 +470,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(subject && subject.forbid_seeing_deadchat && !check_rights_for(subject.client, R_HOLDER))
return // Can't talk in deadchat if you can't see it.
if(ismob(subject))
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_DEAD_SAY, subject, message)
for(var/mob/M in GLOB.player_list)
if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (check_rights_for(M.client, R_HOLDER) && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay))

View File

@@ -253,6 +253,8 @@
inserted_battery.battery_effect = E
inserted_battery.stored_charge = 0
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_HARVEST_ARTIFACT, inserted_battery, user)
/obj/machinery/artifact_harvester/process()
if(harvesting == 0)
return

View File

@@ -112,7 +112,7 @@
while(S.cores)
playsound(src, 'sound/machines/juicer.ogg', 25, 1)
if(do_after(user, 15, target = src))
new S.coretype(get_turf(AM))
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_HARVEST_SLIME_CORE, new S.coretype(get_turf(AM)))
playsound(src, 'sound/effects/splat.ogg', 50, 1)
S.cores--
qdel(S)

View File

@@ -82,7 +82,7 @@
if(istype(AM, /mob/living/simple_mob/slime))
var/mob/living/simple_mob/slime/S = AM
while(S.cores)
new S.coretype(get_turf(src))
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_HARVEST_SLIME_CORE, new S.coretype(get_turf(src)))
playsound(src, 'sound/effects/splat.ogg', 50, 1)
S.cores--
sleep(1 SECOND)