mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[MIRROR] FIXES RUNTIME EVERYTIME A PAI MOVES [MDB IGNORE] (#15473)
* FIXES RUNTIME EVERYTIME A PAI MOVES (#69054) Fixes runtime on movement if a pai fails to put the hacking cable in its holder's hands * FIXES RUNTIME EVERYTIME A PAI MOVES Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
QDEL_NULL(hacking_cable) //clear any old cables
|
||||
hacking_cable = new
|
||||
var/mob/living/carbon/hacker = get_holder()
|
||||
if(hacker?.put_in_hands(hacking_cable))
|
||||
if(iscarbon(hacker) && hacker.put_in_hands(hacking_cable)) //important to double check since get_holder can return non-null values that aren't carbons.
|
||||
hacker.visible_message(span_notice("A port on [src] opens to reveal a cable, which you quickly grab."), span_hear("You hear the soft click of a plastic component and manage to catch the falling cable."))
|
||||
track_pai()
|
||||
track_thing(hacking_cable)
|
||||
@@ -90,10 +90,7 @@
|
||||
/mob/living/silicon/pai/proc/retract_cable()
|
||||
hacking_cable.visible_message(span_notice("The cable quickly retracts."))
|
||||
balloon_alert(src, "cable retracted")
|
||||
untrack_pai()
|
||||
untrack_thing(hacking_cable)
|
||||
QDEL_NULL(hacking_cable)
|
||||
SStgui.update_user_uis(src)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
|
||||
@@ -183,7 +183,10 @@
|
||||
|
||||
/mob/living/silicon/pai/handle_atom_del(atom/deleting_atom)
|
||||
if(deleting_atom == hacking_cable)
|
||||
untrack_pai()
|
||||
untrack_thing(hacking_cable)
|
||||
hacking_cable = null
|
||||
SStgui.update_user_uis(src)
|
||||
if(!QDELETED(card))
|
||||
card.update_appearance()
|
||||
if(deleting_atom == atmos_analyzer)
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
to_chat(src, span_syndradio("You are not at liberty to do this! All agents are clandestine."))
|
||||
return FALSE
|
||||
var/mob/living/carbon/holder = get_holder()
|
||||
if(!holder)
|
||||
if(!iscarbon(holder))
|
||||
balloon_alert(src, "not being carried")
|
||||
return FALSE
|
||||
balloon_alert(src, "requesting DNA sample")
|
||||
|
||||
Reference in New Issue
Block a user