mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Adds Floor Lights (and makes lights not have random ranges) (#26923)
* Adds Floor Lights * undef * remove TECHNICAL DEBT™ * remove more technical debt™ * mapping changes
This commit is contained in:
@@ -3,35 +3,30 @@
|
||||
/turf/simulated/mineral/ancient,
|
||||
/turf/simulated/wall
|
||||
)
|
||||
var/allow_floor_mounting = FALSE
|
||||
|
||||
|
||||
/obj/item/mounted/afterattack(atom/A, mob/user, proximity_flag)
|
||||
var/found_type = 0
|
||||
for(var/turf_type in src.buildon_types)
|
||||
if(istype(A, turf_type))
|
||||
found_type = 1
|
||||
break
|
||||
|
||||
if(found_type)
|
||||
if(is_type_in_list(A, buildon_types))
|
||||
if(try_build(A, user, proximity_flag))
|
||||
return do_build(A, user)
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/mounted/proc/try_build(turf/on_wall, mob/user, proximity_flag) //checks
|
||||
if(!on_wall || !user)
|
||||
return
|
||||
if(proximity_flag != 1) //if we aren't next to the wall
|
||||
return
|
||||
if(!( get_dir(on_wall,user) in GLOB.cardinal))
|
||||
to_chat(user, "<span class='warning'>You need to be standing next to a wall to place \the [src].</span>")
|
||||
if(!proximity_flag) //if we aren't next to the turf
|
||||
return
|
||||
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
|
||||
|
||||
if(gotwallitem(get_turf(user), get_dir(on_wall,user)))
|
||||
to_chat(user, "<span class='warning'>There's already an item on this wall!</span>")
|
||||
return
|
||||
if(gotwallitem(get_turf(user), get_dir(on_wall, user)))
|
||||
to_chat(user, "<span class='warning'>There's already an item on this wall!</span>")
|
||||
return
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/mounted/proc/do_build(turf/on_wall, mob/user) //the buildy bit after we pass the checks
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user