mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
fixes some pulse demon issues (#24129)
* fixes some pulse demon issues * Update code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -142,6 +142,7 @@
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_CABLE_UPDATED, PROC_REF(cable_updated_handler))
|
||||
|
||||
RegisterSignal(src, COMSIG_BODY_TRANSFER_TO, PROC_REF(make_pulse_antagonist))
|
||||
RegisterSignal(src, COMSIG_ATOM_EMP_ACT, PROC_REF(handle_emp))
|
||||
|
||||
current_power = locate(/obj/machinery/power) in loc
|
||||
// in the case that both current_power and current_cable are null, the pulsedemon will die the next tick
|
||||
@@ -253,7 +254,6 @@
|
||||
greeting.Add(mind.prepare_announce_objectives(FALSE))
|
||||
to_chat(src, chat_box_red(greeting.Join("<br>")))
|
||||
SSticker.mode.traitors |= mind
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/demon/pulse_demon/proc/give_spells()
|
||||
AddSpell(new /obj/effect/proc_holder/spell/pulse_demon/cycle_camera)
|
||||
@@ -379,6 +379,7 @@
|
||||
current_power = new_power
|
||||
current_cable = null
|
||||
forceMove(current_power) // we go inside the machine
|
||||
RegisterSignal(current_power, COMSIG_ATOM_EMP_ACT, PROC_REF(handle_emp))
|
||||
playsound(src, 'sound/effects/eleczap.ogg', 15, TRUE)
|
||||
do_sparks(rand(2, 4), FALSE, src)
|
||||
if(isapc(current_power))
|
||||
@@ -388,6 +389,8 @@
|
||||
INVOKE_ASYNC(src, PROC_REF(try_hijack_apc), current_power)
|
||||
else if(new_cable)
|
||||
current_cable = new_cable
|
||||
if(current_power)
|
||||
UnregisterSignal(current_power, COMSIG_ATOM_EMP_ACT)
|
||||
current_power = null
|
||||
update_controlling_area()
|
||||
if(!isturf(loc))
|
||||
@@ -695,11 +698,10 @@
|
||||
LAZYADD(apc_images[apc_turf], apc_image)
|
||||
client.images += apc_image
|
||||
|
||||
/mob/living/simple_animal/demon/pulse_demon/emp_act(severity)
|
||||
/mob/living/simple_animal/demon/pulse_demon/proc/handle_emp(datum/source, severity)
|
||||
SIGNAL_HANDLER
|
||||
if(emp_debounce)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
visible_message("<span class='danger'>[src] [pick("fizzles", "wails", "flails")] in anguish!</span>")
|
||||
playsound(get_turf(src), pick(hurt_sounds), 30, TRUE)
|
||||
throw_alert(ALERT_CATEGORY_NOREGEN, /obj/screen/alert/pulse_noregen)
|
||||
|
||||
@@ -377,9 +377,9 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/proc/drop_loot()
|
||||
if(loot.len)
|
||||
for(var/i in loot)
|
||||
new i(loc)
|
||||
if(length(loot))
|
||||
for(var/item in loot)
|
||||
new item(get_turf(src))
|
||||
|
||||
/mob/living/simple_animal/revive()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user