mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
168 lines
5.1 KiB
Plaintext
168 lines
5.1 KiB
Plaintext
/obj/structure/fitness/boxing_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
|
|
climbable = TRUE
|
|
layer = WINDOW_LAYER
|
|
anchored = TRUE
|
|
flags = ON_BORDER
|
|
|
|
/obj/structure/fitness/boxing_ropes/CanPass(atom/movable/mover, turf/target)
|
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
|
return TRUE
|
|
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
|
return !density
|
|
return TRUE
|
|
|
|
/obj/structure/fitness/boxing_ropes/Uncross(atom/movable/mover, turf/target)
|
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
|
return TRUE
|
|
if(get_dir(mover, target) == dir) // From here to elsewhere, can't move in our dir
|
|
return !density
|
|
return TRUE
|
|
/obj/structure/fitness/boxing_ropes/do_climb(var/mob/living/user) //Sets it so that players can climb *over* the turf and will enter the the turf **this** turf is facing.
|
|
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/can_climb(var/mob/living/user, post_climb_check=0) //Sets it to keep people from climbing over into the next turf if it is occupied.
|
|
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_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
|
|
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"
|
|
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"
|
|
icon = 'icons/turf/floors_vr.dmi'
|
|
icon_state = "fit_mat" |