[s] Blocks any doubled wall mount placement (#27016)

* Blocks any doubled wall mount placement

* Fixes direction stuff

* Remove old code
This commit is contained in:
DGamerL
2024-10-07 20:08:11 +00:00
committed by GitHub
parent 19a8edae33
commit a01f41e904
3 changed files with 16 additions and 33 deletions
@@ -14,17 +14,18 @@
/obj/item/mounted/proc/try_build(turf/on_wall, mob/user, proximity_flag) //checks
if(!on_wall || !user)
return
return FALSE
if(!proximity_flag) //if we aren't next to the turf
return
return FALSE
if(!allow_floor_mounting)
if(!(get_dir(on_wall, user) in GLOB.cardinal))
to_chat(user, "<span class='warning'>You need to be standing next to [on_wall] to place [src].</span>")
return
return FALSE
if(gotwallitem(get_turf(user), get_dir(on_wall, user)))
if(gotwallitem(get_turf(user), get_dir(user, on_wall)))
to_chat(user, "<span class='warning'>There's already an item on this wall!</span>")
return
return FALSE
return TRUE