afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)

Necessary for #72292 to work effectively, and probably not very useful
out of that context. Split out of its own PR because this is long and
boring.

I want to make sure that we're catching actual mistakes there, and not
just experiencing side effects of how shitty the attack chain is.
This commit is contained in:
Mothblocks
2023-01-04 21:10:41 -08:00
committed by GitHub
parent a320ea0721
commit f54dcda1c0
101 changed files with 345 additions and 117 deletions
@@ -478,9 +478,10 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
/obj/item/analyzer/hilbertsanalyzer/afterattack(atom/target, mob/user, proximity)
. = ..()
if(istype(target, /obj/item/hilbertshotel))
. |= AFTERATTACK_PROCESSED_ITEM
if(!proximity)
to_chat(user, span_warning("It's to far away to scan!"))
return
return .
var/obj/item/hilbertshotel/sphere = target
if(sphere.activeRooms.len)
to_chat(user, "Currently Occupied Rooms:")
@@ -494,6 +495,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
to_chat(user, roomnumber)
else
to_chat(user, "No vacated rooms.")
return .
/obj/effect/landmark/lift_id/hilbert
specific_lift_id = HILBERT_TRAM