diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 3a03ec0efc7..6e7563429be 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -5,7 +5,8 @@ // 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) + +///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" @@ -19,12 +20,13 @@ #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 + #define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0) /// ingame button pressed (/obj/machinery/button/button) #define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed" -// signals from globally accessible objects -/// from SSsun when the sun changes position : (azimuth) +/// signals from globally accessible objects + +///from SSsun when the sun changes position : (azimuth) #define COMSIG_SUN_MOVED "sun_moved" ////////////////////////////////////////////////////////////////// @@ -47,122 +49,206 @@ #define COMSIG_ELEMENT_DETACH "element_detach" // /atom signals -#define COMSIG_ATOM_CREATED "atom_created" ///from base of atom/proc/Initialize(): sent any time a new atom is created -#define COMSIG_PARENT_ATTACKBY "atom_attackby" ///from base of atom/attackby(): (/obj/item, /mob/living, params) - #define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called -#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" ///from base of atom/attack_hulk(): (/mob/living/carbon/human) -#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal" ///from base of atom/animal_attack(): (/mob/user) -#define COMSIG_PARENT_EXAMINE "atom_examine" ///from base of atom/examine(): (/mob) -#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" ///from base of atom/get_examine_name(): (/mob, list/overrides) +///from base of atom/proc/Initialize(): sent any time a new atom is created +#define COMSIG_ATOM_CREATED "atom_created" +///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(): (/mob) +#define COMSIG_PARENT_EXAMINE "atom_examine" +///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 - #define EXAMINE_POSITION_BEFORE 2 + #define EXAMINE_POSITION_ARTICLE (1<<0) + #define EXAMINE_POSITION_BEFORE (1<<1) //End positions - #define COMPONENT_EXNAME_CHANGED 1 -#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" ///from base of atom/update_icon(): () - #define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1 - #define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2 -#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" ///from base of atom/update_overlays(): (list/new_overlays) -#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" ///from base of atom/update_icon(): (signalOut, did_anything) -#define COMSIG_ATOM_ENTERED "atom_entered" ///from base of atom/Entered(): (atom/movable/entering, /atom) -#define COMSIG_ATOM_EXIT "atom_exit" ///from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc) - #define COMPONENT_ATOM_BLOCK_EXIT 1 -#define COMSIG_ATOM_EXITED "atom_exited" ///from base of atom/Exited(): (atom/movable/exiting, atom/newloc) -#define COMSIG_ATOM_BUMPED "atom_bumped" ///from base of atom/Bumped(): (/atom/movable) -#define COMSIG_ATOM_EX_ACT "atom_ex_act" ///from base of atom/ex_act(): (severity, target) -#define COMSIG_ATOM_EMP_ACT "atom_emp_act" ///from base of atom/emp_act(): (severity) -#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" ///from base of atom/fire_act(): (exposed_temperature, exposed_volume) -#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" ///from base of atom/bullet_act(): (/obj/projectile, def_zone) -#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" ///from base of atom/blob_act(): (/obj/structure/blob) -#define COMSIG_ATOM_ACID_ACT "atom_acid_act" ///from base of atom/acid_act(): (acidpwr, acid_volume) -#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" ///from base of atom/emag_act(): (/mob/user) -#define COMSIG_ATOM_RAD_ACT "atom_rad_act" ///from base of atom/rad_act(intensity) -#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" ///from base of atom/narsie_act(): () -#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" ///from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode) -#define COMSIG_ATOM_SING_PULL "atom_sing_pull" ///from base of atom/singularity_pull(): (S, current_size) -#define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass" ///from obj/machinery/bsa/full/proc/fire(): () - #define COMSIG_ATOM_BLOCKS_BSA_BEAM 1 -#define COMSIG_ATOM_SET_LIGHT "atom_set_light" ///from base of atom/set_light(): (l_range, l_power, l_color) -#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" ///from base of atom/setDir(): (old_dir, new_dir) -#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" ///from base of atom/handle_atom_del(): (atom/deleted) -#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity" ///from base of atom/has_gravity(): (turf/location, list/forced_gravities) -#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe" ///from proc/get_rad_contents(): () - #define COMPONENT_BLOCK_RADIATION 1 -#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" ///from base of datum/radiation_wave/radiate(): (strength) - #define COMPONENT_BLOCK_CONTAMINATION 1 -#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" ///from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width) - #define COMPONENT_RAD_WAVE_HANDLED 1 -#define COMSIG_ATOM_CANREACH "atom_can_reach" ///from internal loop in atom/movable/proc/CanReach(): (list/next) - #define COMPONENT_BLOCK_REACH 1 -#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" ///from base of atom/screwdriver_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_WRENCH_ACT "atom_wrench_act" ///from base of atom/wrench_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_MULTITOOL_ACT "atom_multitool_act" ///from base of atom/multitool_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_WELDER_ACT "atom_welder_act" ///from base of atom/welder_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_WIRECUTTER_ACT "atom_wirecutter_act" ///from base of atom/wirecutter_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_CROWBAR_ACT "atom_crowbar_act" ///from base of atom/crowbar_act(): (mob/living/user, obj/item/I) -#define COMSIG_ATOM_ANALYSER_ACT "atom_analyser_act" ///from base of atom/analyser_act(): (mob/living/user, obj/item/I) - #define COMPONENT_BLOCK_TOOL_ATTACK 1 -#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" ///called when teleporting into a protected turf: (channel, turf/origin) - #define COMPONENT_BLOCK_TELEPORT 1 -#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" ///called when an atom is added to the hearers on get_hearers_in_view(): (list/processing_list, list/hearers) -#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin" ///called when an atom starts orbiting another atom: (atom) -#define COMSIG_ATOM_ORBIT_STOP "atom_orbit_stop" ///called when an atom stops orbiting another atom: (atom) + #define COMPONENT_EXNAME_CHANGED (1<<0) +///from base of atom/update_icon(): () +#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" + #define COMSIG_ATOM_NO_UPDATE_ICON_STATE (1<<0) + #define COMSIG_ATOM_NO_UPDATE_OVERLAYS (1<<1) +///from base of atom/update_overlays(): (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 internal loop in atom/movable/proc/CanReach(): (list/next) +#define COMSIG_ATOM_CANREACH "atom_can_reach" + #define COMPONENT_BLOCK_REACH (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" ///////////////// -#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" ///from base of atom/attack_ghost(): (mob/dead/observer/ghost) -#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" ///from base of atom/attack_hand(): (mob/user) -#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" ///from base of atom/attack_paw(): (mob/user) - #define COMPONENT_NO_ATTACK_HAND 1 //works on all 3. +///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 -#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" ///called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels) -#define COMSIG_ATOM_START_PULL "movable_start_pull" ///called on a movable (NOT living) when someone starts pulling it (atom/movable/puller, state, force) -#define COMSIG_LIVING_START_PULL "living_start_pull" ///called on /living when someone starts pulling it (atom/movable/puller, state, force) + +///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" ///////////////// -#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area) -#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area) - -#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params, mob/user) -#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob) - #define COMPONENT_ALLOW_EXAMINATE 1 //Allows the user to examinate regardless of client.eye. -#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob) -#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob) -#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob) -#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" //from base of atom/MouseDrop(): (/atom/over, /mob/user) - #define COMPONENT_NO_MOUSEDROP 1 -#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user) +///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" +///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" // /area signals -#define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M) -#define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M) + +///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 -#define COMSIG_TURF_CHANGE "turf_change" //from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps) -#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" ///from base of atom/has_gravity(): (atom/asker, list/forced_gravities) -#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //from base of turf/New(): (turf/source, direction) + +///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 -#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" ///from base of atom/movable/Moved(): (/atom) - #define COMPONENT_MOVABLE_BLOCK_PRE_MOVE 1 -#define COMSIG_MOVABLE_MOVED "movable_moved" ///from base of atom/movable/Moved(): (/atom, dir) -#define COMSIG_MOVABLE_CROSS "movable_cross" ///from base of atom/movable/Cross(): (/atom/movable) -#define COMSIG_MOVABLE_CROSSED "movable_crossed" ///from base of atom/movable/Crossed(): (/atom/movable) -#define COMSIG_MOVABLE_UNCROSS "movable_uncross" ///from base of atom/movable/Uncross(): (/atom/movable) - #define COMPONENT_MOVABLE_BLOCK_UNCROSS 1 -#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" ///from base of atom/movable/Uncrossed(): (/atom/movable) -#define COMSIG_MOVABLE_BUMP "movable_bump" ///from base of atom/movable/Bump(): (/atom) -#define COMSIG_MOVABLE_IMPACT "movable_impact" ///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum) - #define COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH 1 ///if true, flip if the impact will push what it hits - #define COMPONENT_MOVABLE_IMPACT_NEVERMIND 2 ///return true if you destroyed whatever it was you're impacting and there won't be anything for hitby() to run on -#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" ///from base of mob/living/hitby(): (mob/living/target, hit_zone) -#define COMSIG_MOVABLE_BUCKLE "buckle" ///from base of atom/movable/buckle_mob(): (mob, force) -#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" ///from base of atom/movable/unbuckle_mob(): (mob, force) -#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw" ///from base of atom/movable/throw_at(): (list/args) - #define COMPONENT_CANCEL_THROW 1 -#define COMSIG_MOVABLE_POST_THROW "movable_post_throw" ///from base of atom/movable/throw_at(): (datum/thrownthing, spin) -#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" ///from base of atom/movable/onTransitZ(): (old_z, new_z) -#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded" ///called when the movable is placed in an unaccessible area, used for stationloving: () -#define COMSIG_MOVABLE_HEAR "movable_hear" ///from base of atom/movable/Hear(): (proc args list(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)) + +///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" +///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 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 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 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 @@ -170,34 +256,57 @@ /* #define HEARING_RADIO_FREQ 5 #define HEARING_SPANS 6 #define HEARING_MESSAGE_MODE 7 */ -#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source) + +///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" // /mob signals -#define COMSIG_MOB_LOGIN "mob_login" //from base of /mob/Login(): () -#define COMSIG_MOB_LOGOUT "mob_logout" //from base of /mob/Logout(): () -#define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed) -#define COMSIG_MOB_STATCHANGE "mob_statchange" //from base of mob/set_stat(): (new_stat) -#define COMSIG_MOB_CLICKON "mob_clickon" //from base of mob/clickon(): (atom/A, params) -#define COMSIG_MOB_MIDDLECLICKON "mob_middleclickon" //from base of mob/MiddleClickOn(): (atom/A) -#define COMSIG_MOB_ALTCLICKON "mob_altclickon" //from base of mob/AltClickOn(): (atom/A) - #define COMSIG_MOB_CANCEL_CLICKON 1 -#define COMSIG_MOB_ALLOWED "mob_allowed" //from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj -#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" //from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources) - #define COMPONENT_BLOCK_MAGIC 1 -#define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): () -#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of -#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" //from base of /obj/item/attack(): (mob/M, mob/user) - #define COMPONENT_ITEM_NO_ATTACK 1 -#define COMSIG_MOB_APPLY_DAMGE "mob_apply_damage" //from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone) -#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters) -#define COMSIG_MOB_ITEM_ATTACK_QDELETED "mob_item_attack_qdeleted" //from base of obj/item/attack_qdeleted(): (atom/target, mob/user, proxiumity_flag, click_parameters) -#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params) -#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target) -#define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/target) -#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): () -#define COMSIG_MOB_SAY "mob_say" // from /mob/living/say(): () - #define COMPONENT_UPPERCASE_SPEECH 1 +///from base of /mob/Login(): () +#define COMSIG_MOB_LOGIN "mob_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_DAMGE "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" +///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 @@ -206,238 +315,408 @@ #define SPEECH_LANGUAGE 5 #define SPEECH_IGNORE_SPAM 6 #define SPEECH_FORCED 7 */ -#define COMSIG_MOB_DEADSAY "mob_deadsay" // from /mob/say_dead(): (mob/speaker, message) - #define MOB_DEADSAY_SIGNAL_INTERCEPT 1 -#define COMSIG_MOB_EMOTE "mob_emote" // from /mob/living/emote(): () -#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands" //from base of mob/swap_hand(): (obj/item) - #define COMPONENT_BLOCK_SWAP 1 + +///from /mob/say_dead(): (mob/speaker, message) +#define COMSIG_MOB_DEADSAY "mob_deadsay" + #define MOB_DEADSAY_SIGNAL_INTERCEPT (1<<0) +///from /mob/living/emote(): () +#define COMSIG_MOB_EMOTE "mob_emote" +///from base of mob/swap_hand(): (obj/item) +#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands" + #define COMPONENT_BLOCK_SWAP (1<<0) // /mob/living signals -#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living) -#define COMSIG_LIVING_LOOK_UP "living_look_up" //from base of mob/living/look_up() (/mob/living) -#define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living) -#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living) -#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, flags) -#define COMSIG_LIVING_SHOCK_PREVENTED "living_shock_prevented" //sent when items with siemen coeff. of 0 block a shock: (power_source, source, siemens_coeff, dist_check) -#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: () -#define COMSIG_LIVING_REVIVE "living_revive" //from base of mob/living/revive() (full_heal, admin_revive) -#define COMSIG_LIVING_REGENERATE_LIMBS "living_regen_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs) -#define COMSIG_LIVING_ATTACH_LIMB "living_attach_limb" //from base of /obj/item/bodypart/proc/attach_limb(): (new_limb, special) allows you to fail limb attachment - #define COMPONENT_NO_ATTACH 1 -#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge" //sent from borg recharge stations: (amount, repairs) -#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" //sent when a mob/login() finishes: (client) -#define COMSIG_BORG_SAFE_DECONSTRUCT "borg_safe_decon" //sent from borg mobs to itself, for tools to catch an upcoming destroy() due to safe decon (rather than detonation) + +///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" +///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/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" //ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS! -#define COMSIG_LIVING_STATUS_STUN "living_stun" //from base of mob/living/Stun() (amount, update, ignore) -#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" //from base of mob/living/Knockdown() (amount, update, ignore) -#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze" //from base of mob/living/Paralyze() (amount, update, ignore) -#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" //from base of mob/living/Immobilize() (amount, update, ignore) -#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" //from base of mob/living/Unconscious() (amount, update, ignore) -#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping" //from base of mob/living/Sleeping() (amount, update, ignore) - #define COMPONENT_NO_STUN 1 //For all of them -#define COMSIG_LIVING_CAN_TRACK "mob_cantrack" //from base of /mob/living/can_track(): (mob/user) - #define COMPONENT_CANT_TRACK 1 + +///from base of mob/living/Stun() (amount, update, ignore) +#define COMSIG_LIVING_STATUS_STUN "living_stun" +///from base of mob/living/Knockdown() (amount, update, ignore) +#define COMSIG_LIVING_STATUS_KNOCKDOWN "living_knockdown" +///from base of mob/living/Paralyze() (amount, update, ignore) +#define COMSIG_LIVING_STATUS_PARALYZE "living_paralyze" +///from base of mob/living/Immobilize() (amount, update, ignore) +#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" +///from base of mob/living/Unconscious() (amount, update, ignore) +#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" +///from base of mob/living/Sleeping() (amount, update, ignore) +#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) // /mob/living/carbon signals -#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity)) -#define COMSIG_CARBON_GAIN_ORGAN "carbon_gain_organ" //from /item/organ/proc/Insert() (/obj/item/organ/) -#define COMSIG_CARBON_LOSE_ORGAN "carbon_lose_organ" //from /item/organ/proc/Remove() (/obj/item/organ/) -#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" //from /mob/living/carbon/doUnEquip(obj/item/I, force, newloc, no_move, invdrop, silent) -#define COMSIG_CARBON_EMBED_RIP "item_embed_start_rip" // 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_REMOVAL "item_embed_remove_safe" // called when removing a given item from a mob, from mob/living/carbon/remove_embedded_object(mob/living/carbon/target, /obj/item) + +///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" // /mob/living/simple_animal/hostile signals #define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget" - #define COMPONENT_HOSTILE_NO_ATTACK 1 + #define COMPONENT_HOSTILE_NO_ATTACK (1<<0) // /obj signals -#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled) -#define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value) -#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" //from base of code/game/machinery -#define COMSIG_OBJ_HIDE "obj_hide" //from base of /turf/proc/levelupdate(). (intact) true to hide and false to unhide + +///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" // /obj/machinery signals -#define COMSIG_MACHINERY_BROKEN "machinery_broken" //from /obj/machinery/obj_break(damage_flag): (damage_flag) -#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost" //from base power_change() when power is lost -#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored" //from base power_change() when power is restored + +///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/item signals -#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user) -#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob) - #define COMPONENT_NO_INTERACT 1 -#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob) - #define COMPONENT_NO_ATTACK_OBJ 1 -#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params) - #define COMPONENT_NO_ATTACK 1 -#define COMSIG_ITEM_AFTERATTACK "item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, params) -#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted" //from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params) -#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot) -#define COMSIG_ITEM_DROPPED "item_drop" //from base of obj/item/dropped(): (mob/user) -#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker) -#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone) -#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user) -#define COMSIG_ITEM_MARK_RETRIEVAL "item_mark_retrieval" //called before marking an object for retrieval, checked in /obj/effect/proc_holder/spell/targeted/summonitem/cast() : (mob/user) - #define COMPONENT_BLOCK_MARK_RETRIEVAL 1 -#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args) -#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable, mob/living/crossed) -#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M) -#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" //from base of item/sharpener/attackby(): (amount, max) - #define COMPONENT_BLOCK_SHARPEN_APPLIED 1 - #define COMPONENT_BLOCK_SHARPEN_BLOCKED 2 - #define COMPONENT_BLOCK_SHARPEN_ALREADY 4 - #define COMPONENT_BLOCK_SHARPEN_MAXED 8 -#define COMSIG_TOOL_IN_USE "tool_in_use" ///from base of [/obj/item/proc/tool_check_callback]: (mob/living/user) -#define COMSIG_TOOL_START_USE "tool_start_use" ///from base of [/obj/item/proc/tool_start_check]: (mob/living/user) -#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" ///from [/obj/item/proc/disableEmbedding]: -#define COMSIG_MINE_TRIGGERED "minegoboom" ///from [/obj/effect/mine/proc/triggermine]: + +///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/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) +#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 /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user) +#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" +///called before marking an object for retrieval, checked in /obj/effect/proc_holder/spell/targeted/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" +///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_BLOCK_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 [/obj/item/proc/disableEmbedding]: +#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" +///from [/obj/effect/mine/proc/triggermine]: +#define COMSIG_MINE_TRIGGERED "minegoboom" // /obj/item signals for economy -#define COMSIG_ITEM_SOLD "item_sold" //called when an item is sold by the exports subsystem -#define COMSIG_STRUCTURE_UNWRAPPED "structure_unwrapped" //called when a wrapped up structure is opened by hand -#define COMSIG_ITEM_UNWRAPPED "item_unwrapped" //called when a wrapped up item is opened by hand - #define COMSIG_ITEM_SPLIT_VALUE 1 -#define COMSIG_ITEM_SPLIT_PROFIT "item_split_profits" //Called when getting the item's exact ratio for cargo's profit. -#define COMSIG_ITEM_SPLIT_PROFIT_DRY "item_split_profits_dry" //Called when getting the item's exact ratio for cargo's profit, without selling the item. - +///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 -#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): () -#define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle" //from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit) + +///from base of obj/item/clothing/shoes/proc/step_action(): () +#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 -#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): () -#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" //from base of /obj/item/implant/proc/implant(): (list/args) - #define COMPONENT_STOP_IMPLANTING 1 -#define COMSIG_IMPLANT_OTHER "implant_other" //called on already installed implants when a new one is being added in /obj/item/implant/proc/implant(): (list/args, obj/item/implant/new_implant) - //#define COMPONENT_STOP_IMPLANTING 1 //The name makes sense for both - #define COMPONENT_DELETE_NEW_IMPLANT 2 - #define COMPONENT_DELETE_OLD_IMPLANT 4 -#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //called on implants being implanted into someone with an uplink implant: (datum/component/uplink) +///from base of /obj/item/implant/proc/activate(): () +#define COMSIG_IMPLANT_ACTIVATED "implant_activated" +///from base of /obj/item/implant/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/implant/proc/implant(): (list/args, obj/item/implant/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 // /obj/item/pda signals -#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" //called on pda when the user changes the ringtone: (mob/living/user, new_ringtone) - #define COMPONENT_STOP_RINGTONE_CHANGE 1 + +///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 + #define COMPONENT_PDA_NO_DETONATE (1<<0) // /obj/item/radio signals -#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" //called from base of /obj/item/radio/proc/set_frequency(): (list/args) + +///called from base of /obj/item/radio/proc/set_frequency(): (list/args) +#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" // /obj/item/pen signals -#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user) + +///called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user) +#define COMSIG_PEN_ROTATED "pen_rotated" // /obj/item/gun signals -#define COMSIG_MOB_FIRED_GUN "mob_fired_gun" //called in /obj/item/gun/process_fire (user, target, params, zone_override) + +///called in /obj/item/gun/process_fire (user, target, params, zone_override) +#define COMSIG_MOB_FIRED_GUN "mob_fired_gun" // /obj/item/grenade signals -#define COMSIG_GRENADE_PRIME "grenade_prime" //called in /obj/item/gun/process_fire (user, target, params, zone_override) -#define COMSIG_GRENADE_ARMED "grenade_armed" //called in /obj/item/gun/process_fire (user, target, params, zone_override) + +///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) -#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/on_hit(): (atom/movable/firer, atom/target, Angle) -#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/projectile/proc/fire(): (obj/projectile, atom/original_target) -#define COMSIG_PROJECTILE_FIRE "projectile_fire" // from the base of /obj/projectile/proc/fire(): () -#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 to targets during the process_hit proc of projectiles -#define COMSIG_EMBED_TRY_FORCE "item_try_embed" // sent when trying to force an embed (mainly for projectiles, only used in the embed element) -#define COMSIG_PELLET_CLOUD_INIT "pellet_cloud_init" // sent to targets during the process_hit proc of projectiles +///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 -#define COMSIG_MECHA_ACTION_ACTIVATE "mecha_action_activate" //sent from mecha action buttons to the mecha they're linked to + +///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 -#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(): (atom/target, proximity) -#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" //from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker) -#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" //Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted) -#define COMSIG_JOB_RECEIVED "job_received" //Whenever EquipRanked is called, called after job is set + +///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" // /datum/species signals -#define COMSIG_SPECIES_GAIN "species_gain" //from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species) -#define COMSIG_SPECIES_LOSS "species_loss" //from datum/species/on_species_loss(): (datum/species/lost_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" // /datum/song signals -#define COMSIG_SONG_START "song_start" //sent to the instrument when a song starts playing -#define COMSIG_SONG_END "song_end" //sent to the instrument when a song stops playing + +///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 -#define COMSIG_TURF_IS_WET "check_turf_wet" //(): Returns bitflags of wet values. -#define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool. -#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength) + +///(): 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 -#define COMSIG_COMPONENT_CLEAN_FACE_ACT "clean_face_act" //called when you wash your face at a sink: (num/strength) + +///called when you wash your face at a sink: (num/strength) +#define COMSIG_COMPONENT_CLEAN_FACE_ACT "clean_face_act" //Food -#define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder) + +///from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder) +#define COMSIG_FOOD_EATEN "food_eaten" //Gibs -#define COMSIG_GIBS_STREAK "gibs_streak" // from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases) + +///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases) +#define COMSIG_GIBS_STREAK "gibs_streak" //Mood -#define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code. -#define COMSIG_ADD_MOOD_EVENT_RND "RND_add_mood" //Mood event that only RnD members listen for -#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code. + +///called when you send a mood event from anywhere in the code. +#define COMSIG_ADD_MOOD_EVENT "add_mood" +///Mood event that only RnD members listen for +#define COMSIG_ADD_MOOD_EVENT_RND "RND_add_mood" +///called when you clear a mood event from anywhere in the code. +#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //NTnet -#define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive" //called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata)) + +///called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata)) +#define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive" //Nanites -#define COMSIG_HAS_NANITES "has_nanites" //() returns TRUE if nanites are found -#define COMSIG_NANITE_IS_STEALTHY "nanite_is_stealthy" //() returns TRUE if nanites have stealth -#define COMSIG_NANITE_DELETE "nanite_delete" //() deletes the nanite component -#define COMSIG_NANITE_GET_PROGRAMS "nanite_get_programs" //(list/nanite_programs) - makes the input list a copy the nanites' program list -#define COMSIG_NANITE_GET_VOLUME "nanite_get_volume" //(amount) Returns nanite amount -#define COMSIG_NANITE_SET_VOLUME "nanite_set_volume" //(amount) Sets current nanite volume to the given amount -#define COMSIG_NANITE_ADJUST_VOLUME "nanite_adjust" //(amount) Adjusts nanite volume by the given amount -#define COMSIG_NANITE_SET_MAX_VOLUME "nanite_set_max_volume" //(amount) Sets maximum nanite volume to the given amount -#define COMSIG_NANITE_SET_CLOUD "nanite_set_cloud" //(amount(0-100)) Sets cloud ID to the given amount -#define COMSIG_NANITE_SET_CLOUD_SYNC "nanite_set_cloud_sync" //(method) Modify cloud sync status. Method can be toggle, enable or disable -#define COMSIG_NANITE_SET_SAFETY "nanite_set_safety" //(amount) Sets safety threshold to the given amount -#define COMSIG_NANITE_SET_REGEN "nanite_set_regen" //(amount) Sets regeneration rate to the given amount -#define COMSIG_NANITE_SIGNAL "nanite_signal" //(code(1-9999)) Called when sending a nanite signal to a mob. -#define COMSIG_NANITE_COMM_SIGNAL "nanite_comm_signal" //(comm_code(1-9999), comm_message) Called when sending a nanite comm signal to a mob. -#define COMSIG_NANITE_SCAN "nanite_scan" //(mob/user, full_scan) - sends to chat a scan of the nanites to the user, returns TRUE if nanites are detected -#define COMSIG_NANITE_UI_DATA "nanite_ui_data" //(list/data, scan_level) - adds nanite data to the given data list - made for ui_data procs -#define COMSIG_NANITE_ADD_PROGRAM "nanite_add_program" //(datum/nanite_program/new_program, datum/nanite_program/source_program) Called when adding a program to a nanite component - #define COMPONENT_PROGRAM_INSTALLED 1 //Installation successful - #define COMPONENT_PROGRAM_NOT_INSTALLED 2 //Installation failed, but there are still nanites -#define COMSIG_NANITE_SYNC "nanite_sync" //(datum/component/nanites, full_overwrite, copy_activation) Called to sync the target's nanites to a given nanite component + +///() returns TRUE if nanites are found +#define COMSIG_HAS_NANITES "has_nanites" +///() returns TRUE if nanites have stealth +#define COMSIG_NANITE_IS_STEALTHY "nanite_is_stealthy" +///() deletes the nanite component +#define COMSIG_NANITE_DELETE "nanite_delete" +///(list/nanite_programs) - makes the input list a copy the nanites' program list +#define COMSIG_NANITE_GET_PROGRAMS "nanite_get_programs" +///(amount) Returns nanite amount +#define COMSIG_NANITE_GET_VOLUME "nanite_get_volume" +///(amount) Sets current nanite volume to the given amount +#define COMSIG_NANITE_SET_VOLUME "nanite_set_volume" +///(amount) Adjusts nanite volume by the given amount +#define COMSIG_NANITE_ADJUST_VOLUME "nanite_adjust" +///(amount) Sets maximum nanite volume to the given amount +#define COMSIG_NANITE_SET_MAX_VOLUME "nanite_set_max_volume" +///(amount(0-100)) Sets cloud ID to the given amount +#define COMSIG_NANITE_SET_CLOUD "nanite_set_cloud" +///(method) Modify cloud sync status. Method can be toggle, enable or disable +#define COMSIG_NANITE_SET_CLOUD_SYNC "nanite_set_cloud_sync" +///(amount) Sets safety threshold to the given amount +#define COMSIG_NANITE_SET_SAFETY "nanite_set_safety" +///(amount) Sets regeneration rate to the given amount +#define COMSIG_NANITE_SET_REGEN "nanite_set_regen" +///(code(1-9999)) Called when sending a nanite signal to a mob. +#define COMSIG_NANITE_SIGNAL "nanite_signal" +///(comm_code(1-9999), comm_message) Called when sending a nanite comm signal to a mob. +#define COMSIG_NANITE_COMM_SIGNAL "nanite_comm_signal" +///(mob/user, full_scan) - sends to chat a scan of the nanites to the user, returns TRUE if nanites are detected +#define COMSIG_NANITE_SCAN "nanite_scan" +///(list/data, scan_level) - adds nanite data to the given data list - made for ui_data procs +#define COMSIG_NANITE_UI_DATA "nanite_ui_data" +///(datum/nanite_program/new_program, datum/nanite_program/source_program) Called when adding a program to a nanite component +#define COMSIG_NANITE_ADD_PROGRAM "nanite_add_program" + ///Installation successful + #define COMPONENT_PROGRAM_INSTALLED (1<<0) + ///Installation failed, but there are still nanites + #define COMPONENT_PROGRAM_NOT_INSTALLED (1<<1) +///(datum/component/nanites, full_overwrite, copy_activation) Called to sync the target's nanites to a given nanite component +#define COMSIG_NANITE_SYNC "nanite_sync" // /datum/component/storage signals -#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool. -#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool -#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool. -#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool -#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool -#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate) -#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" //() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST! -#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" //(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types. -#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items. -#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool -#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location. -#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE) -#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool + +///() - returns bool. +#define COMSIG_CONTAINS_STORAGE "is_storage" +///(obj/item/inserting, mob/user, silent, force) - returns bool +#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" +///(mob/show_to, force) - returns bool. +#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" +///(mob/hide_from) - returns bool +#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" +///returns bool +#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" +///(newstate) +#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" +///() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST! +#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" +///(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types. +#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" +///(type, amount = INFINITY, force = FALSE). Force will ignore max_items, and amount is normally clamped to max_items. +#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" +///(obj, new_loc, force = FALSE) - returns bool +#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" +///(loc) - returns bool - if loc is null it will dump at parent location. +#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" +///(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE) +#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" +///(obj/item/insertion_candidate, mob/user, silent) - returns bool +#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" // /datum/component/two_handed signals -#define COMSIG_TWOHANDED_WIELD "twohanded_wield" //from base of datum/component/two_handed/proc/wield(mob/living/carbon/user): (/mob/user) - #define COMPONENT_TWOHANDED_BLOCK_WIELD 1 -#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" //from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user) + +///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 -#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action) - #define COMPONENT_ACTION_BLOCK_TRIGGER 1 + +///from base of datum/action/proc/Trigger(): (datum/action) +#define COMSIG_ACTION_TRIGGER "action_trigger" + #define COMPONENT_ACTION_BLOCK_TRIGGER (1<<0) //Xenobio hotkeys -#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" //from slime CtrlClickOn(): (/mob) -#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" //from slime AltClickOn(): (/mob) -#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" //from slime ShiftClickOn(): (/mob) -#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" //from turf ShiftClickOn(): (/mob) -#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" //from turf AltClickOn(): (/mob) -#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob) + +///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/flags.dm b/code/__DEFINES/flags.dm index 0928b43809f..329269ba5d0 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -148,3 +148,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 REMOVE_TRAIT(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL);\ else if(!HAS_TRAIT(x, TRAIT_KEEP_TOGETHER))\ x.appearance_flags &= ~KEEP_TOGETHER + +//religious_tool flags +#define RELIGION_TOOL_INVOKE (1<<0) +#define RELIGION_TOOL_SACRIFICE (1<<1) +#define RELIGION_TOOL_SECTSELECT (1<<2) diff --git a/code/datums/components/religious_tool.dm b/code/datums/components/religious_tool.dm new file mode 100644 index 00000000000..d55e83896b9 --- /dev/null +++ b/code/datums/components/religious_tool.dm @@ -0,0 +1,149 @@ +/** + * + * Allows the parent to act similarly to the Altar of Gods with modularity. Invoke and Sect Selection is done via attacking with a bible. This means you cannot sacrifice Bibles (you shouldn't want to do this anyways although now that I mentioned it you probably will want to). + * + */ +/datum/component/religious_tool + dupe_mode = COMPONENT_DUPE_UNIQUE + /// Enables access to the global sect directly + var/datum/religion_sect/easy_access_sect + /// What extent do we want this religious tool to act? In case you don't want full access to the list. Generated on New + var/operation_flags + /// The rite currently being invoked + var/datum/religion_rites/performing_rite + ///Sets the type for catalyst + var/catalyst_type = /obj/item/storage/book/bible + ///Enables overide of COMPONENT_NO_AFTERATTACK, not recommended as it means you can potentially cause damage to the item using the catalyst. + var/force_catalyst_afterattack = FALSE + var/datum/callback/after_sect_select_cb + +/datum/component/religious_tool/Initialize(_flags = ALL, _force_catalyst_afterattack = FALSE, _after_sect_select_cb, override_catalyst_type) + . = ..() + SetGlobalToLocal() //attempt to connect on start in case one already exists! + operation_flags = _flags + force_catalyst_afterattack = _force_catalyst_afterattack + after_sect_select_cb = _after_sect_select_cb + if(override_catalyst_type) + catalyst_type = override_catalyst_type + +/datum/component/religious_tool/RegisterWithParent() + RegisterSignal(parent, COMSIG_PARENT_ATTACKBY,.proc/AttemptActions) + RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine) + +/datum/component/religious_tool/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE)) + +/** + * Sets the easy access variable to the global if it exists. + */ +/datum/component/religious_tool/proc/SetGlobalToLocal() + if(easy_access_sect) + return TRUE + if(!GLOB.religious_sect) + return FALSE + easy_access_sect = GLOB.religious_sect + after_sect_select_cb.Invoke() + return TRUE + + + +/** + * Since all of these involve attackby, we require mega proc. Handles Invocation, Sacrificing, And Selection of Sects. + */ +/datum/component/religious_tool/proc/AttemptActions(datum/source, obj/item/the_item, mob/living/user) + /**********Sect Selection**********/ + if(!SetGlobalToLocal()) + if(!(operation_flags & RELIGION_TOOL_SECTSELECT)) + return + . = COMPONENT_NO_AFTERATTACK //At this point you're intentionally trying to select a sect. + if(user.mind.holy_role != HOLY_ROLE_HIGHPRIEST) + to_chat(user, "You are not the high priest, and therefore cannot select a religious sect.") + return + var/list/available_options = generate_available_sects(user) + if(!available_options) + return + + var/sect_select = input(user,"Select a sect (You CANNOT revert this decision!)","Select a Sect",null) in available_options + if(!sect_select || !user.canUseTopic(parent, BE_CLOSE, FALSE, NO_TK)) + to_chat(user,"You cannot select a sect at this time.") + return + var/type_selected = available_options[sect_select] + GLOB.religious_sect = new type_selected() + for(var/i in GLOB.player_list) + if(!isliving(i)) + continue + var/mob/living/am_i_holy_living = i + if(!am_i_holy_living.mind?.holy_role) + continue + GLOB.religious_sect.on_conversion(am_i_holy_living) + easy_access_sect = GLOB.religious_sect + after_sect_select_cb.Invoke() + return + /**********Rite Invocation**********/ + else if(istype(the_item, catalyst_type)) + if(!(operation_flags & RELIGION_TOOL_INVOKE)) + return + . = force_catalyst_afterattack ? null : COMPONENT_NO_AFTERATTACK + if(!easy_access_sect.rites_list) + to_chat(user, "Your sect doesn't have any rites to perform!") + return + if(performing_rite) + to_chat(user, "There is a rite currently being performed here already!") + return + var/rite_select = input(user,"Select a rite to perform!","Select a rite",null) in easy_access_sect.rites_list + if(!rite_select || !user.canUseTopic(parent, BE_CLOSE, FALSE, NO_TK)) + to_chat(user,"You cannot perform the rite at this time.") + return + var/selection2type = easy_access_sect.rites_list[rite_select] + performing_rite = new selection2type(parent) + if(!performing_rite.perform_rite(user, parent)) + QDEL_NULL(performing_rite) + else + performing_rite.invoke_effect(user, parent) + easy_access_sect.adjust_favor(-performing_rite.favor_cost) + QDEL_NULL(performing_rite) + return + + /**********Sacrificing**********/ + else if(operation_flags & RELIGION_TOOL_SACRIFICE) + if(!easy_access_sect?.can_sacrifice(the_item,user)) + return + easy_access_sect.on_sacrifice(the_item,user) + return COMPONENT_NO_AFTERATTACK + + +/** + * Generates a list of available sects to the user. Intended to support custom-availability sects. Because these are not instanced, we cannot put the availability on said sect beyond variables. + */ +/datum/component/religious_tool/proc/generate_available_sects(mob/user) + . = list() + for(var/i in subtypesof(/datum/religion_sect)) + var/datum/religion_sect/not_a_real_instance_rs = i + if(initial(not_a_real_instance_rs.starter)) + . += list(initial(not_a_real_instance_rs.name) = i) + +/** + * Appends to examine so the user knows it can be used for religious purposes. + */ +/datum/component/religious_tool/proc/on_examine(datum/source, mob/user, list/examine_list) + var/can_i_see = FALSE + if(isobserver(user)) + can_i_see = TRUE + else if(isliving(user)) + var/mob/living/L = user + if(L.mind?.holy_role) + can_i_see = TRUE + + if(!can_i_see) + return + if(!easy_access_sect) + if(operation_flags & RELIGION_TOOL_SECTSELECT) + examine_list += "This looks like it can be used to select a sect." + return + + examine_list += "The sect currently has [round(easy_access_sect.favor)] favor with [GLOB.deity].[(operation_flags & RELIGION_TOOL_SACRIFICE) ? "Desired items can be used on this to increase favor." : ""]" + if(!easy_access_sect.rites_list) + return //if we dont have rites it doesnt do us much good if the object can be used to invoke them! + if(operation_flags & RELIGION_TOOL_INVOKE) + examine_list += "List of available Rites:" + examine_list += easy_access_sect.rites_list diff --git a/code/modules/religion/religion_sects.dm b/code/modules/religion/religion_sects.dm index 9cd6ded504d..ac4a0773f81 100644 --- a/code/modules/religion/religion_sects.dm +++ b/code/modules/religion/religion_sects.dm @@ -34,8 +34,11 @@ var/altar_icon /// Changes the Altar of Gods icon_state var/altar_icon_state +/// Currently Active (non-deleted) rites + var/list/active_rites /datum/religion_sect/New() + . = ..() if(desired_items) desired_items_typecache = typecacheof(desired_items) if(rites_list) @@ -65,13 +68,13 @@ /datum/religion_sect/proc/on_conversion(mob/living/L) to_chat(L, "[convert_opener][GLOB.deity] does not accept pity amounts of power.") - return FALSE - return TRUE - - /datum/religion_sect/technophile/on_sacrifice(obj/item/I, mob/living/L) - if(!is_type_in_typecache(I, desired_items_typecache)) - return var/obj/item/stock_parts/cell/the_cell = I + if(!istype(the_cell)) //how... + return + if(the_cell.charge < 3000) + to_chat(L,"[GLOB.deity] does not accept pity amounts of power.") + return adjust_favor(round(the_cell.charge/3000), L) to_chat(L, "You offer [the_cell]'s power to [GLOB.deity], pleasing them.") qdel(I) + return TRUE diff --git a/code/modules/religion/religion_structures.dm b/code/modules/religion/religion_structures.dm index 638dfd6de90..ffad8ef18d1 100644 --- a/code/modules/religion/religion_structures.dm +++ b/code/modules/religion/religion_structures.dm @@ -10,37 +10,16 @@ pass_flags = LETPASSTHROW can_buckle = TRUE buckle_lying = 90 //we turn to you! - var/datum/religion_sect/sect_to_altar // easy access! - var/datum/religion_rites/performing_rite - -/obj/structure/altar_of_gods/examine(mob/user) - . = ..() - var/can_i_see = FALSE - if(isobserver(user)) - can_i_see = TRUE - else if(isliving(user)) - var/mob/living/L = user - if(L.mind?.holy_role) - can_i_see = TRUE - - if(!can_i_see || !sect_to_altar) - return - - . += "The sect currently has [round(sect_to_altar.favor)] favor with [GLOB.deity]." - if(!sect_to_altar.rites_list) - return - . += "List of available Rites:" - . += sect_to_altar.rites_list - + ///Avoids having to check global everytime by referencing it locally. + var/datum/religion_sect/sect_to_altar /obj/structure/altar_of_gods/Initialize(mapload) . = ..() - if(GLOB.religious_sect) - sect_to_altar = GLOB.religious_sect - if(sect_to_altar.altar_icon) - icon = sect_to_altar.altar_icon - if(sect_to_altar.altar_icon_state) - icon_state = sect_to_altar.altar_icon_state + reflect_sect_in_icons() + +/obj/structure/altar_of_gods/ComponentInitialize() + . = ..() + AddComponent(/datum/component/religious_tool, ALL, FALSE, CALLBACK(src, .proc/reflect_sect_in_icons)) /obj/structure/altar_of_gods/attack_hand(mob/living/user) if(!Adjacent(user) || !user.pulling) @@ -57,65 +36,10 @@ pushed_mob.forceMove(loc) return ..() -/obj/structure/altar_of_gods/attackby(obj/item/C, mob/user, params) - //If we can sac, we do nothing but the sacrifice instead of typical attackby behavior (IE damage the structure) - if(sect_to_altar?.can_sacrifice(C,user)) - sect_to_altar.on_sacrifice(C,user) - return TRUE - . = ..() - //everything below is assumed you're bibling it up - if(!istype(C, /obj/item/storage/book/bible)) - return - if(sect_to_altar) - if(!sect_to_altar.rites_list) - to_chat(user, "Your sect doesn't have any rites to perform!") - return - var/rite_select = input(user,"Select a rite to perform!","Select a rite",null) in sect_to_altar.rites_list - if(!rite_select || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) - to_chat(user,"You cannot perform the rite at this time.") - return - var/selection2type = sect_to_altar.rites_list[rite_select] - performing_rite = new selection2type(src) - if(!performing_rite.perform_rite(user, src)) - QDEL_NULL(performing_rite) - else - performing_rite.invoke_effect(user, src) - sect_to_altar.adjust_favor(-performing_rite.favor_cost) - QDEL_NULL(performing_rite) - return - - if(user.mind.holy_role != HOLY_ROLE_HIGHPRIEST) - to_chat(user, "You are not the high priest, and therefore cannot select a religious sect.") - return - - var/list/available_options = generate_available_sects(user) - if(!available_options) - return - - var/sect_select = input(user,"Select a sect (You CANNOT revert this decision!)","Select a Sect",null) in available_options - if(!sect_select || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) - to_chat(user,"You cannot select a sect at this time.") - return - var/type_selected = available_options[sect_select] - GLOB.religious_sect = new type_selected() - for(var/i in GLOB.player_list) - if(!isliving(i)) - continue - var/mob/living/am_i_holy_living = i - if(!am_i_holy_living.mind?.holy_role) - continue - GLOB.religious_sect.on_conversion(am_i_holy_living) - sect_to_altar = GLOB.religious_sect - if(sect_to_altar.altar_icon) - icon = sect_to_altar.altar_icon - if(sect_to_altar.altar_icon_state) - icon_state = sect_to_altar.altar_icon_state - - - -/obj/structure/altar_of_gods/proc/generate_available_sects(mob/user) //eventually want to add sects you get from unlocking certain achievements - . = list() - for(var/i in subtypesof(/datum/religion_sect)) - var/datum/religion_sect/not_a_real_instance_rs = i - if(initial(not_a_real_instance_rs.starter)) - . += list(initial(not_a_real_instance_rs.name) = i) +/obj/structure/altar_of_gods/proc/reflect_sect_in_icons() + if(GLOB.religious_sect) + sect_to_altar = GLOB.religious_sect + if(sect_to_altar.altar_icon) + icon = sect_to_altar.altar_icon + if(sect_to_altar.altar_icon_state) + icon_state = sect_to_altar.altar_icon_state diff --git a/code/modules/religion/rites.dm b/code/modules/religion/rites.dm index 9cb9153a014..c03bcae7bfc 100644 --- a/code/modules/religion/rites.dm +++ b/code/modules/religion/rites.dm @@ -11,8 +11,21 @@ var/invoke_msg var/favor_cost = 0 +/datum/religion_rites/New() + . = ..() + if(!GLOB?.religious_sect) + return + LAZYADD(GLOB.religious_sect.active_rites, src) + +/datum/religion_rites/Destroy() + if(!GLOB?.religious_sect) + return + LAZYREMOVE(GLOB.religious_sect.active_rites, src) + return ..() + + ///Called to perform the invocation of the rite, with args being the performer and the altar where it's being performed. Maybe you want it to check for something else? -/datum/religion_rites/proc/perform_rite(mob/living/user, obj/structure/altar_of_gods/AOG) +/datum/religion_rites/proc/perform_rite(mob/living/user, atom/religious_tool) if(GLOB.religious_sect?.favor < favor_cost) to_chat(user, "This rite requires more favor!") return FALSE @@ -40,8 +53,8 @@ ///Does the thing if the rite was successfully performed. return value denotes that the effect successfully (IE a harm rite does harm) -/datum/religion_rites/proc/invoke_effect(mob/living/user, obj/structure/altar_of_gods/AOG) - GLOB.religious_sect.on_riteuse(user,AOG) +/datum/religion_rites/proc/invoke_effect(mob/living/user, atom/religious_tool) + GLOB.religious_sect.on_riteuse(user,religious_tool) return TRUE @@ -57,17 +70,30 @@ invoke_msg = "... Arise, our champion! Become that which your soul craves, live in the world as your true form!!" favor_cost = 500 -/datum/religion_rites/synthconversion/perform_rite(mob/living/user, obj/structure/altar_of_gods/AOG) - if(!AOG?.buckled_mobs?.len) - to_chat(user, "This rite requires an individual to be buckled to [AOG].") +/datum/religion_rites/synthconversion/perform_rite(mob/living/user, atom/religious_tool) + if(!ismovable(religious_tool)) + to_chat(user, "This rite requires a religious device that individuals can be buckled to.") return FALSE + var/atom/movable/movable_reltool = religious_tool + if(!movable_reltool) + return FALSE + if(!LAZYLEN(movable_reltool.buckled_mobs)) + . = FALSE + if(!movable_reltool.can_buckle) //yes, if you have somehow managed to have someone buckled to something that now cannot buckle, we will still let you perform the rite! + to_chat(user, "This rite requires a religious device that individuals can be buckled to.") + return + to_chat(user, "This rite requires an individual to be buckled to [movable_reltool].") + return return ..() -/datum/religion_rites/synthconversion/invoke_effect(mob/living/user, obj/structure/altar_of_gods/AOG) - if(!AOG?.buckled_mobs?.len) +/datum/religion_rites/synthconversion/invoke_effect(mob/living/user, atom/religious_tool) + if(!ismovable(religious_tool)) + CRASH("[name]'s perform_rite had a movable atom that has somehow turned into a non-movable!") + var/atom/movable/movable_reltool = religious_tool + if(!movable_reltool?.buckled_mobs?.len) return FALSE var/mob/living/carbon/human/human2borg - for(var/i in AOG.buckled_mobs) + for(var/i in movable_reltool.buckled_mobs) if(istype(i,/mob/living/carbon/human)) human2borg = i break diff --git a/tgstation.dme b/tgstation.dme index 8e4010c022a..728feead983 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -422,6 +422,7 @@ #include "code\datums\components\punchcooldown.dm" #include "code\datums\components\rad_insulation.dm" #include "code\datums\components\radioactive.dm" +#include "code\datums\components\religious_tool.dm" #include "code\datums\components\remote_materials.dm" #include "code\datums\components\riding.dm" #include "code\datums\components\rot.dm"