From a7f696e6e1d2c946eeb0d665cd5eeb01d38137a8 Mon Sep 17 00:00:00 2001 From: ikarrus Date: Thu, 5 Jun 2014 22:19:38 -0600 Subject: [PATCH 1/3] Shuttles will always destroy things in their way Fixes #1992 Also: -Adds labour shuttle to admin secrets -Removes delay when admins move shuttles --- code/modules/admin/admin.dm | 1 + code/modules/admin/topic.dm | 15 +++++++++++---- code/modules/shuttle/shuttle.dm | 24 +++++++----------------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index f08e6bffef1..aa1fa5f1dcb 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -427,6 +427,7 @@ var/global/floorIsLava = 0
Move Ferry
Move Mining Shuttle
+ Move Labor Shuttle

"} diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index f9fcfb99bf8..5aded3ba871 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1933,15 +1933,22 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ShM") var/datum/shuttle_manager/s = shuttles["mining"] - if(istype(s)) s.move_shuttle() - message_admins("\blue [key_name_admin(usr)] moved mining shuttle", 1) + if(istype(s)) s.move_shuttle(0) + message_admins("[key_name_admin(usr)] moved mining shuttle", 1) log_admin("[key_name(usr)] moved the mining shuttle") + if("movelaborshuttle") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","ShL") + var/datum/shuttle_manager/s = shuttles["laborcamp"] + if(istype(s)) s.move_shuttle(0) + message_admins("[key_name_admin(usr)] moved labor shuttle", 1) + log_admin("[key_name(usr)] moved the labor shuttle") if("moveferry") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","ShF") var/datum/shuttle_manager/s = shuttles["ferry"] - if(istype(s)) s.move_shuttle() - message_admins("\blue [key_name_admin(usr)] moved the centcom ferry", 1) + if(istype(s)) s.move_shuttle(0) + message_admins("[key_name_admin(usr)] moved the centcom ferry", 1) log_admin("[key_name(usr)] moved the centcom ferry") if("kick_all_from_lobby") if(ticker && ticker.current_state == GAME_STATE_PLAYING) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 8fadd57ba3f..27e5221f934 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -29,26 +29,16 @@ datum/shuttle_manager/proc/move_shuttle(var/override_delay) if(T.y < throwy) throwy = T.y - // hey you, get out of the way! + // Destroy everything in the destination area for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - // NOTE: Commenting this out to avoid recreating mass driver glitch - /* - spawn(0) - AM.throw_at(E, 1, 1) - return - */ + AM.ex_act(1) //splat + if(AM) + qdel(AM) if(istype(T, /turf/simulated)) del(T) - for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area... - bug.gib() - fromArea.move_contents_to(toArea) location = toArea.type @@ -108,11 +98,11 @@ datum/shuttle_manager/proc/move_shuttle(var/override_delay) if(id in shuttles) var/datum/shuttle_manager/s = shuttles[id] if (s.move_shuttle()) - usr << "\blue Shuttle recieved message and will be sent shortly." + usr << "Shuttle recieved message and will be sent shortly." else - usr << "\blue Shuttle is already moving." + usr << "Shuttle is already moving." else - usr << "\red Invalid shuttle requested." + usr << "Invalid shuttle requested." /obj/machinery/computer/shuttle/attackby(I as obj, user as mob) From 9d76c7fffcd4c6ebcada9384d268b086a3f9fb9e Mon Sep 17 00:00:00 2001 From: ikarrus Date: Fri, 6 Jun 2014 22:14:55 -0600 Subject: [PATCH 2/3] -Shuttles inflict heavy brute damage instead of instagibbing -Behaviour extended to supply shuttle --- code/controllers/supply_shuttle.dm | 8 +------- code/game/area/areas.dm | 32 +++++++++++++++++++++++++++++- code/modules/shuttle/shuttle.dm | 20 +------------------ 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/code/controllers/supply_shuttle.dm b/code/controllers/supply_shuttle.dm index 1457fa818bb..fd68fcac95f 100644 --- a/code/controllers/supply_shuttle.dm +++ b/code/controllers/supply_shuttle.dm @@ -171,24 +171,18 @@ var/global/datum/controller/supply_shuttle/supply_shuttle proc/send() var/area/from var/area/dest - var/area/the_shuttles_way switch(at_station) if(1) from = locate(SUPPLY_STATION_AREATYPE) dest = locate(SUPPLY_DOCK_AREATYPE) - the_shuttles_way = from at_station = 0 if(0) from = locate(SUPPLY_DOCK_AREATYPE) dest = locate(SUPPLY_STATION_AREATYPE) - the_shuttles_way = dest at_station = 1 + dest.clear_docking_area() moving = 0 - //Do I really need to explain this loop? - for(var/mob/living/unlucky_person in the_shuttles_way) - unlucky_person.gib() - from.move_contents_to(dest) //Check whether the shuttle is allowed to move diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 614c6009fbc..53b40c49921 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -297,4 +297,34 @@ // There's a gravity generator on our z level if(T && gravity_generators["[T.z]"] && length(gravity_generators["[T.z]"])) return 1 - return 0 \ No newline at end of file + return 0 + +/area/proc/clear_docking_area() + var/list/dstturfs = list() + var/throwy = world.maxy + + for(var/turf/T in src) + dstturfs += T + if(T.y < throwy) + throwy = T.y + + // hey you, get out of the way! + for(var/turf/T in dstturfs) + // find the turf to move things to + var/turf/D = locate(T.x, throwy - 1, T.z) + for(var/atom/movable/AM as mob|obj in T) + //mobs take damage + if(istype(AM, /mob/living)) + var/mob/living/living_mob = AM + living_mob.Paralyse(10) + living_mob.take_organ_damage(80) + //Anything not bolted down is moved, everything else is destroyed + if(!AM.anchored) + AM.Move(D) + else + qdel(AM) + if(istype(T, /turf/simulated)) + del(T) + + for(var/atom/movable/bug in src) // If someone (or something) is somehow still in the shuttle's docking area... + qdel(bug) \ No newline at end of file diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 27e5221f934..1002d63f30b 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -21,23 +21,7 @@ datum/shuttle_manager/proc/move_shuttle(var/override_delay) fromArea = locate(location) //the location of the shuttle toArea = locate(fromArea.destination) - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in toArea) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // Destroy everything in the destination area - for(var/turf/T in dstturfs) - for(var/atom/movable/AM as mob|obj in T) - AM.ex_act(1) //splat - if(AM) - qdel(AM) - - if(istype(T, /turf/simulated)) - del(T) + toArea.clear_docking_area() fromArea.move_contents_to(toArea) location = toArea.type @@ -64,8 +48,6 @@ datum/shuttle_manager/proc/move_shuttle(var/override_delay) return 1 - - /obj/machinery/computer/shuttle name = "Shuttle Console" icon = 'icons/obj/computer.dmi' From 19e20290f548d7c3ffb2ff9e29b2611df4321230 Mon Sep 17 00:00:00 2001 From: ikarrus Date: Tue, 1 Jul 2014 12:59:08 -0600 Subject: [PATCH 3/3] Removed execution by shuttle docking --- code/game/area/areas.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 53b40c49921..3a096621176 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -319,10 +319,8 @@ living_mob.Paralyse(10) living_mob.take_organ_damage(80) //Anything not bolted down is moved, everything else is destroyed - if(!AM.anchored) - AM.Move(D) - else - qdel(AM) + AM.anchored = 0 + AM.Move(D) if(istype(T, /turf/simulated)) del(T)