diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 6a92f9a24bf..acc528e6110 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -62,7 +62,7 @@ Filter types: var/output_starting_pressure = air3.return_pressure() - if(output_starting_pressure >= target_pressure) + if(output_starting_pressure >= target_pressure || air2.return_pressure() >= target_pressure ) //No need to mix if target is already full! return 1 diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index 167d4368b3c..a2506bb2d92 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -248,8 +248,8 @@ atom/movable if(src:buckled) return if(src:shoes) - if(src:shoes.type == /obj/item/clothing/shoes/magboots) - if(src:shoes.flags & NOSLIP) + if(istype(src:shoes, /obj/item/clothing/shoes/magboots)) + if(src:shoes:magpulse) 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. @@ -303,7 +303,6 @@ atom/movable if(airflow_speed) airflow_speed = n/max(get_dist(src,airflow_dest),1) return - last_airflow = world.time if(airflow_dest == loc) step_away(src,loc) if(ismob(src)) @@ -317,6 +316,7 @@ atom/movable if(src:shoes.flags & NOSLIP) return src << "\red You are pushed away by airflow!" + last_airflow = world.time var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful. if(airflow_falloff < 1) airflow_dest = null diff --git a/code/ZAS/Debug.dm b/code/ZAS/Debug.dm index 186ed65ae8e..e4e07f5cd8a 100644 --- a/code/ZAS/Debug.dm +++ b/code/ZAS/Debug.dm @@ -12,6 +12,50 @@ client/verb/Zone_Info(turf/T as null|turf) T.overlays -= 'debug_group.dmi' T.overlays -= 'debug_connect.dmi' + + +client/verb/Test_ZAS_Connection(var/turf/simulated/T as turf) + set category = "Debug" + if(!istype(T)) + return + + var/direction_list = list(\ + "North" = NORTH,\ + "South" = SOUTH,\ + "East" = EAST,\ + "West" = WEST,\ + "None" = null) + var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list + if(!direction) + return + + if(direction == "None") + if(T.CanPass(null, T, 0,0)) + mob << "The turf can pass air! :D" + else + mob << "No air passage :x" + return + + var/turf/simulated/other_turf = get_step(T, direction_list[direction]) + if(!istype(other_turf)) + return + + var/pass_directions = T.CanPass(null, other_turf, 0, 0) + 2*other_turf.CanPass(null, T, 0, 0) + + switch(pass_directions) + if(0) + mob << "Neither turf can connect. :(" + + if(1) + mob << "The initial turf only can connect. :\\" + + if(2) + mob << "The other turf can connect, but not the initial turf. :/" + + if(3) + mob << "Both turfs can connect! :)" + + zone/proc DebugDisplay(mob/M) if(!dbg_output) diff --git a/code/ZAS/FEA_system.dm b/code/ZAS/FEA_system.dm index 58574baeb7e..1eadd31ed6b 100644 --- a/code/ZAS/FEA_system.dm +++ b/code/ZAS/FEA_system.dm @@ -346,7 +346,7 @@ datum if(current == NT) return //We made it, yaaay~ stepped_back = 0 - zone.rebuild = 1 + zone.rebuild = 1 else if ( current.air_check_directions&test_dir ) //Try to connect to the left hand side. diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 9481a866772..a2242ad8aa9 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -11,8 +11,6 @@ Attach to transfer valve and open. BOOM. */ - - //Some legacy definitions so fires can be started. atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return null @@ -21,21 +19,12 @@ atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) - turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) if(fire_protection > world.time-300) return - var/datum/gas_mixture/air_contents = return_air(1) - if(!air_contents) + var/datum/gas_mixture/air_contents = return_air() + if(!air_contents || exposed_temperature < PLASMA_MINIMUM_BURN_TEMPERATURE) return 0 - /*if(active_hotspot) - if(soh) - if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5) - if(active_hotspot.temperature < exposed_temperature) - active_hotspot.temperature = exposed_temperature - if(active_hotspot.volume < exposed_volume) - active_hotspot.volume = exposed_volume - return 1*/ var/igniting = 0 if(locate(/obj/fire) in src) return 1 @@ -47,9 +36,8 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh) return 0 if(! (locate(/obj/fire) in src)) - var/obj/fire/F = new(src,1000) - F.temperature = exposed_temperature - F.volume = CELL_VOLUME + + new /obj/fire(src,1000) //active_hotspot.just_spawned = (current_cycle < air_master.current_cycle) //remove just_spawned protection if no longer processing this cell @@ -71,10 +59,7 @@ obj layer = TURF_LAYER var - volume = CELL_VOLUME - temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel() - archived_firelevel = 0 process() . = 1 @@ -92,7 +77,7 @@ obj //Also get liquid fuels on the ground. obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in S - var/datum/gas_mixture/flow = air_contents.remove_ratio(0.25) + var/datum/gas_mixture/flow = air_contents.remove_ratio(vsc.fire_consuption_rate) //The reason we're taking a part of the air instead of all of it is so that it doesn't jump to //the fire's max temperature instantaneously. @@ -126,10 +111,13 @@ obj //Change icon depending on the fuel, and thus temperature. if(firelevel > 6) icon_state = "3" + SetLuminosity(7) else if(firelevel > 2.5) icon_state = "2" + SetLuminosity(5) else icon_state = "1" + SetLuminosity(3) //Ensure flow temperature is higher than minimum fire temperatures. flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature) @@ -153,11 +141,10 @@ obj else del src -//Should fix fire being extra damaging, temperature of the environment will now be the main source of fire damage. -/* + for(var/mob/living/carbon/human/M in loc) - M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans! -*/ + M.FireBurn(firelevel) //Burn the humans! + New(newLoc,fl) ..() @@ -166,13 +153,14 @@ obj del src dir = pick(cardinal) - //sd_SetLuminosity(3,2,0) + SetLuminosity(3) firelevel = fl air_master.active_hotspots.Add(src) + Del() if (istype(loc, /turf/simulated)) - //sd_SetLuminosity(0) + SetLuminosity(0) loc = null air_master.active_hotspots.Remove(src) @@ -180,36 +168,34 @@ obj ..() + turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. turf/proc/apply_fire_protection() turf/simulated/apply_fire_protection() fire_protection = world.time + datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid) //This proc is similar to fire(), but uses a simple logarithm to calculate temp, and is thus more stable with ZAS. if(temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) var total_fuel = toxins - fuel_sources = 0 //We'll divide by this later so that fuel is consumed evenly. + datum/gas/volatile_fuel/fuel = locate() in trace_gases if(fuel) //Volatile Fuel total_fuel += fuel.moles - fuel_sources++ if(liquid) //Liquid Fuel if(liquid.amount <= 0) del liquid else - total_fuel += liquid.amount - fuel_sources++ + total_fuel += liquid.amount*15 - //Toxins - if(toxins > 0.3) fuel_sources++ - - if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway. + if(! (fuel || toxins || liquid) ) + return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway. if(oxygen > 0.3) @@ -219,46 +205,54 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid) //Reaches a maximum practical temperature of around 4500. //Increase temperature. - temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature ) + temperature = max( vsc.fire_temperature_multiplier*log(0.04*firelevel + 1.24) , temperature ) + + var/total_reactants = min(oxygen, 2*total_fuel) + total_fuel //Consume some gas. - var/consumed_gas = min(oxygen,0.05*firelevel,total_fuel) / fuel_sources + var/consumed_gas = max( min( total_reactants, vsc.fire_gas_combustion_ratio*firelevel ), 0.2) - oxygen = max(0,oxygen-consumed_gas) + oxygen -= min(oxygen, (total_reactants-total_fuel)*consumed_gas/total_reactants ) - toxins = max(0,toxins-consumed_gas) + toxins -= min(toxins, toxins*consumed_gas/total_reactants ) - carbon_dioxide += consumed_gas*2 + carbon_dioxide += max(consumed_gas, 0) if(fuel) - fuel.moles -= consumed_gas + fuel.moles -= fuel.moles*consumed_gas/total_reactants if(fuel.moles <= 0) del fuel if(liquid) - liquid.amount -= consumed_gas + liquid.amount -= liquid.amount*consumed_gas/(total_reactants) if(liquid.amount <= 0) del liquid update_values() - return consumed_gas*fuel_sources + return consumed_gas return 0 - datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fuel/liquid) //Calculates the firelevel based on one equation instead of having to do this multiple times in different areas. var datum/gas/volatile_fuel/fuel = locate() in trace_gases - liquid_concentration = 0 - oxy_concentration = oxygen / volume - tox_concentration = toxins / volume - fuel_concentration = 0 + var/total_fuel = toxins - 0.5 - if(fuel) fuel_concentration = (fuel.moles) / volume - if(liquid) liquid_concentration = (liquid.amount*15) / volume - return (oxy_concentration + tox_concentration + liquid_concentration + fuel_concentration)*100 + if(liquid) + total_fuel += (liquid.amount*15) -/mob/living/carbon/human/proc/FireBurn(mx as num) + if(fuel) + total_fuel += fuel.moles + + var/total_combustables = (total_fuel + oxygen) + if(total_fuel <= 0 || oxygen <= 0) + return 0 + + return max( 0, vsc.fire_firelevel_multiplier*(total_combustables/(total_combustables + nitrogen))*log(2*total_combustables/oxygen)*log(total_combustables/total_fuel)) + + +/mob/living/carbon/human/proc/FireBurn(var/firelevel) //Burns mobs due to fire. Respects heat transfer coefficients on various body parts. + //Due to TG reworking how fireprotection works, this is kinda less meaningful. var head_exposure = 1 @@ -267,20 +261,26 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue legs_exposure = 1 arms_exposure = 1 + var/mx = min(max(0.1,firelevel / 20),10) + var/last_temperature = vsc.fire_temperature_multiplier*log(0.04*firelevel + 1.24) + //Get heat transfer coefficients for clothing. - //skytodo: different handling of temp with tg - /*for(var/obj/item/clothing/C in src) - if(l_hand == C || r_hand == C) continue - if(C.body_parts_covered & HEAD) - head_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & UPPER_TORSO) - chest_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & LOWER_TORSO) - groin_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & LEGS) - legs_exposure *= C.heat_transfer_coefficient - if(C.body_parts_covered & ARMS) - arms_exposure *= C.heat_transfer_coefficient*/ + //skytodo: kill anyone who breaks things then orders me to fix them + for(var/obj/item/clothing/C in src) + if(l_hand == C || r_hand == C) + continue + + if( C.max_heat_protection_temperature >= last_temperature ) + if(C.body_parts_covered & HEAD) + head_exposure = 0 + if(C.body_parts_covered & UPPER_TORSO) + chest_exposure = 0 + if(C.body_parts_covered & LOWER_TORSO) + groin_exposure = 0 + if(C.body_parts_covered & LEGS) + legs_exposure = 0 + if(C.body_parts_covered & ARMS) + arms_exposure = 0 //Always check these damage procs first if fire damage isn't working. They're probably what's wrong. @@ -292,4 +292,5 @@ datum/gas_mixture/proc/calculate_firelevel(obj/effect/decal/cleanable/liquid_fue apply_damage(0.4*mx*arms_exposure, BURN, "l_arm", 0, 0, "Fire") apply_damage(0.4*mx*arms_exposure, BURN, "r_arm", 0, 0, "Fire") - //flash_pain() \ No newline at end of file + //flash_pain() +#undef ZAS_FIRE_CONSUMPTION_RATE \ No newline at end of file diff --git a/code/ZAS/Functions.dm b/code/ZAS/Functions.dm index 47762f74a49..e7847bb2bd3 100644 --- a/code/ZAS/Functions.dm +++ b/code/ZAS/Functions.dm @@ -21,7 +21,24 @@ proc/FloodFill(turf/simulated/start) if(istype(O) && !(O in open) && !(O in closed) && O.ZCanPass(T)) - if(!O.HasDoor()) + if(T.HasDoor()) + //If they both have doors, then they are nto able to connect period. + if(O.HasDoor()) + continue + + //connect first to north and west + if(d == NORTH || d == WEST) + open += O + + else + var/turf/simulated/W = get_step(O, WEST) + var/turf/simulated/N = get_step(O, NORTH) + + if( !O.ZCanPass(N) && !O.ZCanPass(W) ) + //If it cannot connect either to the north or west, connect it! + open += O + + else if(!O.HasDoor()) open += O else @@ -108,8 +125,10 @@ proc/ZConnect(turf/simulated/A,turf/simulated/B) //Make some preliminary checks to see if the connection is valid. if(!A.zone || !B.zone) return if(A.zone == B.zone) return + if(!A.CanPass(null,B,0,0)) return - if(A.CanPass(null,B,1.5,1)) + + if(A.CanPass(null,B,0,1)) return ZMerge(A.zone,B.zone) //Ensure the connection isn't already made. diff --git a/code/ZAS/Plasma.dm b/code/ZAS/Plasma.dm index e9a91fee4bb..d7da7f53379 100644 --- a/code/ZAS/Plasma.dm +++ b/code/ZAS/Plasma.dm @@ -5,7 +5,7 @@ pl_control/var PLASMA_DMG_NAME = "Plasma Damage Amount" PLASMA_DMG_DESC = "Self Descriptive" - CLOTH_CONTAMINATION = 0 + CLOTH_CONTAMINATION = 1 CLOTH_CONTAMINATION_NAME = "Cloth Contamination" CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth." @@ -17,7 +17,7 @@ pl_control/var GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance" GENETIC_CORRUPTION_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000." - SKIN_BURNS = 1 + SKIN_BURNS = 0 SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited." SKIN_BURNS_NAME = "Skin Burns" @@ -25,7 +25,7 @@ pl_control/var EYE_BURNS_NAME = "Eye Burns" EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection." - CONTAMINATION_LOSS = 0.01 + CONTAMINATION_LOSS = 0.02 CONTAMINATION_LOSS_NAME = "Contamination Loss" CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN @@ -42,11 +42,10 @@ obj/var/contaminated = 0 obj/item/proc can_contaminate() - return 0 //Clothing and backpacks can be contaminated. if(flags & PLASMAGUARD) return 0 else if(istype(src,/obj/item/clothing)) return 1 - else if(istype(src,/obj/item/weapon/storage/backpack)) return 1 + else if(istype(src,/obj/item/weapon/storage/backpack)) return 0 //Cannot be washed :( contaminate() //Do a contamination overlay? Temporary measure to keep contamination less deadly than it was. diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm index 592be10d067..ee63fd37b22 100644 --- a/code/ZAS/Variable Settings.dm +++ b/code/ZAS/Variable Settings.dm @@ -2,40 +2,69 @@ var/global/vs_control/vsc = new vs_control/var IgnitionLevel = 0.5 - IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn." - airflow_lightest_pressure = 30 + IgnitionLevel_DESC = "Determines point at which fire can ignite" + + fire_consuption_rate = 0.25 + fire_consuption_rate_NAME = "Fire - Air Consumption Ratio" + fire_consuption_rate_DESC = "Ratio of air removed and combusted per tick." + + fire_firelevel_multiplier = 25 + fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant" + fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects the combustion and ignition of gas mixes." + + fire_temperature_multiplier = 1700 + fire_temperature_multiplier_NAME = "Fire - Temperature Multiplier" + fire_temperature_multiplier_DESC = "Base value for fire temperatures." + + fire_gas_combustion_ratio = 0.25 + fire_gas_combustion_ratio_NAME = "Fire - Gas Conversion Ratio" + fire_gas_combustion_ratio_DESC = "The rate at which oxygen and plasma are converted to CO2, expressed in terms of the firelevel." + + + airflow_lightest_pressure = 20 airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %" airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move." - airflow_light_pressure = 45 + + airflow_light_pressure = 35 airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %" airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move." - airflow_medium_pressure = 90 + + airflow_medium_pressure = 50 airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %" airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move." - airflow_heavy_pressure = 95 + + airflow_heavy_pressure = 65 airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %" airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move." - airflow_dense_pressure = 120 + + airflow_dense_pressure = 85 airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %" airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move." - airflow_stun_pressure = 100 + + airflow_stun_pressure = 60 airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %" airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow." + airflow_stun_cooldown = 60 airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown" airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again." - airflow_stun = 0.15 + + airflow_stun = 1 airflow_stun_NAME = "Airflow Impact - Stunning" airflow_stun_DESC = "How much a mob is stunned when hit by an object." - airflow_damage = 0.3 + + airflow_damage = 2 airflow_damage_NAME = "Airflow Impact - Damage" airflow_damage_DESC = "Damage from airflow impacts." + airflow_speed_decay = 1.5 airflow_speed_decay_NAME = "Airflow Speed Decay" airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays." + airflow_delay = 30 airflow_delay_NAME = "Airflow Retrigger Delay" airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again." + airflow_mob_slowdown = 1 airflow_mob_slowdown_NAME = "Airflow Slowdown" airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow." @@ -164,21 +193,22 @@ vs_control return switch(def) if("Plasma - Standard") - plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth. + plc.CLOTH_CONTAMINATION = 1 //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.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. plc.PLASMA_HALLUCINATION = 0 - plc.CONTAMINATION_LOSS = 0 + plc.CONTAMINATION_LOSS = 0.02 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.SKIN_BURNS = 1 //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.CONTAMINATION_LOSS = 0 + plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited. + plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. + plc.PLASMA_HALLUCINATION = 0 + plc.CONTAMINATION_LOSS = 0.01 if("Plasma - High Hazard") plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. @@ -186,6 +216,8 @@ vs_control 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.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. + plc.PLASMA_HALLUCINATION = 1 + plc.CONTAMINATION_LOSS = 0.05 if("Plasma - Oh Shit!") plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth. @@ -193,18 +225,20 @@ vs_control 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.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection. + plc.PLASMA_HALLUCINATION = 1 + plc.CONTAMINATION_LOSS = 0.075 if("ZAS - Normal") IgnitionLevel = 0.5 - airflow_lightest_pressure = 30 - airflow_light_pressure = 45 - airflow_medium_pressure = 90 - airflow_heavy_pressure = 95 - airflow_dense_pressure = 120 - airflow_stun_pressure = 100 + airflow_lightest_pressure = 20 + airflow_light_pressure = 35 + airflow_medium_pressure = 50 + airflow_heavy_pressure = 65 + airflow_dense_pressure = 85 + airflow_stun_pressure = 60 airflow_stun_cooldown = 60 - airflow_stun = 0.15 - airflow_damage = 0.3 + airflow_stun = 1 + airflow_damage = 2 airflow_speed_decay = 1.5 airflow_delay = 30 airflow_mob_slowdown = 1 @@ -226,15 +260,15 @@ vs_control if("ZAS - Dangerous") IgnitionLevel = 0.4 - airflow_lightest_pressure = 25 - airflow_light_pressure = 35 - airflow_medium_pressure = 75 - airflow_heavy_pressure = 80 - airflow_dense_pressure = 100 - airflow_stun_pressure = 90 + airflow_lightest_pressure = 15 + airflow_light_pressure = 30 + airflow_medium_pressure = 45 + airflow_heavy_pressure = 55 + airflow_dense_pressure = 70 + airflow_stun_pressure = 50 airflow_stun_cooldown = 50 airflow_stun = 2 - airflow_damage = 1 + airflow_damage = 3 airflow_speed_decay = 1.2 airflow_delay = 25 airflow_mob_slowdown = 2 @@ -243,13 +277,13 @@ vs_control IgnitionLevel = 0.3 airflow_lightest_pressure = 20 airflow_light_pressure = 30 - airflow_medium_pressure = 70 - airflow_heavy_pressure = 75 - airflow_dense_pressure = 80 - airflow_stun_pressure = 70 + airflow_medium_pressure = 40 + airflow_heavy_pressure = 50 + airflow_dense_pressure = 60 + airflow_stun_pressure = 40 airflow_stun_cooldown = 40 airflow_stun = 3 - airflow_damage = 2 + airflow_damage = 4 airflow_speed_decay = 1 airflow_delay = 20 airflow_mob_slowdown = 3 diff --git a/code/ZAS/ZAS_Zones.dm b/code/ZAS/ZAS_Zones.dm index d4cc90b708c..1ccd28aff4f 100644 --- a/code/ZAS/ZAS_Zones.dm +++ b/code/ZAS/ZAS_Zones.dm @@ -218,7 +218,7 @@ zone/proc/process() if(air.temperature > PLASMA_FLASHPOINT) for(var/atom/movable/item in S) item.temperature_expose(air, air.temperature, CELL_VOLUME) - S.hotspot_expose(air, air.temperature, CELL_VOLUME) + S.hotspot_expose(air.temperature, CELL_VOLUME) progress = "problem with: calculating air graphic" @@ -275,13 +275,13 @@ zone/proc/process() //Air Movement// //////////////// -var/list/sharing_lookup_table = list(0.06, 0.11, 0.15, 0.18, 0.20, 0.21) +var/list/sharing_lookup_table = list(0.08, 0.15, 0.21, 0.26, 0.30, 0.33) 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 //WOOT WOOT TOUCH THIS AND YOU ARE A RETARD - ratio = 0.21 + ratio = 0.33 //WOOT WOOT TOUCH THIS AND YOU ARE A RETARD size = max(1,A.group_multiplier) @@ -368,7 +368,7 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles) var // Depressurize very, very fast(it's fine since many rooms are internally multiple zones) - ratio = 0.21 + ratio = 0.33 old_pressure = A.return_pressure() diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index bdbe50b31a3..e018eb0eba8 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -38,12 +38,6 @@ datum/controller/game_controller/New() del(master_controller) master_controller = src - createRandomZlevel() - - if(!air_master) - air_master = new /datum/controller/air_system() - air_master.setup() - if(!job_master) job_master = new /datum/controller/occupations() job_master.SetupOccupations() @@ -52,13 +46,20 @@ datum/controller/game_controller/New() if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase() if(!syndicate_code_response) syndicate_code_response = generate_code_phrase() - if(!ticker) ticker = new /datum/controller/gameticker() if(!emergency_shuttle) emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle() - datum/controller/game_controller/proc/setup() world.tick_lag = config.Ticklag + createRandomZlevel() + + if(!air_master) + air_master = new /datum/controller/air_system() + air_master.setup() + + if(!ticker) + ticker = new /datum/controller/gameticker() + setup_objects() setupgenetics() setupfactions() @@ -70,6 +71,7 @@ datum/controller/game_controller/proc/setup() spawn(0) if(ticker) ticker.pregame() + lighting_controller.Initialize() datum/controller/game_controller/proc/setup_objects() world << "\red \b Initializing objects" diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index f705a6cfc6d..38cb9d10be7 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -24,7 +24,6 @@ U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U) H.equip_to_slot_or_del(U, slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt) - //H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/captain(H), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index edcfa9623fe..d43f7657f2c 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -136,6 +136,9 @@ else can_label = 0 + if(air_contents.temperature > PLASMA_FLASHPOINT) + air_contents.zburn() + src.updateDialog() return diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index f8c71f4decf..c09dbfdf682 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -78,6 +78,8 @@ /obj/machinery/door/proc/bumpopen(mob/user as mob) if(operating) return + if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit + return src.add_fingerprint(user) if(!src.requiresID()) user = null @@ -229,6 +231,11 @@ SetOpacity(1) //caaaaarn! operating = 0 update_nearby_tiles() + + //I shall not add a check every x ticks if a door has closed over some fire. + var/obj/fire/fire = locate() in loc + if(fire) + del fire return /obj/machinery/door/proc/requiresID() diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 0c6b78ea35d..07a3a1b9b83 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -17,6 +17,11 @@ New() . = ..() + for(var/obj/machinery/door/firedoor/F in loc) + if(F != src) + spawn(1) + del src + return . var/area/A = get_area(src) ASSERT(istype(A)) @@ -134,7 +139,7 @@ else users_name = "Unknown" - if( !stat && ( istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda) ) ) + if( ishuman(user) && !stat && ( istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda) ) ) var/obj/item/weapon/card/id/ID = C if( istype(C, /obj/item/device/pda) ) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 5a903c3f97d..25e3772baf4 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -40,6 +40,9 @@ for(var/atom/A in contents) A.clean_blood() + for(var/obj/item/I in contents) + I.decontaminate() + //Tanning! for(var/obj/item/stack/sheet/hairlesshide/HH in contents) var/obj/item/stack/sheet/wetleather/WL = new(src) diff --git a/code/game/objects/effects/decals/Cleanable/fuel.dm b/code/game/objects/effects/decals/Cleanable/fuel.dm index e4c5ae42205..5cc3ebd3fe0 100644 --- a/code/game/objects/effects/decals/Cleanable/fuel.dm +++ b/code/game/objects/effects/decals/Cleanable/fuel.dm @@ -26,10 +26,11 @@ obj/effect/decal/cleanable/liquid_fuel if(!istype(S)) return for(var/d in cardinal) if(rand(25)) - var/turf/simulated/O = get_step(src,d) - if(O.CanPass(target = get_turf(src), air_group = 1)) - if(!locate(/obj/effect/decal/cleanable/liquid_fuel) in O) - new/obj/effect/decal/cleanable/liquid_fuel(O,amount*0.25) + var/turf/simulated/target = get_step(src,d) + var/turf/simulated/origin = get_turf(src) + if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0)) + if(!locate(/obj/effect/decal/cleanable/liquid_fuel) in target) + new/obj/effect/decal/cleanable/liquid_fuel(target, amount*0.25) amount *= 0.75 flamethrower_fuel @@ -38,18 +39,19 @@ obj/effect/decal/cleanable/liquid_fuel New(newLoc, amt = 1, d = 0) dir = d //Setting this direction means you won't get torched by your own flamethrower. . = ..() + Spread() //The spread for flamethrower fuel is much more precise, to create a wide fire pattern. if(amount < 0.1) return var/turf/simulated/S = loc if(!istype(S)) return - for(var/d in list(turn(dir,90),turn(dir,-90))) + for(var/d in list(turn(dir,90),turn(dir,-90), dir)) var/turf/simulated/O = get_step(S,d) if(locate(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel) in O) continue - if(O.CanPass(target = get_turf(src), air_group = 1)) + if(O.CanPass(null, S, 0, 0) && S.CanPass(null, O, 0, 0)) new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(O,amount*0.25,d) O.hotspot_expose((T20C*2) + 380,500) //Light flamethrower fuel on fire immediately. - amount *= 0.5 + amount *= 0.25 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ab92cafbad4..4292c9a14fa 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -499,9 +499,12 @@ var/global/floorIsLava = 0 Quick Create Object
Create Turf
Create Mob
+
Edit Airflow Settings
+ Edit Plasma Settings
+ Choose a default ZAS setting
"} - usr << browse(dat, "window=admin2;size=210x180") + usr << browse(dat, "window=admin2;size=210x280") return /datum/admins/proc/Secrets() diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0abadc98de3..7dd3407ce79 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2422,6 +2422,15 @@ if(check_rights(R_ADMIN|R_SERVER)) populate_inactive_customitems_list(src.owner) + else if(href_list["vsc"]) + if(check_rights(R_ADMIN|R_SERVER)) + if(href_list["vsc"] == "airflow") + vsc.ChangeSettingsDialog(usr,vsc.settings) + if(href_list["vsc"] == "plasma") + vsc.ChangeSettingsDialog(usr,vsc.plc.settings) + if(href_list["vsc"] == "default") + vsc.SetDefault(usr) + // player info stuff if(href_list["add_player_info"]) diff --git a/code/modules/awaymissions/loot.dm b/code/modules/awaymissions/loot.dm index 70ec7ddc36c..706e1716afd 100644 --- a/code/modules/awaymissions/loot.dm +++ b/code/modules/awaymissions/loot.dm @@ -7,12 +7,18 @@ /obj/effect/spawner/lootdrop/initialize() var/list/things = params2list(loot) + if(things && things.len) for(var/i = lootcount, i > 0, i--) - if(!things.len) return - var/lootspawn = text2path(pick(things)) - if(!lootdoubles) - things.Remove(lootspawn) + if(!things.len) + return - new lootspawn(get_turf(src)) + var/loot_spawn = pick(things) + var/loot_path = text2path(loot_spawn) + + if(!loot_path || !lootdoubles) + things.Remove(loot_spawn) + continue + + new loot_path(get_turf(src)) del(src) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 8ed5860ecf8..3bba11e32d1 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -17,7 +17,7 @@ attack_self(mob/user as mob) - if(!brainmob.key && searching == 0) + if(brainmob && !brainmob.key && searching == 0) //Start the process of searching for a new user. user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process." icon_state = "posibrain-searching" @@ -65,7 +65,7 @@ proc/reset_search() //We give the players sixty seconds to decide, then reset the timer. - if(brainmob) return + if(src.brainmob && src.brainmob.key) return src.searching = 0 icon_state = "posibrain" @@ -86,7 +86,7 @@ var/msg = "*---------*\nThis is \icon[src] \a [src]!\n[desc]\n" msg += "" - if(src.brainmob.key) + if(src.brainmob && src.brainmob.key) switch(src.brainmob.stat) if(CONSCIOUS) if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk @@ -124,4 +124,4 @@ src.brainmob.brain_op_stage = 4.0 dead_mob_list -= src.brainmob - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 32eb7019146..ae58b2fbcf4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -564,6 +564,9 @@ pressure_alert = -2 else pressure_alert = -1 + + if(environment.toxins > MOLES_PLASMA_VISIBLE) + pl_effects() return /* @@ -777,6 +780,12 @@ proc/handle_chemicals_in_body() if(reagents) reagents.metabolize(src) + var/total_plasmaloss = 0 + for(var/obj/item/I in src) + if(I.contaminated) + total_plasmaloss += vsc.plc.CONTAMINATION_LOSS + + adjustToxLoss(total_plasmaloss) // if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist if(PLANT in mutations) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 4a03ef68691..60835c6ce8d 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -378,15 +378,17 @@ datum name = "Napalm" id = "napalm" result = null - //required_reagents = list("aluminum" = 1, "plasma" = 1, "sacid" = 1 ) //Let's not make napalm. + required_reagents = list("aluminum" = 1, "plasma" = 1, "sacid" = 1 ) result_amount = 1 on_reaction(var/datum/reagents/holder, var/created_volume) var/turf/location = get_turf(holder.my_atom.loc) for(var/turf/simulated/floor/target_tile in range(0,location)) var/datum/gas_mixture/napalm = new + var/datum/gas/volatile_fuel/fuel = new + fuel.moles = created_volume + napalm.trace_gases += fuel - napalm.toxins = created_volume*10 napalm.temperature = 400+T0C napalm.update_values() diff --git a/code/world.dm b/code/world.dm index 2efd352dcfd..1a85ada9ba6 100644 --- a/code/world.dm +++ b/code/world.dm @@ -78,14 +78,16 @@ src.update_status() + . = ..() + + sleep_offline = 1 + master_controller = new /datum/controller/game_controller() - spawn(-1) + spawn(1) master_controller.setup() - lighting_controller.Initialize() process_teleport_locs() //Sets up the wizard teleport locations process_ghost_teleport_locs() //Sets up ghost teleport locations. - sleep_offline = 1 spawn(3000) //so we aren't adding to the round-start lag if(config.ToRban) diff --git a/html/changelog.html b/html/changelog.html index 3ffcb1b8c19..b7b5d3e2852 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -59,6 +59,49 @@ should be listed in the changelog upon commit though. Thanks. --> +
+

