mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 01:23:41 +01:00
[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:
@@ -22,15 +22,15 @@
|
||||
|
||||
/obj/item/mounted/frame/try_build(turf/on_wall, mob/user)
|
||||
if(!..())
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/turf/build_turf = get_turf(user)
|
||||
if((mount_requirements & MOUNTED_FRAME_SIMFLOOR) && !isfloorturf(build_turf))
|
||||
to_chat(user, "<span class='warning'>[src] cannot be placed on this spot.</span>")
|
||||
return
|
||||
return FALSE
|
||||
if(mount_requirements & MOUNTED_FRAME_NOSPACE)
|
||||
var/area/my_area = get_area(build_turf)
|
||||
if(!istype(my_area) || !my_area.requires_power || isspacearea(my_area))
|
||||
to_chat(user, "<span class='warning'>[src] cannot be placed in this area.</span>")
|
||||
return
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user