mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Fixes embedded items not reacting to explosions (#87351)
## About The Pull Request Closes #63414 ## Changelog 🆑 fix: Fixed embedded items not reacting to explosions /🆑
This commit is contained in:
@@ -85,9 +85,10 @@
|
||||
RegisterSignal(parent, COMSIG_CARBON_EMBED_REMOVAL, PROC_REF(safeRemove))
|
||||
RegisterSignal(parent, COMSIG_ATOM_ATTACKBY, PROC_REF(checkTweeze))
|
||||
RegisterSignal(parent, COMSIG_MAGIC_RECALL, PROC_REF(magic_pull))
|
||||
RegisterSignal(parent, COMSIG_ATOM_EX_ACT, PROC_REF(on_ex_act))
|
||||
|
||||
/datum/component/embedded/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_EMBED_RIP, COMSIG_CARBON_EMBED_REMOVAL, COMSIG_ATOM_ATTACKBY, COMSIG_MAGIC_RECALL))
|
||||
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_EMBED_RIP, COMSIG_CARBON_EMBED_REMOVAL, COMSIG_ATOM_ATTACKBY, COMSIG_MAGIC_RECALL, COMSIG_ATOM_EX_ACT))
|
||||
|
||||
/datum/component/embedded/process(seconds_per_tick)
|
||||
var/mob/living/carbon/victim = parent
|
||||
@@ -121,6 +122,19 @@
|
||||
if(prob(fall_chance_current))
|
||||
fallOut()
|
||||
|
||||
/datum/component/embedded/proc/on_ex_act(atom/source, severity)
|
||||
SIGNAL_HANDLER
|
||||
// In the process of parent's ex_act
|
||||
if (QDELETED(weapon))
|
||||
return
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
SSexplosions.high_mov_atom += weapon
|
||||
if(EXPLODE_HEAVY)
|
||||
SSexplosions.med_mov_atom += weapon
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.low_mov_atom += weapon
|
||||
|
||||
////////////////////////////////////////
|
||||
////////////BEHAVIOR PROCS//////////////
|
||||
////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user