mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
initial (#28430)
This commit is contained in:
@@ -165,6 +165,14 @@
|
||||
remove_paddles(user)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/item/defibrillator/on_mob_move(dir, mob/user)
|
||||
if(paddles_on_defib)
|
||||
return
|
||||
|
||||
if(paddles.loc != user)
|
||||
remove_paddles(paddles.loc)
|
||||
|
||||
|
||||
/obj/item/defibrillator/item_action_slot_check(slot, mob/user)
|
||||
if(slot == ITEM_SLOT_BACK)
|
||||
return TRUE
|
||||
@@ -371,6 +379,25 @@
|
||||
defib.update_icon(UPDATE_OVERLAYS)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/shockpaddles/on_give(mob/living/carbon/giver, mob/living/carbon/receiver)
|
||||
|
||||
// This should be True, because action give calls drop() before this proc
|
||||
if(defib.paddles_on_defib)
|
||||
//Detach the paddles into the user's hands
|
||||
defib.paddles.forceMove(receiver)
|
||||
defib.paddles_on_defib = FALSE
|
||||
else if(receiver.is_in_active_hand(defib.paddles))
|
||||
//Remove from their hands and back onto the defib unit
|
||||
defib.remove_paddles(receiver)
|
||||
|
||||
defib.update_icon(UPDATE_OVERLAYS)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
// We call this to check if the receiver is outside the defib range
|
||||
// Otherwise, it can be placed anywhere on the map
|
||||
on_mob_move(null, receiver)
|
||||
|
||||
|
||||
/obj/item/shockpaddles/on_mob_move(dir, mob/user)
|
||||
if(defib)
|
||||
if(!isturf(user.loc))
|
||||
|
||||
Reference in New Issue
Block a user