Files
SyncIt21 81427cd5cf 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
/🆑
2025-11-18 22:37:12 -07:00

27 lines
974 B
Plaintext

// APC HULL
/obj/item/wallframe/apc
name = "\improper APC frame"
desc = "Used for repairing or building APCs."
icon_state = "apc"
result_path = /obj/machinery/power/apc/auto_name
/obj/item/wallframe/apc/try_build(turf/on_wall, user)
var/turf/T = get_turf(on_wall) //the user is not where it needs to be.
var/area/A = get_area(user)
if(A.apc)
to_chat(user, span_warning("This area already has an APC!"))
return FALSE //only one APC per area
if(!A.requires_power || A.always_unpowered)
to_chat(user, span_warning("You cannot place [src] in this area!"))
return FALSE //can't place apcs in areas with no power requirement
for(var/obj/machinery/power/terminal/E in T)
if(E.master)
to_chat(user, span_warning("There is another network terminal here!"))
return FALSE
return ..()
/obj/item/wallframe/apc/after_attach(obj/machinery/power/apc/attached_to)
for(var/obj/machinery/power/terminal/E in attached_to.loc)
attached_to.make_terminal()
return