diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 83514f912b2..440447487ba 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -215,10 +215,7 @@ //Transfer 5% of current tank air contents to turf var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount) if(air_transfer.gases[/datum/gas/plasma]) - if(air_transfer.gases[/datum/gas/plasma]) - air_transfer.gases[/datum/gas/plasma][MOLES] *= 5 - else - air_transfer.temperature += 15000 + air_transfer.gases[/datum/gas/plasma][MOLES] *= 5 target.assume_air(air_transfer) //Burn it based on transfered gas target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index ea25c24b197..ae368d7bc12 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -305,7 +305,7 @@ /obj/structure/statue/elder_atmosian name = "Elder Atmosian" - desc = "A statue of an Elder Atmosian, capable of bending the laws of thermodinamics at their will" + desc = "A statue of an Elder Atmosian, capable of bending the laws of thermodinamics to their will" icon_state = "eng" material_drop_type = /obj/item/stack/sheet/mineral/metal_hydrogen max_integrity = 1000 diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 4db11264de0..355aa6ae367 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -27,7 +27,7 @@ sivana_formation = 16 raynar_crystal_production = 17 roinneil_crystal_production = 18 cymar_crystal_production = 19 -roinneil_response = 20 +roinneil_response = 20 - 25 nobiliumsuppression = INFINITY */ @@ -122,6 +122,8 @@ nobiliumsuppression = INFINITY burned_fuel = max(0,0.00002*(temperature-(0.00001*(temperature**2))))*cached_gases[/datum/gas/nitrous_oxide][MOLES] + if(cached_gases[/datum/gas/nitrous_oxide][MOLES] - burned_fuel < 0) + return NO_REACTION cached_gases[/datum/gas/nitrous_oxide][MOLES] -= burned_fuel if(burned_fuel) @@ -399,6 +401,8 @@ nobiliumsuppression = INFINITY var/consumed_fuel = 0 if(temperature > 150 && temperature < T0C && cached_gases[/datum/gas/nitrogen][MOLES] > cached_gases[/datum/gas/hydrogen][MOLES]) consumed_fuel = (cached_gases[/datum/gas/hydrogen][MOLES] / AMMONIA_FORMATION_FACTOR) + if(cached_gases[/datum/gas/nitrogen][MOLES] - consumed_fuel < 0 || cached_gases[/datum/gas/hydrogen][MOLES] - consumed_fuel * 4 < 0) + return NO_REACTION cached_gases[/datum/gas/nitrogen][MOLES] -= consumed_fuel cached_gases[/datum/gas/hydrogen][MOLES] -= consumed_fuel * 4 if(prob(30 * consumed_fuel)) @@ -514,7 +518,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(cached_gases[/datum/gas/oxygen][MOLES], cached_gases[/datum/gas/nitrogen][MOLES]) var/energy_used = heat_efficency * NITROUS_FORMATION_ENERGY ASSERT_GAS(/datum/gas/nitrous_oxide,air) - if ((cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/nitrogen][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/nitrogen][MOLES] - heat_efficency * 2 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION if (temperature > 250) //maximum allowed temperature for the reaction return NO_REACTION @@ -549,7 +553,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST * 100),cached_gases[/datum/gas/oxygen][MOLES],cached_gases[/datum/gas/nitrogen][MOLES]) var/energy_used = heat_efficency * NITRYL_FORMATION_ENERGY ASSERT_GAS(/datum/gas/nitryl,air) - if ((cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/nitrogen][MOLES] - heat_efficency < 0) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency * 2 < 0 ) || (cached_gases[/datum/gas/nitrogen][MOLES] - heat_efficency < 0) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency * 0.05 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/oxygen][MOLES] -= heat_efficency * 2 cached_gases[/datum/gas/nitrogen][MOLES] -= heat_efficency @@ -658,7 +662,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST * 10), cached_gases[/datum/gas/plasma][MOLES], cached_gases[/datum/gas/carbon_dioxide][MOLES], cached_gases[/datum/gas/bz][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/freon,air) - if ((cached_gases[/datum/gas/plasma][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/carbon_dioxide][MOLES] - heat_efficency < 0) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/plasma][MOLES] - heat_efficency * 5 < 0 ) || (cached_gases[/datum/gas/carbon_dioxide][MOLES] - heat_efficency < 0) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency * 0.25 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/plasma][MOLES] -= heat_efficency * 5 cached_gases[/datum/gas/carbon_dioxide][MOLES] -= heat_efficency @@ -817,7 +821,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature * 0.01, cached_gases[/datum/gas/tritium][MOLES], cached_gases[/datum/gas/bz][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/halon,air) - if ((cached_gases[/datum/gas/tritium][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/tritium][MOLES] - heat_efficency * 5 < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency * 0.25 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION if(air.temperature >= 250) return NO_REACTION @@ -825,11 +829,11 @@ nobiliumsuppression = INFINITY cached_gases[/datum/gas/bz][MOLES] -= heat_efficency * 0.25 cached_gases[/datum/gas/halon][MOLES] += heat_efficency * 2 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/sivana_formation priority = 16 @@ -850,7 +854,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature * 0.01, cached_gases[/datum/gas/tritium][MOLES], cached_gases[/datum/gas/bz][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/sivana,air) - if ((cached_gases[/datum/gas/hydrogen][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/hydrogen][MOLES] - heat_efficency * 5 < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency * 0.25 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION if(air.temperature >= 250) return NO_REACTION @@ -858,11 +862,11 @@ nobiliumsuppression = INFINITY cached_gases[/datum/gas/bz][MOLES] -= heat_efficency * 0.25 cached_gases[/datum/gas/halon][MOLES] += heat_efficency * 2 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/raynar_formation priority = 12 @@ -883,7 +887,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature * 0.3, cached_gases[/datum/gas/freon][MOLES], cached_gases[/datum/gas/bz][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/raynar,air) - if ((cached_gases[/datum/gas/freon][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/freon][MOLES] - heat_efficency * 5 < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency * 0.25 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION if(air.temperature >= 100) return NO_REACTION @@ -891,11 +895,11 @@ nobiliumsuppression = INFINITY cached_gases[/datum/gas/bz][MOLES] -= heat_efficency * 0.25 cached_gases[/datum/gas/raynar][MOLES] += heat_efficency * 3 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/roinneil_formation priority = 13 @@ -916,7 +920,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature * 0.005, cached_gases[/datum/gas/pluoxium][MOLES], cached_gases[/datum/gas/hydrogen][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/roinneil,air) - if ((cached_gases[/datum/gas/pluoxium][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/hydrogen][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/pluoxium][MOLES] - heat_efficency * 0.2 < 0 ) || (cached_gases[/datum/gas/hydrogen][MOLES] - heat_efficency * 2 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION if(air.temperature >= 10000) return NO_REACTION @@ -928,7 +932,7 @@ nobiliumsuppression = INFINITY var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/cymar_formation priority = 14 @@ -949,7 +953,7 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature * 0.005, cached_gases[/datum/gas/hypernoblium][MOLES], cached_gases[/datum/gas/stimulum][MOLES]) var/energy_used = heat_efficency * 10 ASSERT_GAS(/datum/gas/cymar,air) - if ((cached_gases[/datum/gas/hypernoblium][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/stimulum][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/hypernoblium][MOLES] - heat_efficency * 0.01 < 0 ) || (cached_gases[/datum/gas/stimulum][MOLES] - heat_efficency * 0.5 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION if(air.temperature >= 290) return NO_REACTION @@ -957,11 +961,11 @@ nobiliumsuppression = INFINITY cached_gases[/datum/gas/stimulum][MOLES] -= heat_efficency * 0.5 cached_gases[/datum/gas/cymar][MOLES] += heat_efficency * 0.5 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/halon_o2removal priority = -1 @@ -982,17 +986,17 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature / ( FIRE_MINIMUM_TEMPERATURE_TO_EXIST * 10), cached_gases[/datum/gas/halon][MOLES], cached_gases[/datum/gas/oxygen][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/carbon_dioxide,air) - if ((cached_gases[/datum/gas/halon][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/halon][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/oxygen][MOLES] - heat_efficency * 10 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/halon][MOLES] -= heat_efficency cached_gases[/datum/gas/oxygen][MOLES] -= heat_efficency * 10 cached_gases[/datum/gas/carbon_dioxide][MOLES] += heat_efficency * 5 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity - energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/sivana_plasma_filtering priority = 9 @@ -1012,17 +1016,17 @@ nobiliumsuppression = INFINITY var/heat_efficency = min(temperature * 0.01, cached_gases[/datum/gas/sivana][MOLES], cached_gases[/datum/gas/plasma][MOLES]) var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/carbon_dioxide,air) - if ((cached_gases[/datum/gas/sivana][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/plasma][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/sivana][MOLES] - heat_efficency * 0.2 < 0 ) || (cached_gases[/datum/gas/plasma][MOLES] - heat_efficency * 0.5 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/sivana][MOLES] -= heat_efficency * 0.2 cached_gases[/datum/gas/plasma][MOLES] -= heat_efficency * 0.5 cached_gases[/datum/gas/carbon_dioxide][MOLES] += heat_efficency * 0.4 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/sivana_n2o_filtering priority = 10 @@ -1043,18 +1047,18 @@ nobiliumsuppression = INFINITY var/energy_used = heat_efficency * 100 ASSERT_GAS(/datum/gas/oxygen,air) ASSERT_GAS(/datum/gas/nitrogen,air) - if ((cached_gases[/datum/gas/sivana][MOLES] - heat_efficency < 0 ) || (cached_gases[/datum/gas/nitrous_oxide][MOLES] - heat_efficency < 0)) //Shouldn't produce gas from nothing. + if ((cached_gases[/datum/gas/sivana][MOLES] - heat_efficency * 0.2 < 0 ) || (cached_gases[/datum/gas/nitrous_oxide][MOLES] - heat_efficency * 0.5 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/sivana][MOLES] -= heat_efficency * 0.2 cached_gases[/datum/gas/nitrous_oxide][MOLES] -= heat_efficency * 0.5 cached_gases[/datum/gas/oxygen][MOLES] += heat_efficency * 0.4 cached_gases[/datum/gas/nitrogen][MOLES] += heat_efficency * 0.4 - if(energy_used > 0) + if(energy_used) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = max(((temperature * old_heat_capacity + energy_used) / new_heat_capacity),TCMB) - return REACTING + return REACTING /datum/gas_reaction/cymar_decomp priority = 11 @@ -1073,8 +1077,6 @@ nobiliumsuppression = INFINITY var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow var/temperature = air.temperature var/burned_fuel = 0 - - burned_fuel = min(20, cached_gases[/datum/gas/nitrogen][MOLES], cached_gases[/datum/gas/cymar][MOLES]) if(cached_gases[/datum/gas/cymar][MOLES] - burned_fuel < 0) return NO_REACTION @@ -1114,15 +1116,18 @@ nobiliumsuppression = INFINITY var/consumed_fuel = 0 if(temperature > 1000 && temperature < 2500) consumed_fuel = min(cached_gases[/datum/gas/raynar][MOLES] / 10, 20 * (temperature * 0.001)) + if ((cached_gases[/datum/gas/raynar][MOLES] - consumed_fuel * 4 < 0 ) || (cached_gases[/datum/gas/oxygen][MOLES] - consumed_fuel < 0)) //Shouldn't produce gas from nothing. + return NO_REACTION cached_gases[/datum/gas/oxygen][MOLES] -= consumed_fuel cached_gases[/datum/gas/raynar][MOLES] -= consumed_fuel * 4 if(prob(1 * consumed_fuel)) new /obj/item/grenade/gas_crystal/raynar_crystal(location) energy_released += consumed_fuel * 800 - if(energy_released > 0) + if(energy_released) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING /datum/gas_reaction/roinneil_crystal_formation priority = 18 @@ -1144,15 +1149,18 @@ nobiliumsuppression = INFINITY var/consumed_fuel = 0 if(temperature > 100 && temperature < 150) consumed_fuel = min(cached_gases[/datum/gas/roinneil][MOLES] / 10, 20 * (temperature * 0.01)) + if ((cached_gases[/datum/gas/roinneil][MOLES] - consumed_fuel * 4 < 0 ) || (cached_gases[/datum/gas/nitrogen][MOLES] - consumed_fuel < 0)) //Shouldn't produce gas from nothing. + return NO_REACTION cached_gases[/datum/gas/nitrogen][MOLES] -= consumed_fuel cached_gases[/datum/gas/roinneil][MOLES] -= consumed_fuel * 4 if(prob(1 * consumed_fuel)) new /obj/item/grenade/gas_crystal/roinneil_crystal(location) energy_released += consumed_fuel * 800 - if(energy_released > 0) + if(energy_released) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING /datum/gas_reaction/cymar_crystal_formation priority = 19 @@ -1174,51 +1182,75 @@ nobiliumsuppression = INFINITY var/consumed_fuel = 0 if(temperature > 270 && temperature < 280) consumed_fuel = min(cached_gases[/datum/gas/cymar][MOLES] / 10, 20 * (temperature * 0.02)) + if ((cached_gases[/datum/gas/cymar][MOLES] - consumed_fuel * 4 < 0 ) || (cached_gases[/datum/gas/plasma][MOLES] - consumed_fuel < 0)) //Shouldn't produce gas from nothing. + return NO_REACTION cached_gases[/datum/gas/plasma][MOLES] -= consumed_fuel cached_gases[/datum/gas/cymar][MOLES] -= consumed_fuel * 4 if(prob(1 * consumed_fuel)) new /obj/item/grenade/gas_crystal/cymar_crystal(location) energy_released += consumed_fuel * 800 - if(energy_released > 0) + if(energy_released) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING -/datum/gas_reaction/roinneil_response +/datum/gas_reaction/roinneil_plasma_response priority = 20 - name = "Roinneil response" - id = "roinneil_response" + name = "Roinneil plasma response" + id = "roinneil_plasma_response" -/datum/gas_reaction/roinneil_response/init_reqs() +/datum/gas_reaction/roinneil_plasma_response/init_reqs() min_requirements = list( /datum/gas/roinneil = MINIMUM_MOLE_COUNT, - "TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + /datum/gas/plasma = MINIMUM_MOLE_COUNT, + "TEMP" = 250 ) -/datum/gas_reaction/roinneil_response/react(datum/gas_mixture/air, datum/holder) +/datum/gas_reaction/roinneil_plasma_response/react(datum/gas_mixture/air, datum/holder) var/energy_released = 0 var/old_heat_capacity = air.heat_capacity() var/list/cached_gases = air.gases var/temperature = air.temperature var/turf/open/location = isturf(holder) ? holder : null - air.assert_gases( /datum/gas/plasma, - /datum/gas/bz, - /datum/gas/freon, - /datum/gas/oxygen, - /datum/gas/tritium, - /datum/gas/hydrogen, - /datum/gas/nitrous_oxide, - /datum/gas/cymar - ) - if(cached_gases[/datum/gas/plasma][MOLES] > MINIMUM_MOLE_COUNT && cached_gases[/datum/gas/plasma][MOLES] < 10) + if(cached_gases[/datum/gas/plasma][MOLES] < 10 && air.temperature < 300) var produced_amount = min(5, cached_gases[/datum/gas/plasma][MOLES], cached_gases[/datum/gas/roinneil][MOLES]) - cached_gases[/datum/gas/plasma][MOLES] = 0 + if(cached_gases[/datum/gas/plasma][MOLES] - produced_amount < 0 || cached_gases[/datum/gas/roinneil][MOLES] - produced_amount * 0.1 <0) + return NO_REACTION + cached_gases[/datum/gas/plasma][MOLES] -= produced_amount cached_gases[/datum/gas/roinneil][MOLES] -= produced_amount * 0.1 energy_released -= produced_amount * 1500 - if(prob(produced_amount * 20)) + if(prob(produced_amount * 15)) new/obj/item/stack/sheet/mineral/plasma(location) - if(cached_gases[/datum/gas/bz][MOLES] > MINIMUM_MOLE_COUNT) + if(energy_released) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING + return NO_REACTION + +/datum/gas_reaction/roinneil_bz_response + priority = 21 + name = "Roinneil bz response" + id = "roinneil_bz_response" + +/datum/gas_reaction/roinneil_bz_response/init_reqs() + min_requirements = list( + /datum/gas/roinneil = MINIMUM_MOLE_COUNT, + /datum/gas/bz = MINIMUM_MOLE_COUNT, + "TEMP" = 260 + ) + +/datum/gas_reaction/roinneil_bz_response/react(datum/gas_mixture/air, datum/holder) + var/energy_released = 0 + var/old_heat_capacity = air.heat_capacity() + var/list/cached_gases = air.gases + var/temperature = air.temperature + var/turf/open/location = isturf(holder) ? holder : null + if(air.temperature < 280) var consumed_amount = min(5, cached_gases[/datum/gas/bz][MOLES], cached_gases[/datum/gas/roinneil][MOLES]) + if(cached_gases[/datum/gas/bz][MOLES] - consumed_amount < 0) + return NO_REACTION if(cached_gases[/datum/gas/bz][MOLES] < 30) location.rad_act(cached_gases[/datum/gas/bz][MOLES]) cached_gases[/datum/gas/bz][MOLES] -= consumed_amount @@ -1226,27 +1258,127 @@ nobiliumsuppression = INFINITY for(var/mob/living/carbon/L in location) L.hallucination += cached_gases[/datum/gas/bz][MOLES] * 0.5 energy_released += 100 - if(cached_gases[/datum/gas/freon][MOLES] > 100 && cached_gases[/datum/gas/oxygen][MOLES] > 100) - cached_gases[/datum/gas/roinneil][MOLES] = 0 - location.air.temperature = 240 - if(cached_gases[/datum/gas/tritium][MOLES] > MINIMUM_MOLE_COUNT) + if(energy_released) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING + return NO_REACTION + +/datum/gas_reaction/roinneil_freon_fire_response + priority = 22 + name = "Roinneil freon fire response" + id = "roinneil_freon_fire_response" + +/datum/gas_reaction/roinneil_freon_fire_response/init_reqs() + min_requirements = list( + /datum/gas/roinneil = MINIMUM_MOLE_COUNT, + /datum/gas/freon = MINIMUM_MOLE_COUNT, + /datum/gas/oxygen = MINIMUM_MOLE_COUNT, + "TEMP" = 260 + ) + +/datum/gas_reaction/roinneil_freon_fire_response/react(datum/gas_mixture/air, datum/holder) + var/energy_released = 0 + var/old_heat_capacity = air.heat_capacity() + var/list/cached_gases = air.gases + var/temperature = air.temperature + if(cached_gases[/datum/gas/freon][MOLES] > 100 && cached_gases[/datum/gas/oxygen][MOLES] > 100 && air.temperature < 300) + var fuel_consumption = min(5, temperature * 0.03, cached_gases[/datum/gas/freon][MOLES], cached_gases[/datum/gas/roinneil][MOLES]) + if(cached_gases[/datum/gas/roinneil][MOLES] - fuel_consumption < 0) + return NO_REACTION + cached_gases[/datum/gas/roinneil][MOLES] -= fuel_consumption + cached_gases[/datum/gas/freon][MOLES] += fuel_consumption * 0.01 + energy_released -= fuel_consumption * 1500 + if(energy_released) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING + return NO_REACTION + +/datum/gas_reaction/roinneil_tritium_response + priority = 23 + name = "Roinneil tritium response" + id = "roinneil_tritium_response" + +/datum/gas_reaction/roinneil_tritium_response/init_reqs() + min_requirements = list( + /datum/gas/roinneil = MINIMUM_MOLE_COUNT, + /datum/gas/tritium = MINIMUM_MOLE_COUNT, + "TEMP" = 200 + ) + +/datum/gas_reaction/roinneil_tritium_response/react(datum/gas_mixture/air, datum/holder) + var/energy_released = 0 + var/old_heat_capacity = air.heat_capacity() + var/list/cached_gases = air.gases + var/temperature = air.temperature + var/turf/open/location = isturf(holder) ? holder : null + if(air.temperature < 1500) var produced_amount = min(5, cached_gases[/datum/gas/tritium][MOLES], cached_gases[/datum/gas/roinneil][MOLES]) + if(cached_gases[/datum/gas/tritium][MOLES] - produced_amount < 0 || cached_gases[/datum/gas/roinneil][MOLES] - produced_amount * 0.01 < 0) + return NO_REACTION location.rad_act(produced_amount * 2.4) cached_gases[/datum/gas/tritium][MOLES] -= produced_amount cached_gases[/datum/gas/hydrogen][MOLES] += produced_amount cached_gases[/datum/gas/roinneil][MOLES] -= produced_amount * 0.01 energy_released += 50 + if(energy_released) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING + return NO_REACTION + + +/datum/gas_reaction/roinneil_hydrogen_response + priority = 24 + name = "Roinneil hydrogen response" + id = "roinneil_hydrogen_response" + +/datum/gas_reaction/roinneil_hydrogen_response/init_reqs() + min_requirements = list( + /datum/gas/roinneil = MINIMUM_MOLE_COUNT, + /datum/gas/hydrogen = MINIMUM_MOLE_COUNT, + ) + +/datum/gas_reaction/roinneil_hydrogen_response/react(datum/gas_mixture/air, datum/holder) + var/energy_released = 0 + var/old_heat_capacity = air.heat_capacity() + var/list/cached_gases = air.gases + var/temperature = air.temperature if(cached_gases[/datum/gas/hydrogen][MOLES] > 150) - var produced_amount = min(5, cached_gases[/datum/gas/tritium][MOLES], cached_gases[/datum/gas/roinneil][MOLES]) + var produced_amount = min(5, cached_gases[/datum/gas/hydrogen][MOLES], cached_gases[/datum/gas/roinneil][MOLES]) + if(cached_gases[/datum/gas/hydrogen][MOLES] - produced_amount <0) + return NO_REACTION cached_gases[/datum/gas/hydrogen][MOLES] -= produced_amount cached_gases[/datum/gas/roinneil][MOLES] += produced_amount * 0.5 - energy_released -= 150 + energy_released -= produced_amount * 2500 + if(energy_released) + var/new_heat_capacity = air.heat_capacity() + if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) + air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING + +/datum/gas_reaction/roinneil_cymar_response + priority = 25 + name = "Roinneil cymar response" + id = "roinneil_cymar_response" + +/datum/gas_reaction/roinneil_cymar_response/init_reqs() + min_requirements = list( + /datum/gas/roinneil = MINIMUM_MOLE_COUNT, + /datum/gas/cymar = MINIMUM_MOLE_COUNT, + "TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST + ) + +/datum/gas_reaction/roinneil_cymar_response/react(datum/gas_mixture/air, datum/holder) + var/list/cached_gases = air.gases + var/turf/open/location = isturf(holder) ? holder : null if(cached_gases[/datum/gas/cymar][MOLES] > MINIMUM_MOLE_COUNT) var max_power = min(5, cached_gases[/datum/gas/cymar][MOLES]) cached_gases[/datum/gas/cymar][MOLES] = 0 explosion(location, max_power * 0.15, max_power * 0.45, max_power * 0.65, max_power, max_power* 2) - - - var/new_heat_capacity = air.heat_capacity() - if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) - air.temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity + return REACTING + return NO_REACTION diff --git a/icons/obj/grenade.dmi b/icons/obj/grenade.dmi index 316541f5a4a..ab3ded207ce 100644 Binary files a/icons/obj/grenade.dmi and b/icons/obj/grenade.dmi differ