Unit tests, refactor & realignment for map loaded wall mounts (#93662)

## About The Pull Request
This 1st has to be PR'd so the integration tests can point out all
wallmounts that could not find a support structure to mount on. I then
will do many map edits to align them onto the closest atom

Yes we no longer use wall mount but atom mounted component. All objects
that are mounted on windows/tables & fences now also fall off when
destroyed

It'll probably be a WHILE before I can fix all wall mounts. Long day.
Expect me to misalign many stuff to fix failing CI so make sure to
provide suggestions when possible

Improved wallmount code overall
- Fixes #93793


## Changelog
🆑
fix: fixes all incorrectly maploded wall mounts that aren't actually
hanging on any support structure
fix: objects mounted on tables, windows & fences also fall off now when
destoryed
qol: lights can be mounted on windows
qol: cameras can be mounted on windows
qol: buttons can be mounted on tables
refactor: improved how wall mounts interact with objects as a whole
report bugs on github
/🆑
This commit is contained in:
SyncIt21
2025-11-19 11:07:12 +05:30
committed by GitHub
parent 0926fed114
commit 81427cd5cf
96 changed files with 28598 additions and 28539 deletions
@@ -34,7 +34,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/detectiveboard, 32)
if(istype(item, /obj/item/paper) || istype(item, /obj/item/photo))
item.forceMove(src)
cases[current_case].notices++
find_and_hang_on_wall()
find_and_hang_on_atom()
register_context()
+1 -1
View File
@@ -18,7 +18,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
opened = TRUE
else
stored_extinguisher = new /obj/item/extinguisher(src)
find_and_hang_on_wall()
find_and_hang_on_atom()
update_appearance(UPDATE_ICON)
register_context()
+1 -1
View File
@@ -39,7 +39,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/fireaxecabinet, 32)
held_item = new item_path(src)
update_appearance()
if(mapload)
find_and_hang_on_wall()
find_and_hang_on_atom()
/obj/structure/fireaxecabinet/Destroy()
if(held_item)
+1 -1
View File
@@ -55,7 +55,7 @@
check_reflect_signals = list(SIGNAL_ADDTRAIT(TRAIT_NO_MIRROR_REFLECTION), SIGNAL_REMOVETRAIT(TRAIT_NO_MIRROR_REFLECTION)), \
)
if(mapload)
find_and_hang_on_wall()
find_and_hang_on_atom()
update_choices()
register_context()
+1 -1
View File
@@ -36,7 +36,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/noticeboard, 32)
notices++
update_appearance(UPDATE_ICON)
if(mapload)
find_and_hang_on_wall()
find_and_hang_on_atom()
//attaching papers!!
/obj/structure/noticeboard/attackby(obj/item/O, mob/user, list/modifiers, list/attack_modifiers)
+2 -2
View File
@@ -107,10 +107,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/secure_safe, 32)
AddComponent(/datum/component/lockable_storage, stored_lock_code)
if(mapload)
PopulateContents()
find_and_hang_on_wall()
find_and_hang_on_atom()
RegisterSignal(src, COMSIG_LOCKABLE_STORAGE_SET_CODE, PROC_REF(update_lock_code))
/obj/structure/secure_safe/find_and_hang_on_wall()
/obj/structure/secure_safe/find_and_hang_on_atom(mark_for_late_init = FALSE, late_init = FALSE)
if(!density)
return ..()
+9 -6
View File
@@ -23,8 +23,11 @@
/obj/structure/sign/Initialize(mapload)
. = ..()
register_context()
if(mapload)
find_and_hang_on_wall()
if(mapload && !find_and_hang_on_atom(mark_for_late_init = TRUE))
return INITIALIZE_HINT_LATELOAD
/obj/structure/sign/LateInitialize()
find_and_hang_on_atom(late_init = TRUE)
/obj/structure/sign/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
@@ -48,17 +51,17 @@
/obj/structure/sign/wrench_act(mob/living/user, obj/item/wrench/I)
. = ..()
if(!buildable_sign)
return TRUE
return ITEM_INTERACT_FAILURE
user.visible_message(span_notice("[user] starts removing [src]..."), \
span_notice("You start unfastening [src]."))
I.play_tool_sound(src)
if(!I.use_tool(src, user, 4 SECONDS))
return TRUE
return ITEM_INTERACT_FAILURE
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
user.visible_message(span_notice("[user] unfastens [src]."), \
span_notice("You unfasten [src]."))
deconstruct(TRUE)
return TRUE
return ITEM_INTERACT_SUCCESS
/obj/structure/sign/welder_act(mob/living/user, obj/item/I)
. = ..()
@@ -217,7 +220,7 @@
playsound(target_turf, 'sound/items/deconstruct.ogg', 50, TRUE)
placed_sign.update_integrity(get_integrity())
placed_sign.setDir(dir)
placed_sign.find_and_hang_on_wall()
placed_sign.find_and_hang_on_atom()
qdel(src)
return ITEM_INTERACT_SUCCESS
@@ -16,7 +16,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/urinal, 32)
. = ..()
if(mapload)
hidden_item = new /obj/item/food/urinalcake(src)
find_and_hang_on_wall()
find_and_hang_on_atom()
/obj/structure/urinal/Exited(atom/movable/gone, direction)
. = ..()