Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again

This commit is contained in:
pigeons
2018-04-27 21:28:13 -04:00
committed by CitadelStationBot
parent ab3c55ab23
commit 2b2ff05b73
3 changed files with 42 additions and 13 deletions
+2
View File
@@ -56,6 +56,8 @@
#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
#define FIRE_GROWTH_RATE 40000 //For small fires
#define PLASMA_MINIMUM_BURN_TEMPERATURE (100+T0C)
#define PLASMA_UPPER_TEMPERATURE (1370+T0C)
#define PLASMA_OXYGEN_FULLBURN 10
//GASES
#define MIN_TOXIC_GAS_DAMAGE 1
@@ -1,46 +1,77 @@
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT]) / (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT] + (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT] / CELSIUS_TO_KELVIN(TEMP_O)))
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
/obj/effect/spawner/newbomb
name = "bomb"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
var/btemp1 = 1500
var/btemp2 = 1000 // tank temperatures
var/temp_p = 1500
var/temp_o = 1000 // tank temperatures
var/pressure_p = 10 * ONE_ATMOSPHERE
var/pressure_o = 10 * ONE_ATMOSPHERE //tank pressures
var/assembly_type
/obj/effect/spawner/newbomb/Initialize()
. = ..()
<<<<<<< HEAD
var/obj/item/device/transfer_valve/V = new(src.loc)
var/obj/item/tank/internals/plasma/full/PT = new(V)
=======
var/obj/item/transfer_valve/V = new(src.loc)
var/obj/item/tank/internals/plasma/PT = new(V)
>>>>>>> c0b7f77... Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again (#37293)
var/obj/item/tank/internals/oxygen/OT = new(V)
PT.air_contents.temperature = btemp1 + T0C
OT.air_contents.temperature = btemp2 + T0C
PT.air_contents.assert_gas(/datum/gas/plasma)
PT.air_contents.gases[/datum/gas/plasma][MOLES] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
OT.air_contents.assert_gas(/datum/gas/oxygen)
OT.air_contents.gases[/datum/gas/oxygen][MOLES] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
V.tank_one = PT
V.tank_two = OT
PT.master = V
OT.master = V
if(assembly_type)
var/obj/item/device/assembly/A = new assembly_type(V)
V.attached_device = A
A.holder = V
A.toggle_secure()
V.update_icon()
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/newbomb/timer/syndicate/Initialize()
temp_p = (OPTIMAL_TEMP_K_PLA_BURN_SCALE(pressure_p, pressure_o, temp_o)/2 + OPTIMAL_TEMP_K_PLA_BURN_RATIO(pressure_p, pressure_o, temp_o)/2) - T0C
. = ..()
/obj/effect/spawner/newbomb/timer
assembly_type = /obj/item/device/assembly/timer
/obj/effect/spawner/newbomb/timer/syndicate
btemp1 = 150
btemp2 = 20
pressure_o = TANK_LEAK_PRESSURE - 1
temp_o = 20
pressure_p = TANK_LEAK_PRESSURE - 1
/obj/effect/spawner/newbomb/proximity
assembly_type = /obj/item/device/assembly/prox_sensor
/obj/effect/spawner/newbomb/radio
<<<<<<< HEAD
assembly_type = /obj/item/device/assembly/signaler
=======
assembly_type = /obj/item/assembly/signaler
>>>>>>> c0b7f77... Modified bomb and syndicate bomb spawner so Cuban Pete bombs maxcap and work again (#37293)
#undef CELSIUS_TO_KELVIN
#undef OPTIMAL_TEMP_K_PLA_BURN_SCALE
#undef OPTIMAL_TEMP_K_PLA_BURN_RATIO
@@ -1,10 +1,8 @@
//Plasma fire properties
#define OXYGEN_BURN_RATE_BASE 1.4
#define PLASMA_BURN_RATE_DELTA 9
#define PLASMA_UPPER_TEMPERATURE (1370+T0C)
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30
#define PLASMA_OXYGEN_FULLBURN 10
#define FIRE_CARBON_ENERGY_RELEASED 100000 //Amount of heat released per mole of burnt carbon into the tile
#define FIRE_HYDROGEN_ENERGY_RELEASED 280000 // Amount of heat released per mole of burnt hydrogen and/or tritium(hydrogen isotope)
#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
@@ -362,10 +360,8 @@
#undef OXYGEN_BURN_RATE_BASE
#undef PLASMA_BURN_RATE_DELTA
#undef PLASMA_UPPER_TEMPERATURE
#undef PLASMA_MINIMUM_OXYGEN_NEEDED
#undef PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO
#undef PLASMA_OXYGEN_FULLBURN
#undef FIRE_CARBON_ENERGY_RELEASED
#undef FIRE_PLASMA_ENERGY_RELEASED
#undef WATER_VAPOR_FREEZE