From 7531bf6c6464bd3d8ff540b42c1c774df6947075 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 8 Jan 2014 17:45:09 -0700 Subject: [PATCH 1/7] Patched holes in SoftDelete that were causing null reference errors. Fixes #3892 --- code/ZAS/ZAS_Zones.dm | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index cd77fbbbf2..df0daa3f0c 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -69,40 +69,48 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs for(var/turf/simulated/T in contents) RemoveTurf(T) air_master.ReconsiderTileZone(T) - for(var/zone/Z in connected_zones) - if(src in Z.connected_zones) - Z.connected_zones.Remove(src) - air_master.AddConnectionToCheck(connections) if(air_master) - air_master.zones.Remove(src) - air_master.active_zones.Remove(src) - air_master.zones_needing_rebuilt.Remove(src) + air_master.AddConnectionToCheck(connections) + air = null + . = ..() //Handles deletion via garbage collection. /zone/proc/SoftDelete() + air = null + if(air_master) air_master.zones.Remove(src) air_master.active_zones.Remove(src) air_master.zones_needing_rebuilt.Remove(src) - air = null + air_master.AddConnectionToCheck(connections) + + connections = null + for(var/connection/C in direct_connections) + if(C.A.zone == src) + C.A.zone = null + if(C.B.zone == src) + C.B.zone = null + direct_connections = null //Ensuring the zone list doesn't get clogged with null values. for(var/turf/simulated/T in contents) RemoveTurf(T) air_master.ReconsiderTileZone(T) + contents.Cut() + //Removing zone connections and scheduling connection cleanup for(var/zone/Z in connected_zones) - if(src in Z.connected_zones) - Z.connected_zones.Remove(src) - connected_zones = null + Z.connected_zones.Remove(src) + Z.closed_connection_zones.Remove(src) + + connected_zones = null + closed_connection_zones = null - air_master.AddConnectionToCheck(connections) - connections = null return 1 From 81d9483e72eef6ae8940f8daeef652b8afd96245 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 8 Jan 2014 17:47:41 -0700 Subject: [PATCH 2/7] Tweaks the zone rebuilding logic to prevent doors being ignored. Fixes #4046 --- code/ZAS/ZAS_Zones.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index df0daa3f0c..d747b2c150 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -723,9 +723,9 @@ zone/proc/Rebuild() current_adjacents = list() for(var/direction in cardinal) - if( !(current.air_check_directions & direction)) - continue var/turf/simulated/adjacent = get_step(current, direction) + if(!current.ZCanPass(adjacent)) + continue if(adjacent in turfs) current_adjacents += adjacent adjacent_id = turfs[adjacent] From d43b2fa492a242f66e01dddcd806cf6c930d5bfc Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 8 Jan 2014 17:50:59 -0700 Subject: [PATCH 3/7] RCDs no longer create plating with air on it. Fixes #3545 --- code/game/objects/items/weapons/RCD.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 4c11fa9d34..f53734dbba 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -93,7 +93,7 @@ RCD if(useResource(1, user)) user << "Building Floor..." activate() - A:ChangeTurf(/turf/simulated/floor/plating) + A:ChangeTurf(/turf/simulated/floor/plating/airless) return 1 return 0 @@ -132,7 +132,7 @@ RCD if(do_after(user, 40)) if(!useResource(5, user)) return 0 activate() - A:ChangeTurf(/turf/simulated/floor/plating) + A:ChangeTurf(/turf/simulated/floor/plating/airless) return 1 return 0 From 2308e71157d9b0e4cc5cc3cb2e82cde39bff2bba Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 8 Jan 2014 20:44:10 -0700 Subject: [PATCH 4/7] Mining fixes as it was annoying as fuck. Also a random object with nothing in it removed. --- baystation12.dme | 2 +- code/controllers/master_controller.dm | 1 + code/game/mecha/equipment/tools/tools.dm | 4 +- code/modules/mining/mine_turfs.dm | 923 +++++++----------- code/modules/mining/minerals.dm | 72 ++ code/modules/mining/ores_coins.dm | 2 +- .../Chemistry-Reagents-Antidepressants.dm | 2 - .../artifact/artifact_gigadrill.dm | 2 +- .../research/xenoarchaeology/geosample.dm | 77 +- .../machinery/geosample_scanner.dm | 4 +- code/modules/research/xenoarchaeology/misc.dm | 49 + .../tools/tools_coresampler.dm | 6 +- .../tools/tools_depthscanner.dm | 11 +- 13 files changed, 522 insertions(+), 633 deletions(-) create mode 100644 code/modules/mining/minerals.dm diff --git a/baystation12.dme b/baystation12.dme index 773f55ba42..a720e22d05 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -831,6 +831,7 @@ #include "code\modules\mining\mine_areas.dm" #include "code\modules\mining\mine_items.dm" #include "code\modules\mining\mine_turfs.dm" +#include "code\modules\mining\minerals.dm" #include "code\modules\mining\mint.dm" #include "code\modules\mining\money_bag.dm" #include "code\modules\mining\ores_coins.dm" @@ -1162,7 +1163,6 @@ #include "code\modules\research\xenoarchaeology\geosample.dm" #include "code\modules\research\xenoarchaeology\manuals.dm" #include "code\modules\research\xenoarchaeology\misc.dm" -#include "code\modules\research\xenoarchaeology\readme.dm" #include "code\modules\research\xenoarchaeology\artifact\artifact.dm" #include "code\modules\research\xenoarchaeology\artifact\artifact_autocloner.dm" #include "code\modules\research\xenoarchaeology\artifact\artifact_crystal.dm" diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 5e7d308a9e..8a5f62a7b7 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -66,6 +66,7 @@ datum/controller/game_controller/proc/setup() setupgenetics() setupfactions() setup_economy() + SetupXenoarch() transfer_controller = new diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 73c7f5bd84..416e2ff6cb 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -94,7 +94,7 @@ else if(istype(target, /turf/simulated/mineral)) for(var/turf/simulated/mineral/M in range(chassis,1)) if(get_dir(chassis,M)&chassis.dir) - M.gets_drilled() + M.GetDrilled() log_message("Drilled through [target]") if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment) var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo @@ -153,7 +153,7 @@ else if(istype(target, /turf/simulated/mineral)) for(var/turf/simulated/mineral/M in range(chassis,1)) if(get_dir(chassis,M)&chassis.dir) - M.gets_drilled() + M.GetDrilled() log_message("Drilled through [target]") if(locate(/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp) in chassis.equipment) var/obj/structure/ore_box/ore_box = locate(/obj/structure/ore_box) in chassis:cargo diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 6a17f69317..e83bc6c9a8 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -1,11 +1,8 @@ /**********************Mineral deposits**************************/ -#define XENOARCH_SPAWN_CHANCE 0.5 -#define XENOARCH_SPREAD_CHANCE 15 -#define ARTIFACT_SPAWN_CHANCE 20 -/datum/controller/game_controller/var/list/artifact_spawning_turfs = list() -/var/global/list/artifact_spawn = list() // Runtime fix for geometry loading before controller is instantiated. +datum/controller/game_controller/var/list/artifact_spawning_turfs = list() +var/list/artifact_spawn = list() // Runtime fix for geometry loading before controller is instantiated. /turf/simulated/mineral //wall piece name = "Rock" @@ -17,599 +14,375 @@ density = 1 blocks_air = 1 temperature = TCMB - var/mineralName = "" - var/mineralAmt = 0 - var/spread = 0 //will the seam spread? - var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles + var/mineral/mineral + var/mined_ore = 0 var/last_act = 0 - var/datum/geosample/geological_data + var/datum/geosample/geologic_data var/excavation_level = 0 - var/list/finds = list() - var/list/excavation_minerals = list() + var/list/finds var/next_rock = 0 var/archaeo_overlay = "" var/excav_overlay = "" var/obj/item/weapon/last_find var/datum/artifact_find/artifact_find -/turf/simulated/mineral/Del() - return -/turf/simulated/mineral/ex_act(severity) - switch(severity) - if(3.0) + New() + . = ..() + + MineralSpread() + + spawn(1) + var/turf/T + if((istype(get_step(src, NORTH), /turf/simulated/floor)) || (istype(get_step(src, NORTH), /turf/space)) || (istype(get_step(src, NORTH), /turf/simulated/shuttle/floor))) + T = get_step(src, NORTH) + if (T) + T.overlays += image('icons/turf/walls.dmi', "rock_side_s") + if((istype(get_step(src, SOUTH), /turf/simulated/floor)) || (istype(get_step(src, SOUTH), /turf/space)) || (istype(get_step(src, SOUTH), /turf/simulated/shuttle/floor))) + T = get_step(src, SOUTH) + if (T) + T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=6) + if((istype(get_step(src, EAST), /turf/simulated/floor)) || (istype(get_step(src, EAST), /turf/space)) || (istype(get_step(src, EAST), /turf/simulated/shuttle/floor))) + T = get_step(src, EAST) + if (T) + T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6) + if((istype(get_step(src, WEST), /turf/simulated/floor)) || (istype(get_step(src, WEST), /turf/space)) || (istype(get_step(src, WEST), /turf/simulated/shuttle/floor))) + T = get_step(src, WEST) + if (T) + T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6) + + + ex_act(severity) + switch(severity) + if(2.0) + if (prob(70)) + mined_ore = 1 //some of the stuff gets blown up + GetDrilled() + if(1.0) + mined_ore = 2 //some of the stuff gets blown up + GetDrilled() + + + Bumped(AM) + . = ..() + if(istype(AM,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = AM + if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand)) + attackby(H.l_hand,H) + else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand) + attackby(H.r_hand,H) + + else if(istype(AM,/mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = AM + if(istype(R.module_active,/obj/item/weapon/pickaxe)) + attackby(R.module_active,R) + + else if(istype(AM,/obj/mecha)) + var/obj/mecha/M = AM + if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill)) + M.selected.action(src) + + + proc/MineralSpread() + if(mineral && mineral.spread) + for(var/trydir in cardinal) + if(prob(mineral.spread_chance)) + var/turf/simulated/mineral/random/target_turf = get_step(src, trydir) + if(istype(target_turf) && !target_turf.mineral) + target_turf.mineral = mineral + target_turf.UpdateMineral() + target_turf.MineralSpread() + + + proc/UpdateMineral() + if(!mineral) + name = "\improper Rock" + icon_state = "rock" return - if(2.0) - if (prob(70)) - src.mineralAmt -= 1 //some of the stuff gets blown up - src.gets_drilled() - if(1.0) - src.mineralAmt -= 2 //some of the stuff gets blown up - src.gets_drilled() - return - -/turf/simulated/mineral/New() - - spawn(1) - var/turf/T - if((istype(get_step(src, NORTH), /turf/simulated/floor)) || (istype(get_step(src, NORTH), /turf/space)) || (istype(get_step(src, NORTH), /turf/simulated/shuttle/floor))) - T = get_step(src, NORTH) - if (T) - T.overlays += image('icons/turf/walls.dmi', "rock_side_s") - if((istype(get_step(src, SOUTH), /turf/simulated/floor)) || (istype(get_step(src, SOUTH), /turf/space)) || (istype(get_step(src, SOUTH), /turf/simulated/shuttle/floor))) - T = get_step(src, SOUTH) - if (T) - T.overlays += image('icons/turf/walls.dmi', "rock_side_n", layer=6) - if((istype(get_step(src, EAST), /turf/simulated/floor)) || (istype(get_step(src, EAST), /turf/space)) || (istype(get_step(src, EAST), /turf/simulated/shuttle/floor))) - T = get_step(src, EAST) - if (T) - T.overlays += image('icons/turf/walls.dmi', "rock_side_w", layer=6) - if((istype(get_step(src, WEST), /turf/simulated/floor)) || (istype(get_step(src, WEST), /turf/space)) || (istype(get_step(src, WEST), /turf/simulated/shuttle/floor))) - T = get_step(src, WEST) - if (T) - T.overlays += image('icons/turf/walls.dmi', "rock_side_e", layer=6) - - if (mineralName && mineralAmt && spread && spreadChance) - for(var/trydir in list(1,2,4,8)) - if(prob(spreadChance)) - if(istype(get_step(src, trydir), /turf/simulated/mineral/random)) - var/turf/simulated/mineral/T = get_step(src, trydir) - var/turf/simulated/mineral/M = new src.type(T) - //keep any digsite data as constant as possible - if(T.finds.len && !M.finds.len) - M.finds = T.finds - if(T.archaeo_overlay) - M.overlays += archaeo_overlay + name = "\improper [mineral.display_name] deposit" + icon_state = "rock_[mineral.name]" - //---- Xenoarchaeology BEGIN + //Not even going to touch this pile of spaghetti + attackby(obj/item/weapon/W as obj, mob/user as mob) - //put into spawn so that digsite data can be preserved over the turf replacements via spreading mineral veins - spawn(0) - if(mineralAmt > 0 && !excavation_minerals.len) - for(var/i=0, i world.time)//prevents message spam + return + last_act = world.time + + playsound(user, P.drill_sound, 20, 1) + + //handle any archaeological finds we might uncover + var/fail_message + if(finds && finds.len) + var/datum/find/F = finds[1] + if(excavation_level + P.excavation_amount > F.excavation_required) + //Chance to destroy / extract any finds here + fail_message = ", [pick("there is a crunching noise","[W] collides with some different rock","part of the rock face crumbles away","something breaks under [W]")]" + + user << "\red You start [P.drill_verb][fail_message ? fail_message : ""]." + + if(fail_message && prob(90)) + if(prob(25)) + excavate_find(5, finds[1]) + else if(prob(50)) + finds.Remove(finds[1]) if(prob(50)) - M.finds.Add(new/datum/find(digsite, rand(5,95))) - else if(prob(75)) - M.finds.Add(new/datum/find(digsite, rand(5,45))) - M.finds.Add(new/datum/find(digsite, rand(55,95))) + artifact_debris() + + if(do_after(user,P.digspeed)) + user << "\blue You finish [P.drill_verb] the rock." + + if(finds.len) + var/datum/find/F = finds[1] + if(round(excavation_level + P.excavation_amount) == F.excavation_required) + //Chance to extract any items here perfectly, otherwise just pull them out along with the rock surrounding them + if(excavation_level + P.excavation_amount > F.excavation_required) + //if you can get slightly over, perfect extraction + excavate_find(100, F) + else + excavate_find(80, F) + + else if(excavation_level + P.excavation_amount > F.excavation_required - F.clearance_range) + //just pull the surrounding rock out + excavate_find(0, F) + + if( excavation_level + P.excavation_amount >= 100 ) + //if players have been excavating this turf, leave some rocky debris behind + var/obj/structure/boulder/B + if(artifact_find) + if( excavation_level > 0 || prob(15) ) + //boulder with an artifact inside + B = new(src) + if(artifact_find) + B.artifact_find = artifact_find + else + artifact_debris(1) + else if(prob(15)) + //empty boulder + B = new(src) + + if(B) + GetDrilled(0) else - M.finds.Add(new/datum/find(digsite, rand(5,30))) - M.finds.Add(new/datum/find(digsite, rand(35,75))) - M.finds.Add(new/datum/find(digsite, rand(75,95))) + GetDrilled(1) + return + else + excavation_level += P.excavation_amount - //sometimes a find will be close enough to the surface to show - var/datum/find/F = M.finds[1] - if(F.excavation_required <= F.view_range) - archaeo_overlay = "overlay_archaeo[rand(1,3)]" - M.overlays += archaeo_overlay + //archaeo overlays + if(!archaeo_overlay && finds.len) + var/datum/find/F = finds[1] + if(F.excavation_required <= excavation_level + F.view_range) + archaeo_overlay = "overlay_archaeo[rand(1,3)]" + overlays += archaeo_overlay - //dont create artifact machinery in animal or plant digsites, or if we already have one - if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE)) - artifact_find = new() - artifact_spawn.Add(src) + //there's got to be a better way to do this + var/update_excav_overlay = 0 + if(excavation_level >= 75) + if(excavation_level - P.excavation_amount < 75) + update_excav_overlay = 1 + else if(excavation_level >= 50) + if(excavation_level - P.excavation_amount < 50) + update_excav_overlay = 1 + else if(excavation_level >= 25) + if(excavation_level - P.excavation_amount < 25) + update_excav_overlay = 1 - if(!src.geological_data) - src.geological_data = new/datum/geosample(src) - src.geological_data.UpdateTurf(src) + //update overlays displaying excavation level + if( !(excav_overlay && excavation_level > 0) || update_excav_overlay ) + var/excav_quadrant = round(excavation_level / 25) + 1 + excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]" + overlays += excav_overlay - //for excavated turfs placeable in the map editor - /*if(excavation_level > 0) - if(excavation_level < 25) - src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv1_[rand(1,3)]") - else if(excavation_level < 50) - src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv2_[rand(1,3)]") - else if(excavation_level < 75) - src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv3_[rand(1,3)]") - else - src.overlays += image('icons/obj/xenoarchaeology.dmi', "overlay_excv4_[rand(1,3)]") - desc = "It appears to be partially excavated."*/ + /* Nope. + //extract pesky minerals while we're excavating + while(excavation_minerals.len && excavation_level > excavation_minerals[excavation_minerals.len]) + DropMineral() + pop(excavation_minerals) + mineralAmt-- */ + + //drop some rocks + next_rock += P.excavation_amount * 10 + while(next_rock > 100) + next_rock -= 100 + var/obj/item/weapon/ore/O = new(src) + geologic_data.UpdateNearbyArtifactInfo(src) + O.geologic_data = geologic_data + + else + return attack_hand(user) + + + proc/DropMineral() + if(!mineral) + return + + var/obj/item/weapon/ore/O = new mineral.ore (src) + if(istype(O)) + geologic_data.UpdateNearbyArtifactInfo(src) + O.geologic_data = geologic_data + return O + + + proc/GetDrilled(var/artifact_fail = 0) + //var/destroyed = 0 //used for breaking strange rocks + if (mineral && mineral.result_amount) + + //if the turf has already been excavated, some of it's ore has been removed + for (var/i = 1 to mineral.result_amount - mined_ore) + DropMineral() + + //destroyed artifacts have weird, unpleasant effects + //make sure to destroy them before changing the turf though + if(artifact_find && artifact_fail) + var/pain = 0 + if(prob(50)) + pain = 1 + for(var/mob/living/M in range(src, 200)) + M << "[pick("A high pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!" + if(pain) + flick("pain",M.pain) + if(prob(50)) + M.adjustBruteLoss(5) + else + flick("flash",M.flash) + if(prob(50)) + M.Stun(5) + M.apply_effect(25, IRRADIATE) + + var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid) + N.fullUpdateMineralOverlays() + + if(rand(1,500) == 1) + visible_message("An old dusty crate was buried within!") + new /obj/structure/closet/crate/secure/loot(src) + + + proc/excavate_find(var/prob_clean = 0, var/datum/find/F) + //with skill and luck, players can cleanly extract finds + //otherwise, they come out inside a chunk of rock + var/obj/item/weapon/X + if(prob_clean) + X = new /obj/item/weapon/archaeological_find(src, new_item_type = F.find_type) + else + X = new /obj/item/weapon/ore/strangerock(src, inside_item_type = F.find_type) + geologic_data.UpdateNearbyArtifactInfo(src) + X:geologic_data = geologic_data + + //some find types delete the /obj/item/weapon/archaeological_find and replace it with something else, this handles when that happens + //yuck + var/display_name = "something" + if(!X) + X = last_find + if(X) + display_name = X.name + + //many finds are ancient and thus very delicate - luckily there is a specialised energy suspension field which protects them when they're being extracted + if(prob(F.prob_delicate)) + var/obj/effect/suspension_field/S = locate() in src + if(!S || S.field_type != get_responsive_reagent(F.find_type)) + if(X) + visible_message("\red[pick("[display_name] crumbles away into dust","[display_name] breaks apart")].") + del(X) + + finds.Remove(F) + + + proc/artifact_debris(var/severity = 0) + //cael's patented random limited drop componentized loot system! + //sky's patented not-fucking-retarded overhaul! + + //Give a random amount of loot from 1 to 3 or 5, varying on severity. + for(var/j in 1 to rand(1, 3 + max(min(severity, 1), 0) * 2)) + switch(rand(1,7)) + if(1) + var/obj/item/stack/rods/R = new(src) + R.amount = rand(5,25) + + if(2) + var/obj/item/stack/tile/R = new(src) + R.amount = rand(1,5) + + if(3) + var/obj/item/stack/sheet/metal/R = new(src) + R.amount = rand(5,25) + + if(4) + var/obj/item/stack/sheet/plasteel/R = new(src) + R.amount = rand(5,25) + + if(5) + var/quantity = rand(1,3) + for(var/i=0, i world.time)//prevents message spam - return - last_act = world.time - - playsound(user, P.drill_sound, 20, 1) - - //handle any archaeological finds we might uncover - var/fail_message - if(src.finds.len) - var/datum/find/F = src.finds[1] - if(src.excavation_level + P.excavation_amount > F.excavation_required) - //Chance to destroy / extract any finds here - fail_message = ", [pick("there is a crunching noise","[W] collides with some different rock","part of the rock face crumbles away","something breaks under [W]")]" - - user << "\red You start [P.drill_verb][fail_message ? fail_message : ""]." - - if(fail_message && prob(90)) - if(prob(25)) - excavate_find(5, src.finds[1]) - else if(prob(50)) - src.finds.Remove(src.finds[1]) - if(prob(50)) - artifact_debris() - - if(do_after(user,P.digspeed)) - user << "\blue You finish [P.drill_verb] the rock." - - if(finds.len) - var/datum/find/F = src.finds[1] - if(round(src.excavation_level + P.excavation_amount) == F.excavation_required) - //Chance to extract any items here perfectly, otherwise just pull them out along with the rock surrounding them - if(src.excavation_level + P.excavation_amount > F.excavation_required) - //if you can get slightly over, perfect extraction - excavate_find(100, F) - else - excavate_find(80, F) - - else if(src.excavation_level + P.excavation_amount > F.excavation_required - F.clearance_range) - //just pull the surrounding rock out - excavate_find(0, F) - - if( src.excavation_level + P.excavation_amount >= 100 ) - //if players have been excavating this turf, leave some rocky debris behind - var/obj/structure/boulder/B - if(artifact_find) - if( src.excavation_level > 0 || prob(15) ) - //boulder with an artifact inside - B = new(src) - if(artifact_find) - B.artifact_find = artifact_find - else - artifact_debris(1) - else if(prob(15)) - //empty boulder - B = new(src) - - if(B) - gets_drilled(0) - else - gets_drilled(1) - return - else - src.excavation_level += P.excavation_amount - - //archaeo overlays - if(!archaeo_overlay && finds.len) - var/datum/find/F = src.finds[1] - if(F.excavation_required <= src.excavation_level + F.view_range) - archaeo_overlay = "overlay_archaeo[rand(1,3)]" - overlays += archaeo_overlay - - //there's got to be a better way to do this - var/update_excav_overlay = 0 - if(src.excavation_level >= 75) - if(src.excavation_level - P.excavation_amount < 75) - update_excav_overlay = 1 - else if(src.excavation_level >= 50) - if(src.excavation_level - P.excavation_amount < 50) - update_excav_overlay = 1 - else if(src.excavation_level >= 25) - if(src.excavation_level - P.excavation_amount < 25) - update_excav_overlay = 1 - - //update overlays displaying excavation level - if( !(excav_overlay && excavation_level > 0) || update_excav_overlay ) - var/excav_quadrant = round(excavation_level / 25) + 1 - excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]" - overlays += excav_overlay - - //extract pesky minerals while we're excavating - while(excavation_minerals.len && src.excavation_level > excavation_minerals[excavation_minerals.len]) - drop_mineral() - pop(excavation_minerals) - mineralAmt-- - - //drop some rocks - next_rock += P.excavation_amount * 10 - while(next_rock > 100) - next_rock -= 100 - var/obj/item/weapon/ore/O = new(src) - src.geological_data.UpdateNearbyArtifactInfo(src) - O.geological_data = src.geological_data - - else - return attack_hand(user) - return - -/turf/simulated/mineral/proc/drop_mineral() - var/obj/item/weapon/ore/O - if (src.mineralName == "Uranium") - O = new /obj/item/weapon/ore/uranium(src) - if (src.mineralName == "Iron") - O = new /obj/item/weapon/ore/iron(src) - if (src.mineralName == "Gold") - O = new /obj/item/weapon/ore/gold(src) - if (src.mineralName == "Silver") - O = new /obj/item/weapon/ore/silver(src) - if (src.mineralName == "Plasma") - O = new /obj/item/weapon/ore/plasma(src) - if (src.mineralName == "Diamond") - O = new /obj/item/weapon/ore/diamond(src) - if (src.mineralName == "Clown") - O = new /obj/item/weapon/ore/clown(src) - if(O) - src.geological_data.UpdateNearbyArtifactInfo(src) - O.geological_data = src.geological_data - return O - -/turf/simulated/mineral/proc/gets_drilled(var/artifact_fail = 0) - //var/destroyed = 0 //used for breaking strange rocks - if ((src.mineralName != "") && (src.mineralAmt > 0) && (src.mineralAmt < 11)) - - //if the turf has already been excavated, some of it's ore has been removed - for (var/i=0;i[pick("A high pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!" - if(pain) - flick("pain",M.pain) - if(prob(50)) - M.adjustBruteLoss(5) - else - flick("flash",M.flash) - if(prob(50)) - M.Stun(5) - M.apply_effect(25, IRRADIATE) - - var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid) - N.fullUpdateMineralOverlays() - var/crate = rand(1,500) - switch(crate) - if(1) - visible_message("After digging, you find an old dusty crate buried within!") - new/obj/structure/closet/crate/secure/loot(src) - return - -/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F) - //with skill and luck, players can cleanly extract finds - //otherwise, they come out inside a chunk of rock - var/obj/item/weapon/X - if(prob_clean) - X = new/obj/item/weapon/archaeological_find(src, new_item_type = F.find_type) - else - X = new/obj/item/weapon/ore/strangerock(src, inside_item_type = F.find_type) - src.geological_data.UpdateNearbyArtifactInfo(src) - X:geological_data = src.geological_data - - //some find types delete the /obj/item/weapon/archaeological_find and replace it with something else, this handles when that happens - //yuck - var/display_name = "something" - if(!X) - X = last_find - if(X) - display_name = X.name - - //many finds are ancient and thus very delicate - luckily there is a specialised energy suspension field which protects them when they're being extracted - if(prob(F.prob_delicate)) - var/obj/effect/suspension_field/S = locate() in src - if(!S || S.field_type != get_responsive_reagent(F.find_type)) - if(X) - src.visible_message("\red[pick("[display_name] crumbles away into dust","[display_name] breaks apart")].") - del(X) - - src.finds.Remove(F) - -/turf/simulated/mineral/proc/artifact_debris(var/severity = 0) - //cael's patented random limited drop componentized loot system! - severity = max(min(severity,1),0) - var/materials = 0 - var/list/viable_materials = list(1,2,4,8,16,32,64,128,256) - - var/num_materials = rand(1,3 + severity*2) - for(var/i=0, i Date: Wed, 8 Jan 2014 21:36:03 -0700 Subject: [PATCH 5/7] Some turf cleanup and the like. Trace gases are now properly handled by ZAS on world load. Fixes #2485 --- code/ATMOSPHERICS/datum_pipeline.dm | 4 --- code/ZAS/ZAS_Turfs.dm | 34 +++++++++++------------- code/ZAS/ZAS_Zones.dm | 18 +++++++++---- code/game/turfs/simulated/floor_types.dm | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index 5ade345e08..3501b606d5 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -149,10 +149,6 @@ datum/pipeline air.merge(air_sample) //turf_air already modified by equalize_gases() - if(istype(target) && !target.processing) - if(target.air) - if(target.air.check_tile_graphic()) - target.update_visuals(target.air) if(network) network.update = 1 diff --git a/code/ZAS/ZAS_Turfs.dm b/code/ZAS/ZAS_Turfs.dm index 12ac2df244..468d321094 100644 --- a/code/ZAS/ZAS_Turfs.dm +++ b/code/ZAS/ZAS_Turfs.dm @@ -39,8 +39,6 @@ /turf/simulated/var/tmp/datum/gas_mixture/air -/turf/simulated/var/tmp/processing = 1 - /turf/simulated/var/tmp/air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update /turf/simulated/var/tmp/unsim_check_directions = 0 //See above. @@ -61,8 +59,6 @@ overlays.Add(slmaster) /turf/simulated/New() - ..() - if(!blocks_air) air = new @@ -84,6 +80,8 @@ if(istype(target)) air_master.tiles_to_update |= target + . = ..() + /turf/simulated/Del() if(active_hotspot) del(active_hotspot) @@ -171,24 +169,27 @@ if(zone && CanPass(null, src, 0, 0)) for(var/direction in cardinal) - var/turf/T = get_step(src,direction) + var/turf/T = get_step(src, direction) if(!istype(T)) continue - //I can connect to air or space in this direction - if((air_check_directions & direction && !(air_directions_archived & direction)) || \ - (unsim_check_directions & direction && !(unsim_directions_archived & direction))) - ZConnect(src,T) + //A connection to simulated floor has been made where one did not exist. + if((air_check_directions & direction && air_directions_archived & ~direction) ||\ + (unsim_check_directions & direction && unsim_directions_archived & ~direction)) + //Simply connect them. + ZConnect(src, T) zone.ActivateIfNeeded() - if(T.zone) T.zone.ActivateIfNeeded() + if(T.zone) + T.zone.ActivateIfNeeded() //Something like a wall was built, changing the geometry. - else if((!(air_check_directions & direction) && air_directions_archived & direction) || \ - (!(unsim_check_directions & direction) && unsim_directions_archived & direction)) + if((air_check_directions & ~direction && air_directions_archived & direction) || \ + (unsim_check_directions & ~direction && unsim_directions_archived & direction)) + var/turf/NT = get_step(T, direction) //If the tile is in our own zone, and we cannot connect to it, better rebuild. - if(istype(NT,/turf/simulated) && NT in zone.contents) + if(istype(NT, /turf/simulated) && NT in zone.contents) air_master.zones_needing_rebuilt.Add(zone) //Parse if we need to remove the tile, or rebuild the zone. @@ -197,7 +198,7 @@ //Loop through all neighboring turfs to see if we should remove the turf or just rebuild. for(var/d in cardinal) - var/turf/UT = get_step(NT,d) + var/turf/UT = get_step(NT, d) //If we find a neighboring tile that is in the same zone, rebuild if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) @@ -212,11 +213,6 @@ //Not adjacent to anything, and unsimulated. Goodbye~ else zone.RemoveTurf(NT) - - if(air_check_directions) - processing = 1 - else - processing = 0 return 1 /turf/proc/HasDoor(turf/O) diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index d747b2c150..783d8d617f 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -50,11 +50,19 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs air = new air.group_multiplier = contents.len for(var/turf/simulated/T in contents) - air.oxygen += T.oxygen / air.group_multiplier - air.nitrogen += T.nitrogen / air.group_multiplier - air.carbon_dioxide += T.carbon_dioxide / air.group_multiplier - air.toxins += T.toxins / air.group_multiplier - air.temperature += T.temperature / air.group_multiplier + if(!T.air) + continue + air.oxygen += T.air.oxygen / air.group_multiplier + air.nitrogen += T.air.nitrogen / air.group_multiplier + air.carbon_dioxide += T.air.carbon_dioxide / air.group_multiplier + air.toxins += T.air.toxins / air.group_multiplier + air.temperature += T.air.temperature / air.group_multiplier + for(var/datum/gas/trace in T.air.trace_gases) + var/datum/gas/corresponding_gas = locate(trace.type) in air.trace_gases + if(!corresponding_gas) + corresponding_gas = new trace.type() + air.trace_gases.Add(corresponding_gas) + corresponding_gas.moles += trace.moles air.update_values() //Add this zone to the global list. diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 201fd974ad..2e82577a4b 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -73,7 +73,7 @@ /turf/simulated/floor/engine/n20 New() - ..() + . = ..() var/datum/gas_mixture/adding = new var/datum/gas/sleeping_agent/trace_gas = new From f79ffa598e1f36772a9763d2751b3f1422175d90 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 8 Jan 2014 22:15:47 -0700 Subject: [PATCH 6/7] Tradeband and Gutterspeak now have a different font than Tradeband. Fixes #4143 --- code/modules/mob/language.dm | 18 ++++++-------- code/modules/mob/living/carbon/human/human.dm | 11 +++++---- code/modules/mob/living/say.dm | 8 +++---- code/modules/mob/new_player/new_player.dm | 9 +++---- code/modules/mob/say.dm | 24 +++++++++---------- code/stylesheet.dm | 1 + 6 files changed, 34 insertions(+), 37 deletions(-) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index ea82e57925..c94e85658c 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -6,7 +6,7 @@ var/name = "an unknown language" // Fluff name of language if any. var/desc = "A language." // Short description for 'Check Languages'. var/speech_verb = "says" // 'says', 'hisses', 'farts'. - var/colour = "say_quote" // CSS style to use for strings in this language. + var/colour = "body" // CSS style to use for strings in this language. var/key = "x" // Character used to speak in language eg. :o for Unathi. var/flags = 0 // Various language flags. var/native // If set, non-native speakers will have trouble speaking. @@ -54,6 +54,7 @@ /datum/language/human name = "Sol Common" desc = "A bastardized hybrid of informal English and elements of Mandarin Chinese; the common language of the Sol system." + colour = "rough" key = "1" flags = RESTRICTED @@ -62,35 +63,30 @@ name = "Tradeband" desc = "Maintained by the various trading cartels in major systems, this elegant, structured language is used for bartering and bargaining." speech_verb = "enunciates" + colour = "say_quote" key = "2" /datum/language/gutter name = "Gutter" desc = "Much like Standard, this crude pidgin tongue descended from numerous languages and serves as Tradeband for criminal elements." speech_verb = "growls" + colour = "rough" key = "3" // Language handling. /mob/proc/add_language(var/language) - for(var/datum/language/L in languages) - if(L && L.name == language) - return 0 - var/datum/language/new_language = all_languages[language] - if(!istype(new_language,/datum/language)) + if(!istype(new_language) || new_language in languages) return 0 - languages += new_language + languages.Add(new_language) return 1 /mob/proc/remove_language(var/rem_language) - for(var/datum/language/L in languages) - if(L && L.name == rem_language) - languages -= L - return 1 + languages.Remove(all_languages[rem_language]) return 0 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 74cab64505..6e391efb5d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -40,11 +40,6 @@ if(!species) set_species() - if(species.language) - var/datum/language/L = all_languages[species.language] - if(L) - languages += L - var/datum/reagents/R = new/datum/reagents(1000) reagents = R R.my_atom = src @@ -1257,8 +1252,14 @@ mob/living/carbon/human/yank_out_object() if(species && (species.name && species.name == new_species)) return + if(species && species.language) + remove_language(species.language) + species = all_species[new_species] + if(species.language) + add_language(species.language) + spawn(0) update_icons() diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index c6a6f508bb..13523072ca 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -108,7 +108,7 @@ var/list/department_radio_keys = list( if(client.prefs.muted & MUTE_IC) src << "\red You cannot speak in IC (muted)." return - if (src.client.handle_spam_prevention(message,MUTE_IC)) + if (src.client.handle_spam_prevention(message, MUTE_IC)) return // Mute disability @@ -173,7 +173,7 @@ var/list/department_radio_keys = list( if(src.stunned > 2 || (traumatic_shock > 61 && prob(50))) message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it - message = capitalize(message) + message = capitalize(trim_left(message)) if (!message) return @@ -371,9 +371,9 @@ var/list/department_radio_keys = list( for(var/mob/M in hearers(5, src)) if(M != src && is_speaking_radio) M:show_message("[src] talks into [used_radios.len ? used_radios[1] : "radio"]") - + var/rendered = null - + if (length(heard_a)) var/message_a = say_quote(message,speaking) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 88c0c38f6e..d405cfcd66 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -114,7 +114,7 @@ spawning = 1 src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo - + observer.started_as_observer = 1 close_spawn_windows() var/obj/O = locate("landmark*Observer-Start") @@ -287,6 +287,9 @@ src << alert("[rank] is not available. Please try another.") return 0 + spawning = 1 + close_spawn_windows() + job_master.AssignRole(src, rank, 1) var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind @@ -359,8 +362,6 @@ if(chosen_species) if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED) || (client.holder.rights & R_ADMIN) )// Have to recheck admin due to no usr at roundstart. Latejoins are fine though. new_character.set_species(client.prefs.species) - if(chosen_species.language) - new_character.add_language(chosen_species.language) var/datum/language/chosen_language if(client.prefs.language) @@ -392,7 +393,7 @@ if(client.prefs.disabilities) // Set defer to 1 if you add more crap here so it only recalculates struc_enzymes once. - N3X - new_character.dna.SetSEState(GLASSESBLOCK,1,0) + new_character.dna.SetSEState(GLASSESBLOCK,1,0) new_character.disabilities |= NEARSIGHTED // And uncomment this, too. diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 040c1615c5..19a2173af2 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -98,30 +98,28 @@ //tcomms code is still runtiming somewhere here var/ending = copytext(text, length(text)) - var/speechverb = "" + var/speech_verb = "says" + var/speech_style = "body" if (speaking) - speechverb = "[speaking.speech_verb], \"" + speech_verb = speaking.speech_verb + speech_style = speaking.colour else if(speak_emote && speak_emote.len) - speechverb = "[pick(speak_emote)], \"" + speech_verb = pick(speak_emote) else if (src.stuttering) - speechverb = "stammers, \"" + speech_verb = "stammers" else if (src.slurring) - speechverb = "slurrs, \"" + speech_verb = "slurrs" else if (ending == "?") - speechverb = "asks, \"" + speech_verb = "asks" else if (ending == "!") - speechverb = "exclaims, \"" + speech_verb = "exclaims" else if(isliving(src)) var/mob/living/L = src if (L.getBrainLoss() >= 60) - speechverb = "gibbers, \"" - else - speechverb = "says, \"" - else - speechverb = "says, \"" + speech_verb = "gibbers" - return "[speechverb][text]\"" + return "[speech_verb], \"[text]\"" /mob/proc/emote(var/act, var/type, var/message) if(act == "me") diff --git a/code/stylesheet.dm b/code/stylesheet.dm index fda3fb64e2..b7846429a6 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -63,6 +63,7 @@ h1.alert, h2.alert {color: #000000;} .skrell {color: #00CED1;} .soghun {color: #228B22;} .vox {color: #AA00AA;} +.rough {font-family: "Trebuchet MS", cursive, sans-serif;} .say_quote {font-family: Georgia, Verdana, sans-serif;} .interface {color: #330033;} From 37ec915386ac9d80394757833bf5ac6b5c895594 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Wed, 8 Jan 2014 23:00:11 -0700 Subject: [PATCH 7/7] Reverts some geometry code to a functional state. Fixes #4045 --- code/ZAS/ZAS_Turfs.dm | 82 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 65 insertions(+), 17 deletions(-) diff --git a/code/ZAS/ZAS_Turfs.dm b/code/ZAS/ZAS_Turfs.dm index 468d321094..43ea288762 100644 --- a/code/ZAS/ZAS_Turfs.dm +++ b/code/ZAS/ZAS_Turfs.dm @@ -166,30 +166,77 @@ if(src in air_master.turfs_with_connections) air_master.AddConnectionToCheck(air_master.turfs_with_connections[src]) - if(zone && CanPass(null, src, 0, 0)) - + if(zone && !air_master.zones_needing_rebuilt.Find(zone)) for(var/direction in cardinal) - var/turf/T = get_step(src, direction) + var/turf/T = get_step(src,direction) if(!istype(T)) continue - //A connection to simulated floor has been made where one did not exist. - if((air_check_directions & direction && air_directions_archived & ~direction) ||\ - (unsim_check_directions & direction && unsim_directions_archived & ~direction)) - //Simply connect them. - ZConnect(src, T) - zone.ActivateIfNeeded() - if(T.zone) - T.zone.ActivateIfNeeded() + //I can connect to air in this direction + if(air_check_directions & direction || unsim_check_directions & direction) + + //If either block air, we must look to see if the adjacent turfs need rebuilt. + if(!CanPass(null, T, 0, 0)) + + //Target blocks air + if(!T.CanPass(null, T, 0, 0)) + var/turf/NT = get_step(T, direction) + + //If that turf is in my zone still, rebuild. + if(istype(NT,/turf/simulated) && NT in zone.contents) + air_master.zones_needing_rebuilt.Add(zone) + + //If that is an unsimulated tile in my zone, see if we need to rebuild or just remove. + else if(istype(NT) && NT in zone.unsimulated_tiles) + var/consider_rebuild = 0 + for(var/d in cardinal) + var/turf/UT = get_step(NT,d) + if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild + consider_rebuild = 1 + break + if(consider_rebuild) + air_master.zones_needing_rebuilt.Add(zone) //Gotta check if we need to rebuild, dammit + else + zone.RemoveTurf(NT) //Not adjacent to anything, and unsimulated. Goodbye~ + + //To make a closed connection through closed door. + ZConnect(T, src) + + //If I block air. + else if(T.zone && !air_master.zones_needing_rebuilt.Find(T.zone)) + var/turf/NT = get_step(src, reverse_direction(direction)) + + //If I am splitting a zone, rebuild. + if(istype(NT,/turf/simulated) && (NT in T.zone.contents || (NT.zone && T in NT.zone.contents))) + air_master.zones_needing_rebuilt.Add(T.zone) + + //If NT is unsimulated, parse if I should remove it or rebuild. + else if(istype(NT) && NT in T.zone.unsimulated_tiles) + var/consider_rebuild = 0 + for(var/d in cardinal) + var/turf/UT = get_step(NT,d) + if(istype(UT, /turf/simulated) && UT.zone == T.zone && UT.CanPass(null, NT, 0, 0)) //If we find a neighboring tile that is in the same zone, check if we need to rebuild + consider_rebuild = 1 + break + + //Needs rebuilt. + if(consider_rebuild) + air_master.zones_needing_rebuilt.Add(T.zone) + + //Not adjacent to anything, and unsimulated. Goodbye~ + else + T.zone.RemoveTurf(NT) + + else + //Produce connection through open door. + ZConnect(src,T) //Something like a wall was built, changing the geometry. - if((air_check_directions & ~direction && air_directions_archived & direction) || \ - (unsim_check_directions & ~direction && unsim_directions_archived & direction)) - + else if(air_directions_archived & direction || unsim_directions_archived & direction) var/turf/NT = get_step(T, direction) //If the tile is in our own zone, and we cannot connect to it, better rebuild. - if(istype(NT, /turf/simulated) && NT in zone.contents) + if(istype(NT,/turf/simulated) && NT in zone.contents) air_master.zones_needing_rebuilt.Add(zone) //Parse if we need to remove the tile, or rebuild the zone. @@ -198,7 +245,7 @@ //Loop through all neighboring turfs to see if we should remove the turf or just rebuild. for(var/d in cardinal) - var/turf/UT = get_step(NT, d) + var/turf/UT = get_step(NT,d) //If we find a neighboring tile that is in the same zone, rebuild if(istype(UT, /turf/simulated) && UT.zone == zone && UT.CanPass(null, NT, 0, 0)) @@ -208,11 +255,12 @@ //The unsimulated turf is adjacent to another one of our zone's turfs, // better rebuild to be sure we didn't get cut in twain if(consider_rebuild) - air_master.zones_needing_rebuilt.Add(zone) + air_master.zones_needing_rebuilt.Add(NT.zone) //Not adjacent to anything, and unsimulated. Goodbye~ else zone.RemoveTurf(NT) + return 1 /turf/proc/HasDoor(turf/O)