mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Invisible walls can be leaned on (#90564)
By dragging yourself onto a tile with an invisible wall on it, you can lean on one.
This commit is contained in:
@@ -62,6 +62,24 @@
|
||||
desc = "You have a bad feeling about this."
|
||||
alpha = 0
|
||||
|
||||
/obj/effect/forcefield/mime/Initialize(mapload)
|
||||
. = ..()
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_MOUSEDROPPED_ONTO = PROC_REF(mousedrop_receive),
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/effect/forcefield/mime/proc/mousedrop_receive(atom/source, atom/movable/dropped, mob/user, params)
|
||||
SIGNAL_HANDLER
|
||||
// Reroute the call to ourselves so leanable component can trigger
|
||||
if (dropped == user)
|
||||
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom, mouse_drop_receive), dropped, user, params)
|
||||
return COMPONENT_CANCEL_MOUSEDROPPED_ONTO
|
||||
|
||||
/obj/effect/forcefield/mime/mouse_drop_receive(mob/living/dropping, mob/user, params)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/leanable, dropping)
|
||||
|
||||
/obj/effect/forcefield/mime/advanced
|
||||
name = "invisible blockade"
|
||||
desc = "You're gonna be here awhile."
|
||||
|
||||
Reference in New Issue
Block a user