diff --git a/baystation12.dme b/baystation12.dme index 4013de65f5..232289dd45 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -683,6 +683,7 @@ #include "code\game\objects\items\weapons\circuitboards\computer\air_management.dm" #include "code\game\objects\items\weapons\circuitboards\computer\camera_monitor.dm" #include "code\game\objects\items\weapons\circuitboards\computer\computer.dm" +#include "code\game\objects\items\weapons\circuitboards\computer\holodeckcontrol.dm" #include "code\game\objects\items\weapons\circuitboards\computer\research.dm" #include "code\game\objects\items\weapons\circuitboards\computer\supply.dm" #include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm" diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 501c49ae55..dba966e9fb 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -1,13 +1,9 @@ /* Making Bombs with ZAS: -Make burny fire with lots of burning -Draw off 5000K gas from burny fire -Separate gas into oxygen and phoron components -Obtain phoron and oxygen tanks filled up about 50-75% with normal-temp gas -Fill rest with super hot gas from separated canisters, they should be about 125C now. -Attach to transfer valve and open. BOOM. - +Get gas to react in an air tank so that it gains pressure. If it gains enough pressure, it goes boom. +The more pressure, the more boom. +If it gains pressure too slowly, it may leak or just rupture instead of exploding. */ //#define FIREDBG @@ -268,16 +264,16 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) //determine how far the reaction can progress var/reaction_limit = min(total_oxidizers*(FIRE_REACTION_FUEL_AMOUNT/FIRE_REACTION_OXIDIZER_AMOUNT), total_fuel) //stoichiometric limit - //calculate the firelevel. - var/firelevel = calculate_firelevel(total_fuel, total_oxidizers, reaction_limit) - var/firelevel_ratio = firelevel / vsc.fire_firelevel_multiplier - //vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).) + var/gas_firelevel = calculate_firelevel(gas_fuel, total_oxidizers, reaction_limit, volume*group_multiplier) / vsc.fire_firelevel_multiplier var/min_burn = 0.30*volume*group_multiplier/CELL_VOLUME //in moles - so that fires with very small gas concentrations burn out fast - var/gas_reaction_progress = min(max(min_burn, firelevel_ratio*gas_fuel)*FIRE_GAS_BURNRATE_MULT, gas_fuel) + var/gas_reaction_progress = min(max(min_burn, gas_firelevel*gas_fuel)*FIRE_GAS_BURNRATE_MULT, gas_fuel) //liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning. Limit the burn rate to a certain amount per area. - var/liquid_reaction_progress = min((firelevel_ratio*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT, liquid_fuel) + var/liquid_firelevel = calculate_firelevel(liquid_fuel, total_oxidizers, reaction_limit, 0) / vsc.fire_firelevel_multiplier + var/liquid_reaction_progress = min((liquid_firelevel*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT, liquid_fuel) + + var/firelevel = (gas_fuel*gas_firelevel + liquid_fuel*liquid_firelevel)/total_fuel var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress var/used_fuel = min(total_reaction_progress, reaction_limit) @@ -286,7 +282,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) #ifdef FIREDBG log_debug("gas_fuel = [gas_fuel], liquid_fuel = [liquid_fuel], total_oxidizers = [total_oxidizers]") log_debug("fuel_area = [fuel_area], total_fuel = [total_fuel], reaction_limit = [reaction_limit]") - log_debug("firelevel -> [firelevel] / [vsc.fire_firelevel_multiplier]") + log_debug("firelevel -> [firelevel] (gas: [gas_firelevel], liquid: [liquid_firelevel])") log_debug("liquid_reaction_progress = [liquid_reaction_progress]") log_debug("gas_reaction_progress = [gas_reaction_progress]") log_debug("total_reaction_progress = [total_reaction_progress]") @@ -315,13 +311,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) //calculate the energy produced by the reaction and then set the new temperature of the mix temperature = (starting_energy + vsc.fire_fuel_energy_release * (used_gas_fuel + used_liquid_fuel)) / heat_capacity() + update_values() #ifdef FIREDBG log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_fuel]") - log_debug("new temperature = [temperature]") + log_debug("new temperature = [temperature]; new pressure = [return_pressure()]") #endif - - update_values() + return firelevel datum/gas_mixture/proc/check_recombustability(list/fuel_objs) @@ -363,27 +359,31 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs) break //returns a value between 0 and vsc.fire_firelevel_multiplier -/datum/gas_mixture/proc/calculate_firelevel(total_fuel, total_oxidizers, reaction_limit) +/datum/gas_mixture/proc/calculate_firelevel(total_fuel, total_oxidizers, reaction_limit, gas_volume) //Calculates the firelevel based on one equation instead of having to do this multiple times in different areas. var/firelevel = 0 var/total_combustables = (total_fuel + total_oxidizers) + var/active_combustables = (FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT + 1)*reaction_limit if(total_combustables > 0) //slows down the burning when the concentration of the reactants is low - var/dampening_multiplier = min(1, reaction_limit / (total_moles/group_multiplier)) + var/damping_multiplier = min(1, active_combustables / (total_moles/group_multiplier)) + + //weight the damping mult so that it only really brings down the firelevel when the ratio is closer to 0 + damping_multiplier = 2*damping_multiplier - (damping_multiplier*damping_multiplier) //calculates how close the mixture of the reactants is to the optimum - //fires burn better when there is more oxidizer -- too much fuel will choke them out a bit, reducing firelevel. + //fires burn better when there is more oxidizer -- too much fuel will choke the fire out a bit, reducing firelevel. var/mix_multiplier = 1 / (1 + (5 * ((total_fuel / total_combustables) ** 2))) #ifdef FIREDBG - ASSERT(dampening_multiplier <= 1) + ASSERT(damping_multiplier <= 1) ASSERT(mix_multiplier <= 1) #endif //toss everything together -- should produce a value between 0 and fire_firelevel_multiplier - firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * dampening_multiplier + firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * damping_multiplier return max( 0, firelevel) diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm index 674be3fc5e..7e91a26b3f 100644 --- a/code/ZAS/Variable Settings.dm +++ b/code/ZAS/Variable Settings.dm @@ -9,7 +9,8 @@ var/global/vs_control/vsc = new var/fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant" var/fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires." - var/fire_fuel_energy_release = 397000 + //Note that this parameter and the phoron heat capacity have a significant impact on TTV yield. + var/fire_fuel_energy_release = 866000 //J/mol. Adjusted to compensate for fire energy release being fixed, was 397000 var/fire_fuel_energy_release_NAME = "Fire - Fuel energy release" var/fire_fuel_energy_release_DESC = "The energy in joule released when burning one mol of a burnable substance" diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index a0f1f9c7f1..b204dc4eb0 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -41,7 +41,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048 (A.locked ? "The door bolts have fallen!" : "The door bolts look up."), ((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"), ((haspower) ? "The test light is on." : "The test light is off!"), - ((A.backupPowerCablesCut()) ? "The backup power light is off!" : "The backup power light is on."), + ((A.backup_power_lost_until) ? "The backup power light is off!" : "The backup power light is on."), ((A.aiControlDisabled==0 && !A.emagged && haspower)? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."), ((A.safe==0 && haspower)? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."), ((A.normalspeed==0 && haspower)? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."), diff --git a/code/defines/gases.dm b/code/defines/gases.dm index 1f8c871ad3..659bd2e21a 100644 --- a/code/defines/gases.dm +++ b/code/defines/gases.dm @@ -21,6 +21,9 @@ /decl/xgm_gas/phoron id = "phoron" name = "Phoron" + + //Note that this has a significant impact on TTV yield. + //Because it is so high, any leftover phoron soaks up a lot of heat and drops the yield pressure. specific_heat = 200 // J/(mol*K) //Hypothetical group 14 (same as carbon), period 8 element. diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 74edf74ea9..a90cd2f082 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -12,6 +12,11 @@ var/light_range_on = 3 var/light_power_on = 1 +/obj/machinery/computer/Destroy() + qdel(circuit) + circuit = null + return ..() + /obj/machinery/computer/initialize() power_change() @@ -60,7 +65,6 @@ for(var/x in verbs) verbs -= x set_broken() - density = 0 /obj/machinery/computer/update_icon() ..() @@ -125,11 +129,4 @@ M.deconstruct(src) qdel(src) else - src.attack_hand(user) - return - - - - - - + ..() diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index 547931a511..fb4716043f 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -105,27 +105,61 @@ qdel(src) */ +/client/proc/spawn_tanktransferbomb() + set category = "Debug" + set desc = "Spawn a tank transfer valve bomb" + set name = "Instant TTV" + + if(!check_rights(R_SPAWN)) return + + var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom + + var/p = input("Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null + if(p == null) return + + var/o = input("Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null + if(o == null) return + + var/c = input("Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null + if(c == null) return + + new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c) + /obj/effect/spawner/newbomb - name = "bomb" + name = "TTV bomb" icon = 'icons/mob/screen1.dmi' icon_state = "x" - var/btype = 0 // 0=radio, 1=prox, 2=time + + var/assembly_type = /obj/item/device/assembly/signaler + + //Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol. + var/phoron_amt = 10.96 + var/oxygen_amt = 16.44 + var/carbon_amt = 0.0 - timer - btype = 2 +/obj/effect/spawner/newbomb/timer + name = "TTV bomb - timer" + assembly_type = /obj/item/device/assembly/timer - syndicate +/obj/effect/spawner/newbomb/timer/syndicate + name = "TTV bomb - merc" + //High yield bombs. Yes, it is possible to make these with toxins + phoron_amt = 15.66 + oxygen_amt = 24.66 - proximity - btype = 1 +/obj/effect/spawner/newbomb/proximity + name = "TTV bomb - proximity" + assembly_type = /obj/item/device/assembly/prox_sensor - radio - btype = 0 - - -/obj/effect/spawner/newbomb/New() +/obj/effect/spawner/newbomb/radio/custom/New(var/newloc, ph, ox, co) + if(ph != null) phoron_amt = ph + if(ox != null) oxygen_amt = ox + if(co != null) carbon_amt = co ..() +/obj/effect/spawner/newbomb/New(newloc) + ..(newloc) + var/obj/item/device/transfer_valve/V = new(src.loc) var/obj/item/weapon/tank/phoron/PT = new(V) var/obj/item/weapon/tank/oxygen/OT = new(V) @@ -137,28 +171,15 @@ OT.master = V PT.air_contents.temperature = PHORON_FLASHPOINT - PT.air_contents.adjust_multi("phoron", 12, "carbon_dioxide", 8) + PT.air_contents.gas["phoron"] = phoron_amt + PT.air_contents.gas["carbon_dioxide"] = carbon_amt + PT.air_contents.update_values() OT.air_contents.temperature = PHORON_FLASHPOINT - OT.air_contents.adjust_gas("oxygen", 20) + OT.air_contents.gas["oxygen"] = oxygen_amt + OT.air_contents.update_values() - var/obj/item/device/assembly/S - - switch (src.btype) - // radio - if (0) - - S = new/obj/item/device/assembly/signaler(V) - - // proximity - if (1) - - S = new/obj/item/device/assembly/prox_sensor(V) - - // timer - if (2) - - S = new/obj/item/device/assembly/timer(V) + var/obj/item/device/assembly/S = new assembly_type(V) V.attached_device = S diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 36c3b3d11f..e44f759547 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -99,17 +99,9 @@ if (src.loc != usr) return 0 if(tank_one && href_list["tankone"]) - split_gases() - valve_open = 0 - tank_one.loc = get_turf(src) - tank_one = null - update_icon() + remove_tank(tank_one) else if(tank_two && href_list["tanktwo"]) - split_gases() - valve_open = 0 - tank_two.loc = get_turf(src) - tank_two = null - update_icon() + remove_tank(tank_two) else if(href_list["open"]) toggle_valve() else if(attached_device) @@ -148,20 +140,43 @@ if(attached_device) overlays += "device" +/obj/item/device/transfer_valve/proc/remove_tank(obj/item/weapon/tank/T) + if(tank_one == T) + split_gases() + tank_one = null + else if(tank_two == T) + split_gases() + tank_two = null + else + return + + T.loc = get_turf(src) + update_icon() + /obj/item/device/transfer_valve/proc/merge_gases() + if(valve_open) + return tank_two.air_contents.volume += tank_one.air_contents.volume var/datum/gas_mixture/temp temp = tank_one.air_contents.remove_ratio(1) tank_two.air_contents.merge(temp) + valve_open = 1 /obj/item/device/transfer_valve/proc/split_gases() - if (!valve_open || !tank_one || !tank_two) + if(!valve_open) return + + valve_open = 0 + + if(deleted(tank_one) || deleted(tank_two)) + return + var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume var/datum/gas_mixture/temp temp = tank_two.air_contents.remove_ratio(ratio1) tank_one.air_contents.merge(temp) tank_two.air_contents.volume -= tank_one.air_contents.volume + /* Exadv1: I know this isn't how it's going to work, but this was just to check @@ -169,8 +184,7 @@ */ /obj/item/device/transfer_valve/proc/toggle_valve() - if(valve_open==0 && (tank_one && tank_two)) - valve_open = 1 + if(!valve_open && (tank_one && tank_two)) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) @@ -196,16 +210,11 @@ message_admins(log_str, 0, 1) log_game(log_str) merge_gases() - spawn(20) // In case one tank bursts - for (var/i=0,i<5,i++) - src.update_icon() - sleep(10) - src.update_icon() else if(valve_open==1 && (tank_one && tank_two)) split_gases() - valve_open = 0 - src.update_icon() + + src.update_icon() // this doesn't do anything but the timer etc. expects it to be here // eventually maybe have it update icon to show state (timer, prox etc.) like old bombs diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 2c3fc80a31..989b73aa67 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -191,7 +191,7 @@ else if(get_amount() < used) return 0 - for(var/i = 1 to uses_charge) + for(var/i = 1 to charge_costs.len) var/datum/matter_synth/S = synths[i] S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted return 1 @@ -264,8 +264,8 @@ return 0 var/datum/matter_synth/S = synths[1] . = round(S.get_charge() / charge_costs[1]) - if(uses_charge > 1) - for(var/i = 2 to uses_charge) + if(charge_costs.len > 1) + for(var/i = 2 to charge_costs.len) S = synths[i] . = min(., round(S.get_charge() / charge_costs[i])) return diff --git a/code/game/objects/items/weapons/circuitboards/computer/holodeckcontrol.dm b/code/game/objects/items/weapons/circuitboards/computer/holodeckcontrol.dm new file mode 100644 index 0000000000..db11c4de50 --- /dev/null +++ b/code/game/objects/items/weapons/circuitboards/computer/holodeckcontrol.dm @@ -0,0 +1,31 @@ +#ifndef T_BOARD +#error T_BOARD macro is not defined but we need it! +#endif + +/obj/item/weapon/circuitboard/holodeckcontrol + name = T_BOARD("holodeck control console") + build_path = /obj/machinery/computer/HolodeckControl + origin_tech = "programming=2;bluespace=2" + var/last_to_emag + var/linkedholodeck_area + var/list/supported_programs + var/list/restricted_programs + +/obj/item/weapon/circuitboard/holodeckcontrol/construct(var/obj/machinery/computer/HolodeckControl/HC) + if (..(HC)) + HC.supported_programs = supported_programs.Copy() + HC.restricted_programs = restricted_programs.Copy() + if(linkedholodeck_area) + HC.linkedholodeck = locate(linkedholodeck_area) + if(last_to_emag) + HC.last_to_emag = last_to_emag + HC.emagged = 1 + HC.safety_disabled = 1 + +/obj/item/weapon/circuitboard/holodeckcontrol/deconstruct(var/obj/machinery/computer/HolodeckControl/HC) + if (..(HC)) + linkedholodeck_area = HC.linkedholodeck_area + supported_programs = HC.supported_programs.Copy() + restricted_programs = HC.restricted_programs.Copy() + last_to_emag = HC.last_to_emag + HC.emergencyShutdown() diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 87d2639d3b..d61dcd50d6 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -36,6 +36,10 @@ qdel(air_contents) processing_objects.Remove(src) + + if(istype(loc, /obj/item/device/transfer_valve)) + var/obj/item/device/transfer_valve/TTV = loc + TTV.remove_tank(src) ..() @@ -272,7 +276,10 @@ qdel(src) else if(pressure > TANK_RUPTURE_PRESSURE) - //world << "[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]" + #ifdef FIREDBG + log_debug("\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]") + #endif + if(integrity <= 0) var/turf/simulated/T = get_turf(src) if(!T) @@ -284,7 +291,10 @@ integrity-- else if(pressure > TANK_LEAK_PRESSURE) - //world << "[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]" + #ifdef FIREDBG + log_debug("\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]") + #endif + if(integrity <= 0) var/turf/simulated/T = get_turf(src) if(!T) diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index bd3c4be0d9..29d2b95d88 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -162,6 +162,7 @@ var/list/debug_verbs = list ( ,/client/proc/testZAScolors_remove ,/client/proc/setup_supermatter_engine ,/client/proc/atmos_toggle_debug + ,/client/proc/spawn_tanktransferbomb ) diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 41bbdecdac..2a4d1df794 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -5,10 +5,13 @@ use_power = 1 active_power_usage = 8000 //8kW for the scenery + 500W per holoitem + + circuit = /obj/item/weapon/circuitboard/holodeckcontrol + var/item_power_usage = 500 var/area/linkedholodeck = null - var/area/target = null + var/linkedholodeck_area var/active = 0 var/list/holographic_objs = list() var/list/holographic_mobs = list() @@ -17,34 +20,39 @@ var/mob/last_to_emag = null var/last_change = 0 var/last_gravity_change = 0 - var/list/supported_programs = list( \ - "Empty Court" = "emptycourt", \ - "Basketball Court" = "basketball", \ - "Thunderdome Court" = "thunderdomecourt", \ - "Boxing Ring"="boxingcourt", \ - "Beach" = "beach", \ - "Desert" = "desert", \ - "Space" = "space", \ - "Picnic Area" = "picnicarea", \ - "Snow Field" = "snowfield", \ - "Theatre" = "theatre", \ - "Meeting Hall" = "meetinghall", \ - "Courtroom" = "courtroom" \ - ) - var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp") + var/list/supported_programs + var/list/restricted_programs + +/obj/machinery/computer/HolodeckControl/New() + ..() + linkedholodeck = locate(linkedholodeck_area) + supported_programs = list() + restricted_programs = list() /obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob) return src.attack_hand(user) /obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) - if(..()) - return + return 1 user.set_machine(src) var/dat dat += "Holodeck Control System
" dat += "
Current Loaded Programs:
" + + if(!linkedholodeck) + dat += "Warning: Unable to locate holodeck.
" + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + return + + if(!supported_programs.len) + dat += "Warning: No supported holo-programs loaded.
" + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + return + for(var/prog in supported_programs) dat += "([prog])
" @@ -82,10 +90,8 @@ user << browse(dat, "window=computer;size=400x500") onclose(user, "computer") - return - /obj/machinery/computer/HolodeckControl/Topic(href, href_list) if(..()) return 1 @@ -131,8 +137,9 @@ user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator." log_game("[key_name(usr)] emagged the Holodeck Control Computer") return 1 - src.updateUsrDialog() - return + src.updateUsrDialog() + else + ..() /obj/machinery/computer/HolodeckControl/proc/update_projections() if (safety_disabled) @@ -149,10 +156,6 @@ if (last_to_emag) C.friends = list(last_to_emag) -/obj/machinery/computer/HolodeckControl/New() - ..() - linkedholodeck = locate(/area/holodeck/alphadeck) - //This could all be done better, but it works for now. /obj/machinery/computer/HolodeckControl/Destroy() emergencyShutdown() @@ -335,3 +338,28 @@ active = 0 use_power = 1 + +/obj/machinery/computer/HolodeckControl/Exodus + linkedholodeck_area = /area/holodeck/alphadeck + +/obj/machinery/computer/HolodeckControl/Exodus/New() + ..() + supported_programs = list( + "Empty Court" = "emptycourt", + "Basketball Court" = "basketball", + "Thunderdome Court" = "thunderdomecourt", + "Boxing Ring" = "boxingcourt", + "Beach" = "beach", + "Desert" = "desert", + "Space" = "space", + "Picnic Area" = "picnicarea", + "Snow Field" = "snowfield", + "Theatre" = "theatre", + "Meeting Hall" = "meetinghall", + "Courtroom" = "courtroom" + ) + + restricted_programs = list( + "Atmospheric Burn Simulation" = "burntest", + "Wildlife Simulation" = "wildlifecarp" + ) diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index dc23b57094..7e25b7b358 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -54,7 +54,7 @@ breath = environment.remove_volume(volume_needed) handle_chemical_smoke(environment) //handle chemical smoke while we're at it - if(breath) + if(breath && breath.total_moles) //handle mask filtering if(istype(wear_mask, /obj/item/clothing/mask) && breath) var/obj/item/clothing/mask/M = wear_mask diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8291c9df75..ea48fb51c0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -980,7 +980,7 @@ if(L && !L.is_bruised()) src.custom_pain("You feel a stabbing pain in your chest!", 1) - L.damage = L.min_bruised_damage + L.bruise() /* /mob/living/carbon/human/verb/simulate() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 4e4bb11e27..96e3c76f0b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -342,10 +342,26 @@ if(status_flags & GODMODE) return - if(!breath || (breath.total_moles == 0) || suiciding) - failed_last_breath = 1 - if(suiciding) - adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster + if(status_flags & GODMODE) + return + + //exposure to extreme pressures can rupture lungs + if(breath && (breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)) + if(!is_lung_ruptured() && prob(5)) + rupture_lung() + + //check if we actually need to process breath + if(!breath || (breath.total_moles == 0) || suiciding) + failed_last_breath = 1 + if(suiciding) + adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster + oxygen_alert = max(oxygen_alert, 1) + return 0 + if(health > config.health_threshold_crit) + adjustOxyLoss(HUMAN_MAX_OXYLOSS) + else + adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) + oxygen_alert = max(oxygen_alert, 1) return 0 if(health > config.health_threshold_crit) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 2367ed5b43..664e00d275 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -240,6 +240,9 @@ var/list/organ_cache = list() if(parent && !silent) owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) +/obj/item/organ/proc/bruise() + damage = max(damage, min_bruised_damage) + /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc robotic = 2 src.status &= ~ORGAN_BROKEN diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 2038d718e0..f509340549 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -110,6 +110,7 @@ /obj/item/projectile/bullet/pistol/rubber //"rubber" bullets name = "rubber bullet" + check_armour = "melee" damage = 10 agony = 40 embed = 0 @@ -123,6 +124,7 @@ /obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets name = "beanbag" + check_armour = "melee" damage = 20 agony = 60 embed = 0 diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 1744cec3d7..762c2b71c4 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -172,10 +172,12 @@ affected.createwound(BRUISE, 20) affected.fracture() - - /*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE. - user.visible_message("\red A rib pierces the lung!") - target.rupture_lung()*/ + + if(affected.internal_organs && affected.internal_organs.len) + if(prob(40)) + var/obj/item/organ/O = pick(affected.internal_organs) //TODO weight by organ size + user.visible_message("A wayward piece of [target]'s [affected.encased] pierces \his [O.name]!") + O.bruise() /datum/surgery_step/open_encased/mend allowed_tools = list( diff --git a/html/changelog.html b/html/changelog.html index 3ff8b6dadf..3788ac8cb8 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,14 @@ -->
+

10 October 2015

+

HarpyEagle updated:

+ +

11 September 2015

HarpyEagle updated: