mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Mousetrap fix (#21759)
Fixes https://github.com/Aurorastation/Aurora.3/issues/21744 Mousetraps were missing the loc_connection element on initialization. They now trigger appropriately when mobs (mouse, human, or otherwise) step onto their location. changes: - bugfix: "Mousetraps now trigger when mobs move onto their location." - code_imp: "Updates affected assemblies to use feedback_hints() instead of get_examine_text(), improves clarity." --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: Cody Brittain <1779662+Generalcamo@users.noreply.github.com>
This commit is contained in:
co-authored by
Cody Brittain
parent
9dbda9584b
commit
f797eb05c0
@@ -13,10 +13,19 @@
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 100)
|
||||
var/armed = FALSE
|
||||
|
||||
/obj/item/device/assembly/mousetrap/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
/obj/item/device/assembly/mousetrap/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
|
||||
)
|
||||
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/item/device/assembly/mousetrap/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
if(armed)
|
||||
. += "It looks like it's armed."
|
||||
. += SPAN_NOTICE("It looks like it's armed.")
|
||||
|
||||
/obj/item/device/assembly/mousetrap/update_icon()
|
||||
icon_state = armed ? "mousetraparmed" : "mousetrap"
|
||||
|
||||
Reference in New Issue
Block a user