mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-02 13:32:32 +00:00
* after dark * FIXES * breakin * butt * Update code/game/objects/items/devices/floor_painter.dm Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> * Update code/game/objects/items/devices/floor_painter.dm Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> * Update code/game/objects/structures/lattice.dm Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> * testing 1 * a * FUCK THIS PRESET!!! * allah * OTEMACHI * tis' done * Project Exorcism : Sneed's Snairs (Formerly Chuck's) * Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm * Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm * Update stools.dm * Update code/game/objects/structures/stool_bed_chair_nest/stools.dm * Update code/game/objects/structures/stool_bed_chair_nest/stools.dm * Update stools.dm * Update chairs.dm * Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm * inhand fixes * airlocks (matt has cooked) fuck * my cody plays the mamba * fuck * fixes layering issue * airlocks and everything else Please fucking kill me * underlays * unfuck blending * finished replacing old ass shit * your ass is geass * conflicts die now * public fat'wa * progress on walls and windows * more mapping * baltimore accents be like * minor progress * monitors * fire alarms and apc adjustments * apcs pixel adjustments, final airlock look * also grilles * shuttle wall start plus shuttle windows * starting consoles * table outlines * I love broke ass sprites * fixing the stupid ass exterior walls * light fuckery * terminal directionals, external airlocks, table fixes, blahblahblah * fix 1 * fix 2 * some more fixes * fix chairs * basic untested railings and updating colors from atteria * bridge and some fixes * removing some artifacts on the new walls * breaking wood tables and adding 4 wall materials * fix * compile & wood fixes * make the horizon compile again * railings, firedoors, ATMs, intercomms and tables again * mapping begins also some tweaks to map view of icons * full tile steel walls * i sure hope nothing bad happens * airlock updates (untested) * reverts most wall machinery * skull * wall coloring * makes the tg wood chill out * work on airlocks * hull consistency * cause you live forever in the lights you make * whoops can't show that in a christian manga * terminals should be on walls and everything's hunky dory now also i changed the wood stuff as per atteria's suggestion * fixing airlocks * fixes * window resprite, coloring adjustments * scc hull resprite * new grilles, frame edits, and borosilicate * greyscale wood palette improvement * shuttle windows * window frame fix * apc update * refit and reshaded fire alarms * mapping icon fixes * table fixes * map fixes, platforms and stairs * updates cutter, new walls and terminals * mapping fixes * fix preview * preview fix stone * stairs * initial work for the map * railing and windowpane fuckery * new external airlocks * a * fix the maps in preparation * wall object pixel offsets * air alarms D1 * extinguisher cabinets * APC DESTROYED MISSION ACCOMPLISHED GOOD WORK * deck 3: floor decals, APCs, air alarms, fire extinguisher cabinets * deck 3: fireaxe cabinet * /shuttle_landmark/distress/blue, move base_turf from map to obj def * intercom presets * formatting * deck 1: floor decals * deck 2: named area fix (LMAO), signs to use single quotes * deck 2: floor decals, APCs, air alarms, fire extinguisher cabinets, fireaxe cabinets * Platforms and stairs! * grates and bugfixes * Angled ship walls + grate color fix * corrects apc anim overlay * deck 2 and away site fixes # Conflicts: # maps/sccv_horizon/sccv_horizon-2_deck_2.dmm * deck 2 missing grate * warning stripes * railings and ledges * windows and fixtures * windoorsagain * airlocks pt1 * windows de-seamed and transparent * airlocks and pixel offsets * fixes for airlocks * more airlock fixes * presets for ringer, request console and newscaster * 132 * asfsaf * kitchen tiling * thicker freezer tile bevels * More angled walls * New shutters and blast doors * directional corrections * ops railing fixes * updated window map things and shutters * value changes and blast door changes * Ledges and platforms galore (D2/D3) * all decks: fix door dirs * all decks: newscasters, intercoms, requests consoles, ringer consoles * helm light blue decals to dark blue * supermatter door dir fix * fix directional presets (dirs/offsets): newscaster, intercom, requests console, ringer console * firedoor changes * deck 3: overlapping wall mountables fixes * map changes * airlock changes * map tweaks * airlock & stair icons * various mapping modifications * Double airlocks + fixing denied states + fixing airlocks on all levels * Rebase * directional terminals buttons and lights again, platform tweaks terminal north facing sprites, atm/food terminal directionals proper door control and lightswitch directionals (presets still need to be set up, mapping) re-adds new light tube sprites, again new sprites for floor lights and the other stuff that got added adjusted platforms to be recolorable, added light and dark versions, fixed some shading * missing ERT outfit thingy fix * floor lights fixed * deck 3: various small fixes * deck 1: various small fixes * deck 2: various small fixes * fixes * d2 fixes & multitile door fix * d2 fixes, remove unused airlock files, button icon fixes, window icon fixes * make it actually compile, oops! * make it actually compile, pt2 * CE office camera * pew pew pew * pew pew pew 2 * fixes * deck 3: buttons fixes * deck 3: button and other fixes * deck 3: fixes and stuff * D1 fixes & skrell airlocks * minor D2 tweaks * a lot of airlock-related fixes, glass tables, paint sprayer fixes, decal fixes, changelog * maintenance hatch sprites * fixing double doors * flips multi-tiles, fixes multi-tiles, adds desk windoors * new plastic flaps * deck 2: a few buttons * side + middle doors * created paths for 3-tiles doors * apply to map the 3 tiles airlocks * some fixes, windoor alpha * remove this random ass potted plant * more map fixes * holodeck disposal pipe fix * secure airlock sprites no code or obj definitions yet * vault airlock * vault door fixes * scc window alpha * adjusts double door glass, firedoor open state * adjusts construction states for doors * remove some defunct icons and fix anims * assembly stuff * pharma fixes * vault door dir * firedoor smart generation moved to its own proc * lift doors, d1 fixes * firedoor smart generation: adjacent wall check * firedoor smart generation: adjacent firedoor check * all decks: missing firedoor and other fixes * deck 2: weird maint stairs fix * oops * diona airlock fix * the shuttle wall gigadeath * fixes * some fixes for leftover map item paths, and double lattices * new diona walls * more fixes * and more * deck 1: fix out of bounds keys * deck 3: fix out of bounds keys * runtime 3: duplicate APCs fix * all decks: make all 3 tile wide doors glass --------- Co-authored-by: Wezzy <wowzewow@gmail.com> Co-authored-by: Wowzewow (Wezzy) <42310821+alsoandanswer@users.noreply.github.com> Co-authored-by: Cody Brittain <cbrittain10@yahoo.com> Co-authored-by: kyres1 <noodle.buster31@gmail.com> Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: atteria <tarkona@protonmail.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Co-authored-by: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> Co-authored-by: naut <nautilussplat@gmail.com> Co-authored-by: naut <55491249+nauticall@users.noreply.github.com>
456 lines
14 KiB
Plaintext
456 lines
14 KiB
Plaintext
//////////////////////////////
|
|
//Contents: Ladders, Stairs.//
|
|
//////////////////////////////
|
|
|
|
/obj/structure/ladder
|
|
name = "ladder"
|
|
desc = "A ladder. You can climb it up and down."
|
|
icon_state = "ladder01"
|
|
icon = 'icons/obj/structures.dmi'
|
|
density = 0
|
|
opacity = 0
|
|
anchored = 1
|
|
|
|
var/allowed_directions = DOWN
|
|
var/obj/structure/ladder/target_up
|
|
var/obj/structure/ladder/target_down
|
|
var/base_icon = "ladder"
|
|
|
|
var/const/climb_time = 2 SECONDS
|
|
var/list/climbsounds = list('sound/effects/ladder1.ogg','sound/effects/ladder2.ogg','sound/effects/ladder3.ogg','sound/effects/ladder4.ogg')
|
|
var/climb_sound_vol = 50
|
|
var/climb_sound_vary = FALSE
|
|
|
|
var/list/destroy_tools
|
|
|
|
/obj/structure/ladder/mining
|
|
icon = 'icons/obj/mining.dmi'
|
|
climbsounds = list('sound/effects/stonedoor_openclose.ogg')
|
|
climb_sound_vol = 30
|
|
climb_sound_vary = TRUE
|
|
destroy_tools = list(/obj/item/pickaxe, /obj/item/gun/energy/plasmacutter)
|
|
|
|
/obj/structure/ladder/Initialize()
|
|
. = ..()
|
|
// the upper will connect to the lower
|
|
if(allowed_directions & DOWN) //we only want to do the top one, as it will initialize the ones before it.
|
|
for(var/obj/structure/ladder/L in GetBelow(src))
|
|
if(L.allowed_directions & UP)
|
|
target_down = L
|
|
L.target_up = src
|
|
|
|
L.update_icon()
|
|
break
|
|
|
|
AddComponent(/datum/component/turf_hand)
|
|
|
|
update_icon()
|
|
|
|
/obj/structure/ladder/Destroy()
|
|
if(target_down)
|
|
target_down.target_up = null
|
|
target_down = null
|
|
if(target_up)
|
|
target_up.target_down = null
|
|
target_up = null
|
|
return ..()
|
|
|
|
/obj/structure/ladder/attackby(obj/item/C, mob/user)
|
|
if(LAZYLEN(destroy_tools))
|
|
if(is_type_in_list(C, destroy_tools))
|
|
user.visible_message("<b>[user]</b> starts breaking down \the [src] with \the [C]!", SPAN_NOTICE("You start breaking down \the [src] with \the [C]."))
|
|
if(do_after(user, 10 SECONDS, TRUE))
|
|
user.visible_message("<b>[user]</b> breaks down \the [src] with \the [C]!", SPAN_NOTICE("You break down \the [src] with \the [C]."))
|
|
qdel(src)
|
|
return
|
|
attack_hand(user)
|
|
|
|
/obj/structure/ladder/attack_robot(mob/user)
|
|
attack_hand(user)
|
|
|
|
/obj/structure/ladder/attack_hand(var/mob/M)
|
|
if(!M.may_climb_ladders(src))
|
|
return
|
|
|
|
var/obj/structure/ladder/target_ladder = getTargetLadder(M)
|
|
if(!target_ladder)
|
|
return
|
|
|
|
var/obj/item/grab/G = M.l_hand
|
|
if (!istype(G))
|
|
G = M.r_hand
|
|
|
|
if(!M.Move(get_turf(src)))
|
|
to_chat(M, "<span class='notice'>You fail to reach \the [src].</span>")
|
|
return
|
|
|
|
if (istype(G))
|
|
G.affecting.forceMove(get_turf(src))
|
|
|
|
var/direction = target_ladder == target_up ? "up" : "down"
|
|
|
|
M.visible_message("<span class='notice'>\The [M] begins climbing [direction] \the [src]!</span>",
|
|
"You begin climbing [direction] \the [src]!",
|
|
"You hear the grunting and clanging of a metal ladder being used.")
|
|
|
|
target_ladder.audible_message("<span class='notice'>You hear something coming [direction] \the [src]</span>")
|
|
|
|
if(do_after(M, istype(G) ? (climb_time*2) : climb_time))
|
|
climbLadder(M, target_ladder)
|
|
|
|
/obj/structure/ladder/attack_ghost(var/mob/M)
|
|
var/target_ladder = getTargetLadder(M)
|
|
if(target_ladder)
|
|
M.forceMove(get_turf(target_ladder))
|
|
|
|
/obj/structure/ladder/proc/getTargetLadder(var/mob/M)
|
|
if((!target_up && !target_down) || (target_up && !istype(target_up.loc, /turf) || (target_down && !istype(target_down.loc,/turf))))
|
|
to_chat(M, "<span class='notice'>\The [src] is incomplete and can't be climbed.</span>")
|
|
return
|
|
if(target_down && target_up)
|
|
var/direction = alert(M,"Do you want to go up or down?", "Ladder", "Up", "Down", "Cancel")
|
|
|
|
if(direction == "Cancel")
|
|
return
|
|
|
|
if(!M.may_climb_ladders(src))
|
|
return
|
|
|
|
switch(direction)
|
|
if("Up")
|
|
return target_up
|
|
if("Down")
|
|
return target_down
|
|
else
|
|
return target_down || target_up
|
|
|
|
/mob/proc/may_climb_ladders(var/ladder)
|
|
if(!Adjacent(ladder))
|
|
to_chat(src, "<span class='warning'>You need to be next to \the [ladder] to start climbing.</span>")
|
|
return FALSE
|
|
if(incapacitated())
|
|
to_chat(src, "<span class='warning'>You are physically unable to climb \the [ladder].</span>")
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/mob/living/silicon/may_climb_ladders(ladder)
|
|
to_chat(src, "<span class='warning'>You're too heavy to climb [ladder]!</span>")
|
|
return FALSE
|
|
|
|
/mob/living/silicon/robot/drone/may_climb_ladders(ladder)
|
|
if(!Adjacent(ladder))
|
|
to_chat(src, "<span class='warning'>You need to be next to \the [ladder] to start climbing.</span>")
|
|
return FALSE
|
|
if(incapacitated())
|
|
to_chat(src, "<span class='warning'>You are physically unable to climb \the [ladder].</span>")
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/mob/abstract/observer/may_climb_ladders(var/ladder)
|
|
return TRUE
|
|
|
|
/obj/structure/ladder/proc/climbLadder(var/mob/M, var/target_ladder)
|
|
if(!target_ladder)
|
|
return
|
|
var/turf/T = get_turf(target_ladder)
|
|
var/turf/LAD = get_turf(src)
|
|
var/direction = UP
|
|
if(istype(target_ladder, target_down))
|
|
direction = DOWN
|
|
if(!LAD.CanZPass(M, direction))
|
|
to_chat(M, "<span class='notice'>\The [LAD.GetZPassBlocker()] is blocking \the [src].</span>")
|
|
return FALSE
|
|
if(!T.CanZPass(M, direction))
|
|
to_chat(M, "<span class='notice'>\The [T.GetZPassBlocker()] is blocking \the [src].</span>")
|
|
return FALSE
|
|
for(var/atom/A in T)
|
|
if(!isliving(A))
|
|
if(!A.CanPass(M, M.loc, 1.5, 0))
|
|
to_chat(M, "<span class='notice'>\The [A] is blocking \the [src].</span>")
|
|
return FALSE
|
|
playsound(src, pick(climbsounds), climb_sound_vol, climb_sound_vary)
|
|
playsound(target_ladder, pick(climbsounds), climb_sound_vol, climb_sound_vary)
|
|
var/obj/item/grab/G = M.l_hand
|
|
if (!istype(G))
|
|
G = M.r_hand
|
|
if (istype(G))
|
|
G.affecting.forceMove(T)
|
|
return M.forceMove(T)
|
|
|
|
/obj/structure/ladder/CanPass(obj/mover, turf/source, height, airflow)
|
|
return airflow || !density
|
|
|
|
/obj/structure/ladder/update_icon()
|
|
icon_state = "[base_icon][!!(allowed_directions & UP)][!!(allowed_directions & DOWN)]"
|
|
|
|
/obj/structure/ladder/up
|
|
allowed_directions = UP
|
|
icon_state = "ladder10"
|
|
|
|
/obj/structure/ladder/up/mining
|
|
icon = 'icons/obj/mining.dmi'
|
|
climbsounds = list('sound/effects/stonedoor_openclose.ogg')
|
|
climb_sound_vol = 30
|
|
climb_sound_vary = TRUE
|
|
destroy_tools = list(/obj/item/pickaxe, /obj/item/gun/energy/plasmacutter)
|
|
|
|
/obj/structure/ladder/updown
|
|
allowed_directions = UP|DOWN
|
|
icon_state = "ladder11"
|
|
|
|
/obj/structure/ladder/away //a ladder that just looks like it's going down
|
|
icon_state = "ladderawaydown"
|
|
|
|
/// Note that stairs facing left/right may need the stairs_lower structure if they're not placed against walls.
|
|
/obj/structure/stairs
|
|
name = "stairs"
|
|
desc = "Stairs leading to another floor. Not too useful if the gravity goes out."
|
|
icon = 'icons/obj/stairs.dmi'
|
|
icon_state = "stairs_3d"
|
|
layer = TURF_LAYER
|
|
density = FALSE
|
|
opacity = FALSE
|
|
anchored = TRUE
|
|
|
|
/obj/structure/stairs/Initialize()
|
|
. = ..()
|
|
for(var/turf/turf in locs)
|
|
var/turf/simulated/open/above = GetAbove(turf)
|
|
if(!above)
|
|
log_asset("Stair created without z-level above: ([loc.x], [loc.y], [loc.z])")
|
|
return INITIALIZE_HINT_QDEL
|
|
if(!istype(above))
|
|
above.ChangeToOpenturf()
|
|
|
|
/obj/structure/stairs/CheckExit(atom/movable/mover, turf/target)
|
|
if(get_dir(loc, target) == dir && upperStep(mover.loc))
|
|
return FALSE
|
|
|
|
var/obj/structure/stairs/staircase = locate() in target
|
|
var/target_dir = get_dir(mover, target)
|
|
if(!staircase && (target_dir != dir && target_dir != reverse_dir[dir]))
|
|
INVOKE_ASYNC(src, PROC_REF(mob_fall), mover)
|
|
|
|
return ..()
|
|
|
|
/obj/structure/stairs/CollidedWith(atom/movable/A)
|
|
// This is hackish but whatever.
|
|
var/turf/target = get_step(GetAbove(A), dir)
|
|
if(!target)
|
|
return
|
|
if(target.z > (z + 1)) //Prevents wheelchair fuckery. Basically, you teleport twice because both the wheelchair + your mob collide with the stairs.
|
|
return
|
|
if(target.Enter(A, src) && A.dir == dir)
|
|
A.forceMove(target)
|
|
if(isliving(A))
|
|
var/mob/living/L = A
|
|
if(L.pulling)
|
|
L.pulling.forceMove(target)
|
|
if(ishuman(A))
|
|
playsound(src, 'sound/effects/stairs_step.ogg', 50)
|
|
playsound(target, 'sound/effects/stairs_step.ogg', 50)
|
|
|
|
/obj/structure/stairs/proc/upperStep(var/turf/T)
|
|
return (T == loc)
|
|
|
|
/obj/structure/stairs/CanPass(obj/mover, turf/source, height, airflow)
|
|
if (airflow)
|
|
return TRUE
|
|
|
|
// Disallow stepping onto the elevated part of the stairs.
|
|
if (isliving(mover) && z == mover.z && mover.loc != loc && get_step(mover, get_dir(mover, src)) == loc)
|
|
return FALSE
|
|
|
|
return !density
|
|
|
|
/obj/structure/stairs/proc/mob_fall(mob/living/L)
|
|
if(isopenturf(L.loc) || get_turf(L) == get_turf(src) || !ishuman(L))
|
|
return
|
|
|
|
L.Weaken(2)
|
|
if (L.lying)
|
|
L.visible_message(
|
|
"<span class='alert'>\The [L] steps off of [src] and faceplants onto [L.loc].</span>",
|
|
"<span class='danger'>You step off [src] and faceplant onto [L.loc].</span>",
|
|
"<span class='alert'>You hear a thump.</span>"
|
|
)
|
|
|
|
/obj/structure/stairs/north
|
|
dir = NORTH
|
|
bound_height = 64
|
|
bound_y = -32
|
|
pixel_y = -32
|
|
|
|
/obj/structure/stairs/south
|
|
dir = SOUTH
|
|
bound_height = 64
|
|
|
|
/obj/structure/stairs/east
|
|
icon_state = "east"
|
|
dir = EAST
|
|
bound_width = 64
|
|
|
|
/obj/structure/stairs/west
|
|
icon_state = "west"
|
|
dir = WEST
|
|
bound_width = 64
|
|
|
|
/obj/structure/stairs/flat
|
|
icon_state = "flat"
|
|
|
|
/// Snowflake railing object for 64x64 stairs.
|
|
/obj/structure/stairs_railing
|
|
name = "railing"
|
|
desc = "A railing for stairs."
|
|
icon = 'icons/obj/stairs.dmi'
|
|
icon_state = "railing"
|
|
anchored = TRUE
|
|
density = TRUE
|
|
|
|
/obj/structure/stairs_railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
|
if(istype(mover,/obj/item/projectile))
|
|
return TRUE
|
|
if(!istype(mover) || mover.checkpass(PASSRAILING))
|
|
return TRUE
|
|
if(mover.throwing)
|
|
return TRUE
|
|
if(get_dir(loc, target) == dir)
|
|
return !density
|
|
return TRUE
|
|
|
|
/obj/structure/stairs_railing/CheckExit(var/atom/movable/O, var/turf/target)
|
|
if(istype(O) && CanPass(O, target))
|
|
return TRUE
|
|
if(get_dir(O.loc, target) == dir)
|
|
if(!density)
|
|
return TRUE
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/obj/structure/stairs_lower
|
|
name = "stairs"
|
|
desc = "Stairs leading to another floor. Not too useful if the gravity goes out."
|
|
icon = 'icons/obj/stairs.dmi'
|
|
icon_state = "stairs_lower"
|
|
anchored = TRUE
|
|
density = FALSE
|
|
|
|
/obj/structure/stairs_lower/stairs_upper
|
|
icon_state = "stairs_upper"
|
|
|
|
/// These stairs are used for fake depth. They don't go up z-levels.
|
|
/obj/structure/platform_stairs
|
|
name = "stairs"
|
|
desc = "An archaic form of locomotion along the Z-axis."
|
|
density = FALSE
|
|
anchored = TRUE
|
|
icon = 'icons/obj/structure/stairs.dmi'
|
|
icon_state = "np_stair"
|
|
|
|
/obj/structure/platform_stairs/south_north_solo
|
|
icon_state = "p_stair_sn_solo_cap"
|
|
|
|
/obj/structure/platform_stairs/full
|
|
icon_state = "p_stair_full"
|
|
|
|
/obj/structure/platform_stairs/full/east_west_cap
|
|
icon_state = "p_stair_ew_full_cap"
|
|
|
|
/obj/structure/platform_stairs/full/east_west_cap/half
|
|
icon_state = "p_stair_ew_half_cap"
|
|
|
|
/obj/structure/platform_stairs/full/south_north_cap
|
|
icon_state = "p_stair_sn_full_cap"
|
|
|
|
/obj/structure/platform_stairs/full/south_north_cap/half
|
|
icon_state = "p_stair_sn_half_cap"
|
|
|
|
/obj/structure/platform
|
|
name = "platform"
|
|
desc = "An archaic method of preventing travel along the X and Y axes if you are on a lower point on the Z-axis."
|
|
density = TRUE
|
|
anchored = TRUE
|
|
flags = ON_BORDER
|
|
climbable = TRUE
|
|
icon = 'icons/obj/structure/platforms.dmi'
|
|
icon_state = "platform"
|
|
color = COLOR_TILED
|
|
|
|
/obj/structure/platform/dark
|
|
icon_state = "platform_dark"
|
|
color = COLOR_DARK_GUNMETAL
|
|
|
|
/obj/structure/platform/CanPass(atom/movable/mover, turf/target, height, air_group)
|
|
if(istype(mover, /obj/item/projectile))
|
|
return TRUE
|
|
if(!istype(mover) || mover.checkpass(PASSRAILING))
|
|
return TRUE
|
|
if(mover.throwing)
|
|
return TRUE
|
|
if(get_dir(mover, target) == reverse_dir[dir])
|
|
return FALSE
|
|
if(height && (mover.dir == dir))
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/obj/structure/platform/CheckExit(var/atom/movable/O, var/turf/target)
|
|
if(istype(O) && CanPass(O, target))
|
|
return TRUE
|
|
if(get_dir(O, target) == reverse_dir[dir])
|
|
return FALSE
|
|
return TRUE
|
|
|
|
/obj/structure/platform/do_climb(mob/living/user)
|
|
if(user.Adjacent(src) && !user.incapacitated())
|
|
/// Custom climbing code because normal climb code doesn't support the tile-shifting that platforms do.
|
|
/// If the user is on the same turf as the platform, we're trying to go past it, so we need to use reverse_dir.
|
|
/// Otherwise, use our own turf.
|
|
var/same_turf = get_turf(user) == get_turf(src)
|
|
var/turf/next_turf = get_step(src, same_turf ? reverse_dir[dir] : 0)
|
|
if(istype(next_turf) && !next_turf.density && can_climb(user))
|
|
var/climb_text = same_turf ? "over" : "down"
|
|
LAZYADD(climbers, user)
|
|
user.visible_message(SPAN_NOTICE("[user] starts climbing [climb_text] \the [src]..."), SPAN_NOTICE("You start climbing [climb_text] \the [src]..."))
|
|
if(do_after(user, 1 SECOND) && can_climb(user, TRUE))
|
|
user.visible_message(SPAN_NOTICE("[user] climbs [climb_text] \the [src]."), SPAN_NOTICE("You climb [climb_text] \the [src]."))
|
|
user.forceMove(next_turf)
|
|
LAZYREMOVE(climbers, user)
|
|
|
|
/obj/structure/platform/ledge
|
|
icon_state = "ledge"
|
|
|
|
/obj/structure/platform/ledge/dark
|
|
icon_state = "ledge_dark"
|
|
color = COLOR_DARK_GUNMETAL
|
|
|
|
/obj/structure/platform/cutout
|
|
icon_state = "platform_cutout"
|
|
density = 0
|
|
|
|
/obj/structure/platform/cutout/dark
|
|
icon_state = "platform_cutout_dark"
|
|
color = COLOR_DARK_GUNMETAL
|
|
|
|
/obj/structure/platform/cutout/CanPass()
|
|
return TRUE
|
|
|
|
/// No special CanPass for this one.
|
|
/obj/structure/platform_deco
|
|
name = "platform"
|
|
desc = "This is a platform."
|
|
anchored = TRUE
|
|
icon = 'icons/obj/structure/platforms.dmi'
|
|
icon_state = "platform_deco"
|
|
color = COLOR_TILED
|
|
|
|
/obj/structure/platform_deco/dark
|
|
icon_state = "platform_deco_dark"
|
|
color = COLOR_DARK_GUNMETAL
|
|
|
|
/obj/structure/platform_deco/ledge
|
|
icon_state = "ledge_deco"
|
|
|
|
/obj/structure/platform_deco/ledge/dark
|
|
icon_state = "ledge_deco_dark"
|
|
color = COLOR_DARK_GUNMETAL
|