From 10ab1a87a778a6b59fc8ec6eb30fde6a569f0175 Mon Sep 17 00:00:00 2001 From: warriorstar-orion Date: Sat, 24 Aug 2024 12:37:52 -0400 Subject: [PATCH] refactor: Split up signals file. (#26538) --- code/__DEFINES/dcs/atom_signals.dm | 191 +++++ code/__DEFINES/dcs/basetype_signals.dm | 41 + code/__DEFINES/dcs/carbon_signals.dm | 75 ++ code/__DEFINES/dcs/datum_signals.dm | 141 +++ code/__DEFINES/dcs/dept_signals.dm | 42 + code/__DEFINES/dcs/global_signals.dm | 33 + code/__DEFINES/dcs/item_signals.dm | 207 +++++ code/__DEFINES/dcs/machinery_signals.dm | 34 + code/__DEFINES/dcs/mob_signals.dm | 205 +++++ code/__DEFINES/dcs/movable_signals.dm | 76 ++ code/__DEFINES/dcs/obj_signals.dm | 63 ++ code/__DEFINES/dcs/signals.dm | 1050 ----------------------- paradise.dme | 12 +- 13 files changed, 1119 insertions(+), 1051 deletions(-) create mode 100644 code/__DEFINES/dcs/atom_signals.dm create mode 100644 code/__DEFINES/dcs/basetype_signals.dm create mode 100644 code/__DEFINES/dcs/carbon_signals.dm create mode 100644 code/__DEFINES/dcs/datum_signals.dm create mode 100644 code/__DEFINES/dcs/dept_signals.dm create mode 100644 code/__DEFINES/dcs/global_signals.dm create mode 100644 code/__DEFINES/dcs/item_signals.dm create mode 100644 code/__DEFINES/dcs/machinery_signals.dm create mode 100644 code/__DEFINES/dcs/mob_signals.dm create mode 100644 code/__DEFINES/dcs/movable_signals.dm create mode 100644 code/__DEFINES/dcs/obj_signals.dm delete mode 100644 code/__DEFINES/dcs/signals.dm diff --git a/code/__DEFINES/dcs/atom_signals.dm b/code/__DEFINES/dcs/atom_signals.dm new file mode 100644 index 00000000000..30370323fb8 --- /dev/null +++ b/code/__DEFINES/dcs/atom_signals.dm @@ -0,0 +1,191 @@ +/** + * Signals for /atom and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +// /atom + +///from base of atom/proc/Initialize(): sent any time a new atom is created +#define COMSIG_ATOM_CREATED "atom_created" +//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization +#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success" +///from base of atom/attackby(): (/obj/item, /mob/living, params) +#define COMSIG_PARENT_ATTACKBY "atom_attackby" +///Return this in response if you don't want afterattack to be called + #define COMPONENT_NO_AFTERATTACK (1<<0) +///from base of atom/attack_hulk(): (/mob/living/carbon/human) +#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" +///from base of atom/animal_attack(): (/mob/user) +#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal" +///from base of atom/examine(): (examining_user, examine_list) +#define COMSIG_PARENT_EXAMINE "atom_examine" +///from base of atom/examine_more(): (examining_user, examine_list) +#define COMSIG_PARENT_EXAMINE_MORE "atom_examine_more" +///from base of atom/get_examine_name(): (/mob, list/overrides) +#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" + //Positions for overrides list + #define EXAMINE_POSITION_ARTICLE (1<<0) + #define EXAMINE_POSITION_BEFORE (1<<1) + //End positions + #define COMPONENT_EXNAME_CHANGED (1<<0) + ///from base of [/atom/proc/update_appearance]: (updates) + #define COMSIG_ATOM_UPDATE_APPEARANCE "atom_update_appearance" + /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its name. + #define COMSIG_ATOM_NO_UPDATE_NAME UPDATE_NAME + /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its desc. + #define COMSIG_ATOM_NO_UPDATE_DESC UPDATE_DESC + /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its icon. + #define COMSIG_ATOM_NO_UPDATE_ICON UPDATE_ICON +///from base of [/atom/proc/update_name]: (updates) +#define COMSIG_ATOM_UPDATE_NAME "atom_update_name" +///from base of [/atom/proc/update_desc]: (updates) +#define COMSIG_ATOM_UPDATE_DESC "atom_update_desc" +///from base of [/atom/update_icon]: () +#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" + /// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its icon state. + #define COMSIG_ATOM_NO_UPDATE_ICON_STATE UPDATE_ICON_STATE + /// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its overlays. + #define COMSIG_ATOM_NO_UPDATE_OVERLAYS UPDATE_OVERLAYS +///Sent after [atom/update_icon_state] is called by [/atom/update_icon]: () +#define COMSIG_ATOM_UPDATE_ICON_STATE "atom_update_icon_state" +///Sent after [atom/update_overlays] is called by [/atom/update_icon]: (list/new_overlays) +#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" +///from base of [/atom/update_icon]: (signalOut, did_anything) +#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" +///from base of atom/Entered(): (atom/movable/entering, /atom) +#define COMSIG_ATOM_ENTERED "atom_entered" +///from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) +#define COMSIG_ATOM_EXIT "atom_exit" + #define COMPONENT_ATOM_BLOCK_EXIT (1<<0) +///from base of atom/Exited(): (atom/movable/exiting, atom/newloc) +#define COMSIG_ATOM_EXITED "atom_exited" +///from base of atom/Bumped(): (/atom/movable) +#define COMSIG_ATOM_BUMPED "atom_bumped" +///from base of atom/ex_act(): (severity, target) +#define COMSIG_ATOM_EX_ACT "atom_ex_act" +///from base of atom/emp_act(): (severity) +#define COMSIG_ATOM_EMP_ACT "atom_emp_act" +///from base of atom/fire_act(): (exposed_temperature, exposed_volume) +#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" +///from base of atom/bullet_act(): (/obj/projectile, def_zone) +#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" +///from base of atom/blob_act(): (/obj/structure/blob) +#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" +///from base of atom/acid_act(): (acidpwr, acid_volume) +#define COMSIG_ATOM_ACID_ACT "atom_acid_act" +///from base of atom/emag_act(): (/mob/user) +#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" +///from base of atom/rad_act(intensity) +#define COMSIG_ATOM_RAD_ACT "atom_rad_act" +///from base of atom/narsie_act(): () +#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" +///from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode) +#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" +///from base of atom/singularity_pull(): (S, current_size) +#define COMSIG_ATOM_SING_PULL "atom_sing_pull" +///from obj/machinery/bsa/full/proc/fire(): () +#define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass" + #define COMSIG_ATOM_BLOCKS_BSA_BEAM (1<<0) +///from base of atom/set_light(): (l_range, l_power, l_color) +#define COMSIG_ATOM_SET_LIGHT "atom_set_light" +///from base of atom/setDir(): (old_dir, new_dir) +#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" +///from base of atom/handle_atom_del(): (atom/deleted) +#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" +///from base of atom/has_gravity(): (turf/location, list/forced_gravities) +#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity" +///from proc/get_rad_contents(): () +#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe" + #define COMPONENT_BLOCK_RADIATION (1<<0) +///from base of datum/radiation_wave/radiate(): (strength) +#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" + #define COMPONENT_BLOCK_CONTAMINATION (1<<0) +///from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width) +#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" + #define COMPONENT_RAD_WAVE_HANDLED (1<<0) +///from base of atom/screwdriver_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" +///from base of atom/wrench_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_WRENCH_ACT "atom_wrench_act" +///from base of atom/multitool_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_MULTITOOL_ACT "atom_multitool_act" +///from base of atom/welder_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_WELDER_ACT "atom_welder_act" +///from base of atom/wirecutter_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_WIRECUTTER_ACT "atom_wirecutter_act" +///from base of atom/crowbar_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_CROWBAR_ACT "atom_crowbar_act" +///from base of atom/analyser_act(): (mob/living/user, obj/item/I) +#define COMSIG_ATOM_ANALYSER_ACT "atom_analyser_act" + #define COMPONENT_BLOCK_TOOL_ATTACK (1<<0) +///called when teleporting into a protected turf: (channel, turf/origin) +#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" + #define COMPONENT_BLOCK_TELEPORT (1<<0) +///called when an atom is added to the hearers on get_hearers_in_view(): (list/processing_list, list/hearers) +#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" +///called when an atom starts orbiting another atom: (atom) +#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin" +///called when an atom stops orbiting another atom: (atom) +#define COMSIG_ATOM_ORBIT_STOP "atom_orbit_stop" +/// called on an atom who has stopped orbiting another atom (atom/orbiter, atom/formerly_orbited) +#define COMSIG_ATOM_ORBITER_STOP "atom_orbiter_stop" +///from base of atom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) +#define COMSIG_ATOM_HITBY "atom_hitby" +/// Called when an atom is sharpened or dulled. +#define COMSIG_ATOM_UPDATE_SHARPNESS "atom_update_sharpness" +///from base of atom/atom_prehit(obj/item/projectile/P): +#define COMSIG_ATOM_PREHIT "atom_prehit" + #define ATOM_PREHIT_SUCCESS (1<<0) + #define ATOM_PREHIT_FAILURE (1<<1) + +// Attack signals. These should share the returned flags, to standardize the attack chain. +// The chain currently works like: +// tool_act -> pre_attack -> target.attackby (item.attack) -> afterattack +// You can use these signal responses to cancel the attack chain at a certain point from most attack signal types. + /// This response cancels the attack chain entirely. If sent early, it might cause some later effects to be skipped. + #define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0) + +/// Called from atom/Initialize() of target: (atom/target) +#define COMSIG_ATOM_INITIALIZED_ON "atom_initialized_on" + +///from base of atom/attack_ghost(): (mob/dead/observer/ghost) +#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" +///from base of atom/attack_hand(): (mob/user) +#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" +///from base of atom/attack_paw(): (mob/user) +#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" + #define COMPONENT_NO_ATTACK_HAND (1<<0) //works on all 3. +//This signal return value bitflags can be found in __DEFINES/misc.dm + +///called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels) +#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" +///called on a movable (NOT living) when someone starts pulling it (atom/movable/puller, state, force) +#define COMSIG_ATOM_START_PULL "movable_start_pull" +///called on /living when someone starts pulling it (atom/movable/puller, state, force) +#define COMSIG_LIVING_START_PULL "living_start_pull" +///called on /living, when pull is attempted, but before it completes, from base of [/mob/living/start_pulling]: (atom/movable/thing, force) +#define COMSIG_LIVING_TRY_PULL "living_try_pull" + #define COMSIG_LIVING_CANCEL_PULL (1 << 0) + +///from base of atom/expose_reagents(): (/list, /datum/reagents, chemholder, volume_modifier) +#define COMSIG_ATOM_EXPOSE_REAGENTS "atom_expose_reagents" + +///from base of atom/Click(): (location, control, params, mob/user) +#define COMSIG_CLICK "atom_click" +///from base of atom/ShiftClick(): (/mob) +#define COMSIG_CLICK_SHIFT "shift_click" + #define COMPONENT_ALLOW_EXAMINATE (1<<0) //Allows the user to examinate regardless of client.eye. +///from base of atom/CtrlClickOn(): (/mob) +#define COMSIG_CLICK_CTRL "ctrl_click" +///from base of atom/AltClick(): (/mob) +#define COMSIG_CLICK_ALT "alt_click" + /// Cancel the alt-click, since this isn't properly part of the attack chain + #define COMPONENT_CANCEL_ALTCLICK (1<<0) +///from base of atom/CtrlShiftClick(/mob) +#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" +///from base of atom/MouseDrop(): (/atom/over, /mob/user) +#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" + #define COMPONENT_NO_MOUSEDROP (1<<0) +///from base of atom/MouseDrop_T: (/atom/from, /mob/user) +#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" diff --git a/code/__DEFINES/dcs/basetype_signals.dm b/code/__DEFINES/dcs/basetype_signals.dm new file mode 100644 index 00000000000..b4efddc99f4 --- /dev/null +++ b/code/__DEFINES/dcs/basetype_signals.dm @@ -0,0 +1,41 @@ +/** + * Signals for base types that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +// /client + +/// from base of client/Click(): (atom/target, atom/location, control, params, mob/user) +#define COMSIG_CLIENT_CLICK "atom_client_click" +/// from base of client/MouseDown(): (/client, object, location, control, params) +#define COMSIG_CLIENT_MOUSEDOWN "client_mousedown" +/// from base of client/MouseUp(): (/client, object, location, control, params) +#define COMSIG_CLIENT_MOUSEUP "client_mouseup" + #define COMPONENT_CLIENT_MOUSEUP_INTERCEPT (1<<0) +/// from base of client/MouseUp(): (/client, object, location, control, params) +#define COMSIG_CLIENT_MOUSEDRAG "client_mousedrag" + +/// from base of area/Entered(): (/area) +#define COMSIG_ENTER_AREA "enter_area" +/// from base of area/Exited(): (/area) +#define COMSIG_EXIT_AREA "exit_area" + +// /area + +/// from base of area/Entered(): (atom/movable/M) +#define COMSIG_AREA_ENTERED "area_entered" +///from base of area/Exited(): (atom/movable/M) +#define COMSIG_AREA_EXITED "area_exited" + +// /turf + +///from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps) +#define COMSIG_TURF_CHANGE "turf_change" +///from base of atom/has_gravity(): (atom/asker, list/forced_gravities) +#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" +///from base of turf/New(): (turf/source, direction) +#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" +///from base of /turf/proc/levelupdate(). (intact) true to hide and false to unhide +#define COMSIG_OBJ_HIDE "obj_hide" + diff --git a/code/__DEFINES/dcs/carbon_signals.dm b/code/__DEFINES/dcs/carbon_signals.dm new file mode 100644 index 00000000000..89af8e88b5b --- /dev/null +++ b/code/__DEFINES/dcs/carbon_signals.dm @@ -0,0 +1,75 @@ +/** + * Signals for /mob/living/carbon and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +///from base of mob/living/carbon/soundbang_act(): (list(intensity)) +#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" +///from /item/organ/proc/Insert() (/obj/item/organ/) +#define COMSIG_CARBON_GAIN_ORGAN "carbon_gain_organ" +///from /item/organ/proc/Remove() (/obj/item/organ/) +#define COMSIG_CARBON_LOSE_ORGAN "carbon_lose_organ" +///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent) +#define COMSIG_CARBON_EQUIP_HAT "carbon_equip_hat" +///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent) +#define COMSIG_CARBON_UNEQUIP_HAT "carbon_unequip_hat" +///defined twice, in carbon and human's topics, fired when interacting with a valid embedded_object to pull it out (mob/living/carbon/target, /obj/item, /obj/item/bodypart/L) +#define COMSIG_CARBON_EMBED_RIP "item_embed_start_rip" +///called when removing a given item from a mob, from mob/living/carbon/remove_embedded_object(mob/living/carbon/target, /obj/item) +#define COMSIG_CARBON_EMBED_REMOVAL "item_embed_remove_safe" +/// From /mob/living/carbon/swap_hand(): Called when the user swaps their active hand +#define COMSIG_CARBON_SWAP_HANDS "carbon_swap_hands" +/// From /mob/living/carbon/toggle_throw_mode() +#define COMSIG_CARBON_TOGGLE_THROW "carbon_toggle_throw" +/// From /mob/living/carbon/human/hitby() +#define COMSIG_CARBON_THROWN_ITEM_CAUGHT "carbon_thrown_item_caught" +/// From /mob/living/carbon/flash_eyes() +#define COMSIG_CARBON_FLASH_EYES "carbon_flash_eyes" +/// From /mob/living/carbon/update_handcuffed() +#define COMSIG_CARBON_UPDATE_HANDCUFFED "carbon_update_handcuff" +/// From /mob/living/carbon/regenerate_icons() +#define COMSIG_CARBON_REGENERATE_ICONS "carbon_regen_icons" +/// From /mob/living/carbon/enter_stamcrit() +#define COMSIG_CARBON_ENTER_STAMINACRIT "carbon_enter_staminacrit" +/// From /mob/living/carbon/update_stamina() +#define COMSIG_CARBON_EXIT_STAMINACRIT "carbon_exit_staminacrit" +/// From /mob/living/carbon/handle_status_effects() +#define COMSIG_CARBON_STAMINA_REGENERATED "carbon_stamina_regenerated" + + +///from mob/living/carbon/human/UnarmedAttack(): (atom/target, proximity) +#define COMSIG_HUMAN_EARLY_UNARMED_ATTACK "human_early_unarmed_attack" +///from mob/living/carbon/human/UnarmedAttack(): (atom/target, proximity) +#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" +///from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker) +#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" +///Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted) +#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" +///Whenever EquipRanked is called, called after job is set +#define COMSIG_JOB_RECEIVED "job_received" +// called after DNA is updated +#define COMSIG_HUMAN_UPDATE_DNA "human_update_dna" +/// From mob/living/carbon/human/change_body_accessory(): (mob/living/carbon/human/H, body_accessory_style) +#define COMSIG_HUMAN_CHANGE_BODY_ACCESSORY "human_change_body_accessory" + #define COMSIG_HUMAN_NO_CHANGE_APPEARANCE (1<<0) +/// From mob/living/carbon/human/change_head_accessory(): (mob/living/carbon/human/H, head_accessory_style) +#define COMSIG_HUMAN_CHANGE_HEAD_ACCESSORY "human_change_head_accessory" +//sent from living mobs when they parry +#define COMSIG_HUMAN_PARRY "human_parry" +///From base of mob/living/MobBump() (mob/living) +#define COMSIG_LIVING_MOB_BUMP "living_mob_bump" +///From mob/living/carbon/human/do_suicide() +#define COMSIG_HUMAN_SUICIDE_ACT "human_suicide_act" +/// Sent from mob/living/carbon/human/do_cpr(): (mob/living/carbon/human/H, new_seconds_of_life) +#define COMSIG_HUMAN_RECEIVE_CPR "human_receive_cpr" + +///From mob/living/carbon/human/attackedby(): (mob/living/carbon/human/attacker). Also found on species/disarm and species/harm +#define COMSIG_HUMAN_ATTACKED "human_attacked" + +///from /mob/living/carbon/human/proc/check_shields(): (atom/hit_by, damage, attack_text, attack_type, armour_penetration, damage_type) +#define COMSIG_HUMAN_CHECK_SHIELDS "human_check_shields" + #define SHIELD_BLOCK (1<<0) + +///from /mob/living/carbon/human/create_mob_hud() +#define COMSIG_HUMAN_CREATE_MOB_HUD "human_create_mob_hud" diff --git a/code/__DEFINES/dcs/datum_signals.dm b/code/__DEFINES/dcs/datum_signals.dm new file mode 100644 index 00000000000..b84db8dded7 --- /dev/null +++ b/code/__DEFINES/dcs/datum_signals.dm @@ -0,0 +1,141 @@ +/** + * Signals for /datums. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +// /datum/component + +/// when a component is added to a datum: (/datum/component) +#define COMSIG_COMPONENT_ADDED "component_added" +/// before a component is removed from a datum because of RemoveComponent: (/datum/component) +#define COMSIG_COMPONENT_REMOVING "component_removing" +/// before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation +#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" +/// just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called +#define COMSIG_PARENT_QDELETING "parent_qdeleting" +/// generic topic handler (usr, href_list) +#define COMSIG_TOPIC "handle_topic" + +/// fires on the target datum when an element is attached to it (/datum/element) +#define COMSIG_ELEMENT_ATTACH "element_attach" +/// fires on the target datum when an element is attached to it (/datum/element) +#define COMSIG_ELEMENT_DETACH "element_detach" + + +// /datum/mind + +///from base of /datum/mind/proc/transfer_to(mob/living/new_character) +#define COMSIG_MIND_TRANSER_TO "mind_transfer_to" +///called on the mob instead of the mind +#define COMSIG_BODY_TRANSFER_TO "body_transfer_to" +///called when the mind is initialized (called every time the mob logins) +#define COMSIG_MIND_INITIALIZE "mind_initialize" + +// Sent from a surgery step when blood is being splashed. (datum/surgery, mob/user, mob/target, zone, obj/item/tool) +#define COMSIG_SURGERY_BLOOD_SPLASH "surgery_blood_splash" + /// If returned from this signal, will prevent any surgery splashing. + #define COMPONENT_BLOOD_SPLASH_HANDLED (1<<0) + +// Sent from a surgery step when organs are being spread from an incision +#define COMSIG_SURGERY_GERM_SPREAD "surgery_germ_spread" + /// If returned from this signal, germ spread will be blocked. + #define COMPONENT_GERM_SPREAD_BLOCK (1<<0) + + +// /datum/species + +///from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species) +#define COMSIG_SPECIES_GAIN "species_gain" +///from datum/species/on_species_loss(): (datum/species/lost_species) +#define COMSIG_SPECIES_LOSS "species_loss" +///from /datum/species/proc/spec_hitby() +#define COMSIG_SPECIES_HITBY "species_hitby" + + +// /datum/song + +///sent to the instrument when a song starts playing +#define COMSIG_SONG_START "song_start" +///sent to the instrument when a song stops playing +#define COMSIG_SONG_END "song_end" + + +// /datum/component/decal + +///(): Returns bitflags of wet values. +#define COMSIG_TURF_IS_WET "check_turf_wet" +///(max_strength, immediate, duration_decrease = INFINITY): Returns bool. +#define COMSIG_TURF_MAKE_DRY "make_turf_try" +///called on an object to clean it of cleanables. Usualy with soap: (num/strength) +#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" + + +// /datum/component/two_handed + +///from base of datum/component/two_handed/proc/wield(mob/living/carbon/user): (/mob/user) +#define COMSIG_TWOHANDED_WIELD "twohanded_wield" + #define COMPONENT_TWOHANDED_BLOCK_WIELD (1<<0) +///from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user) +#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" + + +// /datum/action + +///from base of datum/action/proc/Trigger(): (datum/action) +#define COMSIG_ACTION_TRIGGER "action_trigger" + #define COMPONENT_ACTION_BLOCK_TRIGGER (1<<0) +/// From /datum/action/Grant(): (mob/grant_to) +#define COMSIG_ACTION_GRANTED "action_grant" +/// From /datum/action/Grant(): (datum/action) +#define COMSIG_MOB_GRANTED_ACTION "mob_action_grant" +/// From /datum/action/Remove(): (mob/removed_from) +#define COMSIG_ACTION_REMOVED "action_removed" +/// From /datum/action/Remove(): (datum/action) +#define COMSIG_MOB_REMOVED_ACTION "mob_action_removed" + + +// /datum/objective + +///from datum/objective/proc/find_target(list/target_blacklist) +#define COMSIG_OBJECTIVE_TARGET_FOUND "objective_target_found" +///from datum/objective/is_invalid_target() +#define COMSIG_OBJECTIVE_CHECK_VALID_TARGET "objective_check_valid_target" + #define OBJECTIVE_VALID_TARGET (1<<0) + #define OBJECTIVE_INVALID_TARGET (1<<1) + + +/// /datum/component/defib + +/// Called when a defibrillator is first applied to someone. (mob/living/user, mob/living/target, harmful) +#define COMSIG_DEFIB_PADDLES_APPLIED "defib_paddles_applied" + /// Defib is out of power. + #define COMPONENT_BLOCK_DEFIB_DEAD (1<<0) + /// Something else: we won't have a custom message for this and should let the defib handle it. + #define COMPONENT_BLOCK_DEFIB_MISC (1<<1) +/// Called when a defib has been successfully used, and a shock has been applied. (mob/living/user, mob/living/target, harmful, successful) +#define COMSIG_DEFIB_SHOCK_APPLIED "defib_zap" +/// Called when a defib's cooldown has run its course and it is once again ready. () +#define COMSIG_DEFIB_READY "defib_ready" + + +/// /datum/alarm_manager + +#define COMSIG_TRIGGERED_ALARM "alarmmanager_triggered" +#define COMSIG_CANCELLED_ALARM "alarmmanager_cancelled" + +// other subtypes + +/// called by datum/cinematic/play() : (datum/cinematic/new_cinematic) +#define COMSIG_GLOB_PLAY_CINEMATIC "!play_cinematic" + #define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0) + +///from base of /datum/local_powernet/proc/power_change() +#define COMSIG_POWERNET_POWER_CHANGE "powernet_power_change" + +/// Sent when bodies transfer between shades/shards and constructs +/// from base of /datum/component/construct_held_body/proc/transfer_held_body() +#define COMSIG_SHADE_TO_CONSTRUCT_TRANSFER "shade_to_construct_transfer" + +///called when you wash your face at a sink: (num/strength) +#define COMSIG_COMPONENT_CLEAN_FACE_ACT "clean_face_act" diff --git a/code/__DEFINES/dcs/dept_signals.dm b/code/__DEFINES/dcs/dept_signals.dm new file mode 100644 index 00000000000..0c93af9704c --- /dev/null +++ b/code/__DEFINES/dcs/dept_signals.dm @@ -0,0 +1,42 @@ +/** + * Signals for department mechanics. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +// Cargo shuttle + +// Sent before the shuttle scans its contents. +// Use to initialize data that will be needed during the scan. +#define COMSIG_CARGO_BEGIN_SCAN "begin_scan" +// Sent as the shuttle scans its contents. +// Can return sell flags (see code/__DEFINES/supply_defines.dm). +#define COMSIG_CARGO_CHECK_SELL "check_sell" +// Sent as the shuttle begins selling off its contents. +// Use to initialize data that will be needed during the sale. +#define COMSIG_CARGO_BEGIN_SELL "begin_sell" +// Sent during sales for items marked with COMSIG_CARGO_SELL_PRIORITY. +#define COMSIG_CARGO_DO_PRIORITY_SELL "do_priority_sell" +// Sent during sales for items marked with COMSIG_CARGO_SELL_NORMAL. +#define COMSIG_CARGO_DO_SELL "do_sell" +// Sent during sales for items marked with COMSIG_CARGO_SELL_WRONG. +#define COMSIG_CARGO_SEND_ERROR "send_error" +// Sent when sales are completed. +// Use to send summary messages for items that sell in bulk. +#define COMSIG_CARGO_END_SELL "end_sell" + + +// Xenobio hotkeys + +///from slime CtrlClickOn(): (/mob) +#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" +///from slime AltClickOn(): (/mob) +#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" +///from slime ShiftClickOn(): (/mob) +#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" +///from turf ShiftClickOn(): (/mob) +#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" +///from turf AltClickOn(): (/mob) +#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" +///from monkey CtrlClickOn(): (/mob) +#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" diff --git a/code/__DEFINES/dcs/global_signals.dm b/code/__DEFINES/dcs/global_signals.dm new file mode 100644 index 00000000000..28a149d5412 --- /dev/null +++ b/code/__DEFINES/dcs/global_signals.dm @@ -0,0 +1,33 @@ +/** + * Signals for globally accessible objects/procs. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args) +#define COMSIG_GLOB_NEW_Z "!new_z" +/// called after a successful var edit somewhere in the world: (list/args) +#define COMSIG_GLOB_VAR_EDIT "!var_edit" +/// called after an explosion happened : (epicenter, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range) +#define COMSIG_GLOB_EXPLOSION "!explosion" +/// job subsystem has spawned and equipped a new mob +#define COMSIG_GLOB_JOB_AFTER_SPAWN "!job_after_spawn" +///from SSsun when the sun changes position : (azimuth) +#define COMSIG_SUN_MOVED "sun_moved" +///from SSsecurity_level on planning security level change : (previous_level_number, new_level_number) +#define COMSIG_SECURITY_LEVEL_CHANGE_PLANNED "security_level_change_planned" +///from SSsecurity_level when the security level changes : (previous_level_number, new_level_number) +#define COMSIG_SECURITY_LEVEL_CHANGED "security_level_changed" + +/// mob was created somewhere : (mob) +#define COMSIG_GLOB_MOB_CREATED "!mob_created" +/// mob died somewhere : (mob , gibbed) +#define COMSIG_GLOB_MOB_DEATH "!mob_death" +/// global living say plug - use sparingly: (mob/speaker , message) +#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" + +/// Called when the round has started, but before GAME_STATE_PLAYING. +#define COMSIG_TICKER_ROUND_STARTING "comsig_ticker_round_starting" + +/// Used by admin-tooling to remove radiation +#define COMSIG_ADMIN_DECONTAMINATE "admin_decontaminate" diff --git a/code/__DEFINES/dcs/item_signals.dm b/code/__DEFINES/dcs/item_signals.dm new file mode 100644 index 00000000000..f90529d6e96 --- /dev/null +++ b/code/__DEFINES/dcs/item_signals.dm @@ -0,0 +1,207 @@ +/** + * Signals for /obj/item and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +// /obj/item + +///from base of obj/item/attack(): (/mob/living/target, /mob/living/user) +#define COMSIG_ITEM_ATTACK "item_attack" +///from base of obj/item/attack_self(): (/mob) +#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" + #define COMPONENT_NO_INTERACT (1<<0) +///from base of obj/item/attack_obj(): (/obj, /mob) +#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" + #define COMPONENT_NO_ATTACK_OBJ (1<<0) +///from base of obj/item/pre_attack(): (atom/target, mob/user, params) +#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" + #define COMPONENT_NO_ATTACK (1<<0) +///from base of obj/item/pre_attack(): (atom/target, mob/user, params) +#define COMSIG_ITEM_BEING_ATTACKED "item_being_attacked" +///from base of obj/item/afterattack(): (atom/target, mob/user, params) +#define COMSIG_ITEM_AFTERATTACK "item_afterattack" +///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params) +#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted" +///from base of obj/item/equipped(): (/mob/equipper, slot) +///called on [/obj/item] before unequip from base of [mob/proc/doUnEquip]: (force, atom/newloc, no_move, invdrop, silent) +#define COMSIG_ITEM_PRE_UNEQUIP "item_pre_unequip" + ///only the pre unequip can be cancelled + #define COMPONENT_ITEM_BLOCK_UNEQUIP (1<<0) +#define COMSIG_ITEM_EQUIPPED "item_equip" +///from base of obj/item/dropped(): (mob/user) +#define COMSIG_ITEM_DROPPED "item_drop" +///from base of obj/item/pickup(): (/mob/taker) +#define COMSIG_ITEM_PICKUP "item_pickup" +///from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone) +#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" +///return a truthy value to prevent ensouling, checked in /datum/spell/lichdom/cast(): (mob/user) +#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" +///called before marking an object for retrieval, checked in /datum/spell/summonitem/cast() : (mob/user) +#define COMSIG_ITEM_MARK_RETRIEVAL "item_mark_retrieval" + #define COMPONENT_BLOCK_MARK_RETRIEVAL (1<<0) +///from base of obj/item/hit_reaction(): (list/args) +#define COMSIG_ITEM_HIT_REACT "item_hit_react" + #define COMPONENT_BLOCK_SUCCESSFUL (1 << 0) + #define COMPONENT_BLOCK_PERFECT (1 << 2) +///called on item when crossed by something (): (/atom/movable, mob/living/crossed) +#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" +///called on item when microwaved (): (obj/machinery/microwave/M) +#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" +///from base of item/sharpener/attackby(): (amount, max) +#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" + #define COMPONENT_SHARPEN_APPLIED (1<<0) + #define COMPONENT_BLOCK_SHARPEN_BLOCKED (1<<1) + #define COMPONENT_BLOCK_SHARPEN_ALREADY (1<<2) + #define COMPONENT_BLOCK_SHARPEN_MAXED (1<<3) +///from base of [/obj/item/proc/tool_check_callback]: (mob/living/user) +#define COMSIG_TOOL_IN_USE "tool_in_use" +///from base of [/obj/item/proc/tool_start_check]: (mob/living/user) +#define COMSIG_TOOL_START_USE "tool_start_use" +///from base of [/obj/item/proc/tool_attack_chain]: (atom/tool, mob/user) +#define COMSIG_TOOL_ATTACK "tool_attack" + #define COMPONENT_CANCEL_TOOLACT (1<<0) +///from [/obj/item/proc/disableEmbedding]: +#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" +///from [/obj/effect/mine/proc/triggermine]: +#define COMSIG_MINE_TRIGGERED "minegoboom" +/// Called by /obj/item/proc/worn_overlays(list/overlays, mutable_appearance/standing, isinhands, icon_file) +#define COMSIG_ITEM_GET_WORN_OVERLAYS "item_get_worn_overlays" +/// Called by /obj/item/assembly/signaler(called_from_radio) +#define COMSIG_ASSEMBLY_PULSED "item_assembly_pulsed" + +///called when an item is sold by the exports subsystem +#define COMSIG_ITEM_SOLD "item_sold" +///called when a wrapped up structure is opened by hand +#define COMSIG_STRUCTURE_UNWRAPPED "structure_unwrapped" +#define COMSIG_ITEM_UNWRAPPED "item_unwrapped" +///called when a wrapped up item is opened by hand + #define COMSIG_ITEM_SPLIT_VALUE (1<<0) +///called when getting the item's exact ratio for cargo's profit. +#define COMSIG_ITEM_SPLIT_PROFIT "item_split_profits" +///called when getting the item's exact ratio for cargo's profit, without selling the item. +#define COMSIG_ITEM_SPLIT_PROFIT_DRY "item_split_profits_dry" + +// /obj/item/clothing + +///from [/mob/living/carbon/human/Move]: () +#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" +///from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit) +#define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle" + +// /obj/item/implant + +///from base of /obj/item/bio_chip/proc/activate(): () +#define COMSIG_IMPLANT_ACTIVATED "implant_activated" +///from base of /obj/item/bio_chip/proc/implant(): (list/args) +#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" + #define COMPONENT_STOP_IMPLANTING (1<<0) +///called on already installed implants when a new one is being added in /obj/item/bio_chip/proc/implant(): (list/args, obj/item/bio_chip/new_implant) +#define COMSIG_IMPLANT_OTHER "implant_other" + //#define COMPONENT_STOP_IMPLANTING (1<<0) //The name makes sense for both + #define COMPONENT_DELETE_NEW_IMPLANT (1<<1) + #define COMPONENT_DELETE_OLD_IMPLANT (1<<2) +///called on implants being implanted into someone with an uplink implant: (datum/component/uplink) +#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" + //This uses all return values of COMSIG_IMPLANT_OTHER + +/// called on implants, after a successful implantation: (mob/living/target, mob/user, silent, force) +#define COMSIG_IMPLANT_IMPLANTED "implant_implanted" + +/// called on implants, after an implant has been removed: (mob/living/source, silent, special) +#define COMSIG_IMPLANT_REMOVED "implant_removed" + + +// /obj/item/pda + +///called on pda when the user changes the ringtone: (mob/living/user, new_ringtone) +#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" + #define COMPONENT_STOP_RINGTONE_CHANGE (1<<0) +#define COMSIG_PDA_CHECK_DETONATE "pda_check_detonate" + #define COMPONENT_PDA_NO_DETONATE (1<<0) + + +// /obj/item/radio + +///called from base of /obj/item/radio/proc/set_frequency(): (list/args) +#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" + + +// /obj/item/pen + +///called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user) +#define COMSIG_PEN_ROTATED "pen_rotated" + + +// /obj/item/gun + +///called in /obj/item/gun/fire_gun (user, target, flag, params) +#define COMSIG_GUN_TRY_FIRE "gun_try_fire" + #define COMPONENT_CANCEL_GUN_FIRE (1<<0) +///called in /obj/item/gun/afterattack (user, target, flag, params) +#define COMSIG_MOB_TRY_FIRE "mob_fired_gun" +///called in /obj/item/gun/process_fire (user, target) +#define COMSIG_GUN_FIRED "gun_fired" +/// called in /datum/component/automatic_fire/proc/on_mouse_down: (client/clicker, atom/target, turf/location, control, params) +#define COMSIG_AUTOFIRE_ONMOUSEDOWN "autofire_onmousedown" + #define COMPONENT_AUTOFIRE_ONMOUSEDOWN_BYPASS (1<<0) +/// called in /datum/component/automatic_fire/proc/process_shot(): (atom/target, mob/living/shooter, allow_akimbo, params) +#define COMSIG_AUTOFIRE_SHOT "autofire_shot" + #define COMPONENT_AUTOFIRE_SHOT_SUCCESS (1<<0) + + +// /obj/item/grenade + +///called in /obj/item/gun/process_fire (user, target, params, zone_override) +#define COMSIG_GRENADE_PRIME "grenade_prime" +///called in /obj/item/gun/process_fire (user, target, params, zone_override) +#define COMSIG_GRENADE_ARMED "grenade_armed" + + +// /obj/item/mod + +/// Called when a module is selected to be the active one from on_select(obj/item/mod/module/module) +#define COMSIG_MOD_MODULE_SELECTED "mod_module_selected" +/// Called when a MOD deploys one or more of its parts. +#define COMSIG_MOD_DEPLOYED "mod_deployed" +/// Called when a MOD retracts one or more of its parts. +#define COMSIG_MOD_RETRACTED "mod_retracted" +/// Called when a MOD is finished toggling itself. +#define COMSIG_MOD_TOGGLED "mod_toggled" +/// Called when a MOD activation is called from toggle_activate(mob/user) +#define COMSIG_MOD_ACTIVATE "mod_activate" + /// Cancels the suit's activation + #define MOD_CANCEL_ACTIVATE (1 << 0) +/// Called when a MOD finishes having a module removed from it. +#define COMSIG_MOD_MODULE_REMOVED "mod_module_removed" +/// Called when a MOD finishes having a module added to it. +#define COMSIG_MOD_MODULE_ADDED "mod_module_added" +/// Called when a MOD is having modules removed from crowbar_act(mob/user, obj/crowbar) +#define COMSIG_MOD_MODULE_REMOVAL "mod_module_removal" + /// Cancels the removal of modules + #define MOD_CANCEL_REMOVAL (1 << 0) +/// Called when a module attempts to activate, however it does. At the end of checks so you can add some yourself, or work on trigger behavior (mob/user) +#define COMSIG_MODULE_TRIGGERED "mod_module_triggered" + /// Cancels activation, with no message. Include feedback on your cancel. + #define MOD_ABORT_USE (1<<0) +/// Called when a module activates, after all checks have passed and cooldown started. +#define COMSIG_MODULE_ACTIVATED "mod_module_activated" +/// Called when a module deactivates, after all checks have passed. +#define COMSIG_MODULE_DEACTIVATED "mod_module_deactivated" +/// Called when a module is used, after all checks have passed and cooldown started. +#define COMSIG_MODULE_USED "mod_module_used" +/// Called when the MODsuit wearer is set. +#define COMSIG_MOD_WEARER_SET "mod_wearer_set" +/// Called when the MODsuit wearer is unset. +#define COMSIG_MOD_WEARER_UNSET "mod_wearer_unset" + + +// /obj/item/food + +///from base of obj/item/food/attack(): (mob/living/eater, mob/feeder) +#define COMSIG_FOOD_EATEN "food_eaten" + +/// from base of /obj/item/slimepotion/speed/afterattack(): (obj/target, /obj/src, mob/user) +#define COMSIG_SPEED_POTION_APPLIED "speed_potion" + #define SPEED_POTION_STOP (1<<0) + diff --git a/code/__DEFINES/dcs/machinery_signals.dm b/code/__DEFINES/dcs/machinery_signals.dm new file mode 100644 index 00000000000..1b368ab614c --- /dev/null +++ b/code/__DEFINES/dcs/machinery_signals.dm @@ -0,0 +1,34 @@ +/** + * Signals for /obj/machinery and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +///from /obj/machinery/obj_break(damage_flag): (damage_flag) +#define COMSIG_MACHINERY_BROKEN "machinery_broken" +///from base power_change() when power is lost +#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost" +///from base power_change() when power is restored +#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored" + + +// /obj/machinery/camera + +#define COMSIG_CAMERA_ON "camera_on" +#define COMSIG_CAMERA_OFF "camera_off" +#define COMSIG_CAMERA_MOVED "camera_moved" + + +// /obj/machinery/door + +#define COMSIG_DOOR_OPEN "door_open" +#define COMSIG_DOOR_CLOSE "door_close" + + +// /obj/machinery/door/airlock + +#define COMSIG_AIRLOCK_OPEN "airlock_open" +#define COMSIG_AIRLOCK_CLOSE "airlock_close" + +/// ingame button pressed (/obj/machinery/button/button) +#define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed" diff --git a/code/__DEFINES/dcs/mob_signals.dm b/code/__DEFINES/dcs/mob_signals.dm new file mode 100644 index 00000000000..406d4541a28 --- /dev/null +++ b/code/__DEFINES/dcs/mob_signals.dm @@ -0,0 +1,205 @@ +/** + * Signals for /mob, /mob/living, and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +///from base of /mob/Login(): () +#define COMSIG_MOB_LOGIN "mob_login" +///called in human/login +#define COMSIG_HUMAN_LOGIN "human_login" +///from base of /mob/Logout(): () +#define COMSIG_MOB_LOGOUT "mob_logout" +///from base of mob/death(): (gibbed) +#define COMSIG_MOB_DEATH "mob_death" +///from base of mob/set_stat(): (new_stat) +#define COMSIG_MOB_STATCHANGE "mob_statchange" +///from base of mob/clickon(): (atom/A, params) +#define COMSIG_MOB_CLICKON "mob_clickon" +///from base of mob/MiddleClickOn(): (atom/A) +#define COMSIG_MOB_MIDDLECLICKON "mob_middleclickon" +///from base of mob/AltClickOn(): (atom/A) +#define COMSIG_MOB_ALTCLICKON "mob_altclickon" + #define COMSIG_MOB_CANCEL_CLICKON (1<<0) + +///from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj +#define COMSIG_MOB_ALLOWED "mob_allowed" +///from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources) +#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" + #define COMPONENT_BLOCK_MAGIC (1<<0) +///from base of mob/create_mob_hud(): () +#define COMSIG_MOB_HUD_CREATED "mob_hud_created" +///from base of atom/attack_hand(): (mob/user) +#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" +///from base of /obj/item/attack(): (mob/M, mob/user) +#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" + #define COMPONENT_ITEM_NO_ATTACK (1<<0) +///from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone) +#define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage" +///from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters) +#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" +///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, proxiumity_flag, click_parameters) +#define COMSIG_MOB_ITEM_ATTACK_QDELETED "mob_item_attack_qdeleted" +///from base of mob/RangedAttack(): (atom/A, params) +#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" +///from base of /mob/throw_item(): (atom/target) +#define COMSIG_MOB_THROW "mob_throw" +///called when a user willingly drops something (i.e. keybind, or UI action) +#define COMSIG_MOB_WILLINGLY_DROP "mob_willingly_drop" +///called when a user is getting new weapon and we want to remove previous weapon to clear hands +#define COMSIG_MOB_WEAPON_APPEARS "mob_weapon_appears" +///from base of /mob/verb/examinate(): (atom/target) +#define COMSIG_MOB_EXAMINATE "mob_examinate" +///from base of /mob/update_sight(): () +#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" +////from /mob/living/say(): () +#define COMSIG_MOB_SAY "mob_say" + #define COMPONENT_UPPERCASE_SPEECH (1<<0) + // used to access COMSIG_MOB_SAY argslist + #define SPEECH_MESSAGE 1 + // #define SPEECH_BUBBLE_TYPE 2 + #define SPEECH_SPANS 3 + /* #define SPEECH_SANITIZE 4 + #define SPEECH_LANGUAGE 5 + #define SPEECH_IGNORE_SPAM 6 + #define SPEECH_FORCED 7 */ + +///from /mob/say_dead(): (mob/speaker, message) +#define COMSIG_MOB_DEADSAY "mob_deadsay" + #define MOB_DEADSAY_SIGNAL_INTERCEPT (1<<0) + +/// Signal fired when an emote is used but before it's executed. +///from /datum/emote/proc/try_run_emote(): (key, intentional) +#define COMSIG_MOB_PREEMOTE "mob_preemote" + // Use these to block execution of emotes from components. + /// Return this to block an emote and let the user know the emote is unusable. + #define COMPONENT_BLOCK_EMOTE_UNUSABLE (1<<0) + /// Return this to block an emote silently. + #define COMPONENT_BLOCK_EMOTE_SILENT (1<<1) +/// General signal fired when a mob does any old emote +///from /datum/emote/proc/run_emote(): (key, intentional) +#define COMSIG_MOB_EMOTE "mob_emote" +/// Specific signal used to track when a specific emote is used. +/// From /datum/emote/run_emote(): (P, key, m_type, message, intentional) +#define COMSIG_MOB_EMOTED(emote_key) "mob_emoted_[emote_key]" +/// From /datum/emote/select_param(): (target, key, intentional) +#define COMSIG_MOB_EMOTE_AT "mob_emote_at" + #define COMPONENT_BLOCK_EMOTE_ACTION (1<<2) + +///from base of mob/swap_hand(): (obj/item) +#define COMSIG_MOB_SWAPPING_HANDS "mob_swapping_hands" + /// Prevent the mob from changing hands + #define COMPONENT_BLOCK_SWAP (1<<0) + +/// Performed after the hands are swapped. +#define COMSIG_MOB_SWAPPED_HANDS "mob_swap_hands" + +#define COMSIG_MOB_AUTOMUTE_CHECK "automute_check" + #define WAIVE_AUTOMUTE_CHECK (1<<0) + +///Called when movement intent is toggled. +#define COMSIG_MOVE_INTENT_TOGGLED "move_intent_toggled" + +// /mob/living + +///from base of mob/living/resist() (/mob/living) +#define COMSIG_LIVING_RESIST "living_resist" +///from base of mob/living/IgniteMob() (/mob/living) +#define COMSIG_LIVING_IGNITED "living_ignite" +///from base of mob/living/ExtinguishMob() (/mob/living) +#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" +///from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, flags) +#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" +///sent when items with siemen coeff. of 0 block a shock: (power_source, source, siemens_coeff, dist_check) +#define COMSIG_LIVING_SHOCK_PREVENTED "living_shock_prevented" +///sent by stuff like stunbatons and tasers: () +#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" +///Sent from defibrillators when everything seems good and the user will be shocked: (defibber, defib_item, ghost) +#define COMSIG_LIVING_PRE_DEFIB "living_pre_defib" + /// If returned from LIVING_BEFORE_DEFIB or LIVING_DEFIBBED, the defibrillation will fail + #define COMPONENT_BLOCK_DEFIB (1<<0) + /// If returned, don't even show the "failed" message, defer to the signal handler to do that. + #define COMPONENT_DEFIB_OVERRIDE (1<<1) + /// If returned, allow to revive through false death. + #define COMPONENT_DEFIB_FAKEDEATH_ACCEPTED (1<<2) + /// If returned, make the fake death look like a unresponsive ghost. + #define COMPONENT_DEFIB_FAKEDEATH_DENIED (1<<3) +///send from defibs on ressurection: (defibber, defib_item, ghost) +#define COMSIG_LIVING_DEFIBBED "living_defibbed" +///from base of mob/living/revive() (full_heal, admin_revive) +#define COMSIG_LIVING_REVIVE "living_revive" +///from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs) +#define COMSIG_LIVING_REGENERATE_LIMBS "living_regen_limbs" +///from base of /obj/item/bodypart/proc/attach_limb(): (new_limb, special) allows you to fail limb attachment +#define COMSIG_LIVING_ATTACH_LIMB "living_attach_limb" + #define COMPONENT_NO_ATTACH (1<<0) +///sent from borg recharge stations: (amount, repairs) +#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge" +///sent when a mob enters a borg charger +#define COMSIG_ENTERED_BORGCHARGER "enter_charger" +///sent when a mob exits a borg charger +#define COMSIG_EXITED_BORGCHARGER "exit_charger" +///sent when a mob/login() finishes: (client) +#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" +///sent from borg mobs to itself, for tools to catch an upcoming destroy() due to safe decon (rather than detonation) +#define COMSIG_BORG_SAFE_DECONSTRUCT "borg_safe_decon" +///sent from living mobs every tick of fire +#define COMSIG_LIVING_FIRE_TICK "living_fire_tick" +//sent from living mobs when they are ahealed +#define COMSIG_LIVING_AHEAL "living_aheal" +//sent from mobs when they exit their body as a ghost +#define COMSIG_LIVING_GHOSTIZED "ghostized" +//sent from mobs when they re-enter their body as a ghost +#define COMSIG_LIVING_REENTERED_BODY "reentered_body" +//sent from a mob when they set themselves to DNR +#define COMSIG_LIVING_SET_DNR "set_dnr" + +//ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS! +// none of these are called as of right now, as there is nothing listening for them. +///from base of mob/living/Stun() (amount, ignore_canstun) +#define COMSIG_LIVING_STATUS_STUN "living_stun" +///from base of mob/living/Stun() (amount, ignore_canstun) +#define COMSIG_LIVING_STATUS_WEAKEN "living_weaken" +///from base of mob/living/Knockdown() (amount, ignore_canstun) +///#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" // one day +///from base of mob/living/Paralyse() (amount, ignore_canstun) +#define COMSIG_LIVING_STATUS_PARALYSE "living_paralyse" +///from base of mob/living/Immobilize() (amount, ignore_canstun) +#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" +///from base of mob/living/Unconscious() (amount, ignore_canstun) +#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" +///from base of mob/living/Sleeping() (amount, ignore_canstun) +#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping" + #define COMPONENT_NO_STUN (1<<0) //For all of them +///from base of /mob/living/can_track(): (mob/user) +#define COMSIG_LIVING_CAN_TRACK "mob_cantrack" + #define COMPONENT_CANT_TRACK (1<<0) + +///from base of mob/living/Write_Memory() +#define COMSIG_LIVING_WRITE_MEMORY "living_write_memory" + #define COMPONENT_DONT_WRITE_MEMORY (1<<0) + +// /mob/living/simple_animal signals +///from /mob/living/simple_animal/handle_environment() +#define COMSIG_SIMPLEANIMAL_HANDLE_ENVIRONMENT "simpleanimal_handle_environment" + +// /mob/living/simple_animal/hostile signals +#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget" + #define COMPONENT_HOSTILE_NO_ATTACK (1<<0) +//Called when a /mob/living/simple_animal/hostile fines a new target: (atom/source, give_target) +#define COMSIG_HOSTILE_FOUND_TARGET "comsig_hostile_found_target" + +///from of mob/MouseDrop(): (/atom/over, /mob/user) +#define COMSIG_DO_MOB_STRIP "do_mob_strip" + +// Sent when a mob spawner is attacked directly or via projectile. +#define COMSIG_SPAWNER_SET_TARGET "spawner_set_target" + +// ghost signals + +/// from observer_base/do_observe(): (mob/now_followed) +#define COMSIG_GHOST_START_OBSERVING "ghost_start_observing" +/// from observer_base/do_observe(): (mob/no_longer_following) +#define COMSIG_GHOST_STOP_OBSERVING "ghost_stop_observing" + +#define COMSIG_LIVING_CLEAR_STUNS "living_clear_stuns" diff --git a/code/__DEFINES/dcs/movable_signals.dm b/code/__DEFINES/dcs/movable_signals.dm new file mode 100644 index 00000000000..af529e08601 --- /dev/null +++ b/code/__DEFINES/dcs/movable_signals.dm @@ -0,0 +1,76 @@ +/** + * Signals for /atom/movable and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +///from base of atom/movable/Moved(): (/atom) +#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" + #define COMPONENT_MOVABLE_BLOCK_PRE_MOVE (1<<0) +///from base of atom/movable/Moved(): (/atom, dir) +#define COMSIG_MOVABLE_MOVED "movable_moved" +///from base of atom/movable/Cross(): (/atom/movable) +#define COMSIG_MOVABLE_CROSS "movable_cross" +///from base of atom/movable/Crossed(): (/atom/movable) +#define COMSIG_MOVABLE_CROSSED "movable_crossed" +///when we cross over something (calling Crossed() on that atom) +#define COMSIG_CROSSED_MOVABLE "crossed_movable" +///from base of atom/movable/Uncross(): (/atom/movable) +#define COMSIG_MOVABLE_UNCROSS "movable_uncross" + #define COMPONENT_MOVABLE_BLOCK_UNCROSS (1<<0) +///from base of atom/movable/Uncrossed(): (/atom/movable) +#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" +///from base of atom/movable/Bump(): (/atom) +#define COMSIG_MOVABLE_BUMP "movable_bump" +///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum) +#define COMSIG_MOVABLE_IMPACT "movable_impact" + #define COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH (1<<0) //if true, flip if the impact will push what it hits + #define COMPONENT_MOVABLE_IMPACT_NEVERMIND (1<<1) //return true if you destroyed whatever it was you're impacting and there won't be anything for hitby() to run on +///from base of mob/living/hitby(): (mob/living/target, hit_zone) +#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" +///from /atom/movable/proc/buckle_mob(): (mob/living/M, force, check_loc, buckle_mob_flags) +#define COMSIG_MOVABLE_PREBUCKLE "prebuckle" // this is the last chance to interrupt and block a buckle before it finishes + #define COMPONENT_BLOCK_BUCKLE (1<<0) +///from base of atom/movable/buckle_mob(): (mob, force) +#define COMSIG_MOVABLE_BUCKLE "buckle" +///from base of atom/movable/unbuckle_mob(): (mob, force) +#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" +///from /obj/vehicle/proc/driver_move, caught by the riding component to check and execute the driver trying to drive the vehicle +#define COMSIG_RIDDEN_DRIVER_MOVE "driver_move" + #define COMPONENT_DRIVER_BLOCK_MOVE (1<<0) +///from base of atom/movable/throw_at(): (list/args) +#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw" + #define COMPONENT_CANCEL_THROW (1<<0) +///from base of atom/movable/throw_at(): (datum/thrownthing, spin) +#define COMSIG_MOVABLE_POST_THROW "movable_post_throw" +///from base of datum/thrownthing/finalize(): (obj/thrown_object, datum/thrownthing) used for when a throw is finished +#define COMSIG_MOVABLE_THROW_LANDED "movable_throw_landed" +///from base of atom/movable/onTransitZ(): (old_z, new_z) +#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" +///called when the movable is placed in an unaccessible area, used for stationloving: () +#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded" +///from base of atom/movable/Hear(): (proc args list(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)) +#define COMSIG_MOVABLE_HEAR "movable_hear" + #define HEARING_MESSAGE 1 + #define HEARING_SPEAKER 2 + #define HEARING_RAW_MESSAGE 4 + +/// Called just before something gets untilted +#define COMSIG_MOVABLE_TRY_UNTILT "movable_try_untilt" + /// Return this to block an untilt attempt + #define COMPONENT_BLOCK_UNTILT (1<<0) +/// Called when something gets untilted, from /datum/element/tilted/proc/do_untilt(atom/movable/source, mob/user) +#define COMSIG_MOVABLE_UNTILTED "movable_untilted" + +///called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source) +#define COMSIG_MOVABLE_DISPOSING "movable_disposing" +///called when the movable is removed from a disposal holder object: /obj/structure/disposalpipe/proc/expel(): (obj/structure/disposalholder/H, turf/T, direction) +#define COMSIG_MOVABLE_EXIT_DISPOSALS "movable_exit_disposals" + +/// from base of atom/movable/Process_Spacemove(): (movement_dir, continuous_move) +#define COMSIG_MOVABLE_SPACEMOVE "spacemove" + #define COMSIG_MOVABLE_STOP_SPACEMOVE (1<<0) + +// Note that this is only defined for actions because this could be a good bit expensive otherwise +/// From base of /atom/movable/screen/movable/action_button/MouseWheel(src, delta_x, delta_y, location, control, params) +#define COMSIG_ACTION_SCROLLED "action_scrolled" diff --git a/code/__DEFINES/dcs/obj_signals.dm b/code/__DEFINES/dcs/obj_signals.dm new file mode 100644 index 00000000000..d002a32fe18 --- /dev/null +++ b/code/__DEFINES/dcs/obj_signals.dm @@ -0,0 +1,63 @@ +/** + * Signals for /obj and subtypes that have too few related signals to put in separate files. + * Doc format: `/// when the signal is called: (signal arguments)`. + * All signals send the source datum of the signal as the first argument + */ + +// /obj + +///from base of obj/deconstruct(): (disassembled) +#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" +///called in /obj/structure/setAnchored(): (value) +#define COMSIG_OBJ_SETANCHORED "obj_setanchored" +///from base of code/game/machinery +#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" +///called in /obj/update_icon() +#define COMSIG_OBJ_UPDATE_ICON "obj_update_icon" + + +// /obj/projectile (sent to the firer) + +///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle) +#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit" +///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle) +#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" +///from base of /obj/projectile/proc/fire(): (obj/projectile, atom/original_target) +#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" +///from the base of /obj/projectile/proc/fire(): () +#define COMSIG_PROJECTILE_FIRE "projectile_fire" +///sent to targets during the process_hit proc of projectiles +#define COMSIG_PROJECTILE_PREHIT "com_proj_prehit" +///sent to targets during the process_hit proc of projectiles +#define COMSIG_PROJECTILE_RANGE_OUT "projectile_range_out" +///sent when trying to force an embed (mainly for projectiles, only used in the embed element) +#define COMSIG_EMBED_TRY_FORCE "item_try_embed" +///sent to targets during the process_hit proc of projectiles +#define COMSIG_PELLET_CLOUD_INIT "pellet_cloud_init" + + +// /obj/mecha + +///sent from mecha action buttons to the mecha they're linked to +#define COMSIG_MECHA_ACTION_ACTIVATE "mecha_action_activate" + +/// cable was placed or joined somewhere : (turf) +#define COMSIG_GLOB_CABLE_UPDATED "!cable_updated" + + +// /obj/structure/cursed_slot_machine + +/// from /obj/structure/cursed_slot_machine/handle_status_effect() when someone pulls the handle on the slot machine +#define COMSIG_CURSED_SLOT_MACHINE_USE "cursed_slot_machine_use" + #define SLOT_MACHINE_USE_CANCEL (1<<0) //! we've used up the number of times we may use this slot machine. womp womp. + #define SLOT_MACHINE_USE_POSTPONE (1<<1) //! we haven't used up all our attempts to gamble away our life but we should chill for a few seconds +/// from /obj/structure/cursed_slot_machine/determine_victor() when someone loses. +#define COMSIG_CURSED_SLOT_MACHINE_LOST "cursed_slot_machine_lost" +/// from /obj/structure/cursed_slot_machine/determine_victor() when someone finally wins. +#define COMSIG_GLOB_CURSED_SLOT_MACHINE_WON "cursed_slot_machine_won" + + +// other subtypes + +///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases) +#define COMSIG_GIBS_STREAK "gibs_streak" diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm deleted file mode 100644 index 07c33b97a78..00000000000 --- a/code/__DEFINES/dcs/signals.dm +++ /dev/null @@ -1,1050 +0,0 @@ -// All signals. Format: -// When the signal is called: (signal arguments) -// All signals send the source datum of the signal as the first argument - -// global signals -// These are signals which can be listened to by any component on any parent -// start global signals with "!", this used to be necessary but now it's just a formatting choice - -///from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args) -#define COMSIG_GLOB_NEW_Z "!new_z" -/// called after a successful var edit somewhere in the world: (list/args) -#define COMSIG_GLOB_VAR_EDIT "!var_edit" -/// called after an explosion happened : (epicenter, devastation_range, heavy_impact_range, light_impact_range, took, orig_dev_range, orig_heavy_range, orig_light_range) -#define COMSIG_GLOB_EXPLOSION "!explosion" -/// mob was created somewhere : (mob) -#define COMSIG_GLOB_MOB_CREATED "!mob_created" -/// mob died somewhere : (mob , gibbed) -#define COMSIG_GLOB_MOB_DEATH "!mob_death" -/// global living say plug - use sparingly: (mob/speaker , message) -#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" -/// called by datum/cinematic/play() : (datum/cinematic/new_cinematic) -#define COMSIG_GLOB_PLAY_CINEMATIC "!play_cinematic" - #define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0) -/// ingame button pressed (/obj/machinery/button/button) -#define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed" - -/// job subsystem has spawned and equipped a new mob -#define COMSIG_GLOB_JOB_AFTER_SPAWN "!job_after_spawn" - -/// cable was placed or joined somewhere : (turf) -#define COMSIG_GLOB_CABLE_UPDATED "!cable_updated" - - -/// signals from globally accessible objects - -///from SSsun when the sun changes position : (azimuth) -#define COMSIG_SUN_MOVED "sun_moved" - -///from SSsecurity_level on planning security level change : (previous_level_number, new_level_number) -#define COMSIG_SECURITY_LEVEL_CHANGE_PLANNED "security_level_change_planned" -///from SSsecurity_level when the security level changes : (previous_level_number, new_level_number) -#define COMSIG_SECURITY_LEVEL_CHANGED "security_level_changed" - -////////////////////////////////////////////////////////////////// - -// /datum signals -/// when a component is added to a datum: (/datum/component) -#define COMSIG_COMPONENT_ADDED "component_added" -/// before a component is removed from a datum because of RemoveComponent: (/datum/component) -#define COMSIG_COMPONENT_REMOVING "component_removing" -/// before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation -#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" -/// just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called -#define COMSIG_PARENT_QDELETING "parent_qdeleting" -/// generic topic handler (usr, href_list) -#define COMSIG_TOPIC "handle_topic" - -/// fires on the target datum when an element is attached to it (/datum/element) -#define COMSIG_ELEMENT_ATTACH "element_attach" -/// fires on the target datum when an element is attached to it (/datum/element) -#define COMSIG_ELEMENT_DETACH "element_detach" - -// /atom signals -///from base of atom/proc/Initialize(): sent any time a new atom is created -#define COMSIG_ATOM_CREATED "atom_created" -//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization -#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success" -///from base of atom/attackby(): (/obj/item, /mob/living, params) -#define COMSIG_PARENT_ATTACKBY "atom_attackby" -///Return this in response if you don't want afterattack to be called - #define COMPONENT_NO_AFTERATTACK (1<<0) -///from base of atom/attack_hulk(): (/mob/living/carbon/human) -#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" -///from base of atom/animal_attack(): (/mob/user) -#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal" -///from base of atom/examine(): (examining_user, examine_list) -#define COMSIG_PARENT_EXAMINE "atom_examine" -///from base of atom/examine_more(): (examining_user, examine_list) -#define COMSIG_PARENT_EXAMINE_MORE "atom_examine_more" -///from base of atom/get_examine_name(): (/mob, list/overrides) -#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" - //Positions for overrides list - #define EXAMINE_POSITION_ARTICLE (1<<0) - #define EXAMINE_POSITION_BEFORE (1<<1) - //End positions - #define COMPONENT_EXNAME_CHANGED (1<<0) - ///from base of [/atom/proc/update_appearance]: (updates) - #define COMSIG_ATOM_UPDATE_APPEARANCE "atom_update_appearance" - /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its name. - #define COMSIG_ATOM_NO_UPDATE_NAME UPDATE_NAME - /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its desc. - #define COMSIG_ATOM_NO_UPDATE_DESC UPDATE_DESC - /// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its icon. - #define COMSIG_ATOM_NO_UPDATE_ICON UPDATE_ICON -///from base of [/atom/proc/update_name]: (updates) -#define COMSIG_ATOM_UPDATE_NAME "atom_update_name" -///from base of [/atom/proc/update_desc]: (updates) -#define COMSIG_ATOM_UPDATE_DESC "atom_update_desc" -///from base of [/atom/update_icon]: () -#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" - /// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its icon state. - #define COMSIG_ATOM_NO_UPDATE_ICON_STATE UPDATE_ICON_STATE - /// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its overlays. - #define COMSIG_ATOM_NO_UPDATE_OVERLAYS UPDATE_OVERLAYS -///Sent after [atom/update_icon_state] is called by [/atom/update_icon]: () -#define COMSIG_ATOM_UPDATE_ICON_STATE "atom_update_icon_state" -///Sent after [atom/update_overlays] is called by [/atom/update_icon]: (list/new_overlays) -#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" -///from base of [/atom/update_icon]: (signalOut, did_anything) -#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" -///from base of atom/Entered(): (atom/movable/entering, /atom) -#define COMSIG_ATOM_ENTERED "atom_entered" -///from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) -#define COMSIG_ATOM_EXIT "atom_exit" - #define COMPONENT_ATOM_BLOCK_EXIT (1<<0) -///from base of atom/Exited(): (atom/movable/exiting, atom/newloc) -#define COMSIG_ATOM_EXITED "atom_exited" -///from base of atom/Bumped(): (/atom/movable) -#define COMSIG_ATOM_BUMPED "atom_bumped" -///from base of atom/ex_act(): (severity, target) -#define COMSIG_ATOM_EX_ACT "atom_ex_act" -///from base of atom/emp_act(): (severity) -#define COMSIG_ATOM_EMP_ACT "atom_emp_act" -///from base of atom/fire_act(): (exposed_temperature, exposed_volume) -#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" -///from base of atom/bullet_act(): (/obj/projectile, def_zone) -#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" -///from base of atom/blob_act(): (/obj/structure/blob) -#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" -///from base of atom/acid_act(): (acidpwr, acid_volume) -#define COMSIG_ATOM_ACID_ACT "atom_acid_act" -///from base of atom/emag_act(): (/mob/user) -#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" -///from base of atom/rad_act(intensity) -#define COMSIG_ATOM_RAD_ACT "atom_rad_act" -///from base of atom/narsie_act(): () -#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" -///from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode) -#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" -///from base of atom/singularity_pull(): (S, current_size) -#define COMSIG_ATOM_SING_PULL "atom_sing_pull" -///from obj/machinery/bsa/full/proc/fire(): () -#define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass" - #define COMSIG_ATOM_BLOCKS_BSA_BEAM (1<<0) -///from base of atom/set_light(): (l_range, l_power, l_color) -#define COMSIG_ATOM_SET_LIGHT "atom_set_light" -///from base of atom/setDir(): (old_dir, new_dir) -#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" -///from base of atom/handle_atom_del(): (atom/deleted) -#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" -///from base of atom/has_gravity(): (turf/location, list/forced_gravities) -#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity" -///from proc/get_rad_contents(): () -#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe" - #define COMPONENT_BLOCK_RADIATION (1<<0) -///from base of datum/radiation_wave/radiate(): (strength) -#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" - #define COMPONENT_BLOCK_CONTAMINATION (1<<0) -///from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width) -#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" - #define COMPONENT_RAD_WAVE_HANDLED (1<<0) -///from base of atom/screwdriver_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" -///from base of atom/wrench_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_WRENCH_ACT "atom_wrench_act" -///from base of atom/multitool_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_MULTITOOL_ACT "atom_multitool_act" -///from base of atom/welder_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_WELDER_ACT "atom_welder_act" -///from base of atom/wirecutter_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_WIRECUTTER_ACT "atom_wirecutter_act" -///from base of atom/crowbar_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_CROWBAR_ACT "atom_crowbar_act" -///from base of atom/analyser_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_ANALYSER_ACT "atom_analyser_act" - #define COMPONENT_BLOCK_TOOL_ATTACK (1<<0) -///called when teleporting into a protected turf: (channel, turf/origin) -#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" - #define COMPONENT_BLOCK_TELEPORT (1<<0) -///called when an atom is added to the hearers on get_hearers_in_view(): (list/processing_list, list/hearers) -#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" -///called when an atom starts orbiting another atom: (atom) -#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin" -///called when an atom stops orbiting another atom: (atom) -#define COMSIG_ATOM_ORBIT_STOP "atom_orbit_stop" -/// called on an atom who has stopped orbiting another atom (atom/orbiter, atom/formerly_orbited) -#define COMSIG_ATOM_ORBITER_STOP "atom_orbiter_stop" -///from base of atom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) -#define COMSIG_ATOM_HITBY "atom_hitby" -/// Called when an atom is sharpened or dulled. -#define COMSIG_ATOM_UPDATE_SHARPNESS "atom_update_sharpness" -///from base of atom/atom_prehit(obj/item/projectile/P): -#define COMSIG_ATOM_PREHIT "atom_prehit" - #define ATOM_PREHIT_SUCCESS (1<<0) - #define ATOM_PREHIT_FAILURE (1<<1) - -// Attack signals. These should share the returned flags, to standardize the attack chain. -// The chain currently works like: -// tool_act -> pre_attack -> target.attackby (item.attack) -> afterattack -// You can use these signal responses to cancel the attack chain at a certain point from most attack signal types. - /// This response cancels the attack chain entirely. If sent early, it might cause some later effects to be skipped. - #define COMPONENT_CANCEL_ATTACK_CHAIN (1<<0) - -/// Called from atom/Initialize() of target: (atom/target) -#define COMSIG_ATOM_INITIALIZED_ON "atom_initialized_on" - -///////////////// -///from base of atom/attack_ghost(): (mob/dead/observer/ghost) -#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" -///from base of atom/attack_hand(): (mob/user) -#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" -///from base of atom/attack_paw(): (mob/user) -#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" - #define COMPONENT_NO_ATTACK_HAND (1<<0) //works on all 3. -//This signal return value bitflags can be found in __DEFINES/misc.dm - -///called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels) -#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" -///called on a movable (NOT living) when someone starts pulling it (atom/movable/puller, state, force) -#define COMSIG_ATOM_START_PULL "movable_start_pull" -///called on /living when someone starts pulling it (atom/movable/puller, state, force) -#define COMSIG_LIVING_START_PULL "living_start_pull" -///called on /living, when pull is attempted, but before it completes, from base of [/mob/living/start_pulling]: (atom/movable/thing, force) -#define COMSIG_LIVING_TRY_PULL "living_try_pull" - #define COMSIG_LIVING_CANCEL_PULL (1 << 0) - -///////////////// - -// /client signals - -/// from base of client/Click(): (atom/target, atom/location, control, params, mob/user) -#define COMSIG_CLIENT_CLICK "atom_client_click" -/// from base of client/MouseDown(): (/client, object, location, control, params) -#define COMSIG_CLIENT_MOUSEDOWN "client_mousedown" -/// from base of client/MouseUp(): (/client, object, location, control, params) -#define COMSIG_CLIENT_MOUSEUP "client_mouseup" - #define COMPONENT_CLIENT_MOUSEUP_INTERCEPT (1<<0) -/// from base of client/MouseUp(): (/client, object, location, control, params) -#define COMSIG_CLIENT_MOUSEDRAG "client_mousedrag" - -///from base of area/Entered(): (/area) -#define COMSIG_ENTER_AREA "enter_area" -///from base of area/Exited(): (/area) -#define COMSIG_EXIT_AREA "exit_area" -///from base of atom/Click(): (location, control, params, mob/user) -#define COMSIG_CLICK "atom_click" -///from base of atom/ShiftClick(): (/mob) -#define COMSIG_CLICK_SHIFT "shift_click" - #define COMPONENT_ALLOW_EXAMINATE (1<<0) //Allows the user to examinate regardless of client.eye. -///from base of atom/CtrlClickOn(): (/mob) -#define COMSIG_CLICK_CTRL "ctrl_click" -///from base of atom/AltClick(): (/mob) -#define COMSIG_CLICK_ALT "alt_click" - /// Cancel the alt-click, since this isn't properly part of the attack chain - #define COMPONENT_CANCEL_ALTCLICK (1<<0) -///from base of atom/CtrlShiftClick(/mob) -#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" -///from base of atom/MouseDrop(): (/atom/over, /mob/user) -#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" - #define COMPONENT_NO_MOUSEDROP (1<<0) -///from base of atom/MouseDrop_T: (/atom/from, /mob/user) -#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" - - -///from base of /datum/local_powernet/proc/power_change() -#define COMSIG_POWERNET_POWER_CHANGE "powernet_power_change" - -// /area signals -///from base of area/Entered(): (atom/movable/M) -#define COMSIG_AREA_ENTERED "area_entered" -///from base of area/Exited(): (atom/movable/M) -#define COMSIG_AREA_EXITED "area_exited" - -// /turf signals - -///from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps) -#define COMSIG_TURF_CHANGE "turf_change" -///from base of atom/has_gravity(): (atom/asker, list/forced_gravities) -#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" -///from base of turf/New(): (turf/source, direction) -#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" - -// /atom/movable signals - -///from base of atom/movable/Moved(): (/atom) -#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" - #define COMPONENT_MOVABLE_BLOCK_PRE_MOVE (1<<0) -///from base of atom/movable/Moved(): (/atom, dir) -#define COMSIG_MOVABLE_MOVED "movable_moved" -///from base of atom/movable/Cross(): (/atom/movable) -#define COMSIG_MOVABLE_CROSS "movable_cross" -///from base of atom/movable/Crossed(): (/atom/movable) -#define COMSIG_MOVABLE_CROSSED "movable_crossed" -///when we cross over something (calling Crossed() on that atom) -#define COMSIG_CROSSED_MOVABLE "crossed_movable" -///from base of atom/movable/Uncross(): (/atom/movable) -#define COMSIG_MOVABLE_UNCROSS "movable_uncross" - #define COMPONENT_MOVABLE_BLOCK_UNCROSS (1<<0) -///from base of atom/movable/Uncrossed(): (/atom/movable) -#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" -///from base of atom/movable/Bump(): (/atom) -#define COMSIG_MOVABLE_BUMP "movable_bump" -///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum) -#define COMSIG_MOVABLE_IMPACT "movable_impact" - #define COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH (1<<0) //if true, flip if the impact will push what it hits - #define COMPONENT_MOVABLE_IMPACT_NEVERMIND (1<<1) //return true if you destroyed whatever it was you're impacting and there won't be anything for hitby() to run on -///from base of mob/living/hitby(): (mob/living/target, hit_zone) -#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" -///from /atom/movable/proc/buckle_mob(): (mob/living/M, force, check_loc, buckle_mob_flags) -#define COMSIG_MOVABLE_PREBUCKLE "prebuckle" // this is the last chance to interrupt and block a buckle before it finishes - #define COMPONENT_BLOCK_BUCKLE (1<<0) -///from base of atom/movable/buckle_mob(): (mob, force) -#define COMSIG_MOVABLE_BUCKLE "buckle" -///from base of atom/movable/unbuckle_mob(): (mob, force) -#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" -///from /obj/vehicle/proc/driver_move, caught by the riding component to check and execute the driver trying to drive the vehicle -#define COMSIG_RIDDEN_DRIVER_MOVE "driver_move" - #define COMPONENT_DRIVER_BLOCK_MOVE (1<<0) -///from base of atom/movable/throw_at(): (list/args) -#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw" - #define COMPONENT_CANCEL_THROW (1<<0) -///from base of atom/movable/throw_at(): (datum/thrownthing, spin) -#define COMSIG_MOVABLE_POST_THROW "movable_post_throw" -///from base of datum/thrownthing/finalize(): (obj/thrown_object, datum/thrownthing) used for when a throw is finished -#define COMSIG_MOVABLE_THROW_LANDED "movable_throw_landed" -///from base of atom/movable/onTransitZ(): (old_z, new_z) -#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" -///called when the movable is placed in an unaccessible area, used for stationloving: () -#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded" -///from base of atom/movable/Hear(): (proc args list(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)) -#define COMSIG_MOVABLE_HEAR "movable_hear" - #define HEARING_MESSAGE 1 - #define HEARING_SPEAKER 2 -// #define HEARING_LANGUAGE 3 - #define HEARING_RAW_MESSAGE 4 - /* #define HEARING_RADIO_FREQ 5 - #define HEARING_SPANS 6 - #define HEARING_MESSAGE_MODE 7 */ - -/// Called just before something gets untilted -#define COMSIG_MOVABLE_TRY_UNTILT "movable_try_untilt" - /// Return this to block an untilt attempt - #define COMPONENT_BLOCK_UNTILT (1<<0) -/// Called when something gets untilted, from /datum/element/tilted/proc/do_untilt(atom/movable/source, mob/user) -#define COMSIG_MOVABLE_UNTILTED "movable_untilted" - -///called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source) -#define COMSIG_MOVABLE_DISPOSING "movable_disposing" -///called when the movable is removed from a disposal holder object: /obj/structure/disposalpipe/proc/expel(): (obj/structure/disposalholder/H, turf/T, direction) -#define COMSIG_MOVABLE_EXIT_DISPOSALS "movable_exit_disposals" - -/// from base of atom/movable/Process_Spacemove(): (movement_dir, continuous_move) -#define COMSIG_MOVABLE_SPACEMOVE "spacemove" - #define COMSIG_MOVABLE_STOP_SPACEMOVE (1<<0) - -// /datum/mind signals - -///from base of /datum/mind/proc/transfer_to(mob/living/new_character) -#define COMSIG_MIND_TRANSER_TO "mind_transfer_to" -///called on the mob instead of the mind -#define COMSIG_BODY_TRANSFER_TO "body_transfer_to" -///called when the mind is initialized (called every time the mob logins) -#define COMSIG_MIND_INITIALIZE "mind_initialize" - -// /mob signals - -///from base of /mob/Login(): () -#define COMSIG_MOB_LOGIN "mob_login" -///called in human/login -#define COMSIG_HUMAN_LOGIN "human_login" -///from base of /mob/Logout(): () -#define COMSIG_MOB_LOGOUT "mob_logout" -///from base of mob/death(): (gibbed) -#define COMSIG_MOB_DEATH "mob_death" -///from base of mob/set_stat(): (new_stat) -#define COMSIG_MOB_STATCHANGE "mob_statchange" -///from base of mob/clickon(): (atom/A, params) -#define COMSIG_MOB_CLICKON "mob_clickon" -///from base of mob/MiddleClickOn(): (atom/A) -#define COMSIG_MOB_MIDDLECLICKON "mob_middleclickon" -///from base of mob/AltClickOn(): (atom/A) -#define COMSIG_MOB_ALTCLICKON "mob_altclickon" - #define COMSIG_MOB_CANCEL_CLICKON (1<<0) - -///from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj -#define COMSIG_MOB_ALLOWED "mob_allowed" -///from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources) -#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" - #define COMPONENT_BLOCK_MAGIC (1<<0) -///from base of mob/create_mob_hud(): () -#define COMSIG_MOB_HUD_CREATED "mob_hud_created" -///from base of atom/attack_hand(): (mob/user) -#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" -///from base of /obj/item/attack(): (mob/M, mob/user) -#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" - #define COMPONENT_ITEM_NO_ATTACK (1<<0) -///from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone) -#define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage" -///from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters) -#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" -///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, proxiumity_flag, click_parameters) -#define COMSIG_MOB_ITEM_ATTACK_QDELETED "mob_item_attack_qdeleted" -///from base of mob/RangedAttack(): (atom/A, params) -#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" -///from base of /mob/throw_item(): (atom/target) -#define COMSIG_MOB_THROW "mob_throw" -///called when a user willingly drops something (i.e. keybind, or UI action) -#define COMSIG_MOB_WILLINGLY_DROP "mob_willingly_drop" -///called when a user is getting new weapon and we want to remove previous weapon to clear hands -#define COMSIG_MOB_WEAPON_APPEARS "mob_weapon_appears" -///from base of /mob/verb/examinate(): (atom/target) -#define COMSIG_MOB_EXAMINATE "mob_examinate" -///from base of /mob/update_sight(): () -#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" -////from /mob/living/say(): () -#define COMSIG_MOB_SAY "mob_say" - #define COMPONENT_UPPERCASE_SPEECH (1<<0) - // used to access COMSIG_MOB_SAY argslist - #define SPEECH_MESSAGE 1 - // #define SPEECH_BUBBLE_TYPE 2 - #define SPEECH_SPANS 3 - /* #define SPEECH_SANITIZE 4 - #define SPEECH_LANGUAGE 5 - #define SPEECH_IGNORE_SPAM 6 - #define SPEECH_FORCED 7 */ - -///from /mob/say_dead(): (mob/speaker, message) -#define COMSIG_MOB_DEADSAY "mob_deadsay" - #define MOB_DEADSAY_SIGNAL_INTERCEPT (1<<0) - -/// Signal fired when an emote is used but before it's executed. -///from /datum/emote/proc/try_run_emote(): (key, intentional) -#define COMSIG_MOB_PREEMOTE "mob_preemote" - // Use these to block execution of emotes from components. - /// Return this to block an emote and let the user know the emote is unusable. - #define COMPONENT_BLOCK_EMOTE_UNUSABLE (1<<0) - /// Return this to block an emote silently. - #define COMPONENT_BLOCK_EMOTE_SILENT (1<<1) -/// General signal fired when a mob does any old emote -///from /datum/emote/proc/run_emote(): (key, intentional) -#define COMSIG_MOB_EMOTE "mob_emote" -/// Specific signal used to track when a specific emote is used. -/// From /datum/emote/run_emote(): (P, key, m_type, message, intentional) -#define COMSIG_MOB_EMOTED(emote_key) "mob_emoted_[emote_key]" -/// From /datum/emote/select_param(): (target, key, intentional) -#define COMSIG_MOB_EMOTE_AT "mob_emote_at" - #define COMPONENT_BLOCK_EMOTE_ACTION (1<<2) - -///from base of mob/swap_hand(): (obj/item) -#define COMSIG_MOB_SWAPPING_HANDS "mob_swapping_hands" - /// Prevent the mob from changing hands - #define COMPONENT_BLOCK_SWAP (1<<0) - -/// Performed after the hands are swapped. -#define COMSIG_MOB_SWAPPED_HANDS "mob_swap_hands" - -#define COMSIG_MOB_AUTOMUTE_CHECK "automute_check" - #define WAIVE_AUTOMUTE_CHECK (1<<0) - -///Called when movement intent is toggled. -#define COMSIG_MOVE_INTENT_TOGGLED "move_intent_toggled" - -// /mob/living signals - -///from base of mob/living/resist() (/mob/living) -#define COMSIG_LIVING_RESIST "living_resist" -///from base of mob/living/IgniteMob() (/mob/living) -#define COMSIG_LIVING_IGNITED "living_ignite" -///from base of mob/living/ExtinguishMob() (/mob/living) -#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" -///from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, flags) -#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" -///sent when items with siemen coeff. of 0 block a shock: (power_source, source, siemens_coeff, dist_check) -#define COMSIG_LIVING_SHOCK_PREVENTED "living_shock_prevented" -///sent by stuff like stunbatons and tasers: () -#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" -///Sent from defibrillators when everything seems good and the user will be shocked: (defibber, defib_item, ghost) -#define COMSIG_LIVING_PRE_DEFIB "living_pre_defib" - /// If returned from LIVING_BEFORE_DEFIB or LIVING_DEFIBBED, the defibrillation will fail - #define COMPONENT_BLOCK_DEFIB (1<<0) - /// If returned, don't even show the "failed" message, defer to the signal handler to do that. - #define COMPONENT_DEFIB_OVERRIDE (1<<1) - /// If returned, allow to revive through false death. - #define COMPONENT_DEFIB_FAKEDEATH_ACCEPTED (1<<2) - /// If returned, make the fake death look like a unresponsive ghost. - #define COMPONENT_DEFIB_FAKEDEATH_DENIED (1<<3) -///send from defibs on ressurection: (defibber, defib_item, ghost) -#define COMSIG_LIVING_DEFIBBED "living_defibbed" -///from base of mob/living/revive() (full_heal, admin_revive) -#define COMSIG_LIVING_REVIVE "living_revive" -///from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs) -#define COMSIG_LIVING_REGENERATE_LIMBS "living_regen_limbs" -///from base of /obj/item/bodypart/proc/attach_limb(): (new_limb, special) allows you to fail limb attachment -#define COMSIG_LIVING_ATTACH_LIMB "living_attach_limb" - #define COMPONENT_NO_ATTACH (1<<0) -///sent from borg recharge stations: (amount, repairs) -#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge" -///sent when a mob enters a borg charger -#define COMSIG_ENTERED_BORGCHARGER "enter_charger" -///sent when a mob exits a borg charger -#define COMSIG_EXITED_BORGCHARGER "exit_charger" -///sent when a mob/login() finishes: (client) -#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" -///sent from borg mobs to itself, for tools to catch an upcoming destroy() due to safe decon (rather than detonation) -#define COMSIG_BORG_SAFE_DECONSTRUCT "borg_safe_decon" -///sent from living mobs every tick of fire -#define COMSIG_LIVING_FIRE_TICK "living_fire_tick" -//sent from living mobs when they are ahealed -#define COMSIG_LIVING_AHEAL "living_aheal" -//sent from mobs when they exit their body as a ghost -#define COMSIG_LIVING_GHOSTIZED "ghostized" -//sent from mobs when they re-enter their body as a ghost -#define COMSIG_LIVING_REENTERED_BODY "reentered_body" -//sent from a mob when they set themselves to DNR -#define COMSIG_LIVING_SET_DNR "set_dnr" - -// Sent from a surgery step when blood is being splashed. (datum/surgery, mob/user, mob/target, zone, obj/item/tool) -#define COMSIG_SURGERY_BLOOD_SPLASH "surgery_blood_splash" - /// If returned from this signal, will prevent any surgery splashing. - #define COMPONENT_BLOOD_SPLASH_HANDLED (1<<0) - -// Sent from a surgery step when organs are being spread from an incision -#define COMSIG_SURGERY_GERM_SPREAD "surgery_germ_spread" - /// If returned from this signal, germ spread will be blocked. - #define COMPONENT_GERM_SPREAD_BLOCK (1<<0) - - -//ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS! -// none of these are called as of right now, as there is nothing listening for them. -///from base of mob/living/Stun() (amount, ignore_canstun) -#define COMSIG_LIVING_STATUS_STUN "living_stun" -///from base of mob/living/Stun() (amount, ignore_canstun) -#define COMSIG_LIVING_STATUS_WEAKEN "living_weaken" -///from base of mob/living/Knockdown() (amount, ignore_canstun) -///#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" // one day -///from base of mob/living/Paralyse() (amount, ignore_canstun) -#define COMSIG_LIVING_STATUS_PARALYSE "living_paralyse" -///from base of mob/living/Immobilize() (amount, ignore_canstun) -#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" -///from base of mob/living/Unconscious() (amount, ignore_canstun) -#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" -///from base of mob/living/Sleeping() (amount, ignore_canstun) -#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping" - #define COMPONENT_NO_STUN (1<<0) //For all of them -///from base of /mob/living/can_track(): (mob/user) -#define COMSIG_LIVING_CAN_TRACK "mob_cantrack" - #define COMPONENT_CANT_TRACK (1<<0) - -///from base of mob/living/Write_Memory() -#define COMSIG_LIVING_WRITE_MEMORY "living_write_memory" - #define COMPONENT_DONT_WRITE_MEMORY (1<<0) - -// /mob/living/simple_animal signals -///from /mob/living/simple_animal/handle_environment() -#define COMSIG_SIMPLEANIMAL_HANDLE_ENVIRONMENT "simpleanimal_handle_environment" - -// /mob/living/carbon signals - -///from base of mob/living/carbon/soundbang_act(): (list(intensity)) -#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" -///from /item/organ/proc/Insert() (/obj/item/organ/) -#define COMSIG_CARBON_GAIN_ORGAN "carbon_gain_organ" -///from /item/organ/proc/Remove() (/obj/item/organ/) -#define COMSIG_CARBON_LOSE_ORGAN "carbon_lose_organ" -///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent) -#define COMSIG_CARBON_EQUIP_HAT "carbon_equip_hat" -///from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent) -#define COMSIG_CARBON_UNEQUIP_HAT "carbon_unequip_hat" -///defined twice, in carbon and human's topics, fired when interacting with a valid embedded_object to pull it out (mob/living/carbon/target, /obj/item, /obj/item/bodypart/L) -#define COMSIG_CARBON_EMBED_RIP "item_embed_start_rip" -///called when removing a given item from a mob, from mob/living/carbon/remove_embedded_object(mob/living/carbon/target, /obj/item) -#define COMSIG_CARBON_EMBED_REMOVAL "item_embed_remove_safe" -/// From /mob/living/carbon/swap_hand(): Called when the user swaps their active hand -#define COMSIG_CARBON_SWAP_HANDS "carbon_swap_hands" -/// From /mob/living/carbon/toggle_throw_mode() -#define COMSIG_CARBON_TOGGLE_THROW "carbon_toggle_throw" -/// From /mob/living/carbon/human/hitby() -#define COMSIG_CARBON_THROWN_ITEM_CAUGHT "carbon_thrown_item_caught" -/// From /mob/living/carbon/flash_eyes() -#define COMSIG_CARBON_FLASH_EYES "carbon_flash_eyes" -/// From /mob/living/carbon/update_handcuffed() -#define COMSIG_CARBON_UPDATE_HANDCUFFED "carbon_update_handcuff" -/// From /mob/living/carbon/regenerate_icons() -#define COMSIG_CARBON_REGENERATE_ICONS "carbon_regen_icons" -/// From /mob/living/carbon/enter_stamcrit() -#define COMSIG_CARBON_ENTER_STAMINACRIT "carbon_enter_staminacrit" -/// From /mob/living/carbon/update_stamina() -#define COMSIG_CARBON_EXIT_STAMINACRIT "carbon_exit_staminacrit" -/// From /mob/living/carbon/handle_status_effects() -#define COMSIG_CARBON_STAMINA_REGENERATED "carbon_stamina_regenerated" - -// /mob/living/simple_animal/hostile signals -#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget" - #define COMPONENT_HOSTILE_NO_ATTACK (1<<0) -//Called when a /mob/living/simple_animal/hostile fines a new target: (atom/source, give_target) -#define COMSIG_HOSTILE_FOUND_TARGET "comsig_hostile_found_target" - -// /obj signals - -///from base of obj/deconstruct(): (disassembled) -#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" -///called in /obj/structure/setAnchored(): (value) -#define COMSIG_OBJ_SETANCHORED "obj_setanchored" -///from base of code/game/machinery -#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" -///from base of /turf/proc/levelupdate(). (intact) true to hide and false to unhide -#define COMSIG_OBJ_HIDE "obj_hide" -///called in /obj/update_icon() -#define COMSIG_OBJ_UPDATE_ICON "obj_update_icon" - -// /obj/machinery signals - -///from /obj/machinery/obj_break(damage_flag): (damage_flag) -#define COMSIG_MACHINERY_BROKEN "machinery_broken" -///from base power_change() when power is lost -#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost" -///from base power_change() when power is restored -#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored" - -// /obj/machinery/camera signals -#define COMSIG_CAMERA_ON "camera_on" -#define COMSIG_CAMERA_OFF "camera_off" -#define COMSIG_CAMERA_MOVED "camera_moved" - -// /obj/item signals - -///from base of obj/item/attack(): (/mob/living/target, /mob/living/user) -#define COMSIG_ITEM_ATTACK "item_attack" -///from base of obj/item/attack_self(): (/mob) -#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" - #define COMPONENT_NO_INTERACT (1<<0) -///from base of obj/item/attack_obj(): (/obj, /mob) -#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" - #define COMPONENT_NO_ATTACK_OBJ (1<<0) -///from base of obj/item/pre_attack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" - #define COMPONENT_NO_ATTACK (1<<0) -///from base of obj/item/pre_attack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_BEING_ATTACKED "item_being_attacked" -///from base of obj/item/afterattack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_AFTERATTACK "item_afterattack" -///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params) -#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted" -///from base of obj/item/equipped(): (/mob/equipper, slot) -///called on [/obj/item] before unequip from base of [mob/proc/doUnEquip]: (force, atom/newloc, no_move, invdrop, silent) -#define COMSIG_ITEM_PRE_UNEQUIP "item_pre_unequip" - ///only the pre unequip can be cancelled - #define COMPONENT_ITEM_BLOCK_UNEQUIP (1<<0) -#define COMSIG_ITEM_EQUIPPED "item_equip" -///from base of obj/item/dropped(): (mob/user) -#define COMSIG_ITEM_DROPPED "item_drop" -///from base of obj/item/pickup(): (/mob/taker) -#define COMSIG_ITEM_PICKUP "item_pickup" -///from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone) -#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" -///return a truthy value to prevent ensouling, checked in /datum/spell/lichdom/cast(): (mob/user) -#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" -///called before marking an object for retrieval, checked in /datum/spell/summonitem/cast() : (mob/user) -#define COMSIG_ITEM_MARK_RETRIEVAL "item_mark_retrieval" - #define COMPONENT_BLOCK_MARK_RETRIEVAL (1<<0) -///from base of obj/item/hit_reaction(): (list/args) -#define COMSIG_ITEM_HIT_REACT "item_hit_react" - #define COMPONENT_BLOCK_SUCCESSFUL (1 << 0) - #define COMPONENT_BLOCK_PERFECT (1 << 2) -///called on item when crossed by something (): (/atom/movable, mob/living/crossed) -#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" -///called on item when microwaved (): (obj/machinery/microwave/M) -#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" -///from base of item/sharpener/attackby(): (amount, max) -#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" - #define COMPONENT_SHARPEN_APPLIED (1<<0) - #define COMPONENT_BLOCK_SHARPEN_BLOCKED (1<<1) - #define COMPONENT_BLOCK_SHARPEN_ALREADY (1<<2) - #define COMPONENT_BLOCK_SHARPEN_MAXED (1<<3) -///from base of [/obj/item/proc/tool_check_callback]: (mob/living/user) -#define COMSIG_TOOL_IN_USE "tool_in_use" -///from base of [/obj/item/proc/tool_start_check]: (mob/living/user) -#define COMSIG_TOOL_START_USE "tool_start_use" -///from base of [/obj/item/proc/tool_attack_chain]: (atom/tool, mob/user) -#define COMSIG_TOOL_ATTACK "tool_attack" - #define COMPONENT_CANCEL_TOOLACT (1<<0) -///from [/obj/item/proc/disableEmbedding]: -#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" -///from [/obj/effect/mine/proc/triggermine]: -#define COMSIG_MINE_TRIGGERED "minegoboom" -/// Called by /obj/item/proc/worn_overlays(list/overlays, mutable_appearance/standing, isinhands, icon_file) -#define COMSIG_ITEM_GET_WORN_OVERLAYS "item_get_worn_overlays" -/// Called by /obj/item/assembly/signaler(called_from_radio) -#define COMSIG_ASSEMBLY_PULSED "item_assembly_pulsed" - -/// Defib-specific signals - -/// Called when a defibrillator is first applied to someone. (mob/living/user, mob/living/target, harmful) -#define COMSIG_DEFIB_PADDLES_APPLIED "defib_paddles_applied" - /// Defib is out of power. - #define COMPONENT_BLOCK_DEFIB_DEAD (1<<0) - /// Something else: we won't have a custom message for this and should let the defib handle it. - #define COMPONENT_BLOCK_DEFIB_MISC (1<<1) -/// Called when a defib has been successfully used, and a shock has been applied. (mob/living/user, mob/living/target, harmful, successful) -#define COMSIG_DEFIB_SHOCK_APPLIED "defib_zap" -/// Called when a defib's cooldown has run its course and it is once again ready. () -#define COMSIG_DEFIB_READY "defib_ready" - -// /obj/item signals for economy -///called when an item is sold by the exports subsystem -#define COMSIG_ITEM_SOLD "item_sold" -///called when a wrapped up structure is opened by hand -#define COMSIG_STRUCTURE_UNWRAPPED "structure_unwrapped" -#define COMSIG_ITEM_UNWRAPPED "item_unwrapped" -///called when a wrapped up item is opened by hand - #define COMSIG_ITEM_SPLIT_VALUE (1<<0) -///called when getting the item's exact ratio for cargo's profit. -#define COMSIG_ITEM_SPLIT_PROFIT "item_split_profits" -///called when getting the item's exact ratio for cargo's profit, without selling the item. -#define COMSIG_ITEM_SPLIT_PROFIT_DRY "item_split_profits_dry" - -// /obj/item/clothing signals - -///from [/mob/living/carbon/human/Move]: () -#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" -///from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit) -#define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle" - -// /obj/item/implant signals - -///from base of /obj/item/bio_chip/proc/activate(): () -#define COMSIG_IMPLANT_ACTIVATED "implant_activated" -///from base of /obj/item/bio_chip/proc/implant(): (list/args) -#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" - #define COMPONENT_STOP_IMPLANTING (1<<0) -///called on already installed implants when a new one is being added in /obj/item/bio_chip/proc/implant(): (list/args, obj/item/bio_chip/new_implant) -#define COMSIG_IMPLANT_OTHER "implant_other" - //#define COMPONENT_STOP_IMPLANTING (1<<0) //The name makes sense for both - #define COMPONENT_DELETE_NEW_IMPLANT (1<<1) - #define COMPONENT_DELETE_OLD_IMPLANT (1<<2) -///called on implants being implanted into someone with an uplink implant: (datum/component/uplink) -#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" - //This uses all return values of COMSIG_IMPLANT_OTHER - -/// called on implants, after a successful implantation: (mob/living/target, mob/user, silent, force) -#define COMSIG_IMPLANT_IMPLANTED "implant_implanted" - -/// called on implants, after an implant has been removed: (mob/living/source, silent, special) -#define COMSIG_IMPLANT_REMOVED "implant_removed" - -// /obj/item/pda signals - -///called on pda when the user changes the ringtone: (mob/living/user, new_ringtone) -#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" - #define COMPONENT_STOP_RINGTONE_CHANGE (1<<0) -#define COMSIG_PDA_CHECK_DETONATE "pda_check_detonate" - #define COMPONENT_PDA_NO_DETONATE (1<<0) - -// /obj/item/radio signals - -///called from base of /obj/item/radio/proc/set_frequency(): (list/args) -#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" - -// /obj/item/pen signals - -///called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user) -#define COMSIG_PEN_ROTATED "pen_rotated" - -// /obj/item/gun signals - -///called in /obj/item/gun/fire_gun (user, target, flag, params) -#define COMSIG_GUN_TRY_FIRE "gun_try_fire" - #define COMPONENT_CANCEL_GUN_FIRE (1<<0) -///called in /obj/item/gun/afterattack (user, target, flag, params) -#define COMSIG_MOB_TRY_FIRE "mob_fired_gun" -///called in /obj/item/gun/process_fire (user, target) -#define COMSIG_GUN_FIRED "gun_fired" -/// called in /datum/component/automatic_fire/proc/on_mouse_down: (client/clicker, atom/target, turf/location, control, params) -#define COMSIG_AUTOFIRE_ONMOUSEDOWN "autofire_onmousedown" - #define COMPONENT_AUTOFIRE_ONMOUSEDOWN_BYPASS (1<<0) -/// called in /datum/component/automatic_fire/proc/process_shot(): (atom/target, mob/living/shooter, allow_akimbo, params) -#define COMSIG_AUTOFIRE_SHOT "autofire_shot" - #define COMPONENT_AUTOFIRE_SHOT_SUCCESS (1<<0) - -// /obj/item/grenade signals - -///called in /obj/item/gun/process_fire (user, target, params, zone_override) -#define COMSIG_GRENADE_PRIME "grenade_prime" -///called in /obj/item/gun/process_fire (user, target, params, zone_override) -#define COMSIG_GRENADE_ARMED "grenade_armed" - -// /obj/projectile signals (sent to the firer) - -///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle) -#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit" -///from base of /obj/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle) -#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" -///from base of /obj/projectile/proc/fire(): (obj/projectile, atom/original_target) -#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" -///from the base of /obj/projectile/proc/fire(): () -#define COMSIG_PROJECTILE_FIRE "projectile_fire" -///sent to targets during the process_hit proc of projectiles -#define COMSIG_PROJECTILE_PREHIT "com_proj_prehit" -///sent to targets during the process_hit proc of projectiles -#define COMSIG_PROJECTILE_RANGE_OUT "projectile_range_out" -///sent when trying to force an embed (mainly for projectiles, only used in the embed element) -#define COMSIG_EMBED_TRY_FORCE "item_try_embed" - -///sent to targets during the process_hit proc of projectiles -#define COMSIG_PELLET_CLOUD_INIT "pellet_cloud_init" - -// /obj/mecha signals - -///sent from mecha action buttons to the mecha they're linked to -#define COMSIG_MECHA_ACTION_ACTIVATE "mecha_action_activate" - -// /mob/living/carbon/human signals - -///from mob/living/carbon/human/UnarmedAttack(): (atom/target, proximity) -#define COMSIG_HUMAN_EARLY_UNARMED_ATTACK "human_early_unarmed_attack" -///from mob/living/carbon/human/UnarmedAttack(): (atom/target, proximity) -#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" -///from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker) -#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" -///Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted) -#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" -///Whenever EquipRanked is called, called after job is set -#define COMSIG_JOB_RECEIVED "job_received" -// called after DNA is updated -#define COMSIG_HUMAN_UPDATE_DNA "human_update_dna" -/// From mob/living/carbon/human/change_body_accessory(): (mob/living/carbon/human/H, body_accessory_style) -#define COMSIG_HUMAN_CHANGE_BODY_ACCESSORY "human_change_body_accessory" - #define COMSIG_HUMAN_NO_CHANGE_APPEARANCE (1<<0) -/// From mob/living/carbon/human/change_head_accessory(): (mob/living/carbon/human/H, head_accessory_style) -#define COMSIG_HUMAN_CHANGE_HEAD_ACCESSORY "human_change_head_accessory" -//sent from living mobs when they parry -#define COMSIG_HUMAN_PARRY "human_parry" -///From base of mob/living/MobBump() (mob/living) -#define COMSIG_LIVING_MOB_BUMP "living_mob_bump" -///From mob/living/carbon/human/do_suicide() -#define COMSIG_HUMAN_SUICIDE_ACT "human_suicide_act" -/// Sent from mob/living/carbon/human/do_cpr(): (mob/living/carbon/human/H, new_seconds_of_life) -#define COMSIG_HUMAN_RECEIVE_CPR "human_receive_cpr" - -///From mob/living/carbon/human/attackedby(): (mob/living/carbon/human/attacker). Also found on species/disarm and species/harm -#define COMSIG_HUMAN_ATTACKED "human_attacked" - -///from /mob/living/carbon/human/proc/check_shields(): (atom/hit_by, damage, attack_text, attack_type, armour_penetration, damage_type) -#define COMSIG_HUMAN_CHECK_SHIELDS "human_check_shields" - #define SHIELD_BLOCK (1<<0) - -///from /mob/living/carbon/human/create_mob_hud() -#define COMSIG_HUMAN_CREATE_MOB_HUD "human_create_mob_hud" - -// /datum/species signals - -///from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species) -#define COMSIG_SPECIES_GAIN "species_gain" -///from datum/species/on_species_loss(): (datum/species/lost_species) -#define COMSIG_SPECIES_LOSS "species_loss" -///from /datum/species/proc/spec_hitby() -#define COMSIG_SPECIES_HITBY "species_hitby" - -// /datum/song signals - -///sent to the instrument when a song starts playing -#define COMSIG_SONG_START "song_start" -///sent to the instrument when a song stops playing -#define COMSIG_SONG_END "song_end" - -/*******Component Specific Signals*******/ -//Janitor - -///(): Returns bitflags of wet values. -#define COMSIG_TURF_IS_WET "check_turf_wet" -///(max_strength, immediate, duration_decrease = INFINITY): Returns bool. -#define COMSIG_TURF_MAKE_DRY "make_turf_try" -///called on an object to clean it of cleanables. Usualy with soap: (num/strength) -#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" - -//Creamed - -///called when you wash your face at a sink: (num/strength) -#define COMSIG_COMPONENT_CLEAN_FACE_ACT "clean_face_act" - -//Food - -///from base of obj/item/food/attack(): (mob/living/eater, mob/feeder) -#define COMSIG_FOOD_EATEN "food_eaten" - -//Reagent -///from base of atom/expose_reagents(): (/list, /datum/reagents, chemholder, volume_modifier) -#define COMSIG_ATOM_EXPOSE_REAGENTS "atom_expose_reagents" - -//Gibs - -///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases) -#define COMSIG_GIBS_STREAK "gibs_streak" - -// /datum/component/two_handed signals - -///from base of datum/component/two_handed/proc/wield(mob/living/carbon/user): (/mob/user) -#define COMSIG_TWOHANDED_WIELD "twohanded_wield" - #define COMPONENT_TWOHANDED_BLOCK_WIELD (1<<0) -///from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user) -#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" - -// /datum/action signals - -///from base of datum/action/proc/Trigger(): (datum/action) -#define COMSIG_ACTION_TRIGGER "action_trigger" - #define COMPONENT_ACTION_BLOCK_TRIGGER (1<<0) -/// From /datum/action/Grant(): (mob/grant_to) -#define COMSIG_ACTION_GRANTED "action_grant" -/// From /datum/action/Grant(): (datum/action) -#define COMSIG_MOB_GRANTED_ACTION "mob_action_grant" -/// From /datum/action/Remove(): (mob/removed_from) -#define COMSIG_ACTION_REMOVED "action_removed" -/// From /datum/action/Remove(): (datum/action) -#define COMSIG_MOB_REMOVED_ACTION "mob_action_removed" - -// Note that this is only defined for actions because this could be a good bit expensive otherwise -/// From base of /atom/movable/screen/movable/action_button/MouseWheel(src, delta_x, delta_y, location, control, params) -#define COMSIG_ACTION_SCROLLED "action_scrolled" - -// ghost signals - -/// from observer_base/do_observe(): (mob/now_followed) -#define COMSIG_GHOST_START_OBSERVING "ghost_start_observing" -/// from observer_base/do_observe(): (mob/no_longer_following) -#define COMSIG_GHOST_STOP_OBSERVING "ghost_stop_observing" - -//Xenobio hotkeys - -///from slime CtrlClickOn(): (/mob) -#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" -///from slime AltClickOn(): (/mob) -#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" -///from slime ShiftClickOn(): (/mob) -#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" -///from turf ShiftClickOn(): (/mob) -#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" -///from turf AltClickOn(): (/mob) -#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" -///from monkey CtrlClickOn(): (/mob) -#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" - -/// Alarm manager signals -#define COMSIG_TRIGGERED_ALARM "alarmmanager_triggered" -#define COMSIG_CANCELLED_ALARM "alarmmanager_cancelled" - -// /obj/machinery/door signals -#define COMSIG_DOOR_OPEN "door_open" -#define COMSIG_DOOR_CLOSE "door_close" - -// /obj/machinery/door/airlock signals -#define COMSIG_AIRLOCK_OPEN "airlock_open" -#define COMSIG_AIRLOCK_CLOSE "airlock_close" - -// /datum/objective signals -///from datum/objective/proc/find_target(list/target_blacklist) -#define COMSIG_OBJECTIVE_TARGET_FOUND "objective_target_found" -///from datum/objective/is_invalid_target() -#define COMSIG_OBJECTIVE_CHECK_VALID_TARGET "objective_check_valid_target" - #define OBJECTIVE_VALID_TARGET (1<<0) - #define OBJECTIVE_INVALID_TARGET (1<<1) - -#define COMSIG_LIVING_CLEAR_STUNS "living_clear_stuns" - -//MODsuit signals -/// Called when a module is selected to be the active one from on_select(obj/item/mod/module/module) -#define COMSIG_MOD_MODULE_SELECTED "mod_module_selected" -/// Called when a MOD deploys one or more of its parts. -#define COMSIG_MOD_DEPLOYED "mod_deployed" -/// Called when a MOD retracts one or more of its parts. -#define COMSIG_MOD_RETRACTED "mod_retracted" -/// Called when a MOD is finished toggling itself. -#define COMSIG_MOD_TOGGLED "mod_toggled" -/// Called when a MOD activation is called from toggle_activate(mob/user) -#define COMSIG_MOD_ACTIVATE "mod_activate" - /// Cancels the suit's activation - #define MOD_CANCEL_ACTIVATE (1 << 0) -/// Called when a MOD finishes having a module removed from it. -#define COMSIG_MOD_MODULE_REMOVED "mod_module_removed" -/// Called when a MOD finishes having a module added to it. -#define COMSIG_MOD_MODULE_ADDED "mod_module_added" -/// Called when a MOD is having modules removed from crowbar_act(mob/user, obj/crowbar) -#define COMSIG_MOD_MODULE_REMOVAL "mod_module_removal" - /// Cancels the removal of modules - #define MOD_CANCEL_REMOVAL (1 << 0) -/// Called when a module attempts to activate, however it does. At the end of checks so you can add some yourself, or work on trigger behavior (mob/user) -#define COMSIG_MODULE_TRIGGERED "mod_module_triggered" - /// Cancels activation, with no message. Include feedback on your cancel. - #define MOD_ABORT_USE (1<<0) -/// Called when a module activates, after all checks have passed and cooldown started. -#define COMSIG_MODULE_ACTIVATED "mod_module_activated" -/// Called when a module deactivates, after all checks have passed. -#define COMSIG_MODULE_DEACTIVATED "mod_module_deactivated" -/// Called when a module is used, after all checks have passed and cooldown started. -#define COMSIG_MODULE_USED "mod_module_used" -/// Called when the MODsuit wearer is set. -#define COMSIG_MOD_WEARER_SET "mod_wearer_set" -/// Called when the MODsuit wearer is unset. -#define COMSIG_MOD_WEARER_UNSET "mod_wearer_unset" - -/// Called when the round has started, but before GAME_STATE_PLAYING. -#define COMSIG_TICKER_ROUND_STARTING "comsig_ticker_round_starting" - -/// from /obj/structure/cursed_slot_machine/handle_status_effect() when someone pulls the handle on the slot machine -#define COMSIG_CURSED_SLOT_MACHINE_USE "cursed_slot_machine_use" - #define SLOT_MACHINE_USE_CANCEL (1<<0) //! we've used up the number of times we may use this slot machine. womp womp. - #define SLOT_MACHINE_USE_POSTPONE (1<<1) //! we haven't used up all our attempts to gamble away our life but we should chill for a few seconds - -/// from /obj/structure/cursed_slot_machine/determine_victor() when someone loses. -#define COMSIG_CURSED_SLOT_MACHINE_LOST "cursed_slot_machine_lost" - -/// from /obj/structure/cursed_slot_machine/determine_victor() when someone finally wins. -#define COMSIG_GLOB_CURSED_SLOT_MACHINE_WON "cursed_slot_machine_won" - -/// from base of /obj/item/slimepotion/speed/afterattack(): (obj/target, /obj/src, mob/user) -#define COMSIG_SPEED_POTION_APPLIED "speed_potion" - #define SPEED_POTION_STOP (1<<0) - -// Signal types for the cargo shuttle - -// Sent before the shuttle scans its contents. -// Use to initialize data that will be needed during the scan. -#define COMSIG_CARGO_BEGIN_SCAN "begin_scan" -// Sent as the shuttle scans its contents. -// Can return sell flags (see code/__DEFINES/supply_defines.dm). -#define COMSIG_CARGO_CHECK_SELL "check_sell" -// Sent as the shuttle begins selling off its contents. -// Use to initialize data that will be needed during the sale. -#define COMSIG_CARGO_BEGIN_SELL "begin_sell" -// Sent during sales for items marked with COMSIG_CARGO_SELL_PRIORITY. -#define COMSIG_CARGO_DO_PRIORITY_SELL "do_priority_sell" -// Sent during sales for items marked with COMSIG_CARGO_SELL_NORMAL. -#define COMSIG_CARGO_DO_SELL "do_sell" -// Sent during sales for items marked with COMSIG_CARGO_SELL_WRONG. -#define COMSIG_CARGO_SEND_ERROR "send_error" -// Sent when sales are completed. -// Use to send summary messages for items that sell in bulk. -#define COMSIG_CARGO_END_SELL "end_sell" - -///from of mob/MouseDrop(): (/atom/over, /mob/user) -#define COMSIG_DO_MOB_STRIP "do_mob_strip" - -// Sent when a mob spawner is attacked directly or via projectile. -#define COMSIG_SPAWNER_SET_TARGET "spawner_set_target" - -/// Used by admin-tooling to remove radiation -#define COMSIG_ADMIN_DECONTAMINATE "admin_decontaminate" - -/// Sent when bodies transfer between shades/shards and constructs -#define COMSIG_SHADE_TO_CONSTRUCT_TRANSFER "shade_to_construct_transfer" diff --git a/paradise.dme b/paradise.dme index 093eb7ccc43..7d57b41f5a1 100644 --- a/paradise.dme +++ b/paradise.dme @@ -143,9 +143,19 @@ #include "code\__DEFINES\wires_defines.dm" #include "code\__DEFINES\zlevel_defines.dm" #include "code\__DEFINES\zoom.dm" +#include "code\__DEFINES\dcs\atom_signals.dm" +#include "code\__DEFINES\dcs\basetype_signals.dm" +#include "code\__DEFINES\dcs\carbon_signals.dm" +#include "code\__DEFINES\dcs\datum_signals.dm" #include "code\__DEFINES\dcs\dcs_flags.dm" #include "code\__DEFINES\dcs\dcs_helpers.dm" -#include "code\__DEFINES\dcs\signals.dm" +#include "code\__DEFINES\dcs\dept_signals.dm" +#include "code\__DEFINES\dcs\global_signals.dm" +#include "code\__DEFINES\dcs\item_signals.dm" +#include "code\__DEFINES\dcs\machinery_signals.dm" +#include "code\__DEFINES\dcs\mob_signals.dm" +#include "code\__DEFINES\dcs\movable_signals.dm" +#include "code\__DEFINES\dcs\obj_signals.dm" #include "code\__HELPERS\_logging.dm" #include "code\__HELPERS\_string_lists.dm" #include "code\__HELPERS\AnimationLibrary.dm"