From f4444f2dad01002e456cf9e9f2a5609ff6cb5275 Mon Sep 17 00:00:00 2001 From: Anewbe Date: Sat, 15 Apr 2017 20:35:17 -0500 Subject: [PATCH 01/14] Sorta fixes the syntax on the *halt emote --- code/modules/mob/living/silicon/robot/emote.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index a75a8f4bcc..84825559b0 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -230,7 +230,7 @@ if("halt") if (istype(module,/obj/item/weapon/robot_module/robot/security)) - message = "[src]'s speakers skreech, \"Halt! Security!\"." + message = "'s speakers skreech, \"Halt! Security!\"." playsound(src.loc, 'sound/voice/halt.ogg', 50, 0) m_type = 2 From 663e2b2d4cca46e1b71f0beaed5fd19d600fbe6d Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Sat, 18 Mar 2017 12:28:30 +0100 Subject: [PATCH 02/14] Can no longer move up/down from non-turf locations. Port of https://github.com/Baystation12/Baystation12/pull/16653/ --- code/modules/multiz/movement.dm | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 586b624260..122e1aa4cd 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -3,34 +3,38 @@ set category = "IC" if(zMove(UP)) - to_chat(usr, "You move upwards.") + to_chat(src, "You move upwards.") /mob/verb/down() set name = "Move Down" set category = "IC" if(zMove(DOWN)) - to_chat(usr, "You move down.") + to_chat(src, "You move down.") /mob/proc/zMove(direction) if(eyeobj) return eyeobj.zMove(direction) if(!can_ztravel()) - to_chat(usr, "You lack means of travel in that direction.") + to_chat(src, "You lack means of travel in that direction.") return + var/turf/start = loc + if(!istype(start)) + to_chat(src, "You are unable to move from here.") + return 0 + var/turf/destination = (direction == UP) ? GetAbove(src) : GetBelow(src) - if(!destination) - to_chat(usr, "There is nothing of interest in this direction.") + to_chat(src, "There is nothing of interest in this direction.") + return 0 + + if(!start.CanZPass(src, direction)) + to_chat(src, "\The [start] is in the way.") return 0 - var/turf/start = get_turf(src) - if(!start.CanZPass(src, direction)) - to_chat(usr, "\The [start] is in the way.") - return 0 if(!destination.CanZPass(src, direction)) - to_chat(usr, "\The [destination] blocks your way.") + to_chat(src, "\The [destination] blocks your way.") return 0 var/area/area = get_area(src) @@ -46,12 +50,12 @@ to_chat(src, "You gave up on pulling yourself up.") return 0 else - to_chat(usr, "Gravity stops you from moving upward.") + to_chat(src, "Gravity stops you from moving upward.") return 0 for(var/atom/A in destination) if(!A.CanPass(src, start, 1.5, 0)) - to_chat(usr, "\The [A] blocks you.") + to_chat(src, "\The [A] blocks you.") return 0 Move(destination) return 1 @@ -61,14 +65,14 @@ if(destination) forceMove(destination) else - to_chat(usr, "There is nothing of interest in this direction.") + to_chat(src, "There is nothing of interest in this direction.") /mob/observer/eye/zMove(direction) var/turf/destination = (direction == UP) ? GetAbove(src) : GetBelow(src) if(destination) setLoc(destination) else - to_chat(usr, "There is nothing of interest in this direction.") + to_chat(src, "There is nothing of interest in this direction.") /mob/proc/can_ztravel() return 0 From a118aad7b394f3c486646809fac0b37c49108de3 Mon Sep 17 00:00:00 2001 From: Leshana Date: Mon, 17 Apr 2017 00:25:46 -0400 Subject: [PATCH 03/14] Fix lung rupture while drowning in water. * When water returned null from return_air_for_internal_lifeform() the life code treats that as vacuum. Instead we must return a mixture containing at least some gas. * It will attempt to use the exhale type for the species, or fall back to carbon_dioxide if it can't find that info. --- code/game/turfs/simulated/water.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index 77eb419ed1..f25a152869 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -35,7 +35,16 @@ water_breath.temperature = above_air.temperature return water_breath else - return null // Lying down means they're submerged, which means no air. + var/gasid = "carbon_dioxide" + if(ishuman(L)) + var/mob/living/carbon/human/H = L + if(H.species && H.species.exhale_type) + gasid = H.species.exhale_type + var/datum/gas_mixture/water_breath = new() + var/datum/gas_mixture/above_air = return_air() + water_breath.adjust_gas(gasid, BREATH_MOLES) // They have no oxygen, but non-zero moles and temp + water_breath.temperature = above_air.temperature + return water_breath return return_air() // Otherwise their head is above the water, so get the air from the atmosphere instead. /turf/simulated/floor/water/Entered(atom/movable/AM, atom/oldloc) From 1c000715ddf3c8fb183b2e2d76ff51a32b89bd25 Mon Sep 17 00:00:00 2001 From: Yoshax Date: Mon, 17 Apr 2017 15:29:08 +0100 Subject: [PATCH 04/14] No longer shall ye burn from water --- code/game/turfs/simulated/water.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index 77eb419ed1..ec784cb63d 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -44,7 +44,7 @@ L.update_water() if(!istype(oldloc, /turf/simulated/floor/water)) to_chat(L, "You get drenched in water from entering \the [src]!") - AM.water_act(5) + AM.water_act(-5) ..() /turf/simulated/floor/water/Exited(atom/movable/AM, atom/newloc) From 95b9dde94a902b1c1c903956ff06a4ac8ee09831 Mon Sep 17 00:00:00 2001 From: Leshana Date: Sun, 16 Apr 2017 21:47:34 -0400 Subject: [PATCH 05/14] Multi-Z code formatting and utilities. * Global procs should start with /proc * Use to_chat() macro * Added utility to find all z-levels are connected (transitively adjacent) and utility to test if two levels are connected. --- code/_macros.dm | 2 ++ code/modules/multiz/basic.dm | 18 ++++++++++++++---- code/modules/multiz/pipes.dm | 3 +++ code/modules/multiz/structures.dm | 4 ---- code/modules/multiz/turf.dm | 4 ++-- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/code/_macros.dm b/code/_macros.dm index 1038b6a2e4..463a7da26d 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -42,6 +42,8 @@ #define isxeno(A) istype(A, /mob/living/simple_animal/xeno) +#define isopenspace(A) istype(A, /turf/simulated/open) + #define isweakref(A) istype(A, /weakref) #define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") diff --git a/code/modules/multiz/basic.dm b/code/modules/multiz/basic.dm index e76c6516aa..24d24b1049 100644 --- a/code/modules/multiz/basic.dm +++ b/code/modules/multiz/basic.dm @@ -11,25 +11,35 @@ var/z_levels = 0 // Each bit represents a connection between adjacent levels. S qdel(src) // The storage of connections between adjacent levels means some bitwise magic is needed. -proc/HasAbove(var/z) +/proc/HasAbove(var/z) if(z >= world.maxz || z > 16 || z < 1) return 0 return z_levels & (1 << (z - 1)) -proc/HasBelow(var/z) +/proc/HasBelow(var/z) if(z > world.maxz || z > 17 || z < 2) return 0 return z_levels & (1 << (z - 2)) // Thankfully, no bitwise magic is needed here. -proc/GetAbove(var/atom/atom) +/proc/GetAbove(var/atom/atom) var/turf/turf = get_turf(atom) if(!turf) return null return HasAbove(turf.z) ? get_step(turf, UP) : null -proc/GetBelow(var/atom/atom) +/proc/GetBelow(var/atom/atom) var/turf/turf = get_turf(atom) if(!turf) return null return HasBelow(turf.z) ? get_step(turf, DOWN) : null + +/proc/GetConnectedZlevels(z) + . = list(z) + for(var/level = z, HasBelow(level), level--) + . |= level-1 + for(var/level = z, HasAbove(level), level++) + . |= level+1 + +proc/AreConnectedZLevels(var/zA, var/zB) + return zA == zB || (zB in GetConnectedZlevels(zA)) diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm index 1cb5b9b4da..6b6b24c470 100644 --- a/code/modules/multiz/pipes.dm +++ b/code/modules/multiz/pipes.dm @@ -13,6 +13,9 @@ obj/machinery/atmospherics/pipe/zpipe dir = SOUTH initialize_directions = SOUTH + // node1 is the connection on the same Z + // node2 is the connection on the other Z + var/minimum_temperature_difference = 300 var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 5727808276..18bb91a9e4 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -122,10 +122,6 @@ allowed_directions = UP|DOWN icon_state = "ladder11" - - - - /obj/structure/stairs name = "Stairs" desc = "Stairs leading to another deck. Not too useful if the gravity goes out." diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index 8389df7112..caa859f369 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -82,7 +82,7 @@ return var/obj/item/stack/rods/R = C if (R.use(1)) - user << "Constructing support lattice ..." + to_chat(user, "Constructing support lattice ...") playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) ReplaceWithLattice() return @@ -99,7 +99,7 @@ ChangeTurf(/turf/simulated/floor/airless) return else - user << "The plating is going to need some support." + to_chat(user, "The plating is going to need some support.") //To lay cable. if(istype(C, /obj/item/stack/cable_coil)) From cec43bf3d22014bc4abc238c3cca757afeaefc18 Mon Sep 17 00:00:00 2001 From: MagmaRam Date: Mon, 17 Apr 2017 11:19:39 -0500 Subject: [PATCH 06/14] Updates in-game EVA manual --- code/game/objects/items/weapons/manuals.dm | 74 ++++++++++++++++------ html/changelogs/MagmaRam - evabook.yml | 36 +++++++++++ 2 files changed, 92 insertions(+), 18 deletions(-) create mode 100644 html/changelogs/MagmaRam - evabook.yml diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index c89f41056f..6ea812ad3a 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -1113,10 +1113,10 @@ "} /obj/item/weapon/book/manual/evaguide - name = "EVA Gear and You: Not Spending All Day Inside" + name = "EVA Gear and You: Not Spending All Day Inside, 2nd Edition" icon_state = "evabook" author = "Maria Crash, Senior Atmospherics Technician" - title = "EVA Gear and You: Not Spending All Day Inside" + title = "EVA Gear and You: Not Spending All Day Inside, 2nd Edition" dat = {"