[MIRROR] New DCS signals (#2741)
* New DCS signals * Update atoms.dm * actually ports comsigs
This commit is contained in:
committed by
Poojawa
parent
1352eefa3a
commit
ecce4cf138
@@ -11,14 +11,34 @@
|
||||
// All signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
|
||||
// /datum signals
|
||||
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (datum/component)
|
||||
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable)
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from the base of atom/attackby: (obj/item, mob/living, params)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from the base of atom/examine: (mob)
|
||||
|
||||
// /atom signals
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (obj/item, mob/living, params)
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (mob/living/carbon/human)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (mob)
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom)
|
||||
#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/item/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(): ()
|
||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
|
||||
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_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)
|
||||
|
||||
// /atom/movable signals
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (atom, dir)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable)
|
||||
#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (atom)
|
||||
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (atom, throwingdatum)
|
||||
|
||||
// /obj/machinery signals
|
||||
#define COMSIG_MACHINE_PROCESS "machine_process" //from machinery subsystem fire(): ()
|
||||
#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
|
||||
@@ -164,6 +164,7 @@ SUBSYSTEM_DEF(air)
|
||||
currentrun.len--
|
||||
if(!M || (M.process_atmos(seconds) == PROCESS_KILL))
|
||||
atmos_machinery.Remove(M)
|
||||
M.SendSignal(COMSIG_MACHINE_PROCESS_ATMOS)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
@@ -382,4 +383,4 @@ SUBSYSTEM_DEF(air)
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOT
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
@@ -40,6 +40,7 @@ SUBSYSTEM_DEF(machines)
|
||||
var/obj/machinery/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
|
||||
thing.SendSignal(COMSIG_MACHINE_PROCESS)
|
||||
if(thing.use_power)
|
||||
thing.auto_use_power() //add back the power state
|
||||
else
|
||||
@@ -61,4 +62,4 @@ SUBSYSTEM_DEF(machines)
|
||||
if (istype(SSmachines.processing))
|
||||
processing = SSmachines.processing
|
||||
if (istype(SSmachines.powernets))
|
||||
powernets = SSmachines.powernets
|
||||
powernets = SSmachines.powernets
|
||||
@@ -150,6 +150,7 @@
|
||||
return 0
|
||||
|
||||
/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
SendSignal(COMSIG_ATOM_HULK_ATTACK, user)
|
||||
if(does_attack_animation)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_logs(user, src, "punched", "hulk powers")
|
||||
@@ -222,10 +223,12 @@
|
||||
return
|
||||
|
||||
/atom/proc/emp_act(severity)
|
||||
SendSignal(COMSIG_ATOM_EMP_ACT, severity)
|
||||
if(istype(wires) && !(flags_2 & NO_EMP_WIRES_2))
|
||||
wires.emp_pulse()
|
||||
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
||||
SendSignal(COMSIG_ATOM_BULLET_ACT, P, def_zone)
|
||||
. = P.on_hit(src, 0, def_zone)
|
||||
|
||||
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
||||
@@ -291,6 +294,7 @@
|
||||
to_chat(user, "[total_volume] units of various reagents")
|
||||
else
|
||||
to_chat(user, "Nothing.")
|
||||
SendSignal(COMSIG_PARENT_EXAMINE, user)
|
||||
|
||||
/atom/proc/relaymove(mob/user)
|
||||
if(buckle_message_cooldown <= world.time)
|
||||
@@ -307,9 +311,11 @@
|
||||
SendSignal(COMSIG_ATOM_EX_ACT, severity, target)
|
||||
|
||||
/atom/proc/blob_act(obj/structure/blob/B)
|
||||
SendSignal(COMSIG_ATOM_BLOB_ACT, B)
|
||||
return
|
||||
|
||||
/atom/proc/fire_act(exposed_temperature, exposed_volume)
|
||||
SendSignal(COMSIG_ATOM_FIRE_ACT, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked)
|
||||
@@ -473,21 +479,26 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
||||
SendSignal(COMSIG_ATOM_SING_PULL, S, current_size)
|
||||
|
||||
/atom/proc/acid_act(acidpwr, acid_volume)
|
||||
SendSignal(COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume)
|
||||
return
|
||||
|
||||
/atom/proc/emag_act()
|
||||
SendSignal(COMSIG_ATOM_EMAG_ACT)
|
||||
return
|
||||
|
||||
/atom/proc/narsie_act()
|
||||
SendSignal(COMSIG_ATOM_NARSIE_ACT)
|
||||
return
|
||||
|
||||
/atom/proc/ratvar_act()
|
||||
SendSignal(COMSIG_ATOM_RATVAR_ACT)
|
||||
return
|
||||
|
||||
/atom/proc/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
SendSignal(COMSIG_ATOM_RCD_ACT, user, the_rcd, passed_mode)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
|
||||
@@ -626,4 +637,4 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
||||
return L.AllowDrop() ? L : get_turf(L)
|
||||
|
||||
/atom/Entered(atom/movable/AM, atom/oldLoc)
|
||||
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
|
||||
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/atom/movable
|
||||
layer = OBJ_LAYER
|
||||
var/last_move = null
|
||||
@@ -117,6 +116,7 @@
|
||||
|
||||
//Called after a successful Move(). By this point, we've already moved
|
||||
/atom/movable/proc/Moved(atom/OldLoc, Dir)
|
||||
SendSignal(COMSIG_MOVABLE_MOVED, OldLoc, Dir)
|
||||
if (!inertia_moving)
|
||||
inertia_next_move = world.time + inertia_move_delay
|
||||
newtonian_move(Dir)
|
||||
@@ -215,6 +215,7 @@
|
||||
//to differentiate it, naturally everyone forgot about this immediately and so some things
|
||||
//would bump twice, so now it's called Collide
|
||||
/atom/movable/proc/Collide(atom/A)
|
||||
SendSignal(COMSIG_MOVABLE_COLLIDE, A)
|
||||
if(A)
|
||||
if(throwing)
|
||||
throwing.hit_atom(A)
|
||||
@@ -308,6 +309,7 @@
|
||||
|
||||
/atom/movable/proc/throw_impact(atom/hit_atom, throwingdatum)
|
||||
set waitfor = 0
|
||||
SendSignal(COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
|
||||
return hit_atom.hitby(src)
|
||||
|
||||
/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked)
|
||||
@@ -692,4 +694,4 @@
|
||||
return FALSE
|
||||
if(anchored || throwing)
|
||||
return FALSE
|
||||
return TRUE
|
||||
return TRUE
|
||||
Reference in New Issue
Block a user