diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index e90c96ab781..fc5ee28d66d 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -47,74 +47,74 @@ #define COMSIG_ELEMENT_DETACH "element_detach" // /atom signals -#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params) +#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) +#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) //Positions for overrides list #define EXAMINE_POSITION_ARTICLE 1 #define EXAMINE_POSITION_BEFORE 2 //End positions #define COMPONENT_EXNAME_CHANGED 1 -#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): () +#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 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_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 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 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 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 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 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 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 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 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 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. //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) +#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) ///////////////// @@ -137,29 +137,29 @@ // /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_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) // /atom/movable signals -#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" //from base of atom/movable/Moved(): (/atom) +#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 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 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 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 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)) +#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)) #define HEARING_MESSAGE 1 #define HEARING_SPEAKER 2 // #define HEARING_LANGUAGE 3 diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index eb3e65b54da..15f2f59cad0 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -56,6 +56,7 @@ SUBSYSTEM_DEF(atoms) testing("Late initialized [late_loaders.len] atoms") late_loaders.Cut() +/// Init this specific atom /datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments) var/the_type = A.type if(QDELING(A)) diff --git a/code/datums/callback.dm b/code/datums/callback.dm index eb55fcb4862..95343844aa2 100644 --- a/code/datums/callback.dm +++ b/code/datums/callback.dm @@ -10,7 +10,7 @@ * you can also use the compiler define shorthand * var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype) * ``` - * + * * Note: proc strings can only be given for datum proc calls, global procs must be proc paths * * Also proc strings are strongly advised against because they don't compile error if the proc stops existing @@ -30,7 +30,7 @@ * .procname * * `CALLBACK(GLOBAL_PROC, .some_proc_here)` - * + * * ### proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents: * .procname * @@ -38,9 +38,9 @@ * * ### when the above doesn't apply: *.proc/procname - * + * * `CALLBACK(src, .proc/some_proc_here)` - * + * * * proc defined on a parent of a some type * @@ -50,7 +50,7 @@ */ /datum/callback - ///The object we will be calling the proc on + ///The object we will be calling the proc on var/datum/object = GLOBAL_PROC ///The proc we will be calling on the object var/delegate @@ -98,11 +98,11 @@ /** * Invoke this callback - * + * * Calls the registered proc on the registered object, if the user ref * can be resolved it also inclues that as an arg * - * If the datum being called on is varedited, the call is wrapped via WrapAdminProcCall + * If the datum being called on is varedited, the call is wrapped via [WrapAdminProcCall][/proc/WrapAdminProcCall] */ /datum/callback/proc/Invoke(...) if(!usr) @@ -131,7 +131,7 @@ /** * Invoke this callback async (waitfor=false) - * + * * Calls the registered proc on the registered object, if the user ref * can be resolved it also inclues that as an arg * @@ -195,7 +195,7 @@ * Runs a list of callbacks asyncronously, returning only when all have finished * * Callbacks can be repeated, to call it multiple times - * + * * Arguments: * * list/callbacks the list of callbacks to be called * * list/callback_args the list of lists of arguments to pass into each callback diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 7a03d87fc4d..984a298bef5 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -10,26 +10,38 @@ * Useful when you want shared behaviour independent of type inheritance */ /datum/component - /// Defines how duplicate existing components are handled when added to a datum - /// See `COMPONENT_DUPE_*` definitions for available options + /** + * Defines how duplicate existing components are handled when added to a datum + * + * See [COMPONENT_DUPE_*][COMPONENT_DUPE_ALLOWED] definitions for available options + */ var/dupe_mode = COMPONENT_DUPE_HIGHLANDER - /// The type to check for duplication - /// `null` means exact match on `type` (default) - /// Any other type means that and all subtypes + /** + * The type to check for duplication + * + * `null` means exact match on `type` (default) + * + * Any other type means that and all subtypes + */ var/dupe_type /// The datum this components belongs to var/datum/parent - /// Only set to true if you are able to properly transfer this component - /// At a minimum RegisterWithParent and UnregisterFromParent should be used - /// Make sure you also implement PostTransfer for any post transfer handling + /** + * Only set to true if you are able to properly transfer this component + * + * At a minimum [RegisterWithParent][/datum/component/proc/RegisterWithParent] and [UnregisterFromParent][/datum/component/proc/UnregisterFromParent] should be used + * + * Make sure you also implement [PostTransfer][/datum/component/proc/PostTransfer] for any post transfer handling + */ var/can_transfer = FALSE /** * Create a new component. - * Additional arguments are passed to `Initialize()` + * + * Additional arguments are passed to [Initialize()][/datum/component/proc/Initialize] * * Arguments: * * datum/P the parent datum this component reacts to signals from @@ -45,6 +57,7 @@ /** * Called during component creation with the same arguments as in new excluding parent. + * * Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead */ /datum/component/proc/Initialize(...) @@ -52,8 +65,10 @@ /** * Properly removes the component from `parent` and cleans up references - * Setting `force` makes it not check for and remove the component from the parent - * Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal + * + * Arguments: + * * force - makes it not check for and remove the component from the parent + * * silent - deletes the component without sending a [COMSIG_COMPONENT_REMOVING] signal */ /datum/component/Destroy(force=FALSE, silent=FALSE) if(!force && parent) @@ -126,6 +141,7 @@ * Register the component with the parent object * * Use this proc to register with your parent object + * * Overridable proc that's called when added to a new parent */ /datum/component/proc/RegisterWithParent() @@ -135,6 +151,7 @@ * Unregister from our parent object * * Use this proc to unregister from your parent object + * * Overridable proc that's called when removed from a parent * * */ @@ -190,6 +207,7 @@ * Stop listening to a given signal from target * * Breaks the relationship between target and source datum, removing the callback when the signal fires + * * Doesn't care if a registration exists or not * * Arguments: @@ -229,7 +247,9 @@ /** * Called on a component when a component of the same type was added to the same parent - * See `/datum/component/var/dupe_mode` + * + * See [/datum/component/var/dupe_mode] + * * `C`'s type will always be the same of the called component */ /datum/component/proc/InheritComponent(datum/component/C, i_am_original) @@ -237,9 +257,12 @@ /** - * Called on a component when a component of the same type was added to the same parent with COMPONENT_DUPE_SELECTIVE - * See `/datum/component/var/dupe_mode` + * Called on a component when a component of the same type was added to the same parent with [COMPONENT_DUPE_SELECTIVE] + * + * See [/datum/component/var/dupe_mode] + * * `C`'s type will always be the same of the called component + * * return TRUE if you are absorbing the component, otherwise FALSE if you are fine having it exist as a duplicate component */ /datum/component/proc/CheckDupeComponent(datum/component/C, ...) @@ -250,7 +273,6 @@ * Callback Just before this component is transferred * * Use this to do any special cleanup you might need to do before being deregged from an object - * */ /datum/component/proc/PreTransfer() return @@ -259,8 +281,8 @@ * Callback Just after a component is transferred * * Use this to do any special setup you need to do after being moved to a new object - * Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead * + * Do not call `qdel(src)` from this function, `return COMPONENT_INCOMPATIBLE` instead */ /datum/component/proc/PostTransfer() return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it @@ -279,8 +301,10 @@ /** * Internal proc to handle most all of the signaling procedure + * * Will runtime if used on datums with an empty component list - * Use the `SEND_SIGNAL` define instead + * + * Use the [SEND_SIGNAL] define instead */ /datum/proc/_SendSignal(sigtype, list/arguments) var/target = comp_lookup[sigtype] @@ -301,6 +325,7 @@ // The type arg is casted so initial works, you shouldn't be passing a real instance into this /** * Return any component assigned to this datum of the given type + * * This will throw an error if it's possible to have more than one component of that type on the parent * * Arguments: @@ -320,6 +345,7 @@ // The type arg is casted so initial works, you shouldn't be passing a real instance into this /** * Return any component assigned to this datum of the exact given type + * * This will throw an error if it's possible to have more than one component of that type on the parent * * Arguments: @@ -356,9 +382,13 @@ /** * Creates an instance of `new_type` in the datum and attaches to it as parent - * Sends the `COMSIG_COMPONENT_ADDED` signal to the datum - * Returns the component that was created. Or the old component in a dupe situation where `COMPONENT_DUPE_UNIQUE` was set + * + * Sends the [COMSIG_COMPONENT_ADDED] signal to the datum + * + * Returns the component that was created. Or the old component in a dupe situation where [COMPONENT_DUPE_UNIQUE] was set + * * If this tries to add an component to an incompatible type, the component will be deleted and the result will be `null`. This is very unperformant, try not to do it + * * Properly handles duplicate situations based on the `dupe_mode` var */ /datum/proc/_AddComponent(list/raw_args) diff --git a/code/datums/components/creamed.dm b/code/datums/components/creamed.dm index 8ac46132a94..38759e56561 100644 --- a/code/datums/components/creamed.dm +++ b/code/datums/components/creamed.dm @@ -5,7 +5,7 @@ GLOBAL_LIST_INIT(creamable, typecacheof(list( /mob/living/silicon/ai))) /** - * # Creamed component + * Creamed component * * For when you have pie on your face */ @@ -53,9 +53,9 @@ GLOBAL_LIST_INIT(creamable, typecacheof(list( /datum/component/creamed/UnregisterFromParent() UnregisterSignal(parent, list( - COMSIG_COMPONENT_CLEAN_ACT, + COMSIG_COMPONENT_CLEAN_ACT, COMSIG_COMPONENT_CLEAN_FACE_ACT)) - + ///Callback to remove pieface /datum/component/creamed/proc/clean_up(datum/source, strength) if(strength >= CLEAN_WEAK) diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 0a8617b70cd..4608b0ceb68 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -21,19 +21,28 @@ var/list/active_timers /// Status traits attached to this datum var/list/status_traits - - /// Components attached to this datum - /// Lazy associated list in the structure of `type:component/list of components` + + /** + * Components attached to this datum + * + * Lazy associated list in the structure of `type:component/list of components` + */ var/list/datum_components - /// Any datum registered to receive signals from this datum is in this list - /// Lazy associated list in the structure of `signal:registree/list of registrees` + /** + * Any datum registered to receive signals from this datum is in this list + * + * Lazy associated list in the structure of `signal:registree/list of registrees` + */ var/list/comp_lookup /// Lazy associated list in the structure of `signals:proctype` that are run when the datum receives that signal var/list/list/datum/callback/signal_procs - /// Is this datum capable of sending signals? - /// Set to true when a signal has been registered + /** + * Is this datum capable of sending signals? + * + * Set to true when a signal has been registered + */ var/signal_enabled = FALSE - + /// Datum level flags var/datum_flags = NONE @@ -52,7 +61,7 @@ /** * Called when a href for this datum is clicked * - * Sends a COMSIG_TOPIC signal + * Sends a [COMSIG_TOPIC] signal */ /datum/Topic(href, href_list[]) ..() @@ -60,20 +69,20 @@ /** * Default implementation of clean-up code. - * + * * This should be overridden to remove all references pointing to the object being destroyed, if * you do override it, make sure to call the parent and return it's return value by default - * - * Return an appropriate QDEL_HINT to modify handling of your deletion; - * in most cases this is QDEL_HINT_QUEUE. + * + * Return an appropriate [QDEL_HINT][QDEL_HINT_QUEUE] to modify handling of your deletion; + * in most cases this is [QDEL_HINT_QUEUE]. * * The base case is responsible for doing the following * * Erasing timers pointing to this datum * * Erasing compenents on this datum * * Notifying datums listening to signals from this datum that we are going away * - * Returns QDEL_HINT_QUEUE - */ + * Returns [QDEL_HINT_QUEUE] + */ /datum/proc/Destroy(force=FALSE, ...) SHOULD_CALL_PARENT(1) tag = null diff --git a/code/datums/elements/_element.dm b/code/datums/elements/_element.dm index a1473251707..46a295f90be 100644 --- a/code/datums/elements/_element.dm +++ b/code/datums/elements/_element.dm @@ -9,7 +9,9 @@ var/element_flags = NONE /** * The index of the first attach argument to consider for duplicate elements - * Is only used when flags contains ELEMENT_BESPOKE + * + * Is only used when flags contains [ELEMENT_BESPOKE] + * * This is infinity so you must explicitly set this */ var/id_arg_index = INFINITY @@ -46,7 +48,7 @@ /** * Finds the singleton for the element type given and detaches it from src - * You only need additional arguments beyond the type if you're using ELEMENT_BESPOKE + * You only need additional arguments beyond the type if you're using [ELEMENT_BESPOKE] */ /datum/proc/_RemoveElement(list/arguments) var/datum/element/ele = SSdcs.GetElement(arguments) diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index 53f7336d954..55263a326a1 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -172,6 +172,7 @@ S.forceMove(holder.drop_location()) return S +/// Called from [/atom/proc/emp_act] /datum/wires/proc/emp_pulse() var/list/possible_wires = shuffle(wires) var/remaining_pulses = MAXIMUM_EMP_WIRES diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 9ea7c421fe3..f576a5d4b35 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -45,7 +45,7 @@ ///vis overlays managed by SSvis_overlays to automaticaly turn them like other overlays var/list/managed_vis_overlays - ///overlays managed by update_overlays() to prevent removing overlays that weren't added by the same proc + ///overlays managed by [update_overlays][/atom/proc/update_overlays] to prevent removing overlays that weren't added by the same proc var/list/managed_overlays ///Proximity monitor associated with this atom @@ -85,8 +85,8 @@ * Called when an atom is created in byond (built in engine proc) * * Not a lot happens here in SS13 code, as we offload most of the work to the - * [Intialization](atom.html#proc/Initialize) proc, mostly we run the preloader - * if the preloader is being used and then call InitAtom of which the ultimate + * [Intialization][/atom/proc/Initialize] proc, mostly we run the preloader + * if the preloader is being used and then call [InitAtom][/datum/controller/subsystem/atoms/proc/InitAtom] of which the ultimate * result is that the Intialize proc is called. * * We also generate a tag here if the DF_USE_TAG flag is set on the atom @@ -134,11 +134,11 @@ * Any parameters from new are passed through (excluding loc), naturally if you're loading from a map * there are no other arguments * - * Must return an [initialization hint](code/__DEFINES/subsystems.html) or a runtime will occur. + * Must return an [initialization hint][INITIALIZE_HINT_NORMAL] or a runtime will occur. * * Note: the following functions don't call the base for optimization and must copypasta handling: - * * /turf/Initialize - * * /turf/open/space/Initialize + * * [/turf/Initialize] + * * [/turf/open/space/Initialize] */ /atom/proc/Initialize(mapload, ...) if(flags_1 & INITIALIZED_1) @@ -173,10 +173,9 @@ /** * Late Intialization, for code that should run after all atoms have run Intialization * - * To have your LateIntialize proc be called, your atoms [Initalization](atom.html#proc/Initialize) + * To have your LateIntialize proc be called, your atoms [Initalization][/atom/proc/Initialize] * proc must return the hint - * [INITIALIZE_HINT_LATELOAD](code/__DEFINES/subsystems.html#define/INITIALIZE_HINT_LATELOAD) - * otherwise you will never be called. + * [INITIALIZE_HINT_LATELOAD] otherwise you will never be called. * * useful for doing things like finding other machines on GLOB.machines because you can guarantee * that all atoms will actually exist in the "WORLD" at this time and that all their Intialization @@ -185,7 +184,7 @@ /atom/proc/LateInitialize() set waitfor = FALSE -/// Put your AddComponent() calls here +/// Put your [AddComponent] calls here /atom/proc/ComponentInitialize() return @@ -411,10 +410,10 @@ /** * React to an EMP of the given severity * - * Default behaviour is to send the COMSIG_ATOM_EMP_ACT signal + * Default behaviour is to send the [COMSIG_ATOM_EMP_ACT] signal * * If the signal does not return protection, and there are attached wires then we call - * emp_pulse() on the wires + * [emp_pulse][/datum/wires/proc/emp_pulse] on the wires * * We then return the protection value */ @@ -427,7 +426,7 @@ /** * React to a hit by a projectile object * - * Default behaviour is to send the COMSIG_ATOM_BULLET_ACT and then call on_hit() on the projectile + * Default behaviour is to send the [COMSIG_ATOM_BULLET_ACT] and then call [on_hit][/obj/projectile/proc/on_hit] on the projectile */ /atom/proc/bullet_act(obj/projectile/P, def_zone) SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone) @@ -446,7 +445,7 @@ * Get the name of this object for examine * * You can override what is returned from this proc by registering to listen for the - * COMSIG_ATOM_GET_EXAMINE_NAME signal + * [COMSIG_ATOM_GET_EXAMINE_NAME] signal */ /atom/proc/get_examine_name(mob/user) . = "\a [src]" @@ -465,9 +464,9 @@ * Called when a mob examines (shift click or verb) this atom * * Default behaviour is to get the name and icon of the object and it's reagents where - * the TRANSPARENT flag is set on the reagents holder + * the [TRANSPARENT] flag is set on the reagents holder * - * Produces a signal COMSIG_PARENT_EXAMINE + * Produces a signal [COMSIG_PARENT_EXAMINE] */ /atom/proc/examine(mob/user) . = list("[get_examine_string(user, TRUE)].") @@ -537,7 +536,7 @@ * An atom we are buckled or is contained within us has tried to move * * Default behaviour is to send a warning that the user can't move while buckled as long - * as the buckle_message_cooldown has expired (50 ticks) + * as the [buckle_message_cooldown][/atom/var/buckle_message_cooldown] has expired (50 ticks) */ /atom/proc/relaymove(mob/user) if(buckle_message_cooldown <= world.time) @@ -552,7 +551,7 @@ /** * React to being hit by an explosion * - * Default behaviour is to call contents_explosion() and send the COMSIG_ATOM_EX_ACT signal + * Default behaviour is to call [contents_explosion][/atom/proc/contents_explosion] and send the [COMSIG_ATOM_EX_ACT] signal */ /atom/proc/ex_act(severity, target) set waitfor = FALSE @@ -562,7 +561,7 @@ /** * React to a hit by a blob objecd * - * default behaviour is to send the COMSIG_ATOM_BLOB_ACT signal + * default behaviour is to send the [COMSIG_ATOM_BLOB_ACT] signal */ /atom/proc/blob_act(obj/structure/blob/B) SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, B) @@ -575,7 +574,7 @@ /** * React to being hit by a thrown object * - * Default behaviour is to call hitby_react() on ourselves after 2 seconds if we are dense + * Default behaviour is to call [hitby_react][/atom/proc/hitby_react] on ourselves after 2 seconds if we are dense * and under normal gravity. * * Im not sure why this the case, maybe to prevent lots of hitby's if the thrown object is @@ -659,7 +658,7 @@ /** * Respond to the singularity pulling on us * - * Default behaviour is to send COMSIG_ATOM_SING_PULL and return + * Default behaviour is to send [COMSIG_ATOM_SING_PULL] and return */ /atom/proc/singularity_pull(obj/singularity/S, current_size) SEND_SIGNAL(src, COMSIG_ATOM_SING_PULL, S, current_size) @@ -668,7 +667,7 @@ /** * Respond to acid being used on our atom * - * Default behaviour is to send COMSIG_ATOM_ACID_ACT and return + * Default behaviour is to send [COMSIG_ATOM_ACID_ACT] and return */ /atom/proc/acid_act(acidpwr, acid_volume) SEND_SIGNAL(src, COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume) @@ -676,7 +675,7 @@ /** * Respond to an emag being used on our atom * - * Default behaviour is to send COMSIG_ATOM_EMAG_ACT and return + * Default behaviour is to send [COMSIG_ATOM_EMAG_ACT] and return */ /atom/proc/emag_act(mob/user) SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT, user) @@ -684,7 +683,7 @@ /** * Respond to a radioactive wave hitting this atom * - * Default behaviour is to send COMSIG_ATOM_RAD_ACT and return + * Default behaviour is to send [COMSIG_ATOM_RAD_ACT] and return */ /atom/proc/rad_act(strength) SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength) @@ -692,7 +691,7 @@ /** * Respond to narsie eating our atom * - * Default behaviour is to send COMSIG_ATOM_NARSIE_ACT and return + * Default behaviour is to send [COMSIG_ATOM_NARSIE_ACT] and return */ /atom/proc/narsie_act() SEND_SIGNAL(src, COMSIG_ATOM_NARSIE_ACT) @@ -706,7 +705,7 @@ /** * Respond to an RCD acting on our item * - * Default behaviour is to send COMSIG_ATOM_RCD_ACT and return FALSE + * Default behaviour is to send [COMSIG_ATOM_RCD_ACT] and return FALSE */ /atom/proc/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) SEND_SIGNAL(src, COMSIG_ATOM_RCD_ACT, user, the_rcd, passed_mode) @@ -755,9 +754,9 @@ return null /** - * This proc is called when an atom in our contents has it's Destroy() called + * This proc is called when an atom in our contents has it's [Destroy][/atom/Destroy] called * - * Default behaviour is to simply send COMSIG_ATOM_CONTENTS_DEL + * Default behaviour is to simply send [COMSIG_ATOM_CONTENTS_DEL] */ /atom/proc/handle_atom_del(atom/A) SEND_SIGNAL(src, COMSIG_ATOM_CONTENTS_DEL, A) @@ -792,7 +791,7 @@ /** * Hook for running code when a dir change occurs * - * Not recommended to use, listen for the COMSIG_ATOM_DIR_CHANGE signal instead (sent by this proc) + * Not recommended to use, listen for the [COMSIG_ATOM_DIR_CHANGE] signal instead (sent by this proc) */ /atom/proc/setDir(newdir) SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir) @@ -886,7 +885,7 @@ * At the atom level, if you edit a var named "color" it will add the atom colour with * admin level priority to the atom colours list * - * Also, if GLOB.Debug2 is FALSE, it sets the ADMIN_SPAWNED_1 flag on flags_1, which signifies + * Also, if GLOB.Debug2 is FALSE, it sets the [ADMIN_SPAWNED_1] flag on [flags_1][/atom/var/flags_1], which signifies * the object has been admin edited */ /atom/vv_edit_var(var_name, var_value) @@ -995,7 +994,7 @@ /** * An atom has entered this atom's contents * - * Default behaviour is to send the COMSIG_ATOM_ENTERED + * Default behaviour is to send the [COMSIG_ATOM_ENTERED] */ /atom/Entered(atom/movable/AM, atom/oldLoc) SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, oldLoc) @@ -1003,7 +1002,7 @@ /** * An atom is attempting to exit this atom's contents * - * Default behaviour is to send the COMSIG_ATOM_EXIT + * Default behaviour is to send the [COMSIG_ATOM_EXIT] * * Return value should be set to FALSE if the moving atom is unable to leave, * otherwise leave value the result of the parent call @@ -1016,7 +1015,7 @@ /** * An atom has exited this atom's contents * - * Default behaviour is to send the COMSIG_ATOM_EXITED + * Default behaviour is to send the [COMSIG_ATOM_EXITED] */ /atom/Exited(atom/movable/AM, atom/newLoc) SEND_SIGNAL(src, COMSIG_ATOM_EXITED, AM, newLoc) @@ -1162,11 +1161,12 @@ /** * Log a combat message in the attack log * - * 1 argument is the actor performing the action - * 2 argument is the target of the action - * 3 is a verb describing the action (e.g. punched, throwed, kicked, etc.) - * 4 is a tool with which the action was made (usually an item) - * 5 is any additional text, which will be appended to the rest of the log line + * Arguments: + * * atom/user - argument is the actor performing the action + * * atom/target - argument is the target of the action + * * what_done - is a verb describing the action (e.g. punched, throwed, kicked, etc.) + * * atom/object - is a tool with which the action was made (usually an item) + * * addition - is any additional text, which will be appended to the rest of the log line */ /proc/log_combat(atom/user, atom/target, what_done, atom/object=null, addition=null) var/ssource = key_name(user) @@ -1240,7 +1240,7 @@ /** * Returns true if this atom has gravity for the passed in turf * - * Sends signals COMSIG_ATOM_HAS_GRAVITY and COMSIG_TURF_HAS_GRAVITY, both can force gravity with + * Sends signals [COMSIG_ATOM_HAS_GRAVITY] and [COMSIG_TURF_HAS_GRAVITY], both can force gravity with * the forced gravity var * * Gravity situations: diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 8622abd8563..d925b2d04d8 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -25,7 +25,7 @@ var/inertia_next_move = 0 var/inertia_move_delay = 5 var/pass_flags = NONE - /// If false makes CanPass call CanPassThrough on this type instead of using default behaviour + /// If false makes [CanPass][/atom/proc/CanPass] call [CanPassThrough][/atom/movable/proc/CanPassThrough] on this type instead of using default behaviour var/generic_canpass = TRUE var/moving_diagonally = 0 //0: not doing a diagonal move. 1 and 2: doing the first/second step of the diagonal move var/atom/movable/moving_from_pull //attempt to resume grab after moving instead of before. @@ -487,11 +487,17 @@ /atom/movable/proc/setMovetype(newval) movement_type = newval -//Called whenever an object moves and by mobs when they attempt to move themselves through space -//And when an object or action applies a force on src, see newtonian_move() below -//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting -//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm -//movement_dir == 0 when stopping or any dir when trying to move +/** + * Called whenever an object moves and by mobs when they attempt to move themselves through space + * And when an object or action applies a force on src, see [newtonian_move][/atom/movable/proc/newtonian_move] + * + * Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting + * + * Mobs should return 1 if they should be able to move of their own volition, see [/client/Move] + * + * Arguments: + * * movement_dir - 0 when stopping or any dir when trying to move + */ /atom/movable/proc/Process_Spacemove(movement_dir = 0) if(has_gravity(src)) return 1 @@ -511,7 +517,8 @@ return 0 -/atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity +/// Only moves the object if it's under no gravity +/atom/movable/proc/newtonian_move(direction) if(!loc || Process_Spacemove(0)) inertia_dir = 0 return 0 @@ -538,7 +545,8 @@ return return throw_at(target, range, speed, thrower, spin, diagonals_first, callback, force, gentle) -/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE) //If this returns FALSE then callback will not be called. +///If this returns FALSE then callback will not be called. +/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, datum/callback/callback, force = MOVE_FORCE_STRONG, gentle = FALSE) . = FALSE if (!target || speed <= 0) return @@ -662,11 +670,11 @@ SHOULD_CALL_PARENT(TRUE) return blocker_opinion -// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. +/// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. /atom/movable/proc/on_exit_storage(datum/component/storage/concrete/S) return -// called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item. +/// called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item. /atom/movable/proc/on_enter_storage(datum/component/storage/concrete/S) return @@ -689,7 +697,7 @@ break . = dense_object_backup -//called when a mob resists while inside a container that is itself inside something. +///called when a mob resists while inside a container that is itself inside something. /atom/movable/proc/relay_container_resist(mob/living/user, obj/O) return @@ -886,8 +894,11 @@ return FALSE return TRUE -/// Updates the grab state of the movable -/// This exists to act as a hook for behaviour +/** + * Updates the grab state of the movable + * + * This exists to act as a hook for behaviour + */ /atom/movable/proc/setGrabState(newstate) grab_state = newstate diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index 2142a5e57c7..5bd556ed453 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -86,6 +86,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention) GLOBAL_PROTECT(AdminProcCallSpamPrevention) +/// Wrapper for proccalls where the datum is flagged as vareditted /proc/WrapAdminProcCall(datum/target, procname, list/arguments) if(target && procname == "Del") to_chat(usr, "Calling Del() is not allowed") diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index f2d081e30ca..0d3d71bafe1 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -136,6 +136,7 @@ /obj/projectile/proc/prehit(atom/target) return TRUE +/// Called when the projectile hits something /obj/projectile/proc/on_hit(atom/target, blocked = FALSE) if(fired_from) SEND_SIGNAL(fired_from, COMSIG_PROJECTILE_ON_HIT, firer, target, Angle)