-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domino of Explosions: Explosion on a Dwayne-Class #3387
base: master
Are you sure you want to change the base?
Changes from all commits
ec4c776
7f44e89
31bbc79
50e86c9
0584462
205585a
0e5c49b
b0db41f
bfb5c49
109e294
65521fe
e72401d
8efcbbd
361b504
c491220
1031041
dc73e62
beb7563
cede190
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,13 +168,13 @@ | |
|
||
//TANKS | ||
/// temperature in kelvins at which a tank will start to melt | ||
#define TANK_MELT_TEMPERATURE 1000000 | ||
#define TANK_MELT_TEMPERATURE 1000 + T0C | ||
/// Tank starts leaking | ||
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) | ||
#define TANK_LEAK_PRESSURE (20 * ONE_ATMOSPHERE + 5) | ||
/// Tank spills all contents into atmosphere | ||
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) | ||
#define TANK_RUPTURE_PRESSURE (20 * ONE_ATMOSPHERE) | ||
Comment on lines
+173
to
+175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2023 kpa is less than the air pump, which fills to ~2533, so people trying to fill tanks with one can break them (source: experience). I'd think at the very least tanks should have warning labels for maximum pressure/temperature There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea Probably on a examine() |
||
/// Boom 3x3 base explosion | ||
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) | ||
#define TANK_FRAGMENT_PRESSURE (30.*ONE_ATMOSPHERE) | ||
/// +1 for each SCALE kPa aboe threshold | ||
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) | ||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3) | ||
|
@@ -337,6 +337,7 @@ | |
#define GAS_HYDROGEN "h2" | ||
#define GAS_CHLORINE "cl2" | ||
#define GAS_HYDROGEN_CHLORIDE "hcl" | ||
#define GAS_CO "co" | ||
|
||
#define GAS_FLAG_DANGEROUS (1<<0) | ||
#define GAS_FLAG_BREATH_PROC (1<<1) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
// Pressure limits. | ||
/// This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) | ||
#define HAZARD_HIGH_PRESSURE 550 | ||
#define HAZARD_HIGH_PRESSURE 303 | ||
/// This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) | ||
#define WARNING_HIGH_PRESSURE 325 | ||
#define WARNING_HIGH_PRESSURE 202 | ||
/// This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE) | ||
#define WARNING_LOW_PRESSURE 50 | ||
#define WARNING_LOW_PRESSURE 60 | ||
/// This is when the black ultra-low pressure icon is displayed. (This one is set as a constant) | ||
#define HAZARD_LOW_PRESSURE 20 | ||
#define HAZARD_LOW_PRESSURE 40 | ||
Comment on lines
+3
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably update the comments here because they will be inaccurate with the current numbers There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep |
||
|
||
/// This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount. | ||
#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 | ||
|
@@ -28,11 +28,11 @@ | |
/// The body temperature limit the human body can take before it starts taking damage from heat. | ||
/// This also affects how fast the body normalises it's temperature when hot. | ||
/// 340k is about 66c, and rather high for a human. | ||
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 30) | ||
#define HUMAN_BODYTEMP_HEAT_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL + 20) | ||
/// The body temperature limit the human body can take before it starts taking damage from cold. | ||
/// This also affects how fast the body normalises it's temperature when cold. | ||
/// 270k is about -3c, that is below freezing and would hurt over time. | ||
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 40) | ||
#define HUMAN_BODYTEMP_COLD_DAMAGE_LIMIT (HUMAN_BODYTEMP_NORMAL - 30) | ||
Comment on lines
30
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the comments here too, new numbers are 57 c/ 330 k and 7 c/ 280 k There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ty |
||
|
||
|
||
//VOX DEFINES | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,6 @@ | |
var/mob/living/shooter | ||
|
||
/datum/component/pellet_cloud/Initialize(projectile_type=/obj/item/shrapnel, magnitude=5) | ||
if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent) && !issupplypod(parent)) | ||
return COMPONENT_INCOMPATIBLE | ||
Comment on lines
-49
to
-50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please at least check that its an atom or obj |
||
|
||
if(magnitude < 1) | ||
stack_trace("Invalid magnitude [magnitude] < 1 on pellet_cloud, parent: [parent]") | ||
|
@@ -57,7 +55,7 @@ | |
|
||
if(isammocasing(parent)) | ||
num_pellets = magnitude | ||
else if(isgrenade(parent) || islandmine(parent) || issupplypod(parent)) | ||
else | ||
radius = magnitude | ||
|
||
/datum/component/pellet_cloud/Destroy(force, silent) | ||
|
@@ -76,7 +74,7 @@ | |
RegisterSignal(parent, COMSIG_GRENADE_PRIME, PROC_REF(create_blast_pellets)) | ||
else if(islandmine(parent)) | ||
RegisterSignal(parent, COMSIG_MINE_TRIGGERED, PROC_REF(create_blast_pellets)) | ||
else if(issupplypod(parent)) | ||
else | ||
RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, PROC_REF(create_blast_pellets)) | ||
|
||
/datum/component/pellet_cloud/UnregisterFromParent() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -832,6 +832,29 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb | |
if(isturf(location)) | ||
location.hotspot_expose(flame_heat, 5) | ||
|
||
if(!prob(1)) | ||
return | ||
|
||
for(var/dir in GLOB.cardinals) | ||
var/ruined_round = FALSE | ||
var/turf/test_turf = get_step(location, dir) | ||
for(var/obj/to_test as obj in test_turf.contents) | ||
if(istype(to_test, /obj/structure/reagent_dispensers/fueltank)) | ||
location.visible_message("<span class='userdanger'>A single ember from [src] drops gently onto [to_test]. Uh oh.</span>") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. span macros |
||
to_test.fire_act() | ||
ruined_round = TRUE | ||
break | ||
if(istype(to_test, /obj/machinery/atmospherics/components/unary/tank)) | ||
location.visible_message("<span class='userdanger'>A flash fire forms around [src]!</span>") | ||
location.IgniteTurf(flame_heat/20) | ||
new /obj/effect/hotspot(location) | ||
ruined_round = TRUE | ||
break | ||
if(ruined_round) | ||
break | ||
|
||
|
||
|
||
/obj/item/proc/ignition_effect(atom/A, mob/user) | ||
if(get_temperature()) | ||
. = "<span class='notice'>[user] lights [A] with [src].</span>" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
flags_1 = CONDUCT_1 | ||
slot_flags = ITEM_SLOT_BACK | ||
hitsound = 'sound/weapons/smash.ogg' | ||
resistance_flags = FIRE_PROOF // its metal, but the gas inside isnt nessarily fireproof... | ||
pressure_resistance = ONE_ATMOSPHERE * 5 | ||
force = 5 | ||
throwforce = 10 | ||
|
@@ -16,7 +17,6 @@ | |
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 30) | ||
var/datum/gas_mixture/air_contents = null | ||
var/distribute_pressure = ONE_ATMOSPHERE | ||
var/integrity = 3 | ||
var/volume = 70 | ||
|
||
supports_variations = VOX_VARIATION | ||
|
@@ -219,8 +219,37 @@ | |
/obj/item/tank/process() | ||
//Allow for reactions | ||
air_contents.react() | ||
var/turf/open/current_turf = get_turf(src) | ||
if(current_turf) | ||
temperature_expose(current_turf.air, current_turf.air.return_temperature(), current_turf.air.return_pressure()) | ||
check_status() | ||
|
||
/obj/item/tank/fire_act(exposed_temperature, exposed_volume) | ||
. = ..() | ||
var/tank_temperature = air_contents.return_temperature() | ||
tank_temperature += exposed_temperature/20 //slowly equalize with the air, since this is over an active fire, we heat up faster | ||
air_contents.set_temperature(tank_temperature) | ||
if(exposed_temperature > TANK_MELT_TEMPERATURE) | ||
take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE)/2, 0), BURN, 0) | ||
if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion | ||
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) | ||
|
||
|
||
/obj/item/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's easy for a tank to end up overheating on lava planets & there's no fast way to un-overheat a tank as far as I'm aware There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed this mechanic, temperature_expose only procs on fires Before I removed it putting the tank back in your ship would cool it ambiently |
||
if(!isturf(loc)) //so people dont freeze to death by cold air during eva | ||
return ..() | ||
var/tank_temperature = air_contents.return_temperature() | ||
tank_temperature = ((tank_temperature * 6) + exposed_temperature)/7 //slowly equalize with the air | ||
air_contents.set_temperature(tank_temperature) | ||
if(exposed_temperature > TANK_MELT_TEMPERATURE) | ||
take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE)/2, 0), BURN, 0) | ||
if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion | ||
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0) | ||
|
||
/obj/item/tank/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration) | ||
. = ..() | ||
shake_animation(damage_amount, max(damage_amount/2, 2)) | ||
|
||
/obj/item/tank/proc/check_status() | ||
//Handle exploding, leaking, and rupturing of the tank | ||
|
||
|
@@ -232,40 +261,33 @@ | |
|
||
if(pressure > TANK_FRAGMENT_PRESSURE) | ||
if(!istype(src.loc, /obj/item/transfer_valve)) | ||
message_admins("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") | ||
log_admin("[src] ruptured explosively at [ADMIN_VERBOSEJMP(src)], last touched by [get_mob_by_key(fingerprintslast)]!") | ||
log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively") | ||
//Give the gas a chance to build up more pressure through reacting | ||
air_contents.react(src) | ||
pressure = air_contents.return_pressure() | ||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE | ||
var/range = (pressure-TANK_RUPTURE_PRESSURE)/TANK_FRAGMENT_SCALE | ||
var/turf/epicenter = get_turf(loc) | ||
|
||
|
||
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5)) | ||
explosion(epicenter, round(range*0.05), round(range*0.5), round(range), round(range*1.5)) | ||
|
||
AddComponent(/datum/component/pellet_cloud, /obj/projectile/bullet/shrapnel/hot, round(range)) | ||
if(istype(src.loc, /obj/item/transfer_valve)) | ||
qdel(src.loc) | ||
else | ||
qdel(src) | ||
return obj_destruction() | ||
|
||
else if(pressure > TANK_RUPTURE_PRESSURE || temperature > TANK_MELT_TEMPERATURE) | ||
if(integrity <= 0) | ||
var/turf/T = get_turf(src) | ||
if(!T) | ||
return | ||
T.assume_air(air_contents) | ||
playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3) | ||
qdel(src) | ||
else | ||
integrity-- | ||
|
||
else if(pressure > TANK_LEAK_PRESSURE) | ||
if(integrity <= 0) | ||
var/turf/T = get_turf(src) | ||
if(!T) | ||
return | ||
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25) | ||
T.assume_air(leaked_gas) | ||
else | ||
integrity-- | ||
take_damage(max((pressure - TANK_RUPTURE_PRESSURE), 0), BRUTE, 0) | ||
take_damage(max((temperature - TANK_MELT_TEMPERATURE), 0), BRUTE, 0) | ||
|
||
/obj/item/tank/obj_destruction(damage_flag) | ||
var/turf/T = get_turf(src) | ||
if(!T) | ||
return ..() | ||
T.assume_air(air_contents) | ||
playsound(src.loc, 'sound/effects/spray.ogg', 100, TRUE, -3) | ||
return ..() | ||
|
||
else if(integrity < 3) | ||
integrity++ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,17 @@ | |
) | ||
) | ||
|
||
/datum/gas/carbon_monoxide | ||
id = GAS_CO | ||
specific_heat = 30 | ||
name = "Carbon Monoxide" | ||
breath_results = GAS_CO | ||
|
||
flags = GAS_FLAG_DANGEROUS | ||
|
||
fusion_power = 0 | ||
enthalpy = -110500 | ||
|
||
/datum/gas/carbon_dioxide //what the fuck is this? | ||
id = GAS_CO2 | ||
specific_heat = 30 | ||
|
@@ -161,7 +172,7 @@ | |
specific_heat = 10 | ||
name = "Hydrogen" | ||
flags = GAS_FLAG_DANGEROUS | ||
moles_visible = MOLES_GAS_VISIBLE | ||
//moles_visible = MOLES_GAS_VISIBLE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explain why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
color = "#ffe" | ||
fusion_power = 0 | ||
fire_products = list(GAS_H2O = 1) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is higher than the rupture pressure so tanks probably won't leak (for long) they'll just pop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed tank leaking from internal tanks, it didn't seem to even work as intended and during testing it was like... meh honestly