diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 872019f63d2..6cf76b6736f 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -15497,12 +15497,9 @@ /turf/open/floor/plating, /area/maintenance/starboard/fore) "aIo" = ( -/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4{ - dir = 6 - }, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2{ - dir = 10 - }, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2, +/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4, +/obj/structure/cable, /turf/open/floor/plasteel/dark, /area/storage/mining) "aIp" = ( @@ -16372,6 +16369,7 @@ "aKv" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2, +/obj/structure/cable, /turf/open/floor/plasteel, /area/storage/mining) "aKw" = ( @@ -25222,10 +25220,12 @@ /turf/open/floor/wood, /area/bridge/meeting_room) "bgN" = ( -/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{ - dir = 4 +/obj/structure/table, +/obj/item/toy/plush/beeplushie{ + name = "multi-bee plushie"; + pixel_y = 4 }, -/turf/open/floor/plasteel/dark, +/turf/open/floor/plating, /area/storage/mining) "bgO" = ( /obj/machinery/atmospherics/pipe/layer_manifold, @@ -25914,18 +25914,35 @@ /turf/open/floor/wood, /area/bridge/meeting_room) "big" = ( -/turf/open/floor/plasteel/dark, +/obj/machinery/door/airlock/maintenance{ + req_access_txt = "12" + }, +/obj/structure/cable, +/turf/open/floor/plating, /area/storage/mining) "bih" = ( -/obj/machinery/light{ +/obj/effect/turf_decal/trimline/neutral/filled/line{ dir = 4 }, +/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4{ + dir = 8 + }, /turf/open/floor/plasteel/dark, /area/storage/mining) "bii" = ( +/obj/machinery/button/elevator{ + id = "publicElevator"; + pixel_y = -25 + }, /obj/machinery/light{ + dir = 1 + }, +/obj/effect/turf_decal/trimline/neutral/filled/line{ dir = 8 }, +/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{ + dir = 4 + }, /turf/open/floor/plasteel/dark, /area/storage/mining) "bij" = ( @@ -28438,6 +28455,7 @@ /obj/effect/mapping_helpers/airlock/cyclelink_helper, /obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2, +/obj/structure/cable, /turf/open/floor/plasteel/dark, /area/storage/mining) "bnV" = ( @@ -28445,8 +28463,8 @@ /turf/closed/wall/r_wall, /area/storage/mining) "bnW" = ( -/obj/machinery/firealarm, -/turf/closed/wall/r_wall, +/obj/effect/spawner/structure/window/reinforced, +/turf/open/floor/plating, /area/storage/mining) "bnX" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{ @@ -28911,13 +28929,10 @@ /turf/open/floor/plasteel, /area/science/lab) "bpg" = ( -/obj/machinery/power/apc/highcap/five_k{ - areastring = /area/storage/mining; - dir = 1; - name = "Public Mining APC"; - pixel_y = 23 +/obj/machinery/firealarm{ + dir = 8; + pixel_x = 24 }, -/obj/structure/cable, /turf/open/floor/plasteel, /area/storage/mining) "bph" = ( @@ -29434,8 +29449,9 @@ /turf/open/floor/plasteel, /area/crew_quarters/heads/hop) "bqD" = ( -/obj/structure/cable, -/turf/open/floor/plasteel, +/obj/structure/cable/multilayer/multiz, +/obj/effect/turf_decal/stripes/box, +/turf/open/floor/plating, /area/storage/mining) "bqE" = ( /obj/effect/turf_decal/tile/blue{ @@ -49128,6 +49144,12 @@ }, /turf/open/floor/plating, /area/hallway/secondary/entry) +"cJV" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 10 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "cKG" = ( /obj/effect/turf_decal/tile/green, /obj/effect/turf_decal/tile/green{ @@ -50127,6 +50149,13 @@ }, /turf/open/floor/plasteel/dark, /area/science/nanite) +"ejU" = ( +/obj/structure/industrial_lift, +/obj/structure/railing{ + dir = 10 + }, +/turf/open/transparent/openspace, +/area/storage/mining) "ekN" = ( /obj/effect/turf_decal/tile/green, /obj/effect/turf_decal/tile/green{ @@ -50908,6 +50937,13 @@ }, /turf/open/floor/plasteel/dark, /area/crew_quarters/heads/cmo) +"gVn" = ( +/obj/structure/industrial_lift, +/obj/structure/railing{ + dir = 6 + }, +/turf/open/transparent/openspace, +/area/storage/mining) "gWd" = ( /obj/structure/cable, /turf/open/floor/plating, @@ -50933,7 +50969,13 @@ /turf/open/floor/plasteel, /area/science/misc_lab) "hau" = ( -/obj/structure/ladder, +/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer4{ + dir = 6 + }, +/obj/structure/cable, +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2{ + dir = 10 + }, /turf/open/floor/plasteel/dark, /area/storage/mining) "hcE" = ( @@ -51198,6 +51240,13 @@ "hZk" = ( /turf/open/floor/plasteel, /area/science/nanite) +"hZS" = ( +/obj/structure/industrial_lift{ + id = "publicElevator" + }, +/obj/machinery/light/floor, +/turf/open/transparent/openspace, +/area/storage/mining) "ibG" = ( /obj/machinery/nanite_programmer, /obj/effect/turf_decal/bot, @@ -51448,11 +51497,8 @@ /turf/open/floor/plasteel/dark, /area/crew_quarters/heads/cmo) "jcM" = ( -/obj/machinery/camera{ - c_tag = "Public Mining Ladder"; - dir = 8 - }, -/turf/open/floor/plasteel/dark, +/obj/structure/cable, +/turf/open/floor/plating, /area/storage/mining) "jdH" = ( /obj/effect/decal/cleanable/dirt, @@ -52574,10 +52620,11 @@ /turf/open/floor/plasteel, /area/science/misc_lab) "lSU" = ( -/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4{ - dir = 8 +/obj/structure/industrial_lift, +/obj/structure/railing{ + dir = 9 }, -/turf/open/floor/plasteel/dark, +/turf/open/transparent/openspace, /area/storage/mining) "lTQ" = ( /obj/vehicle/ridden/wheelchair{ @@ -53100,6 +53147,10 @@ }, /turf/open/floor/plasteel/cafeteria, /area/crew_quarters/heads/hor) +"nlo" = ( +/obj/structure/industrial_lift, +/turf/open/transparent/openspace, +/area/storage/mining) "nlN" = ( /obj/effect/turf_decal/tile/yellow, /obj/effect/turf_decal/tile/yellow{ @@ -53561,6 +53612,13 @@ /obj/machinery/light, /turf/open/floor/plating, /area/engine/engineering) +"oGZ" = ( +/obj/structure/industrial_lift, +/obj/structure/railing{ + dir = 5 + }, +/turf/open/transparent/openspace, +/area/storage/mining) "oHH" = ( /obj/structure/cable, /obj/machinery/atmospherics/components/binary/pump{ @@ -54190,6 +54248,15 @@ /obj/effect/turf_decal/stripes/line, /turf/open/floor/plasteel/white, /area/science/genetics) +"pTF" = ( +/obj/effect/turf_decal/trimline/neutral/filled/corner{ + dir = 1 + }, +/obj/effect/turf_decal/trimline/neutral/filled/corner{ + dir = 8 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "pUi" = ( /obj/effect/turf_decal/trimline/blue/filled/line, /obj/structure/cable, @@ -54690,6 +54757,12 @@ }, /turf/open/floor/plasteel/white, /area/medical/medbay/aft) +"rUV" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 9 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "rVn" = ( /obj/effect/turf_decal/trimline/blue/filled/warning{ dir = 4 @@ -55457,6 +55530,16 @@ }, /turf/open/floor/plasteel/white, /area/medical/chemistry) +"uhq" = ( +/obj/machinery/camera{ + c_tag = "Public Mining Ladder"; + dir = 8 + }, +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 5 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "uhH" = ( /obj/item/wrench, /obj/item/weldingtool, @@ -55884,6 +55967,12 @@ }, /turf/open/floor/plasteel/white, /area/medical/medbay) +"voE" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 6 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "vqI" = ( /obj/structure/disposalpipe/segment{ dir = 4 @@ -56598,6 +56687,16 @@ }, /turf/open/floor/plasteel/white, /area/medical/chemistry) +"xkH" = ( +/obj/structure/ladder, +/obj/machinery/light/small{ + dir = 4 + }, +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 4 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "xkP" = ( /obj/effect/turf_decal/tile/purple{ dir = 8 @@ -85226,10 +85325,10 @@ beh bfv urc urc -urc -urc -urc -urc +lSU +nlo +ejU +bnW xbg mME xbg @@ -85483,12 +85582,12 @@ aZR bft urc urc -urc -urc -urc -urc -bpg -bqD +oGZ +hZS +gVn +bnW +aeE +aeE aeE xWd xWd @@ -85738,14 +85837,14 @@ aCN bdh bee bfv -urc -urc -big -bii bgN +urc +urc +bii +urc bnV bph -bqD +aeE aOy btG buQ @@ -85995,8 +86094,8 @@ bcf bdg bed bfv -urc -urc +jcM +jcM big hau aIo @@ -86252,16 +86351,16 @@ aCP aEj bef bfv +bqD urc urc -jcM bih -lSU +urc bnV olp aeE aOB -aeE +bpg buS bwn xWd @@ -86511,9 +86610,9 @@ aZR bfw urc urc -urc -urc -urc +rUV +pTF +cJV bnW aeE aeE @@ -86768,10 +86867,10 @@ beh bfv urc urc -urc -urc -urc -urc +uhq +xkH +voE +bnW xbg tGE xbg diff --git a/_maps/map_files/IceBoxStation/IcemoonUnderground_Above.dmm b/_maps/map_files/IceBoxStation/IcemoonUnderground_Above.dmm index 80103f78241..34308d31108 100644 --- a/_maps/map_files/IceBoxStation/IcemoonUnderground_Above.dmm +++ b/_maps/map_files/IceBoxStation/IcemoonUnderground_Above.dmm @@ -995,6 +995,12 @@ /obj/structure/cable, /turf/open/floor/plasteel, /area/mine/production) +"cY" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 8 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "cZ" = ( /obj/machinery/mineral/equipment_vendor, /obj/effect/turf_decal/tile/brown{ @@ -2527,6 +2533,13 @@ /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel, /area/mine/laborcamp) +"mj" = ( +/turf/open/floor/plating, +/area/storage/mining) +"mn" = ( +/obj/structure/sign/poster/contraband/random, +/turf/closed/wall, +/area/storage/mining) "mL" = ( /obj/item/kirbyplants{ icon_state = "plant-10" @@ -2586,6 +2599,12 @@ /area/mine/laborcamp) "nB" = ( /obj/structure/ladder, +/obj/machinery/light/small{ + dir = 4 + }, +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 4 + }, /turf/open/floor/plasteel/dark, /area/storage/mining) "nE" = ( @@ -2657,6 +2676,12 @@ }, /turf/open/floor/plasteel, /area/mine/living_quarters) +"oM" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 6 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "oO" = ( /obj/structure/table, /obj/item/gps/mining, @@ -2982,6 +3007,9 @@ }, /turf/open/floor/plasteel, /area/mine/laborcamp) +"tB" = ( +/turf/open/floor/plasteel/elevatorshaft, +/area/storage/mining) "tI" = ( /obj/machinery/light/small{ dir = 4 @@ -3003,6 +3031,12 @@ }, /turf/open/floor/plasteel/white, /area/mine/laborcamp) +"up" = ( +/obj/machinery/door/airlock/public/glass{ + name = "Public Mining Storage" + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "uG" = ( /obj/machinery/light, /obj/effect/turf_decal/tile/red{ @@ -3135,6 +3169,9 @@ /turf/closed/wall, /area/mine/living_quarters) "xn" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 9 + }, /turf/open/floor/plasteel/dark, /area/storage/mining) "xH" = ( @@ -3274,8 +3311,8 @@ /turf/open/floor/plasteel, /area/hydroponics) "AT" = ( -/obj/machinery/light/small{ - dir = 1 +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 5 }, /turf/open/floor/plasteel/dark, /area/storage/mining) @@ -3384,6 +3421,10 @@ /obj/structure/disposalpipe/segment, /turf/open/floor/plating, /area/storage/mining) +"Ck" = ( +/obj/structure/sign/warning, +/turf/closed/wall, +/area/storage/mining) "Cr" = ( /obj/machinery/door/airlock/public/glass{ id_tag = "gulag1"; @@ -3422,6 +3463,12 @@ /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel, /area/mine/laborcamp) +"CS" = ( +/obj/machinery/light{ + dir = 4 + }, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/storage/mining) "Dh" = ( /obj/machinery/light{ dir = 4 @@ -3482,10 +3529,15 @@ /turf/open/floor/plasteel/dark, /area/hydroponics) "DZ" = ( -/obj/machinery/door/airlock/public/glass{ - name = "Public Mining Storage" +/obj/structure/cable, +/obj/machinery/power/apc/highcap/five_k{ + areastring = /area/storage/mining; + dir = 1; + name = "Public Mining APC"; + pixel_y = 23 }, -/turf/open/floor/plasteel/dark, +/obj/item/reagent_containers/food/drinks/bottle/hooch, +/turf/open/floor/plating, /area/storage/mining) "Ee" = ( /obj/effect/decal/cleanable/dirt, @@ -3551,8 +3603,8 @@ /turf/open/floor/plasteel, /area/mine/laborcamp) "Fc" = ( -/obj/structure/sign/warning, -/turf/closed/wall, +/obj/structure/cable, +/turf/open/floor/plating, /area/storage/mining) "Fd" = ( /obj/structure/cable, @@ -3861,6 +3913,9 @@ /obj/structure/cable, /turf/open/floor/plasteel, /area/mine/living_quarters) +"Kf" = ( +/turf/open/floor/plasteel/dark, +/area/storage/mining) "KE" = ( /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/supply/hidden{ @@ -3873,6 +3928,12 @@ /obj/structure/closet/crate, /turf/closed/mineral/random/snow, /area/icemoon/underground/unexplored/rivers) +"Lb" = ( +/obj/effect/turf_decal/trimline/neutral/filled/line{ + dir = 10 + }, +/turf/open/floor/plasteel/dark, +/area/storage/mining) "Lg" = ( /obj/item/clothing/under/color/jumpskirt/random, /obj/effect/turf_decal/tile/brown{ @@ -3929,6 +3990,12 @@ /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel, /area/mine/laborcamp) +"LX" = ( +/obj/machinery/light/small{ + dir = 8 + }, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/storage/mining) "Ml" = ( /obj/machinery/hydroponics/constructable, /turf/open/floor/grass, @@ -4227,6 +4294,10 @@ /turf/open/floor/plasteel, /area/mine/laborcamp) "Re" = ( +/obj/machinery/door/airlock/maintenance, +/turf/open/floor/plating, +/area/storage/mining) +"Rg" = ( /obj/structure/ore_box, /turf/open/floor/plating/asteroid/snow/icemoon, /area/storage/mining) @@ -4555,6 +4626,12 @@ }, /turf/open/floor/plasteel/white, /area/mine/laborcamp) +"Wd" = ( +/obj/machinery/light{ + dir = 1 + }, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/storage/mining) "Wn" = ( /obj/effect/spawner/structure/window/reinforced, /obj/structure/cable, @@ -4661,10 +4738,9 @@ /turf/open/floor/plasteel, /area/mine/laborcamp) "Yl" = ( -/obj/machinery/light{ - dir = 1 - }, -/turf/open/floor/plating/asteroid/snow/icemoon, +/obj/structure/cable/multilayer/multiz, +/obj/effect/turf_decal/stripes/box, +/turf/open/floor/plating, /area/storage/mining) "Ym" = ( /obj/structure/chair{ @@ -31130,11 +31206,11 @@ ah ah ah ah -ah -ah -ah -ah -ah +wd +wd +wd +wd +wd ah ah ah @@ -31386,13 +31462,13 @@ ah ah ah ah -ah -ah -ah -ah -ah -ah -ah +wd +wd +wd +wd +wd +wd +wd ah ah ah @@ -31642,15 +31718,15 @@ ah ah ah ah -ah -ah -ah -ah -ah -ah -ah -ah -ah +wd +wd +wd +CS +wd +CS +wd +wd +wd ah ah ah @@ -31899,15 +31975,15 @@ ah ah ah ah -ah -ah -ah -ah -ah -ah -ah -ah -ah +wd +wd +YF +Ck +up +Ck +YF +Rg +wd ah ah ah @@ -32156,15 +32232,15 @@ ah ah ah ah -ah -ah -ah -ah -ah -ah -ah -ah -ah +wd +wd +mn +tB +tB +tB +YF +Rg +wd ah ah ah @@ -32413,15 +32489,15 @@ ah ah ah ah -ah -ah -ah -ah -ah -ah -ah -ah -ah +YF +YF +YF +tB +tB +tB +YF +Rg +wd ah ah ah @@ -32670,15 +32746,15 @@ ah ah ah ah -ah -ah +YF +DZ +YF +YF +YF +YF +Ck +Wd wd -wd -wd -wd -wd -ah -ah ah ah ah @@ -32927,12 +33003,13 @@ ah ah ah ah -ah -wd -wd -Re -Re +YF +Fc +mj Re +Kf +Kf +up wd wd ah @@ -33053,7 +33130,6 @@ ah ah ah ah -ah "} (111,1,1) = {" ah @@ -33184,14 +33260,14 @@ ah ah ah ah -wd -wd +YF +Yl YF YF +Kf YF -YF -YF -wd +Ck +Wd wd ah ah @@ -33441,14 +33517,14 @@ ah ah ah ah -wd -wd +YF +YF YF xn -xn -xn -Fc -Yl +cY +Lb +YF +wd wd ah ah @@ -33703,8 +33779,8 @@ wd YF AT nB -xn -DZ +oM +YF wd wd ah @@ -33958,11 +34034,11 @@ ah wd wd YF -xn -xn -xn -Fc -Yl +YF +YF +YF +YF +wd wd ah ah @@ -34214,11 +34290,11 @@ ah ah wd wd -YF -YF -YF -YF -YF +LX +Rg +Rg +Rg +LX wd wd ah @@ -34472,9 +34548,9 @@ ah ah wd wd -Re -Re -Re +wd +wd +wd wd wd ah diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 1d395df72fe..fa2546d4228 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -288,3 +288,17 @@ icon_state = "button" result_path = /obj/machinery/button custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT) + +/obj/machinery/button/elevator + name = "elevator button" + desc = "Go back. Go back. Go back. Can you operate the elevator." + icon_state = "launcher" + skin = "launcher" + device_type = /obj/item/assembly/control/elevator + req_access = list() + id = 1 + +/obj/machinery/button/elevator/examine(mob/user) + . = ..() + . += "There's a small inscription on the button..." + . += "THIS CALLS THE ELEVATOR! IT DOES NOT OPERATE IT! Interact with the elevator itself to use it!" diff --git a/code/game/objects/structures/industrial_lift.dm b/code/game/objects/structures/industrial_lift.dm index 676da3eb345..5727bf7237d 100644 --- a/code/game/objects/structures/industrial_lift.dm +++ b/code/game/objects/structures/industrial_lift.dm @@ -1,3 +1,8 @@ + +//Booleans in arguments are confusing, so I made them defines. +#define LOCKED 1 +#define UNLOCKED 0 + ///Collect and command /datum/lift_master var/list/lift_platforms @@ -43,18 +48,33 @@ possible_expansions |= lift_platform possible_expansions -= borderline -///Move all platforms together +/** + * Moves the lift UP or DOWN, this is what users invoke with their hand. + * This is a SAFE proc, ensuring every part of the lift moves SANELY. + * It also locks controls for the (miniscule) duration of the movement, so the elevator cannot be broken by spamming. + * Arguments: + * going - UP or DOWN directions, where the lift should go. Keep in mind by this point checks of whether it should go up or down have already been done. + * user - Whomever made the lift movement. + */ /datum/lift_master/proc/MoveLift(going, mob/user) + set_controls(LOCKED) for(var/p in lift_platforms) var/obj/structure/industrial_lift/lift_platform = p lift_platform.travel(going) + set_controls(UNLOCKED) +/** + * Moves the lift, this is what users invoke with their hand. + * This is a SAFE proc, ensuring every part of the lift moves SANELY. + * It also locks controls for the (miniscule) duration of the movement, so the elevator cannot be broken by spamming. + */ /datum/lift_master/proc/MoveLiftHorizontal(going, z) var/max_x = 1 var/max_y = 1 var/min_x = world.maxx var/min_y = world.maxy + set_controls(LOCKED) for(var/p in lift_platforms) var/obj/structure/industrial_lift/lift_platform = p max_x = max(max_x, lift_platform.x) @@ -89,15 +109,28 @@ for(var/y in min_y to max_y) var/obj/structure/industrial_lift/lift_platform = locate(/obj/structure/industrial_lift, locate(x, y, z)) lift_platform.travel(going) + set_controls(UNLOCKED) ///Check destination turfs /datum/lift_master/proc/Check_lift_move(check_dir) - for(var/lift_platform in lift_platforms) + for(var/l in lift_platforms) + var/obj/structure/industrial_lift/lift_platform = l var/turf/T = get_step_multiz(lift_platform, check_dir) - if(!T)// || !isopenturf(T)) + if(!T)//the edges of multi-z maps + return FALSE + if(check_dir == DOWN && !istype(get_turf(lift_platform), /turf/open/transparent/openspace)) return FALSE return TRUE +/** + * Sets all lift parts's controls_locked variable. Used to prevent moving mid movement, or cooldowns. + */ +/datum/lift_master/proc/set_controls(state) + for(var/l in lift_platforms) + var/obj/structure/industrial_lift/lift_platform = l + lift_platform.controls_locked = state + +GLOBAL_LIST_EMPTY(lifts) /obj/structure/industrial_lift name = "lift platform" desc = "A lightweight lift platform. It moves up and down." @@ -114,12 +147,18 @@ canSmoothWith = null obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN + var/id = null //ONLY SET THIS TO ONE OF THE LIFT'S PARTS. THEY'RE CONNECTED! ONLY ONE NEEDS THE SIGNAL! + var/pass_through_floors = FALSE //if true, the elevator works through floors + var/controls_locked = FALSE //if true, the lift cannot be manually moved. var/list/atom/movable/lift_load //things to move var/datum/lift_master/lift_master_datum //control from +/obj/structure/industrial_lift/New() + GLOB.lifts.Add(src) + ..() + /obj/structure/industrial_lift/Initialize(mapload) . = ..() - RegisterSignal(src, COMSIG_MOVABLE_CROSSED, .proc/AddItemOnLift) RegisterSignal(loc, COMSIG_ATOM_CREATED, .proc/AddItemOnLift)//For atoms created on platform RegisterSignal(src, COMSIG_MOVABLE_UNCROSSED, .proc/RemoveItemFromLift) @@ -159,51 +198,46 @@ destination = get_step_multiz(src, going) else destination = going + if(going == DOWN)//make sure this stays pre-item moving, or you'll crush anything on the lift under the lift. + for(var/mob/living/crushed in destination.contents) + to_chat(crushed, "You are crushed by [src]!") + crushed.gib(FALSE,FALSE,FALSE)//the nicest kind of gibbing, keeping everything intact. forceMove(destination) for(var/am in things2move) var/atom/movable/thing = am thing.forceMove(destination) /obj/structure/industrial_lift/proc/use(mob/user, is_ghost=FALSE) - if (is_ghost && !in_range(src, user)) + if(is_ghost && !in_range(src, user)) return - var/static/list/tool_list = list( - "Up" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH), - "Down" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH) - ) - - var/turf/can_move_up = lift_master_datum.Check_lift_move(UP) - var/turf/can_move_up_down = lift_master_datum.Check_lift_move(DOWN) - - if (!can_move_up && !can_move_up_down) - to_chat(user, "[src] doesn't seem to able move anywhere!") + var/list/tool_list = list() + if(lift_master_datum.Check_lift_move(UP)) + tool_list["Up"] = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH) + if(lift_master_datum.Check_lift_move(DOWN)) + tool_list["Down"] = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH) + if(!length(tool_list)) + to_chat(user, "[src] doesn't seem to able to move anywhere!") + add_fingerprint(user) + return + if(controls_locked) + to_chat(user, "[src] has its controls locked! It must already be trying to do something!") add_fingerprint(user) return - var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE) - if (!is_ghost && !in_range(src, user)) + if(!is_ghost && !in_range(src, user)) return // nice try switch(result) if("Up") - if(can_move_up) - lift_master_datum.MoveLift(UP, user) - show_fluff_message(TRUE, user) - use(user) - else - to_chat(user, "[src] doesn't seem to able move up!") - use(user) + lift_master_datum.MoveLift(UP, user) + show_fluff_message(TRUE, user) + use(user) if("Down") - if(can_move_up_down) - lift_master_datum.MoveLift(DOWN, user) - show_fluff_message(FALSE, user) - use(user) - else - to_chat(user, "[src] doesn't seem to able move down!") - use(user) + lift_master_datum.MoveLift(DOWN, user) + show_fluff_message(FALSE, user) + use(user) if("Cancel") return - add_fingerprint(user) /obj/structure/industrial_lift/proc/check_menu(mob/user) @@ -217,6 +251,14 @@ return use(user) +//ai probably shouldn't get to use lifts but they sure are great for admins to crush people with +/obj/structure/industrial_lift/attack_ghost(mob/user) + . = ..() + if(.) + return + if(isAdminGhostAI(user)) + use(user) + /obj/structure/industrial_lift/attack_paw(mob/user) return use(user) @@ -229,11 +271,12 @@ /obj/structure/industrial_lift/proc/show_fluff_message(going_up, mob/user) if(going_up) - user.visible_message("[user] move lift up.", "Lift move up.") + user.visible_message("[user] moves the lift upwards.", "You move the lift upwards.") else - user.visible_message("[user] move lift down.", "Lift move down.") + user.visible_message("[user] moves the lift downwards.", "You move the lift downwards.") /obj/structure/industrial_lift/Destroy() + GLOB.lifts.Remove(src) QDEL_NULL(lift_master_datum) var/list/border_lift_platforms = lift_platform_expansion() moveToNullspace() diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 6081f2c59f2..e4643e411e5 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -84,7 +84,7 @@ user.forceMove(T) if(AM) user.start_pulling(AM) - + //reopening ladder radial menu ahead T = get_turf(user) var/obj/structure/ladder/ladder_structure = locate() in T @@ -103,7 +103,7 @@ if (!length(tool_list)) to_chat(user, "[src] doesn't seem to lead anywhere!") return - + var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user, is_ghost), require_near = !is_ghost, tooltips = TRUE) if (!is_ghost && !in_range(src, user)) return // nice try diff --git a/code/modules/assembly/doorcontrol.dm b/code/modules/assembly/doorcontrol.dm index 0e99149c807..f1eb58b0ade 100644 --- a/code/modules/assembly/doorcontrol.dm +++ b/code/modules/assembly/doorcontrol.dm @@ -146,3 +146,39 @@ C.cremate(usr) addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 50) + +//how long it spends on each floor when moving somewhere, so it'd take 4 seconds to reach you if it had to travel up 2 floors +#define FLOOR_TRAVEL_TIME 2 SECONDS +/obj/item/assembly/control/elevator + name = "elevator controller" + desc = "A small device used to call elevators to the current floor." + +/obj/item/assembly/control/elevator/activate() + if(cooldown) + return + cooldown = TRUE + var/obj/structure/industrial_lift/lift + for(var/l in GLOB.lifts) + var/obj/structure/industrial_lift/possible_lift = l + if(possible_lift.id != id || possible_lift.z == z || possible_lift.controls_locked) + continue + lift = possible_lift + break + if(!lift) + addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 2 SECONDS) + return + lift.visible_message("[src] clinks and whirrs into automated motion, locking controls. z ? UP : DOWN + var/travel_duration = FLOOR_TRAVEL_TIME * difference //100 / 2 floors up = 50 seconds on every floor, will always reach destination in the same time + addtimer(VARSET_CALLBACK(src, cooldown, FALSE), travel_duration) + for(var/i in 1 to difference) + sleep(FLOOR_TRAVEL_TIME)//hey this should be alright... right? + if(QDELETED(lift) || QDELETED(src))//elevator control or button gone = don't go up anymore + return + lift.lift_master_datum.MoveLift(direction, null) + lift.visible_message("[src] clicks, ready to be manually operated again.