mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #11074 from farie82/refactor-pickup-and-fix-bomb
Refactored pickup code and fixed the bomb guardian bug
This commit is contained in:
@@ -255,11 +255,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
else
|
||||
if(isliving(loc))
|
||||
return 0
|
||||
|
||||
pickup(user)
|
||||
|
||||
add_fingerprint(user)
|
||||
user.put_in_active_hand(src)
|
||||
if(pickup(user)) // Pickup succeeded
|
||||
user.put_in_active_hand(src)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/attack_alien(mob/user as mob)
|
||||
@@ -355,6 +354,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
|
||||
return TRUE
|
||||
|
||||
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||
/obj/item/proc/on_exit_storage(obj/item/storage/S as obj)
|
||||
|
||||
@@ -47,4 +47,4 @@
|
||||
H.reagents.add_reagent(poison_type, poison_dose)
|
||||
poison_total -= poison_dose
|
||||
add_attack_logs(src, user, "Picked up [src], the trapped syndicate documents")
|
||||
..()
|
||||
return ..()
|
||||
@@ -235,7 +235,7 @@
|
||||
nadeassembly.process_movement()
|
||||
|
||||
/obj/item/grenade/chem_grenade/pickup()
|
||||
..()
|
||||
. = ..()
|
||||
if(nadeassembly)
|
||||
nadeassembly.process_movement()
|
||||
|
||||
|
||||
@@ -800,6 +800,7 @@
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/twohanded/pitchfork/demonic/pickup(mob/user)
|
||||
. = ..()
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/U = user
|
||||
if(U.mind && !U.mind.devilinfo && (U.mind.soulOwner == U.mind)) //Burn hands unless they are a devil or have sold their soul
|
||||
|
||||
Reference in New Issue
Block a user