mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
Fixes boxing ropes (bottom) and boxing turnbuckle not blocking properly
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/obj/structure/fitness/boxing_ropes
|
||||
name = "Ropes"
|
||||
name = "ropes"
|
||||
desc = "Firm yet springy, perhaps this could be useful!"
|
||||
icon = 'icons/obj/fitness_vr.dmi'
|
||||
icon_state = "ropes"
|
||||
density = TRUE
|
||||
throwpass = 1
|
||||
throwpass = TRUE
|
||||
climbable = TRUE
|
||||
layer = WINDOW_LAYER
|
||||
anchored = TRUE
|
||||
@@ -57,110 +57,16 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/fitness/boxing_ropes_bottom
|
||||
name = "Ropes"
|
||||
desc = "Firm yet springy, perhaps this could be useful!"
|
||||
icon = 'icons/obj/fitness_vr.dmi'
|
||||
icon_state = "ropes"
|
||||
density = TRUE
|
||||
throwpass = 1
|
||||
climbable = TRUE
|
||||
/obj/structure/fitness/boxing_ropes/bottom
|
||||
plane = MOB_PLANE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
anchored = TRUE
|
||||
flags = ON_BORDER
|
||||
/obj/structure/fitness/boxing_ropes_bottom/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
return !density
|
||||
return TRUE
|
||||
/obj/structure/fitness/boxing_ropes_bottom/do_climb(var/mob/living/user)
|
||||
if(!can_climb(user))
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/fitness/boxing_ropes_bottom/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
var/obj/occupied = neighbor_turf_impassable()
|
||||
if(occupied)
|
||||
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/obj/structure/fitness/boxing_turnbuckle
|
||||
name = "Turnbuckle"
|
||||
/obj/structure/fitness/boxing_ropes/turnbuckle
|
||||
name = "turnbuckle"
|
||||
desc = "A sturdy post that looks like it could support even the most heaviest of heavy weights!"
|
||||
icon = 'icons/obj/fitness_vr.dmi'
|
||||
icon_state = "turnbuckle"
|
||||
density = TRUE
|
||||
throwpass = 1
|
||||
climbable = TRUE
|
||||
layer = WINDOW_LAYER
|
||||
anchored = TRUE
|
||||
flags = ON_BORDER
|
||||
/obj/structure/fitness/boxing_turnbuckle/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
return !density
|
||||
return TRUE
|
||||
/obj/structure/fitness/boxing_turnbuckle/do_climb(var/mob/living/user)
|
||||
if(!can_climb(user))
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(!can_climb(user, post_climb_check=1))
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/fitness/boxing_turnbuckle/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
var/obj/occupied = neighbor_turf_impassable()
|
||||
if(occupied)
|
||||
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/turf/simulated/fitness
|
||||
name = "Mat"
|
||||
|
||||
Reference in New Issue
Block a user