diff --git a/aurorastation.dme b/aurorastation.dme index 37eb9ae0f50..4de2d8b29f9 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2593,6 +2593,7 @@ #include "code\modules\shuttles\shuttle_console_multi.dm" #include "code\modules\shuttles\shuttle_emergency.dm" #include "code\modules\shuttles\shuttle_ferry.dm" +#include "code\modules\shuttles\shuttle_lift.dm" #include "code\modules\shuttles\shuttle_specops.dm" #include "code\modules\shuttles\shuttle_supply.dm" #include "code\modules\shuttles\shuttles_multi.dm" diff --git a/code/modules/shuttles/shuttle.dm b/code/modules/shuttles/shuttle.dm index 8df4e16c89e..b0999388519 100644 --- a/code/modules/shuttles/shuttle.dm +++ b/code/modules/shuttles/shuttle.dm @@ -29,6 +29,8 @@ var/mothershuttle //tag of mothershuttle var/motherdock //tag of mothershuttle landmark, defaults to starting location + var/squishes = TRUE //decides whether or not things get squished when it moves. + /datum/shuttle/New(_name, var/obj/effect/shuttle_landmark/initial_location) ..() if(_name) @@ -172,7 +174,7 @@ for(var/turf/src_turf in turf_translation) var/turf/dst_turf = turf_translation[src_turf] - if(src_turf.is_solid_structure()) //in case someone put a hole in the shuttle and you were lucky enough to be under it + if(squishes && src_turf.is_solid_structure()) //in case someone put a hole in the shuttle and you were lucky enough to be under it for(var/atom/movable/AM in dst_turf) if(!AM.simulated) continue diff --git a/code/modules/shuttles/shuttle_lift.dm b/code/modules/shuttles/shuttle_lift.dm new file mode 100644 index 00000000000..a9b6bcc4693 --- /dev/null +++ b/code/modules/shuttles/shuttle_lift.dm @@ -0,0 +1,64 @@ +//Used to create small industrial-esque lifts used between two floors +/datum/shuttle/autodock/ferry/lift + warmup_time = 3 + knockdown = FALSE + squishes = FALSE + ceiling_type = null + sound_takeoff = 'sound/effects/lift_heavy_start.ogg' + sound_landing = 'sound/effects/lift_heavy_stop.ogg' + category = /datum/shuttle/autodock/ferry/lift + var/obj/machinery/computer/shuttle_control/assigned_controller + +/datum/shuttle/autodock/ferry/lift/New(_name, var/obj/effect/shuttle_landmark/initial_location) + ..() + for(var/obj/machinery/computer/shuttle_control/lift/controller in shuttle_area[1]) + assigned_controller = controller + break + +/datum/shuttle/autodock/ferry/lift/Destroy() + assigned_controller = null + ..() + +/datum/shuttle/autodock/ferry/lift/short_jump(var/obj/effect/shuttle_landmark/destination) + var/obj/effect/shuttle_landmark/start_location = current_location + if(!obstruction_check(start_location, destination)) + if(assigned_controller) + assigned_controller.audible_message("\The [assigned_controller] buzzes loudly: Obstruction detected!") + playsound(assigned_controller.loc, "sound/machines/buzz-two.ogg", 50, 1) + return FALSE + ..() + +/datum/shuttle/autodock/ferry/lift/proc/obstruction_check(var/obj/effect/shuttle_landmark/start, var/obj/effect/shuttle_landmark/destination) + var/list/translation = list() + for(var/area/A in shuttle_area) + translation += get_turf_translation(get_turf(current_location), get_turf(destination), A.contents) + + for(var/turf/src_turf in translation) + var/turf/dst_turf = translation[src_turf] + + if(dst_turf.density) + return FALSE + if(!location) + if(!istype(dst_turf, /turf/simulated/open)) + return FALSE + else + for(var/atom/A in dst_turf) + if(A.density) + return FALSE + if(istype(A, /mob/living)) + var/mob/living/blockage = A + if(blockage.mob_size > MOB_SMALL) + return FALSE + if(location) + squishes = TRUE + else + squishes = FALSE + + return TRUE + +/obj/machinery/computer/shuttle_control/lift + name = "lift controller" + ui_template = "shuttle_control_console_lift.tmpl" + icon_state = "lift" + icon_screen = null + density = FALSE diff --git a/html/changelogs/Ferner-200702-coding_liftport.yml b/html/changelogs/Ferner-200702-coding_liftport.yml new file mode 100644 index 00000000000..68532f577ce --- /dev/null +++ b/html/changelogs/Ferner-200702-coding_liftport.yml @@ -0,0 +1,4 @@ +author: Ferner, Kyres1 +delete-after: True +changes: + - rscadd: "Added the possibility to map in lifts from Bay, with lift console sprites by Kyres1." diff --git a/icons/obj/computer.dmi b/icons/obj/computer.dmi index fb92226342e..4a5ff7e1d4c 100644 Binary files a/icons/obj/computer.dmi and b/icons/obj/computer.dmi differ diff --git a/nano/templates/shuttle_control_console_lift.tmpl b/nano/templates/shuttle_control_console_lift.tmpl new file mode 100644 index 00000000000..f3e809d57d2 --- /dev/null +++ b/nano/templates/shuttle_control_console_lift.tmpl @@ -0,0 +1,26 @@ +