diff --git a/baystation12.dme b/baystation12.dme index 1b175c0efe..82cc001246 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -38,6 +38,7 @@ #define FILE_DIR "sound/AI" #define FILE_DIR "sound/ambience" #define FILE_DIR "sound/effects" +#define FILE_DIR "sound/effects/wind" #define FILE_DIR "sound/hallucinations" #define FILE_DIR "sound/items" #define FILE_DIR "sound/machines" @@ -188,7 +189,7 @@ #include "code\defines\procs\captain_announce.dm" #include "code\defines\procs\command_alert.dm" #include "code\defines\procs\dbcore.dm" -#include "code\defines\procs\statistics.dm" +#include "code\defines\procs\sd_Alert.dm" #include "code\game\asteroid.dm" #include "code\game\atoms.dm" #include "code\game\atoms_movable.dm" @@ -428,6 +429,7 @@ #include "code\game\objects\weapons.dm" #include "code\game\objects\closets\walllocker.dm" #include "code\game\objects\effects\aliens.dm" +#include "code\game\objects\effects\barsign.dm" #include "code\game\objects\effects\biomass_rift.dm" #include "code\game\objects\effects\bump_teleporter.dm" #include "code\game\objects\effects\effect_system.dm" diff --git a/code/WorkInProgress/surgery.dm b/code/WorkInProgress/surgery.dm index 3b1401708d..ea94d4f8bf 100644 --- a/code/WorkInProgress/surgery.dm +++ b/code/WorkInProgress/surgery.dm @@ -88,6 +88,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/generic/cut_open required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 90 max_duration = 110 @@ -116,9 +117,12 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) user.visible_message("\red [user]'s hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!", \ "\red Your hand slips, slicing open [target]'s [affected.display_name] in a wrong spot with \the [tool]!") affected.createwound(CUT, 10) + if (ishuman(user)) + user:bloody_hands(target, 0) /datum/surgery_step/generic/clamp_bleeders required_tool = /obj/item/weapon/hemostat + allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/weapon/mousetrap) min_duration = 40 max_duration = 60 @@ -145,9 +149,12 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) user.visible_message("\red [user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.display_name] with the \[tool]!", \ "\red Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.display_name] with \the [tool]!",) affected.createwound(CUT, 10) + if (ishuman(user)) + user:bloody_hands(target, 0) /datum/surgery_step/generic/retract_skin required_tool = /obj/item/weapon/retractor + allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork) min_duration = 30 max_duration = 40 @@ -181,6 +188,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) user.visible_message(msg, self_msg) affected.open = 2 spread_germs_to_organ(affected, user) + if (prob(40)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -197,6 +205,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/generic/cauterize required_tool = /obj/item/weapon/cautery + allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter) min_duration = 70 max_duration = 100 @@ -242,6 +251,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/appendectomy/cut_appendix required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 70 max_duration = 90 @@ -258,15 +268,19 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \ "\blue You have separated [target]'s appendix with \the [tool].") target.op_stage.appendix = 1 + if (ishuman(user) && prob(40)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/groin = target.get_organ("groin") user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \ "\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!") - groin.createwound(CUT, 50) + groin.createwound(CUT, 50, 1) + if (ishuman(user)) + user:bloody_body(target) /datum/surgery_step/appendectomy/remove_appendix required_tool = /obj/item/weapon/hemostat + allowed_tools = list(/obj/item/weapon/wirecutters) min_duration = 60 max_duration = 80 @@ -292,6 +306,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) else new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target)) target.op_stage.appendix = 2 + if (ishuman(user) && prob(40)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -307,6 +322,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/fix_vein required_tool = /obj/item/weapon/FixOVein + allowed_tools = list(/obj/item/weapon/cable_coil) min_duration = 70 max_duration = 90 @@ -335,6 +351,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) for(var/datum/wound/W in affected.wounds) if(W.internal) affected.wounds -= W affected.update_damages() + if (ishuman(user) && prob(40)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -349,6 +366,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/glue_bone required_tool = /obj/item/weapon/bonegel + allowed_tools = list(/obj/item/weapon/screwdriver) min_duration = 50 max_duration = 60 @@ -370,6 +388,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) "\blue You apply some [tool] to [target]'s bone in [affected.display_name] with \the [tool].") affected.stage = 1 spread_germs_to_organ(affected, user) + if (ishuman(user) && prob(80)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -378,6 +397,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/set_bone required_tool = /obj/item/weapon/bonesetter + allowed_tools = list(/obj/item/weapon/wrench) min_duration = 60 max_duration = 70 @@ -413,6 +433,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/mend_skull required_tool = /obj/item/weapon/bonesetter + allowed_tools = list(/obj/item/weapon/wrench) min_duration = 60 max_duration = 70 @@ -442,6 +463,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/finish_bone required_tool = /obj/item/weapon/bonegel + allowed_tools = list(/obj/item/weapon/screwdriver) min_duration = 50 max_duration = 60 @@ -464,6 +486,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) affected.stage = 0 affected.perma_injury = 0 spread_germs_to_organ(affected, user) + if (ishuman(user) && prob(80)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -485,6 +508,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/eye/cut_open required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 90 max_duration = 110 @@ -509,6 +533,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/eye/lift_eyes required_tool = /obj/item/weapon/retractor + allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork) min_duration = 30 max_duration = 40 @@ -533,6 +558,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/eye/mend_eyes required_tool = /obj/item/weapon/hemostat + allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/weapon/mousetrap) min_duration = 80 max_duration = 100 @@ -557,6 +583,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/eye/cauterize required_tool = /obj/item/weapon/cautery + allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter) min_duration = 70 max_duration = 100 @@ -598,6 +625,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/generic/cut_face required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 90 max_duration = 110 @@ -623,6 +651,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/face/mend_vocal required_tool = /obj/item/weapon/hemostat + allowed_tools = list(/obj/item/weapon/cable_coil, /obj/item/weapon/mousetrap) min_duration = 70 max_duration = 90 @@ -643,9 +672,13 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) user.visible_message("\red [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \ "\red Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!") target.losebreath += 10 + if (ishuman(user)) + user:bloody_body(target) + user:bloody_hands(target, 0) /datum/surgery_step/face/fix_face required_tool = /obj/item/weapon/retractor + allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork) min_duration = 80 max_duration = 100 @@ -670,6 +703,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/face/cauterize required_tool = /obj/item/weapon/cautery + allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter) min_duration = 70 max_duration = 100 @@ -731,6 +765,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/brain/cut_brain required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 80 max_duration = 100 @@ -750,7 +785,10 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \ "\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!") - target.apply_damage(50, BRUTE, "head") + target.apply_damage(50, BRUTE, "head", 1) + if (ishuman(user)) + user:bloody_body(target) + user:bloody_hands(target, 0) /datum/surgery_step/brain/saw_spine required_tool = /obj/item/weapon/circular_saw @@ -785,7 +823,10 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("\red [user]'s hand slips, cutting a vein in [target]'s brain with \the [tool]!", \ "\red Your hand slips, cutting a vein in [target]'s brain with \the [tool]!") - target.apply_damage(30, BRUTE, "head") + target.apply_damage(30, BRUTE, "head", 1) + if (ishuman(user)) + user:bloody_body(target) + user:bloody_hands(target, 0) ////////////////////////////////////////////////////////////////// @@ -798,6 +839,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/metroid/cut_flesh required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 30 max_duration = 50 @@ -820,6 +862,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/metroid/cut_innards required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 30 max_duration = 50 @@ -887,6 +930,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/limb/cut required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 80 max_duration = 100 @@ -913,6 +957,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/limb/mend required_tool = /obj/item/weapon/retractor + allowed_tools = list(/obj/item/weapon/kitchen/utensil/fork) min_duration = 80 max_duration = 100 @@ -943,6 +988,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/limb/prepare required_tool = /obj/item/weapon/cautery + allowed_tools = list(/obj/item/weapon/weldingtool, /obj/item/clothing/mask/cigarette, /obj/item/weapon/lighter) min_duration = 60 max_duration = 70 @@ -1045,6 +1091,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/ribcage/retract_ribcage required_tool = /obj/item/weapon/retractor + allowed_tools = list(/obj/item/weapon/crowbar) min_duration = 30 max_duration = 40 @@ -1069,6 +1116,9 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) var/datum/organ/external/affected = target.get_organ(target_zone) affected.fracture() + if (ishuman(user)) + user:bloody_hands(target, 0) + fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/msg = "\red [user]'s hand slips, breaking [target]'s ribcage!" var/self_msg = "\red Your hand slips, breaking [target]'s ribcage!" @@ -1078,6 +1128,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) /datum/surgery_step/ribcage/close_ribcage required_tool = /obj/item/weapon/retractor + allowed_tools = list(/obj/item/weapon/crowbar) min_duration = 20 max_duration = 40 @@ -1151,8 +1202,11 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) for(var/datum/disease/alien_embryo in target.viruses) alien_embryo.cure() + if (ishuman(user)) user:bloody_hands(target, 0) + /datum/surgery_step/ribcage/fix_lungs required_tool = /obj/item/weapon/scalpel + allowed_tools = list(/obj/item/weapon/shard, /obj/item/weapon/kitchenknife) min_duration = 70 max_duration = 90 @@ -1170,10 +1224,14 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) user.visible_message("\blue [user] mends the rupture in [target]'s lungs with \the [tool].", \ "\blue You mend the rupture in [target]'s lungs with \the [tool]." ) affected.ruptured_lungs = 0 + if (ishuman(user) && prob(80)) user:bloody_hands(target, 0) fail_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/chest/affected = target.get_organ("chest") user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s chest with \the [tool]!", \ "\red Your hand slips, slicing an artery inside [target]'s chest with \the [tool]!") affected.createwound(CUT, 20) + if (ishuman(user)) + user:bloody_hands(target, 0) + user:bloody_body(target) diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm index 7950389ad3..3d8954fc99 100644 --- a/code/WorkInProgress/virus2/base.dm +++ b/code/WorkInProgress/virus2/base.dm @@ -235,7 +235,6 @@ proc/airborne_can_reach(turf/source, turf/target) if(prob(1)) majormutate() if(mob.reagents.has_reagent("spaceacillin")) - mob.reagents.remove_reagent("spaceacillin",0.3) return if(mob.reagents.has_reagent("virusfood")) mob.reagents.remove_reagent("virusfood",0.1) @@ -599,4 +598,4 @@ proc/airborne_can_reach(turf/source, turf/target) getrandomeffect_greater() /proc/dprob(var/p) - return(prob(sqrt(p)) && prob(sqrt(p))) \ No newline at end of file + return(prob(sqrt(p)) && prob(sqrt(p))) diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index 661fe74d9b..e2edcaac7a 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -133,15 +133,16 @@ proc/Airflow(zone/A, zone/B) else connected_turfs |= C.B - //Get lists of things that can be thrown across the room for each zone. - var/list/pplz = B.movables() - var/list/otherpplz = A.movables() + //Get lists of things that can be thrown across the room for each zone (assumes air is moving from zone B to zone A) + var/list/air_sucked = B.movables() + var/list/air_repelled = A.movables() if(n < 0) - var/list/temporary_pplz = pplz - pplz = otherpplz - otherpplz = temporary_pplz + //air is moving from zone A to zone B + var/list/temporary_pplz = air_sucked + air_sucked = air_repelled + air_repelled = temporary_pplz - for(var/atom/movable/M in pplz) + for(var/atom/movable/M in air_sucked) if(M.last_airflow > world.time - vsc.airflow_delay) continue @@ -166,7 +167,7 @@ proc/Airflow(zone/A, zone/B) spawn M.GotoAirflowDest(abs(n)/5) //Do it again for the stuff in the other zone, making it fly away. - for(var/atom/movable/M in otherpplz) + for(var/atom/movable/M in air_repelled) if(M.last_airflow > world.time - vsc.airflow_delay) continue @@ -240,12 +241,15 @@ atom/movable if(airflow_dest == loc) step_away(src,loc) if(ismob(src)) - if(src:nodamage) return + if(src:nodamage) + return if(istype(src, /mob/living/carbon/human)) - if(istype(src, /mob/living/carbon/human)) - if(src:buckled) return - if(src:shoes) - if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return + if(src:buckled) + return + if(src:shoes) + if(src:shoes.type == /obj/item/clothing/shoes/magboots) + if(src:shoes.flags & NOSLIP) + return src << "\red You are sucked away by airflow!" var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful. if(airflow_falloff < 1) @@ -266,9 +270,15 @@ atom/movable airflow_speed -= vsc.airflow_speed_decay if(airflow_speed > 7) if(airflow_time++ >= airflow_speed - 7) + if(od) + density = 0 sleep(1 * tick_multiplier) else + if(od) + density = 0 sleep(max(1,10-(airflow_speed+3)) * tick_multiplier) + if(od) + density = 1 if ((!( src.airflow_dest ) || src.loc == src.airflow_dest)) src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z) if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy)) @@ -276,7 +286,8 @@ atom/movable if(!istype(loc, /turf)) return step_towards(src, src.airflow_dest) - if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown + if(ismob(src) && src:client) + src:client:move_delay = world.time + vsc.airflow_mob_slowdown airflow_dest = null airflow_speed = 0 airflow_time = 0 @@ -295,12 +306,15 @@ atom/movable if(airflow_dest == loc) step_away(src,loc) if(ismob(src)) - if(src:nodamage) return + if(src:nodamage) + return if(istype(src, /mob/living/carbon/human)) - if(istype(src, /mob/living/carbon/human)) - if(src:buckled) return - if(src:shoes) - if(src:shoes.type == /obj/item/clothing/shoes/magboots && src:shoes.flags & NOSLIP) return + if(src:buckled) + return + if(src:shoes) + if(src:shoes.type == /obj/item/clothing/shoes/magboots) + if(src:shoes.flags & NOSLIP) + return src << "\red You are pushed away by airflow!" var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful. if(airflow_falloff < 1) @@ -331,7 +345,8 @@ atom/movable if(!istype(loc, /turf)) return step_towards(src, src.airflow_dest) - if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown + if(ismob(src) && src:client) + src:client:move_delay = world.time + vsc.airflow_mob_slowdown airflow_dest = null airflow_speed = 0 airflow_time = 0 diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index afda25eba8..17867abf26 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -16,6 +16,9 @@ zone last_update = 0 progress = "nothing" + // To make sure you're not spammed to death by airflow sound effects + tmp/playsound_cooldown = 0 + //CREATION AND DELETION New(turf/start) . = ..() @@ -33,7 +36,7 @@ zone if(!istype(T,/turf/simulated)) AddTurf(T) - //Generate the gas_mixture for use in this zone by using the average of the gases + //Generate the gas_mixture for use in txhis zone by using the average of the gases //defined at startup. air = new var/members = contents.len @@ -161,6 +164,16 @@ zone/proc/process() RemoveTurf(T) if(unsimulated_tiles) var/moved_air = ShareSpace(air,unsimulated_tiles) + + // Only play a sound effect every once in a while + if(playsound_cooldown <= world.time) + // Play a nice sound effect at one of the bordering turfs + + playsound_cooldown = world.time + rand(30, 70) + + var/turf/random_border = pick(contents) + play_wind_sound(random_border, abs(moved_air)) + if(moved_air > vsc.airflow_lightest_pressure) AirflowSpace(src) @@ -239,7 +252,17 @@ zone/proc/process() for(var/zone/Z in connected_zones) if(air && Z.air) //Ensure we're not doing pointless calculations on equilibrium zones. - if(abs(air.total_moles() - Z.air.total_moles()) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1) + var/moles_delta = abs(air.total_moles() - Z.air.total_moles()) + if(moles_delta > 0.1) + // Only play a sound effect every once in a while + if(playsound_cooldown <= world.time) + // Play a nice sound effect at one of the bordering turfs + + playsound_cooldown = world.time + rand(30, 70) + + var/turf/random_border = pick(contents) + play_wind_sound(random_border, abs(moles_delta)) + if(moles_delta > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1) if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure) Airflow(src,Z) ShareRatio( air , Z.air , connected_zones[Z] ) @@ -255,7 +278,7 @@ var/list/sharing_lookup_table = list(0.06, 0.11, 0.15, 0.18, 0.20, 0.21) proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) //Shares a specific ratio of gas between mixtures using simple weighted averages. var - ratio = 0.21 + ratio = 0.50 size = max(1,A.group_multiplier) share_size = max(1,B.group_multiplier) @@ -281,9 +304,6 @@ proc/ShareRatio(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) temp_avg = (A.temperature * full_heat_capacity + B.temperature * s_full_heat_capacity) / (full_heat_capacity + s_full_heat_capacity) - if(sharing_lookup_table.len >= connecting_tiles) //6 or more interconnecting tiles will max at 42% of air moved per tick. - ratio = sharing_lookup_table[connecting_tiles] - A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg ) A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg ) A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg ) @@ -338,37 +358,34 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles) unsim_temperature += T.temperature/unsimulated_tiles.len var - ratio = 0.21 + // Depressurize very, very fast(it's fine since many rooms are internally multiple zones) + ratio = 0.50 old_pressure = A.return_pressure() size = max(1,A.group_multiplier) share_size = max(1,unsimulated_tiles.len) - full_oxy = A.oxygen * size - full_nitro = A.nitrogen * size - full_co2 = A.carbon_dioxide * size - full_plasma = A.toxins * size + //full_oxy = A.oxygen * size + //full_nitro = A.nitrogen * size + //full_co2 = A.carbon_dioxide * size + //full_plasma = A.toxins * size - full_heat_capacity = A.heat_capacity() * size + //full_heat_capacity = A.heat_capacity() * size - oxy_avg = (full_oxy + unsim_oxygen) / (size + share_size) - nit_avg = (full_nitro + unsim_nitrogen) / (size + share_size) - co2_avg = (full_co2 + unsim_co2) / (size + share_size) - plasma_avg = (full_plasma + unsim_plasma) / (size + share_size) + oxy_avg = unsim_oxygen//(full_oxy + unsim_oxygen) / (size + share_size) + nit_avg = unsim_nitrogen//(full_nitro + unsim_nitrogen) / (size + share_size) + co2_avg = unsim_co2//(full_co2 + unsim_co2) / (size + share_size) + plasma_avg = unsim_plasma//(full_plasma + unsim_plasma) / (size + share_size) - temp_avg = (A.temperature * full_heat_capacity + unsim_temperature * unsim_heat_capacity) / (full_heat_capacity + unsim_heat_capacity) - - 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 ) A.carbon_dioxide = max(0, (A.carbon_dioxide - co2_avg) * (1-ratio) + co2_avg ) A.toxins = max(0, (A.toxins - plasma_avg) * (1-ratio) + plasma_avg ) - A.temperature = max(TCMB, (A.temperature - temp_avg) * (1-ratio) + temp_avg ) + // EXPERIMENTAL: Disable space being cold + //A.temperature = max(TCMB, (A.temperature - temp_avg) * (1-ratio) + temp_avg ) for(var/datum/gas/G in A.trace_gases) var/G_avg = (G.moles*size + 0) / (size+share_size) @@ -458,6 +475,21 @@ zone/proc/Rebuild() if(istype(T) && T.zone && S.CanPass(null, T, 0, 0)) T.zone.AddTurf(S) +proc/play_wind_sound(var/turf/random_border, var/n) + if(random_border) + var/windsound = 'sound/effects/wind/wind_2_1.ogg' + switch(n) + if(0 to 30) + windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg') + if(31 to 40) + windsound = pick('sound/effects/wind/wind_3_1.ogg') + if(41 to 60) + windsound = pick('sound/effects/wind/wind_4_1.ogg', 'sound/effects/wind/wind_4_2.ogg') + if(61 to 1000000) + windsound = pick('sound/effects/wind/wind_5_1.ogg') + + playsound(random_border, windsound, 50, 1, 1) + //UNUSED /* zone/proc/connected_zones() @@ -474,4 +506,4 @@ zone/proc/connected_zones() .[Z]++ else . += Z - .[Z] = 1*/ \ No newline at end of file + .[Z] = 1*/ diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index d3e3a6b2a3..7a4dc5f533 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -288,6 +288,13 @@ datum/shuttle_controller if(1) + // Just before it leaves, close the damn doors! + if(timeleft == 2 || timeleft == 1) + var/area/start_location = locate(/area/shuttle/escape/station) + for(var/obj/machinery/door/D in start_location) + spawn(0) + D.close() + if(timeleft>0) return 0 diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 08ed5ce6b4..081753675b 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -16,6 +16,7 @@ var/access = null var/hidden = 0 var/contraband = 0 + var/group /datum/supply_packs/New() manifest += "
" slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
" + if (SP.contraband) slip.loc = null //we are out of blanks for Form #44-D Ordering Illicit Drugs. while(0