From 5e2f4948d039c583d9958161cea1e919143836d4 Mon Sep 17 00:00:00 2001 From: Albert Iordache Date: Sun, 12 Aug 2012 12:17:35 +0300 Subject: [PATCH] Revert pull request #1605 and #1606 due to temperature bugs killing the crew --- baystation12.dme | 3 +- code/TriDimension/Movement.dm | 49 ---- code/TriDimension/Structures.dm | 205 ------------- code/TriDimension/Turfs.dm | 96 ------ code/WorkInProgress/Cael_Aislinn/MultiZ.dm | 277 ++++++++++++++++++ .../Cael_Aislinn}/multiz.dmi | Bin .../Cael_Aislinn}/multiz_pipe.dmi | Bin code/ZAS/Functions.dm | 2 +- .../Pipes.dm => ZAS/Processing.dm} | 0 code/ZAS/Variable Settings.dm | 104 ++++++- code/ZAS/ZAS_Turfs.dm | 61 +++- code/ZAS/ZAS_Zones.dm | 1 - code/setup.dm | 14 +- code/setup_3d.dm | 20 -- 14 files changed, 436 insertions(+), 396 deletions(-) delete mode 100644 code/TriDimension/Movement.dm delete mode 100644 code/TriDimension/Structures.dm delete mode 100644 code/TriDimension/Turfs.dm create mode 100644 code/WorkInProgress/Cael_Aislinn/MultiZ.dm rename code/{TriDimension => WorkInProgress/Cael_Aislinn}/multiz.dmi (100%) rename code/{TriDimension => WorkInProgress/Cael_Aislinn}/multiz_pipe.dmi (100%) rename code/{TriDimension/Pipes.dm => ZAS/Processing.dm} (100%) delete mode 100644 code/setup_3d.dm diff --git a/baystation12.dme b/baystation12.dme index d0fb5184064..e0c1ba32979 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -154,7 +154,6 @@ #define FILE_DIR "code/modules/scripting/Parser" #define FILE_DIR "code/modules/scripting/Scanner" #define FILE_DIR "code/modules/security levels" -#define FILE_DIR "code/TriDimension" #define FILE_DIR "code/unused" #define FILE_DIR "code/unused/beast" #define FILE_DIR "code/unused/computer2" @@ -232,7 +231,6 @@ #include "code\access_defines.dm" #include "code\names.dm" #include "code\setup.dm" -#include "code\setup_3d.dm" #include "code\stylesheet.dm" #include "code\ATMOSPHERICS\atmospherics.dm" #include "code\ATMOSPHERICS\datum_pipe_network.dm" @@ -1275,6 +1273,7 @@ #include "code\ZAS\Fire.dm" #include "code\ZAS\Functions.dm" #include "code\ZAS\Plasma.dm" +#include "code\ZAS\Processing.dm" #include "code\ZAS\Variable Settings.dm" #include "code\ZAS\ZAS_Turfs.dm" #include "code\ZAS\ZAS_Zones.dm" diff --git a/code/TriDimension/Movement.dm b/code/TriDimension/Movement.dm deleted file mode 100644 index dfb529df5b1..00000000000 --- a/code/TriDimension/Movement.dm +++ /dev/null @@ -1,49 +0,0 @@ -var/maxZ = 6 -var/minZ = 2 - -// Maybe it's best to have this hardcoded for whatever we'd add to the map, in order to avoid exploits -// (such as mining base => admin station) -// Note that this assumes the ship's top is at z=1 and bottom at z=4 -/obj/item/weapon/tank/jetpack/proc/move_z(cardinal, mob/user as mob) - if (user.z > 1) - user << "\red There is nothing of interest in that direction." - return - if(allow_thrust(0.01, user)) - switch(cardinal) - if (UP) // Going up! - if(user.z > maxZ) // If we aren't at the very top of the ship - var/turf/T = locate(user.x, user.y, user.z - 1) - // You can only jetpack up if there's space above, and you're sitting on either hull (on the exterior), or space - //if(T && istype(T, /turf/space) && (istype(user.loc, /turf/space) || istype(user.loc, /turf/space/*/hull*/))) - //check through turf contents to make sure there's nothing blocking the way - if(T && istype(T, /turf/space)) - var/blocked = 0 - for(var/atom/A in T.contents) - if(T.density) - blocked = 1 - user << "\red You bump into [T.name]." - break - if(!blocked) - user.Move(T) - else - user << "\red You bump into the ship's plating." - else - user << "\red The ship's gravity well keeps you in orbit!" // Assuming the ship starts on z level 1, you don't want to go past it - - if (DOWN) // Going down! - if (user.z < 1) // If we aren't at the very bottom of the ship, or out in space - var/turf/T = locate(user.x, user.y, user.z + 1) - // You can only jetpack down if you're sitting on space and there's space down below, or hull - if(T && (istype(T, /turf/space) || istype(T, /turf/space/*/hull*/)) && istype(user.loc, /turf/space)) - var/blocked = 0 - for(var/atom/A in T.contents) - if(T.density) - blocked = 1 - user << "\red You bump into [T.name]." - break - if(!blocked) - user.Move(T) - else - user << "\red You bump into the ship's plating." - else - user << "\red The ship's gravity well keeps you in orbit!" \ No newline at end of file diff --git a/code/TriDimension/Structures.dm b/code/TriDimension/Structures.dm deleted file mode 100644 index 0509f1b36f5..00000000000 --- a/code/TriDimension/Structures.dm +++ /dev/null @@ -1,205 +0,0 @@ -/////////////////////////////////////// -//Contents: Ladders, Hatches, Stairs.// -/////////////////////////////////////// - -/obj/multiz - icon = 'multiz.dmi' - density = 0 - opacity = 0 - anchored = 1 - var/obj/multiz/target - - CanPass(obj/mover, turf/source, height, airflow) - return airflow || !density - -/obj/multiz/ladder - icon_state = "ladderdown" - name = "ladder" - desc = "A Ladder. You climb up and down it." - - var/top_icon_state = "ladderdown" - var/bottom_icon_state = "ladderup" - - New() - . = ..() - spawn(1) //Allow map to load - if(z in levels_3d) - if(!target) - var/list/adjacent_to_me = global_adjacent_z_levels["[z]"] - if("up" in adjacent_to_me) - target = locate() in locate(x,y,adjacent_to_me["up"]) - if(istype(target)) - icon_state = bottom_icon_state - else if("down" in adjacent_to_me) - target = locate() in locate(x,y,adjacent_to_me["down"]) - if(istype(target)) - icon_state = top_icon_state - else - del src - else - del src - else if("down" in adjacent_to_me) - target = locate() in locate(x,y,adjacent_to_me["down"]) - if(istype(target)) - icon_state = bottom_icon_state - else - del src - else - del src - if(target) - target.icon_state = ( icon_state == top_icon_state ? bottom_icon_state : top_icon_state) - target.target = src - else - del src - - Del() - spawn(1) - if(target) - del target - return ..() - - attack_paw(var/mob/M) - return attack_hand(M) - - attackby(var/W, var/mob/M) - return attack_hand(M) - - attack_hand(var/mob/M) - if(!target || !istype(target.loc, /turf)) - del src - var/list/adjacent_to_me = global_adjacent_z_levels["[z]"] - M.visible_message("\blue \The [M] climbs [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You climb [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You hear some grunting, and clanging of a metal ladder being used.") - M.Move(target.loc) - - - hatch - icon_state = "hatchdown" - name = "hatch" - desc = "A hatch. You climb down it, and it will automatically seal against pressure loss behind you." - top_icon_state = "hatchdown" - var/top_icon_state_open = "hatchdown-open" - var/top_icon_state_close = "hatchdown-close" - - bottom_icon_state = "ladderup" - - var/image/green_overlay - var/image/red_overlay - - var/active = 0 - - New() - . = ..() - red_overlay = image(icon, "red-ladderlight") - green_overlay = image(icon, "green-ladderlight") - - attack_hand(var/mob/M) - - if(!target || !istype(target.loc, /turf)) - del src - - if(active) - M << "That [src] is being used." - return // It is a tiny airlock, only one at a time. - - active = 1 - var/obj/multiz/ladder/hatch/top_hatch = target - var/obj/multiz/ladder/hatch/bottom_hatch = src - if(icon_state == top_icon_state) - top_hatch = src - bottom_hatch = target - - flick(top_icon_state_open, top_hatch) - bottom_hatch.overlays += green_overlay - - spawn(7) - if(!target || !istype(target.loc, /turf)) - del src - if(M.z == z && get_dist(src,M) <= 1) - var/list/adjacent_to_me = global_adjacent_z_levels["[z]"] - M.visible_message("\blue \The [M] scurries [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You scramble [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You hear some grunting, and a hatch sealing.") - M.Move(target.loc) - flick(top_icon_state_close,top_hatch) - bottom_hatch.overlays -= green_overlay - bottom_hatch.overlays += red_overlay - - spawn(7) - top_hatch.icon_state = top_icon_state - bottom_hatch.overlays -= red_overlay - active = 0 - -/obj/multiz/stairs - name = "Stairs" - desc = "Stairs. You walk up and down them." - icon_state = "ramptop" - var/top_icon_state = "ramptop" - var/bottom_icon_state = "rampbottom" - - active - density = 1 - - - New() - . = ..() - spawn(1) - if(z in levels_3d) - if(!target) - var/list/adjacent_to_me = global_adjacent_z_levels["[z]"] - if("up" in adjacent_to_me) - target = locate() in locate(x,y,adjacent_to_me["up"]) - if(istype(target)) - icon_state = bottom_icon_state - else if("down" in adjacent_to_me) - target = locate() in locate(x,y,adjacent_to_me["down"]) - if(istype(target)) - icon_state = top_icon_state - else - del src - else - del src - else if("down" in adjacent_to_me) - target = locate() in locate(x,y,adjacent_to_me["down"]) - if(istype(target)) - icon_state = bottom_icon_state - else - del src - else - del src - if(target) - target.icon_state = ( icon_state == top_icon_state ? bottom_icon_state : top_icon_state) - target.target = src - var/obj/multiz/stairs/lead_in = locate() in get_step(src, reverse_direction(dir)) - if(lead_in) - lead_in.icon_state = ( icon_state == top_icon_state ? bottom_icon_state : top_icon_state) - else - del src - - - Del() - spawn(1) - if(target) - del target - return ..() - - - Bumped(var/atom/movable/M) - if(target.z > z && istype(src, /obj/multiz/stairs/active) && !locate(/obj/multiz/stairs) in M.loc) - return //If on bottom, only let them go up stairs if they've moved to the entry tile first. - //If it's the top, they can fall down just fine. - - if(!target || !istype(target.loc, /turf)) - del src - - if(ismob(M) && M:client) - M:client.moving = 1 - M.Move(target.loc) - if (ismob(M) && M:client) - M:client.moving = 0 - - Click() - if(!istype(usr,/mob/dead/observer)) - return ..() - if(!target || !istype(target.loc, /turf)) - del src - usr.client.moving = 1 - usr.Move(target.loc) - usr.client.moving = 0 \ No newline at end of file diff --git a/code/TriDimension/Turfs.dm b/code/TriDimension/Turfs.dm deleted file mode 100644 index 1e49e4dc80e..00000000000 --- a/code/TriDimension/Turfs.dm +++ /dev/null @@ -1,96 +0,0 @@ -atom/movable/var/list/adjacent_z_levels -atom/movable/var/archived_z_level - -atom/movable/Move() //Hackish - - if(adjacent_z_levels && adjacent_z_levels["up"]) - var/turf/above_me = locate(x,y,adjacent_z_levels["up"]) - if(istype(above_me, /turf/simulated/floor/open)) - above_me:RemoveImage(src) - - . = ..() - - if(archived_z_level != z) - archived_z_level = z - if(z in levels_3d) - adjacent_z_levels = global_adjacent_z_levels["[z]"] - else - adjacent_z_levels = null - - if(adjacent_z_levels && adjacent_z_levels["up"]) - var/turf/above_me = locate(x,y,adjacent_z_levels["up"]) - if(istype(above_me, /turf/simulated/floor/open)) - above_me:AddImage(src) - -/turf/simulated/floor/open - name = "open space" - intact = 0 - density = 0 - icon_state = "black" - pathweight = 100000 //Seriously, don't try and path over this one numbnuts - var/icon/darkoverlays = null - var/turf/floorbelow - var/list/overlay_references - mouse_opacity = 2 - - New() - ..() - spawn(1) - if(!(z in levels_3d)) - ReplaceWithSpace() - var/list/adjacent_to_me = global_adjacent_z_levels["[z]"] - if(!("down" in adjacent_to_me)) - ReplaceWithSpace() - - floorbelow = locate(x, y, adjacent_to_me["down"]) - if(floorbelow) - if(!istype(floorbelow,/turf)) - del src - else if(floorbelow.density) - ReplaceWithPlating() - else - set_up() - else - ReplaceWithSpace() - - - Enter(var/atom/movable/AM) - if (..()) //TODO make this check if gravity is active (future use) - Sukasa - spawn(1) - if(AM) - AM.Move(floorbelow) - if (istype(AM, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = AM - var/damage = rand(5,15) - H.apply_damage(2*damage, BRUTE, "head") - H.apply_damage(2*damage, BRUTE, "chest") - H.apply_damage(0.5*damage, BRUTE, "l_leg") - H.apply_damage(0.5*damage, BRUTE, "r_leg") - H.apply_damage(0.5*damage, BRUTE, "l_arm") - H.apply_damage(0.5*damage, BRUTE, "r_arm") - H:weakened = max(H:weakened,2) - H:updatehealth() - return ..() - - attackby() - return //nothing - - proc/set_up() //Update the overlays to make the openspace turf show what's down a level - if(!overlay_references) - overlay_references = list() - if(!floorbelow) return - overlays += floorbelow - for(var/obj/o in floorbelow) - var/image/o_img = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer) - overlays += o_img - overlay_references[o] = o_img - - proc/AddImage(var/atom/movable/o) - var/o_img = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer) - overlays += o_img - overlay_references[o] = o_img - - proc/RemoveImage(var/atom/movable/o) - var/o_img = overlay_references[o] - overlays -= o_img - overlay_references -= o \ No newline at end of file diff --git a/code/WorkInProgress/Cael_Aislinn/MultiZ.dm b/code/WorkInProgress/Cael_Aislinn/MultiZ.dm new file mode 100644 index 00000000000..855e26e14ab --- /dev/null +++ b/code/WorkInProgress/Cael_Aislinn/MultiZ.dm @@ -0,0 +1,277 @@ +/obj/multiz + icon = 'multiz.dmi' + density = 0 + opacity = 0 + anchored = 1 + var/istop = 1 + + CanPass(obj/mover, turf/source, height, airflow) + return airflow || !density + +/obj/multiz/proc/targetZ() + return src.z + (istop ? 1 : -1) + +/obj/multiz/ladder + icon_state = "ladderdown" + name = "ladder" + desc = "A Ladder. You climb up and down it." + +/obj/multiz/ladder/New() + ..() + if (!istop) + icon_state = "ladderup" + else + icon_state = "ladderdown" + +/obj/multiz/ladder/attack_paw(var/mob/M) + return attack_hand(M) + +/obj/multiz/ladder/attackby(var/W, var/mob/M) + return attack_hand(M) + +/obj/multiz/ladder/attack_hand(var/mob/M) + M.Move(locate(src.x, src.y, targetZ())) + + +/obj/multiz/ladder/hatch + icon_state = "hatchdown" + name = "hatch" + desc = "A Hatch. You climb down it, and it will automatically seal against pressure loss behind you." + +/obj/multiz/ladder/hatch/New() + ..() + if(istop == 1) + icon_state = "hatchdown" + +/obj/multiz/ladder/hatch/hatchbottom + icon_state = "hatchdown" + +/obj/multiz/ladder/hatch/hatchbottom/New() + istop = 0 + ..() + +/obj/multiz/ladder/hatch/attack_hand(var/mob/M) + var/obj/multiz/ladder/hatch/Htop + var/obj/multiz/ladder/hatch/Hbottom + if(!istop && src.z > 1) + Htop = locate(/obj/multiz/ladder/hatch, locate(src.x, src.y, src.z-1)) + Hbottom = src + else + Hbottom = locate(/obj/multiz/ladder/hatch, locate(src.x, src.y, src.z + 1)) + Htop = src + + if(!Htop) + //world << "Htop == null" + return + if(!Hbottom) + //world << "Hbottom == null" + return + + if(Htop.icon_state == "hatchdown") + flick("hatchdown-open",Htop) + Hbottom.overlays += "green-ladderlight" + spawn(7) + if(M.z == src.z && get_dist(src,M) <= 1) + M.Move(locate(src.x, src.y, targetZ())) + flick("hatchdown-close",Htop) + Hbottom.overlays -= "green-ladderlight" + Hbottom.overlays += "red-ladderlight" + spawn(7) + Htop.icon_state = "hatchdown" + Hbottom.overlays -= "red-ladderlight" + +/* +/obj/multiz/ladder/blob_act() + var/newblob = 1 + for(var/obj/blob in locate(src.x, src.y, targetZ())) + newblob = 0 + if(newblob) + new /obj/blob(locate(src.x, src.y, targetZ())) +*/ +//Stairs. var/dir on all four component objects should be the dir you'd walk from top to bottom +//active = bump to move down +//active/bottom = bump to move up +//enter = decorative downwards stairs +//enter/bottom = decorative upward stairs +/obj/multiz/stairs + name = "Stairs" + desc = "Stairs. You walk up and down them." + icon_state = "ramptop" + +/obj/multiz/stairs/New() + icon_state = istop ^ istype(src, /obj/multiz/stairs/active) ? "ramptop" : "rampbottom" + +/obj/multiz/stairs/enter/bottom + istop = 0 + +/obj/multiz/stairs/active + density = 1 + +/obj/multiz/stairs/active/Bumped(var/atom/movable/M) + if(istype(src, /obj/multiz/stairs/active/bottom) && !locate(/obj/multiz/stairs/enter) in M.loc) + return //If on bottom, only let them go up stairs if they've moved to the entry tile first. + //If it's the top, they can fall down just fine. + if(ismob(M) && M:client) + M:client.moving = 1 + M.Move(locate(src.x, src.y, targetZ())) + if (ismob(M) && M:client) + M:client.moving = 0 + +/obj/multiz/stairs/active/Click() + if(!istype(usr,/mob/dead/observer)) + return ..() + usr.client.moving = 1 + usr.Move(locate(src.x, src.y, targetZ())) + usr.client.moving = 0 +/obj/multiz/stairs/active/bottom + istop = 0 + opacity = 1 + +/turf/simulated/floor/open + name = "open space" + intact = 0 + icon_state = "black" + pathweight = 100000 //Seriously, don't try and path over this one numbnuts + var/icon/darkoverlays = null + var/turf/floorbelow + //floorstrength = 1 + mouse_opacity = 2 + + New() + ..() + spawn(1) + if(!istype(src, /turf/simulated/floor/open)) //This should not be needed but is. + return + floorbelow = locate(x, y, z + 1) + if(floorbelow) + //Fortunately, I've done this before. - Aryn + if(istype(floorbelow,/turf/space) || floorbelow.z > 4) + new/turf/space(src) + else if(!istype(floorbelow,/turf/simulated/floor)) + new/turf/simulated/floor/plating(src) + else + //if(ticker) + //find_zone() + update() + else + new/turf/space(src) + + Del() + . = ..() + + Enter(var/atom/movable/AM) + if (..()) //TODO make this check if gravity is active (future use) - Sukasa + spawn(1) + if(AM) + AM.Move(locate(x, y, z + 1)) + if (istype(AM, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = AM + var/damage = rand(5,15) + H.apply_damage(2*damage, BRUTE, "head") + H.apply_damage(2*damage, BRUTE, "chest") + H.apply_damage(0.5*damage, BRUTE, "l_leg") + H.apply_damage(0.5*damage, BRUTE, "r_leg") + H.apply_damage(0.5*damage, BRUTE, "l_arm") + H.apply_damage(0.5*damage, BRUTE, "r_arm") + +/* +/obj/effect/decal/cleanable/blood + name = "Blood" + desc = "It's red and disgusting." + density = 0 + anchored = 1 + layer = 2 + icon = 'blood.dmi' + icon_state = "floor1" + random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") + var/list/viruses = list() + blood_DNA = list() + var/datum/disease2/disease/virus2 = null + var/OriginalMob = null + + Del() + for(var/datum/disease/D in viruses) + D.cure(0) + ..() +*/ + + // var/obj/effect/decal/cleanable/blood/B = new(src.loc) + // var/list/blood_DNA_temp[1] + // blood_DNA_temp[1] = list(H.dna.unique_enzymes, H.dna.b_type) + // B.blood_DNA = blood_DNA_temp + // B.virus2 = H.virus2 + // for(var/datum/disease/D in H.viruses) + // var/datum/disease/newDisease = new D.type + // B.viruses += newDisease + // newDisease.holder = B + + H:weakened = max(H:weakened,2) + H:updatehealth() + return ..() + + attackby() + //nothing + + proc/update() //Update the overlayss to make the openspace turf show what's down a level + if(!floorbelow) return + /*src.clearoverlays() + src.addoverlay(floorbelow) + for(var/obj/o in floorbelow.contents) + src.addoverlay(image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer)) + var/image/I = image('ULIcons.dmi', "[min(max(floorbelow.LightLevelRed - 4, 0), 7)]-[min(max(floorbelow.LightLevelGreen - 4, 0), 7)]-[min(max(floorbelow.LightLevelBlue - 4, 0), 7)]") + I.layer = TURF_LAYER + 0.2 + src.addoverlay(I) + I = image('ULIcons.dmi', "1-1-1") + I.layer = TURF_LAYER + 0.2 + src.addoverlay(I)*/ + +var/maxZ = 6 +var/minZ = 2 + +// Maybe it's best to have this hardcoded for whatever we'd add to the map, in order to avoid exploits +// (such as mining base => admin station) +// Note that this assumes the ship's top is at z=1 and bottom at z=4 +/obj/item/weapon/tank/jetpack/proc/move_z(cardinal, mob/user as mob) + if (user.z > 1) + user << "\red There is nothing of interest in that direction." + return + if(allow_thrust(0.01, user)) + switch(cardinal) + if (UP) // Going up! + if(user.z > maxZ) // If we aren't at the very top of the ship + var/turf/T = locate(user.x, user.y, user.z - 1) + // You can only jetpack up if there's space above, and you're sitting on either hull (on the exterior), or space + //if(T && istype(T, /turf/space) && (istype(user.loc, /turf/space) || istype(user.loc, /turf/space/*/hull*/))) + //check through turf contents to make sure there's nothing blocking the way + if(T && istype(T, /turf/space)) + var/blocked = 0 + for(var/atom/A in T.contents) + if(T.density) + blocked = 1 + user << "\red You bump into [T.name]." + break + if(!blocked) + user.Move(T) + else + user << "\red You bump into the ship's plating." + else + user << "\red The ship's gravity well keeps you in orbit!" // Assuming the ship starts on z level 1, you don't want to go past it + + if (DOWN) // Going down! + if (user.z < 1) // If we aren't at the very bottom of the ship, or out in space + var/turf/T = locate(user.x, user.y, user.z + 1) + // You can only jetpack down if you're sitting on space and there's space down below, or hull + if(T && (istype(T, /turf/space) || istype(T, /turf/space/*/hull*/)) && istype(user.loc, /turf/space)) + var/blocked = 0 + for(var/atom/A in T.contents) + if(T.density) + blocked = 1 + user << "\red You bump into [T.name]." + break + if(!blocked) + user.Move(T) + else + user << "\red You bump into the ship's plating." + else + user << "\red The ship's gravity well keeps you in orbit!" + diff --git a/code/TriDimension/multiz.dmi b/code/WorkInProgress/Cael_Aislinn/multiz.dmi similarity index 100% rename from code/TriDimension/multiz.dmi rename to code/WorkInProgress/Cael_Aislinn/multiz.dmi diff --git a/code/TriDimension/multiz_pipe.dmi b/code/WorkInProgress/Cael_Aislinn/multiz_pipe.dmi similarity index 100% rename from code/TriDimension/multiz_pipe.dmi rename to code/WorkInProgress/Cael_Aislinn/multiz_pipe.dmi diff --git a/code/ZAS/Functions.dm b/code/ZAS/Functions.dm index 81c9de64e0a..6d40eec83ed 100644 --- a/code/ZAS/Functions.dm +++ b/code/ZAS/Functions.dm @@ -18,7 +18,7 @@ proc/FloodFill(turf/start) for(var/d in cardinal) var/turf/O = get_step(T,d) //Simple pass check. - if(istype(O) && !(O in open) && !(O in doors) && !(O in closed) && O.ZCanPass(T)) + if(istype(O) && !(O in open || O in closed || O in doors) && O.ZCanPass(T)) open += O else doors |= T diff --git a/code/TriDimension/Pipes.dm b/code/ZAS/Processing.dm similarity index 100% rename from code/TriDimension/Pipes.dm rename to code/ZAS/Processing.dm diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm index 9b02ec553e6..deb24080642 100644 --- a/code/ZAS/Variable Settings.dm +++ b/code/ZAS/Variable Settings.dm @@ -1,6 +1,9 @@ var/global/vs_control/vsc = new vs_control/var +// zone_share_percent = 12 +// zone_share_percent_NAME = "Zone Share Percent" +// zone_share_percent_DESC = "Percentage of air difference to move per tick" IgnitionLevel = 0.5 IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn." airflow_lightest_pressure = 30 @@ -46,7 +49,10 @@ vs_control list/settings = list() list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024") pl_control/plc = new() - + /*RPREV_REQUIRE_HEADS_ALIVE = 0 + RPREV_REQUIRE_HEADS_ALIVE_DESC = "Require the heads to be captured alive in RP Rev, rather than either dead or captured." + RPREV_REQUIRE_REVS_ALIVE = 0 + RPREV_REQUIRE_REVS_ALIVE_DESC = "Require the rev leaders to be captured alive in RP Rev, rather than either dead or captured."*/ New() . = ..() settings = vars.Copy() @@ -136,6 +142,7 @@ vs_control if(how == "Toggle") newvar = (newvar?"ON":"OFF") world << "\blue [key_name(user)] changed the setting [display_description] to [newvar]." + //user << "[which] has been changed to [newvar]." if(ch in plc.settings) ChangeSettingsDialog(user,plc.settings) else @@ -155,6 +162,7 @@ vs_control proc/ChangePlasma() for(var/V in plc.settings) plc.Randomize(V) + ////world << "Plasma randomized." proc/SetDefault(var/mob/user) var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\ @@ -165,35 +173,100 @@ vs_control switch(def) if("Plasma - Standard") plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. - plc.PLASMAGUARD_ONLY = 0 - plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. - plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited. - plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. - plc.PLASMA_HALLUCINATION = 0 - plc.CONTAMINATION_LOSS = 0 + plc.PLASMAGUARD_ONLY = 0 + + //plc.CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters, + + plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. + + plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited. + + //plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time. + + plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. + + plc.PLASMA_HALLUCINATION = 0 + + //plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high. + + //plc.PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay! + + //plc.PLASMA_DMG_OFFSET = 1 + //plc.PLASMA_DMG_QUOTIENT = 10 + + plc.CONTAMINATION_LOSS = 0 if("Plasma - Low Hazard") plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. + plc.PLASMAGUARD_ONLY = 0 - plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000 + + // plc.CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters, + + plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. + plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. + + // plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time. + plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection. + + // plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high. + + // plc.PLASMA_COLOR = "onturf" //RBPYB + + //if(prob(20)) + // plc.PLASMA_COLOR = pick("red","yellow","blue","purple") + + //plc.PLASMA_DMG_OFFSET = 1.5 + //plc.PLASMA_DMG_QUOTIENT = 8 + plc.CONTAMINATION_LOSS = 0 if("Plasma - High Hazard") plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. + plc.PLASMAGUARD_ONLY = 0 + + // plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters, + plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000. + plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. + + // plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time. + plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. + // plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high. + + // plc.PLASMA_COLOR = "onturf"//pick("red","yellow","blue","purple") //RBPYB + + //plc.PLASMA_DMG_OFFSET = 3 + //plc.PLASMA_DMG_QUOTIENT = 5 + if("Plasma - Oh Shit!") plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. + plc.PLASMAGUARD_ONLY = 1 + + // plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters, + plc.GENETIC_CORRUPTION = 5 //Chance of genetic corruption as well as toxic damage, X in 1000. + plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited. + + // plc.PLASMA_INJECTS_TOXINS = 1 //Plasma damage injects the toxins chemical to do damage over time. + plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. + // plc.N2O_REACTION = 1 //Plasma can react with N2O, making sparks and starting a fire if levels are high. + + // plc.PLASMA_COLOR = "onturf" //RBPYB + + //plc.PLASMA_DMG_OFFSET = 3 + //plc.PLASMA_DMG_QUOTIENT = 5 + if("ZAS - Normal") IgnitionLevel = 0.5 airflow_lightest_pressure = 30 @@ -273,27 +346,40 @@ pl_control settings -= "settings" proc/Randomize(V) + //world << "Randomizing [V]" var/newvalue if("[V]_RANDOM" in vars) if(isnum(vars["[V]_RANDOM"])) newvalue = prob(vars["[V]_RANDOM"]) + if(newvalue) + //world << "Probability [vars["[V]_RANDOM"]]%: Success." + else + //world << "Probability [vars["[V]_RANDOM"]]%: Failure." else if(istext(vars["[V]_RANDOM"])) var/txt = vars["[V]_RANDOM"] if(findtextEx(txt,"PROB")) + //world << "Probability/Roll Combo \..." txt = dd_text2list(txt,"/") txt[1] = dd_replacetext(txt[1],"PROB","") var/p = text2num(txt[1]) var/r = txt[2] + //world << "Prob:[p]% Roll:[r]" if(prob(p)) newvalue = roll(r) + //world << "Success. New value: [newvalue]" else newvalue = vars[V] + //world << "Probability check failed." else if(findtextEx(txt,"PICK")) txt = dd_replacetext(txt,"PICK","") + //world << "Pick: [txt]" txt = dd_text2list(txt,",") newvalue = pick(txt) + //world << "Picked: [newvalue]" else newvalue = roll(txt) + //world << "Roll: [txt] - [newvalue]" else newvalue = vars[V] - vars[V] = newvalue \ No newline at end of file + vars[V] = newvalue + ////world << "Plasma color updated." \ No newline at end of file diff --git a/code/ZAS/ZAS_Turfs.dm b/code/ZAS/ZAS_Turfs.dm index 92754fe92e2..c2c7fd5f067 100644 --- a/code/ZAS/ZAS_Turfs.dm +++ b/code/ZAS/ZAS_Turfs.dm @@ -45,24 +45,46 @@ turf datum/gas_mixture/air processing = 1 +// group_border = 0 +// length_space_border = 0 air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update +// archived_cycle = 0 +// current_cycle = 0 + obj/fire/active_hotspot +// temperature_archived //USED ONLY FOR SOLIDS +// being_superconductive = 0 - proc/update_visuals() - overlays = null - var/siding_icon_state = return_siding_icon_state() - if(siding_icon_state) - overlays += image('floors.dmi',siding_icon_state) - var/datum/gas_mixture/model = return_air() - switch(model.graphic) - if(1) - overlays.Add(plmaster) //TODO: Make invisible plasma an option - if(2) - overlays.Add(slmaster) + proc + process_cell() + update_air_properties() + archive() + + mimic_air_with_tile(turf/model) + share_air_with_tile(turf/simulated/sharer) + + mimic_temperature_with_tile(turf/model) + share_temperature_with_tile(turf/simulated/sharer) + + + super_conduct() + + update_visuals() + overlays = null + + var/siding_icon_state = return_siding_icon_state() + if(siding_icon_state) + overlays += image('floors.dmi',siding_icon_state) + var/datum/gas_mixture/model = return_air() + switch(model.graphic) + if(1) + overlays.Add(plmaster) //TODO: Make invisible plasma an option + if(2) + overlays.Add(slmaster) @@ -83,6 +105,8 @@ turf if(air_master) air_master.tiles_to_update.Add(src) +// air.parent = src //TODO DEBUG REMOVE + else if(air_master) for(var/direction in cardinal) @@ -108,6 +132,19 @@ turf else return ..() +// archive() +// if(air) //For open space like floors +// air.archive() + +// temperature_archived = temperature +// archived_cycle = air_master.current_cycle + + share_air_with_tile(turf/simulated/T) + return air.share(T.air) + + mimic_air_with_tile(turf/T) + return air.mimic(T) + return_air() if(zone) return zone.air @@ -133,7 +170,7 @@ turf else return ..() - proc/update_air_properties() + update_air_properties() . = 1 air_check_directions = 0 diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index 2c249a75671..36e5ccec39f 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -359,7 +359,6 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles) if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick. ratio = sharing_lookup_table[unsimulated_tiles.len] - ratio *= 2 A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg ) A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg ) diff --git a/code/setup.dm b/code/setup.dm index f58139c8bab..7a2ee6fde6f 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -474,4 +474,16 @@ var/list/liftable_structures = list(\ #define ORGAN_DESTROYED 64 #define ORGAN_ROBOT 128 #define ORGAN_SPLINTED 256 -#define SALVED 512 \ No newline at end of file +#define SALVED 512 + + /////////////////////////////////////////////// + //Important ZAS Functionality. 3D simulation// +/////////////////////////////////////////////// + +//Uncomment if you want it enabled +//#define ZAS_3D + +#ifdef ZAS_3D +var/list/adjacent_z_levels("1" = list("up" = 2, "down" = 7), "2" = list("down" = 1), "7" = list("up" = 1)) //Example. 2 is above 1 which is above 7. +#endif +//The above is for a future feature. \ No newline at end of file diff --git a/code/setup_3d.dm b/code/setup_3d.dm deleted file mode 100644 index 607e350f153..00000000000 --- a/code/setup_3d.dm +++ /dev/null @@ -1,20 +0,0 @@ - /////////////////////////////////////////////// - //Important ZAS Functionality. 3D simulation// -/////////////////////////////////////////////// - -//Uncomment if you want it enabled -//#define ZAS_3D - -#ifdef ZAS_3D - -var/list/levels_3d = list(1,2) //To expediate calculations, just do "z in levels_3d" - -var/list/global_adjacent_z_levels = list("1" = list("up" = 2), "2" = list("down" = 1)) //Example. 2 is above 1 - -//Commented out ones are incomplete. -//#include "TriDimension\Pipes.dm" //Example -#include "TriDimension\Structures.dm" -#include "TriDimension\Turfs.dm" -//#include "TriDimension\Movement.dm" - -#endif \ No newline at end of file