mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item [MDB IGNORE] (#18519)
* afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item * Update _neck.dm Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
co-authored by
Mothblocks
Zonespace
parent
12c3edc8e3
commit
650d64f6d4
@@ -12,17 +12,20 @@
|
||||
. = ..()
|
||||
if (!proximity)
|
||||
return
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
|
||||
var/obj/item/organ/internal/monster_core/target_core = target_organ
|
||||
if (!istype(target_core, /obj/item/organ/internal/monster_core))
|
||||
balloon_alert(user, "invalid target!")
|
||||
return
|
||||
return .
|
||||
|
||||
if (!target_core.preserve())
|
||||
balloon_alert(user, "organ decayed!")
|
||||
return
|
||||
return .
|
||||
|
||||
balloon_alert(user, "organ stabilized")
|
||||
qdel(src)
|
||||
return .
|
||||
|
||||
/**
|
||||
* Useful organs which drop as loot from a mining creature.
|
||||
@@ -137,6 +140,7 @@
|
||||
if (!proximity_flag)
|
||||
return
|
||||
try_apply(target, user)
|
||||
return . | AFTERATTACK_PROCESSED_ITEM
|
||||
|
||||
/obj/item/organ/internal/monster_core/attack_self(mob/user)
|
||||
if (!user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE))
|
||||
|
||||
@@ -34,6 +34,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
|
||||
/obj/item/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params)
|
||||
. = ..()
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
if(!beacon)
|
||||
to_chat(user, span_warning("[src] is not linked to a beacon, and cannot be used!"))
|
||||
return
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
|
||||
/obj/item/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
// If our target is the beacon and the hierostaff is next to the beacon, we're trying to pick it up.
|
||||
if((target == beacon) && target.Adjacent(src))
|
||||
return
|
||||
@@ -771,6 +772,7 @@
|
||||
. = ..()
|
||||
if(timer > world.time)
|
||||
return
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
if(is_type_in_typecache(target, banned_turfs))
|
||||
return
|
||||
if(target in view(user.client.view, get_turf(user)))
|
||||
@@ -1001,6 +1003,7 @@
|
||||
|
||||
/obj/item/storm_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
. |= AFTERATTACK_PROCESSED_ITEM
|
||||
if(!thunder_charges)
|
||||
balloon_alert(user, "needs to charge!")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user