Skip to content

Commit

Permalink
changes for TM
Browse files Browse the repository at this point in the history
  • Loading branch information
rye-rice committed Sep 18, 2024
1 parent dc73e62 commit beb7563
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 32 deletions.
8 changes: 4 additions & 4 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@

//TANKS
/// temperature in kelvins at which a tank will start to melt
#define TANK_MELT_TEMPERATURE 800 + T0C
#define TANK_MELT_TEMPERATURE 1000 + T0C
/// Tank starts leaking
#define TANK_LEAK_PRESSURE (10 * ONE_ATMOSPHERE + 5)
#define TANK_LEAK_PRESSURE (20 * ONE_ATMOSPHERE + 5)
/// Tank spills all contents into atmosphere
#define TANK_RUPTURE_PRESSURE (11 * ONE_ATMOSPHERE)
#define TANK_RUPTURE_PRESSURE (20 * ONE_ATMOSPHERE)
/// Boom 3x3 base explosion
#define TANK_FRAGMENT_PRESSURE (12.*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)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
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))
visible_message("<span class='userdanger'>A single ember from [src] drops gently onto [to_test]. Uh oh.</span>")
location.visible_message("<span class='userdanger'>A single ember from [src] drops gently onto [to_test]. Uh oh.</span>")
to_test.fire_act()
ruined_round = TRUE
break
if(istype(to_test, /obj/machinery/atmospherics/components/unary/tank))
visible_message("<span class='userdanger'>A flash fire forms around [src]!</span>")
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
Expand Down
16 changes: 10 additions & 6 deletions code/game/objects/items/tanks/tanks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@
/obj/item/tank/fire_act(exposed_temperature, exposed_volume)
. = ..()
var/tank_temperature = air_contents.return_temperature()
tank_temperature = ((tank_temperature * 4) + exposed_temperature)/5 //slowly equalize with the air, since this is over an active fire, we heat up faster
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), 0), BURN, 0)
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), 0), BURN, 0)
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)
Expand All @@ -242,9 +242,13 @@
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), 0), BURN, 0)
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), 0), BURN, 0)
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
Expand All @@ -267,7 +271,7 @@
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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,23 @@
. = ..()
var/datum/gas_mixture/air_contents = airs[1]
var/tank_temperature = air_contents.return_temperature()
tank_temperature = ((tank_temperature * 4) + exposed_temperature)/5 //equalize with the air - since this means theres an active fire on the canister's tile
tank_temperature += exposed_temperature/20 //equalize with the air - since this means theres an active fire on the canister's tile
air_contents.set_temperature(tank_temperature)
if(exposed_temperature > TANK_MELT_TEMPERATURE)
take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0)
if(exposed_volume > volume*2) // implosion
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0)
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/machinery/atmospherics/components/unary/tank/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > TANK_MELT_TEMPERATURE) //dont equalize temperature as this would affect atmos balance, we only want fires to be more dangerous
take_damage(max((exposed_temperature - TANK_MELT_TEMPERATURE), 0), BURN, 0)
if(exposed_volume > volume*2) // implosion
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0)
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/machinery/atmospherics/components/unary/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/machinery/atmospherics/components/unary/tank/obj_destruction(damage_flag)
var/datum/gas_mixture/air_contents = airs[1]
Expand All @@ -76,7 +80,7 @@
log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively")
investigate_log("was destroyed.", INVESTIGATE_ATMOS)

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))

Expand Down
16 changes: 10 additions & 6 deletions code/modules/atmospherics/machinery/portable/canister.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,19 +289,23 @@
/obj/machinery/portable_atmospherics/canister/fire_act(exposed_temperature, exposed_volume)
. = ..()
var/can_temperature = air_contents.return_temperature()
can_temperature = ((can_temperature * 4) + exposed_temperature)/5 //equalize with the air - since this means theres an active fire on the canister's tile
can_temperature += exposed_temperature/20 //equalize with the air - since this means theres an active fire on the canister's tile
air_contents.set_temperature(can_temperature)
if(exposed_temperature > temperature_resistance)
take_damage(max((exposed_temperature - temperature_resistance), 0), BURN, 0)
take_damage(max((exposed_temperature - temperature_resistance)/2, 0), BURN, 0)
if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0)
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0)


/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > temperature_resistance) //dont equalize temperature as this would affect atmos balance, we only want fires to be more dangerous
take_damage(max((exposed_temperature - temperature_resistance), 0), BURN, 0)
take_damage(max((exposed_temperature - temperature_resistance)/2, 0), BURN, 0)
if(exposed_volume > TANK_RUPTURE_PRESSURE) // implosion
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE), 0), BURN, 0)
take_damage(max((exposed_volume - TANK_RUPTURE_PRESSURE)/2, 0), BURN, 0)

/obj/machinery/portable_atmospherics/canister/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armour_penetration)
. = ..()
shake_animation(damage_amount, max(damage_amount/2, 2))

/obj/machinery/portable_atmospherics/canister/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
Expand Down Expand Up @@ -349,7 +353,7 @@
log_bomber(get_mob_by_key(fingerprintslast), "was last key to touch", src, "which ruptured explosively")
investigate_log("was destroyed.", INVESTIGATE_ATMOS)

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))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
/mob/living/simple_animal/hostile/asteroid/elite/broodmother_child/death()
. = ..()
visible_message("<span class='warning'>[src] explodes!</span>")
explosion(get_turf(loc),0,0,0,flame_range = 3, adminlog = FALSE)
explosion(get_turf(loc),0,0,0,flame_range = 2, adminlog = FALSE)
gib()

//Tentacles have less stun time compared to regular variant, to balance being able to use them much more often. Also, 10 more damage.
Expand Down
8 changes: 3 additions & 5 deletions code/modules/reagents/chemistry/reagents/other_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1210,13 +1210,11 @@
if(50 to 150)
to_chat(victim, "<span class='warning'>[pick("Your head hurts.", "Your head pounds.")]</span>")
victim.Dizzy(5)
victim.adjustStaminaLoss(1)
if(150 to 250)
to_chat(victim, "<span class='userdanger'>[pick("Your head hurts!", "You feel a burning knife inside your brain!", "A wave of pain fills your head!")]</span>")
victim.adjustStaminaLoss(1)
victim.Stun(10)
victim.Dizzy(5)
victim.confused += (accumilation/50)
victim.confused = (accumilation/50)
victim.gain_trauma(/datum/brain_trauma/mild/expressive_aphasia)
victim.gain_trauma(/datum/brain_trauma/mild/muscle_weakness)
if(250 to 350)
Expand All @@ -1225,8 +1223,8 @@
victim.Stun(35)

victim.Dizzy(5)
victim.confused += (accumilation/50)
victim.drowsyness += (accumilation/50)
victim.confused = (accumilation/50)
victim.drowsyness = (accumilation/50)

victim.adjustToxLoss(accumilation/100*REM, 0)

Expand Down

0 comments on commit beb7563

Please sign in to comment.