mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 02:51:41 +00:00
* Starting out on our tgui journey * God tgui, why do you need to be updated You're dynamically generated anyway * Commit of stuff * Further progress is being made * Everyone loves buildscripts * Further modifications to my incredible running script * Starting to modify the minimap code to be better * It's going well thusfar, I guess * What have I done * RIP minimap * FUN FUN FUN FUN FUN * Adds shuttle_manipulator.dmi MUH HOLOGRAMS * Is it done? IS IT OVER * Peer review * Some bug fixes * Makes that damn greentext shut up * Shuttle registration * Made the Emergency Escape Bar more robust No climbing on the bar. * Do not stare into the operation end of the device * Compile shame * THE MOST DUMB * Passive barmaiden * Emergency shuttle memes * MORE SAFETY CODE * Fancy shuttle manipulator icons * Smoothing it out * We are going to have a lot of fun with this one * Independent blobbernauts * WABBAJACK WABBAJACK * Message for attempting to authenticate old style * Angry alert noise is back * Revert "Independent blobbernauts" This reverts commit 34d6af7c9c88cfc2864990cb37b586bb90163dd3. * No parrot sleep plz * Moves the special shuttle stuff to special.dm * No Bartender like a Centcom Bartender * Non-controversial map changes - Backup shuttle moved closer to Centcom main structure, docking tube created - Moved shuttle import landmark to above Centcom main building - Added shuttle displays to Conference Room - Squashed the Chapel a bit in Metastation - Made the docking port on Z2 massive - Made the docking port on Metastation a lot larger * Hacks and slashes at Box A bunch of things are extended and squashed so Box shuttle dock can support the MetaStation emergency shuttle. * Some Metastationshit * Never ending changes * Wabbajack to TGM * Modified the bar, I think that's all of them * Stops Barmaiden wandering around * More code review * Whitspace, the bane of us all * DIE WHITESPACE DIE
100 lines
2.6 KiB
Plaintext
100 lines
2.6 KiB
Plaintext
/obj/structure/ladder
|
|
name = "ladder"
|
|
desc = "A sturdy metal ladder."
|
|
icon = 'icons/obj/structures.dmi'
|
|
icon_state = "ladder11"
|
|
var/id = null
|
|
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
|
var/obj/structure/ladder/down = null //the ladder below this one
|
|
var/obj/structure/ladder/up = null //the ladder above this one
|
|
|
|
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
|
|
name = "sturdy ladder"
|
|
desc = "An extremely sturdy metal ladder."
|
|
|
|
|
|
/obj/structure/ladder/New()
|
|
spawn(8)
|
|
for(var/obj/structure/ladder/L in world)
|
|
if(L.id == id)
|
|
if(L.height == (height - 1))
|
|
down = L
|
|
continue
|
|
if(L.height == (height + 1))
|
|
up = L
|
|
continue
|
|
|
|
if(up && down) //if both our connections are filled
|
|
break
|
|
update_icon()
|
|
|
|
/obj/structure/ladder/update_icon()
|
|
if(up && down)
|
|
icon_state = "ladder11"
|
|
|
|
else if(up)
|
|
icon_state = "ladder10"
|
|
|
|
else if(down)
|
|
icon_state = "ladder01"
|
|
|
|
else //wtf make your ladders properly assholes
|
|
icon_state = "ladder00"
|
|
|
|
/obj/structure/ladder/proc/go_up(mob/user,is_ghost)
|
|
if(!is_ghost)
|
|
show_fluff_message(1,user)
|
|
up.add_fingerprint(user)
|
|
user.loc = get_turf(up)
|
|
|
|
/obj/structure/ladder/proc/go_down(mob/user,is_ghost)
|
|
if(!is_ghost)
|
|
show_fluff_message(0,user)
|
|
down.add_fingerprint(user)
|
|
user.loc = get_turf(down)
|
|
|
|
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
|
|
if(up && down)
|
|
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
|
if("Up")
|
|
go_up(user,is_ghost)
|
|
if("Down")
|
|
go_down(user,is_ghost)
|
|
if("Cancel")
|
|
return
|
|
else if(up)
|
|
go_up(user,is_ghost)
|
|
else if(down)
|
|
go_down(user,is_ghost)
|
|
|
|
if(!is_ghost)
|
|
add_fingerprint(user)
|
|
|
|
/obj/structure/ladder/attack_hand(mob/user)
|
|
if(can_use(user))
|
|
use(user)
|
|
|
|
/obj/structure/ladder/attack_paw(mob/user)
|
|
return attack_hand(user)
|
|
|
|
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user, params)
|
|
return attack_hand(user)
|
|
|
|
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
|
|
use(user,1)
|
|
|
|
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
|
|
if(up)
|
|
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
|
|
else
|
|
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
|
|
|
|
/obj/structure/ladder/proc/can_use(mob/user)
|
|
return 1
|
|
|
|
/obj/structure/ladder/unbreakable/Destroy(force)
|
|
if(force)
|
|
. = ..()
|
|
else
|
|
return QDEL_HINT_LETMELIVE
|