mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Enhances algorithm for finding an atom mount (#94076)
## About The Pull Request Depends on #94064 for the unit test but offers a better method for finding an atom to mount on - Finding a mount now takes into consideration the objects pixel x & y offsets meaning diagonal mounting is now supported. Gives great flexibility for mappers - If you don't want to use pixel offsets but default back to using the objects direction that behaviour is still preserved. Useful if your object uses directional icon states(lights & cameras for now) AND don't use offsets - If no direction could be specified then as the last resort it defaults back to the objects local turf for mounting ## Changelog 🆑 fix: all mounted objects on tables, fences, windows & walls should fall of correctly when the atom it is placed on is destroyed fix: security telescreen now falls off when their mounted wall is destroyed fix: defib wall mount falls off when their mounted wall is destroyed fix: floor lights are mounted to the ground/catwalk/tram floor they are sitting on meaning destroying it will destroy the light fix: wall mounted plaques now fall off when their mounted wall is destroyed /🆑
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
/obj/structure/plaque/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload)
|
||||
find_and_mount_on_atom()
|
||||
register_context()
|
||||
|
||||
/obj/structure/plaque/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
SET_PLANE_IMPLICIT(src, FLOOR_PLANE)
|
||||
layer = HIGH_TURF_LAYER
|
||||
|
||||
/obj/structure/plaque/static_plaque/get_moutable_objects()
|
||||
return list()
|
||||
|
||||
/obj/structure/plaque/static_plaque/find_and_mount_on_atom(mark_for_late_init, late_init)
|
||||
if(isProbablyWallMounted(src))
|
||||
return ..()
|
||||
|
||||
/obj/structure/plaque/static_plaque/atmos
|
||||
name = "\improper FEA Atmospherics Division plaque"
|
||||
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
|
||||
|
||||
Reference in New Issue
Block a user