mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
## About The Pull Request Recovery of #85771, minus directional window leaning (because it looks goofy) ## Changelog 🆑 add: You can now lean on windows the same way you can lean on walls fix: You no longer stop leaning on walls after clicking on anything /🆑
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
var/datum/material/glass_material_datum = /datum/material/glass
|
||||
/// Whether or not we're disappearing but dramatically
|
||||
var/dramatically_disappearing = FALSE
|
||||
/// If we added a leaning component to ourselves
|
||||
var/added_leaning = FALSE
|
||||
|
||||
/datum/armor/structure_window
|
||||
melee = 50
|
||||
@@ -78,6 +80,15 @@
|
||||
if (flags_1 & ON_BORDER_1)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/structure/window/mouse_drop_receive(atom/dropping, mob/user, params)
|
||||
. = ..()
|
||||
if (added_leaning || (flags_1 & ON_BORDER_1))
|
||||
return
|
||||
/// For performance reasons and to cut down on init times we are "lazy-loading" the leaning component when someone drags their sprite onto us, and then calling dragging code again to trigger the component
|
||||
AddComponent(/datum/component/leanable, 11)
|
||||
added_leaning = TRUE
|
||||
dropping.base_mouse_drop_handler(src, null, null, params)
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user