17 April 2013

+

SkyMarshal updated:

+
    +
  • ZAS is now more deadly, as per decision by administrative team. May be tweaked, but currently AIRFLOW is the biggest griefer.
  • +
  • World startup optimized, many functions now delayed until a player joins the server. (Reduces server boot time significantly)
  • +
  • Zones will now equalize air more rapidly.
  • +
  • ZAS now respects active magboots when airflow occurs.
  • +
  • Airflow will no longer throw you into doors and open them.
  • +
  • Race condition in zone construction has been fixed, so zones connect properly at round start.
  • +
  • Plasma effects readded.
  • +
  • Fixed runtime involving away mission.
  • +
+
+ +
+

11 April 2013

+

SkyMarshal updated:

+
    +
  • Fire has been reworked.
  • +
  • In-game variable editor is both readded and expanded with fire controlling capability.
  • +
+
+ +
+

9 April 2013

+

SkyMarshal updated:

+
    +
  • Fire Issues (Firedoors, Flamethrowers, Incendiary Grenades) fixed.
  • +
  • Fixed a bad line of code that was preventing autoignition of flammable gas mixes.
  • +
  • Volatile fuel is burned up after a point.
  • +
  • Partial-tile firedoors removed. This is due to ZAS breaking when interacting with them.
  • +
+
+ +
+

4 April 2013

+

SkyMarshal updated:

+
    +
  • Fixed ZAS
  • +
  • Fixed Fire
  • +
+

March 27th 2013

diff --git a/icons/effects/contamination.dmi b/icons/effects/contamination.dmi index c2fa348084a..1a7faf893ba 100644 Binary files a/icons/effects/contamination.dmi and b/icons/effects/contamination.dmi differ