Skip to content

Commit

Permalink
da fire port
Browse files Browse the repository at this point in the history
  • Loading branch information
PotatoTomahto committed Feb 4, 2025
1 parent d4e4f30 commit 9b603bb
Show file tree
Hide file tree
Showing 46 changed files with 235 additions and 136 deletions.
10 changes: 7 additions & 3 deletions code/__DEFINES/bodytemperature.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
/// The natural temperature for a body
#define BODYTEMP_NORMAL 310.15
/// This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
#define BODYTEMP_AUTORECOVERY_DIVISOR 11
#define BODYTEMP_AUTORECOVERY_DIVISOR 22
/// Minimum amount of kelvin moved toward 310K per tick. So long as abs(310.15 - bodytemp) is more than 50.
#define BODYTEMP_AUTORECOVERY_MINIMUM 12
///Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
#define BODYTEMP_COLD_DIVISOR 6
#define BODYTEMP_COLD_DIVISOR 12
/// Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
#define BODYTEMP_HEAT_DIVISOR 15
#define BODYTEMP_HEAT_DIVISOR 30
/// The maximum number of degrees that your body can cool in 1 tick, due to the environment, when in a cold area.
#define BODYTEMP_COOLING_MAX -100
/// The maximum number of degrees that your body can heat up in 1 tick, due to the environment, when in a hot area.
#define BODYTEMP_HEATING_MAX 30
/// The maximum number of degrees that your body can heat up to. (~800 kelvin is the temperature of lava)
#define BODYTEMP_MAX_TEMPERATURE 800
/// The minimum number of degrees that your body can cool down to. (0 Kelvin is ABSOLUTE 0)
#define BODYTEMP_MIN_TEMPERATURE 0

/// The limit the human body can take before it starts taking damage from heat.
#define BODYTEMP_HEAT_DAMAGE_LIMIT (BODYTEMP_NORMAL + 50)
Expand Down
7 changes: 3 additions & 4 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@
#define TRAIT_LEGENDARY_ALCHEMIST "Expert Herb Finder"
#define TRAIT_LIGHT_STEP "Light Step" //Can't trigger /obj/structure/trap/'s
#define TRAIT_THIEVESGUILD "Thieves Guild Member"
#define TRAIT_MOB_FIRE_IMMUNE "Fire Immune" //Just says no to fire_act()
#define TRAIT_ENGINEERING_GOGGLES "Engineering Goggles"
#define TRAIT_SEEPRICES "Golden Blood" //See prices

// Divine patron trait bonuses:
#define TRAIT_SOUL_EXAMINE "Blessing of Necra" //can check bodies to see if they have departed
#define TRAIT_ROT_EATER "Blessing of Pestra" //can eat rotten food
#define TRAIT_KNEESTINGER_IMMUNITY "Blessing of Dendor" //Can move through kneestingers.
#define TRAIT_LEECHIMMUNE "Unleechable" //leeches wont attach in dirty water turfs
#define TRAIT_LEECHIMMUNE "Unleechable" //leeches drain very little blood
#define TRAIT_SHARPER_BLADES "Sharper Blades" //Weapons lose less blade integrity
#define TRAIT_BETTER_SLEEP "Better Sleep" //Recover more energy (blue bar) when sleeping
#define TRAIT_EXTEROCEPTION "Exteroception" //See others' hunger and thirst
Expand Down Expand Up @@ -139,7 +138,7 @@ GLOBAL_LIST_INIT(roguetraits, list(
TRAIT_SOUL_EXAMINE = span_deadsay("I know when someone's soul has departed after checking their heartbeat."),
TRAIT_CYCLOPS_LEFT = span_warning("My left eye has been poked out..."),
TRAIT_CYCLOPS_RIGHT = span_warning("My right eye has been poked out..."),
TRAIT_LEECHIMMUNE = "Leeches are reluctant to bite me.",
TRAIT_LEECHIMMUNE = "Leeches are reluctant to drain my blood.",
TRAIT_ASSASSIN = "My soul has been tainted by Graggar, god of murder.",
TRAIT_BARDIC_TRAINING = "Xylixian inspiration grants my songs boons and ailments.",
TRAIT_GRAVEROBBER = "Necra favors my grim deeds, I can unearth graves without being cursed by her.",
Expand All @@ -158,7 +157,7 @@ GLOBAL_LIST_INIT(roguetraits, list(
TRAIT_THIEVESGUILD = "I am a member of the thieves guild!",
TRAIT_LEPROSY = span_necrosis("I'm a disgusting leper..."),
TRAIT_LIGHT_STEP = span_info("I will never trip a trap plate."),
TRAIT_MOB_FIRE_IMMUNE = span_info("I am immune to most scorching flames."),
TRAIT_NOFIRE = span_info("I am immune to most scorching flames."),
TRAIT_ENGINEERING_GOGGLES = span_info("I can find out more information from mechanical devices."),
TRAIT_SHARPER_BLADES = "My weapons lose their sharpness slower.",
TRAIT_BETTER_SLEEP = "I recover more energy when sleeping.",
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@
desc = ""
icon_state = "gross3"

/atom/movable/screen/alert/hot
/atom/movable/screen/alert/status_effect/debuff/hot
name = "Too Hot"
desc = ""
icon_state = "hot"

/atom/movable/screen/alert/cold
/atom/movable/screen/alert/status_effect/debuff/cold
name = "Too Cold"
desc = ""
icon_state = "cold"
Expand Down
8 changes: 8 additions & 0 deletions code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
config_entry_value = 1
integer = FALSE

/datum/config_entry/number/damage_multiplier/fire // Damage multiplier to base tick damage of fire
config_entry_value = 1.5
integer = FALSE

/datum/config_entry/number/per_tick/max_fire_damage // Max amount of tick damage for being on fire (Doesn't account for the base line) -- Found in fire_burning.dm, line 39. MAX is calculated as such: (2 * damage_multiplier/fire) + CLAMP(fire timer, 0, per_tick/max_fire_damage) -> Currently 28 damage.
config_entry_value = 25
integer = TRUE

/datum/config_entry/number/minimal_access_threshold //If the number of players is larger than this threshold, minimal access will be turned on.
min_val = 0

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/adjacent_air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ SUBSYSTEM_DEF(adjacent_air)
if(!isturf(loc) && command)
return
var/turf/T = get_turf(loc)
T.air_update_turf(command)
T?.air_update_turf(command)

/turf/air_update_turf(command = 0)
if(command)
Expand Down
8 changes: 7 additions & 1 deletion code/controllers/subsystem/fire_burning.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ SUBSYSTEM_DEF(fire_burning)

//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
var/fire_multiplier = CONFIG_GET(number/damage_multiplier/fire)
var/max_fire_damage_per_tick = CONFIG_GET(number/per_tick/max_fire_damage)
/// The longer the burn timer / stack the more intense the burn damage. Increases by (Default: 5)
var/fire_intensity = 5

while(currentrun.len)
var/obj/O = currentrun[currentrun.len]
currentrun.len--
fire_intensity = fire_intensity + CLAMP(fire_multiplier, 1, INFINITY) // 6 -> 7 -> 8 etc...
if (!O || QDELETED(O))
processing -= O
if (MC_TICK_CHECK)
Expand All @@ -31,7 +36,8 @@ SUBSYSTEM_DEF(fire_burning)

if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun
if(!(O.resistance_flags & FIRE_PROOF))
O.take_damage(5, BURN, "fire", 0)
// Minimum of 8 burn per tick. Config for max fire damage per tick found in game_options.
O.take_damage((2 * fire_multiplier) + CLAMP(fire_intensity, 0, max_fire_damage_per_tick), BURN, "fire", 0)
for(var/mob/living/carbon/human/H in view(2, O))
if(H.has_flaw(/datum/charflaw/addiction/pyromaniac))
H.sate_addiction()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/tippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
* tipped_mob - the mob who was tipped, and is freeing itself
*/
/datum/component/tippable/proc/right_self(mob/living/tipped_mob)
if(!is_tipped || QDELETED(tipped_mob))
if(!is_tipped || QDELETED(tipped_mob) || tipped_mob.stat >= UNCONSCIOUS)
return

set_tipped_status(tipped_mob, FALSE)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/gods/patrons/divine_pantheon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
flaws= "Reckless, Stubborn, Destructive"
worshippers = "Sailors of the Sea and Sky, Horrid Sea-Creachers, Fog Islanders"
sins = "Fear, Hubris, Forgetfulness"
boons = "Leeches will not latch onto you in dirty water."
boons = "Leeches will drain very little of your blood."
added_traits = list(TRAIT_LEECHIMMUNE)
t0 = /obj/effect/proc_holder/spell/invoked/lesser_heal
t1 = /obj/effect/proc_holder/spell/invoked/projectile/swordfish
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/rogueweapons/ranged/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
max_integrity = 10
force = 10
embedding = list("embedded_pain_multiplier" = 3, "embedded_fall_chance" = 0)
firing_effect_type = null

/obj/projectile/bullet/reusable/bolt
name = "bolt"
Expand Down Expand Up @@ -156,6 +157,7 @@
possible_item_intents = list(/datum/intent/dagger/cut, /datum/intent/dagger/thrust)
max_integrity = 20
embedding = list("embedded_pain_multiplier" = 3, "embedded_fall_chance" = 0)
firing_effect_type = null

/obj/projectile/bullet/reusable/arrow
name = "arrow"
Expand Down Expand Up @@ -418,6 +420,7 @@
dropshrink = 0.9
max_integrity = 10
force = 10
firing_effect_type = null

/obj/projectile/bullet/reusable/dart
name = "dart"
Expand Down
27 changes: 15 additions & 12 deletions code/game/objects/lighting/rogue_fires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
H.visible_message("<span class='info'>[H] warms \his hand over the fire.</span>")

if(do_after(H, 15, target = src))
var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
to_chat(H, "<span class='warning'>HOT!</span>")
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
H.update_damage_overlays()
// var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
// to_chat(H, "<span class='warning'>HOT!</span>")
// if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
// H.update_damage_overlays()
H.adjust_bodytemperature(40)
return TRUE //fires that are on always have this interaction with lmb unless its a torch

else
Expand Down Expand Up @@ -451,10 +452,11 @@
if(istype(H))
H.visible_message("<span class='info'>[H] warms \his hand over the embers.</span>")
if(do_after(H, 50, target = src))
var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
to_chat(H, "<span class='warning'>HOT!</span>")
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
H.update_damage_overlays()
// var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
// to_chat(H, "<span class='warning'>HOT!</span>")
// if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
// H.update_damage_overlays()
H.adjust_bodytemperature(40)
return TRUE


Expand Down Expand Up @@ -536,10 +538,11 @@
H.visible_message("<span class='info'>[H] warms \his hand near the fire.</span>")

if(do_after(H, 100, target = src))
var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
to_chat(H, "<span class='warning'>HOT!</span>")
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
H.update_damage_overlays()
// var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
// to_chat(H, "<span class='warning'>HOT!</span>")
// if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
// H.update_damage_overlays()
H.adjust_bodytemperature(40)
return TRUE //fires that are on always have this interaction with lmb unless its a torch

/obj/machinery/light/rogue/campfire/densefire
Expand Down
7 changes: 4 additions & 3 deletions code/game/objects/structures/meathook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
m90.Translate(12,12)
animate(L, transform = m90, time = 3)
L.pixel_y = L.get_standard_pixel_x_offset(180)
draining_blood = FALSE
else if (has_buckled_mobs())
for(var/mob/living/L in buckled_mobs)
user_unbuckle_mob(L, user)
Expand Down Expand Up @@ -101,10 +102,11 @@

/obj/structure/meathook/process()
if(!length(buckled_mobs) || !draining_blood)
draining_blood = FALSE
STOP_PROCESSING(SSmachines, src)
return
var/mob/living/L = buckled_mobs[1]
if(L.blood_drained > 60)
if(L.blood_drained >= 60)
L.blood_drained = 60
draining_blood = FALSE
STOP_PROCESSING(SSmachines, src)
Expand Down Expand Up @@ -184,8 +186,8 @@
var/cut_time = 4 SECONDS - (0.5 SECONDS * user.mind?.get_skill_level(/datum/skill/labor/butchering))
if(do_after(user, cut_time, FALSE, src))
butchery_target.blood_drained++
START_PROCESSING(SSmachines, src)
draining_blood = TRUE
START_PROCESSING(SSmachines, src)
return

if(!butchery_target.skinned && (user.used_intent.type == /datum/intent/dagger/cut || user.used_intent.type == /datum/intent/sword/cut || user.used_intent.type == /datum/intent/axe/cut))
Expand Down Expand Up @@ -250,7 +252,6 @@
var/obj/item/I = new listed_item(get_turf(user))
I.add_mob_blood(butchery_target)
butchery_target.gib()
draining_blood = FALSE
var/boon = user.mind.get_learning_boon(/datum/skill/labor/butchering)
var/amt2raise = user.STAINT
user.mind.add_sleep_experience(/datum/skill/labor/butchering, amt2raise * boon, FALSE)
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/open/lava.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@
if("lava" in L.weather_immunities)
continue

// L.adjustFireLoss(50)
if(L) //mobs turning into object corpses could get deleted here.
L.adjustFireLoss(10)
L.adjust_fire_stacks(100)
L.IgniteMob()
if(L.health <= 0)
Expand Down
12 changes: 6 additions & 6 deletions code/game/turfs/open/water.dm
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@
return
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if(HAS_TRAIT(AM, TRAIT_LEECHIMMUNE))
return
// if(HAS_TRAIT(AM, TRAIT_LEECHIMMUNE))
// return
if(C.blood_volume <= 0)
return
var/zonee = list(BODY_ZONE_R_LEG,BODY_ZONE_L_LEG)
Expand Down Expand Up @@ -529,8 +529,8 @@
return
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if(HAS_TRAIT(AM, TRAIT_LEECHIMMUNE))
return
// if(HAS_TRAIT(AM, TRAIT_LEECHIMMUNE))
// return
if(C.blood_volume <= 0)
return
var/zonee = list(BODY_ZONE_R_LEG,BODY_ZONE_L_LEG)
Expand Down Expand Up @@ -559,8 +559,8 @@
return
if(iscarbon(AM))
var/mob/living/carbon/C = AM
if(HAS_TRAIT(AM, TRAIT_LEECHIMMUNE))
return
// if(HAS_TRAIT(AM, TRAIT_LEECHIMMUNE))
// return
if(C.blood_volume <= 0)
return
var/zonee = list(BODY_ZONE_CHEST,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_R_ARM,BODY_ZONE_L_ARM)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/atmospherics/environmental/LINDA_fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
for(var/A in location)
var/atom/AT = A
if(!QDELETED(AT) && AT != src) // It's possible that the item is deleted in temperature_expose
AT.fire_act(3, 20)
AT.fire_act(1, 20)
return

/obj/effect/hotspot/proc/gauss_lerp(x, x1, x2)
Expand Down Expand Up @@ -157,7 +157,7 @@
..()
if(isliving(AM))
var/mob/living/L = AM
L.fire_act(3, 20)
L.fire_act(1, 20)

/obj/effect/dummy/lighting_obj/moblight/fire
name = "fire"
Expand Down
13 changes: 13 additions & 0 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,19 @@
user_vars_remembered = null //Oh god somebody put REFERENCES in here? not to worry, we'll clean it up
return ..()

/obj/item/clothing/attack(mob/living/M, mob/living/user, def_zone)
if(M.on_fire)
if(user == M)
return
user.changeNext_move(CLICK_CD_MELEE)
M.visible_message(span_warning("[user] pats out the flames on [M] with [src]!"))
M.adjust_divine_fire_stacks(-2)
if(M.fire_stacks > 0)
M.adjust_fire_stacks(-2)
take_damage(10, BURN, "fire")
else
return ..()

/obj/item/clothing/dropped(mob/user)
..()
if(!istype(user))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/rogueclothes/hats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
user.visible_message(span_reallybig("UNWORTHY HANDS TOUCH MY VISAGE, CEASE OR BE PUNISHED"))
spawn(30)
if(loc == user)
user.adjust_fire_stacks(3)
user.adjust_divine_fire_stacks(3)
user.IgniteMob()
return
else
Expand All @@ -463,7 +463,7 @@
to_chat(user, "<font color='yellow'>UNWORTHY HANDS TOUCH THE VISAGE, CEASE OR BE PUNISHED</font>")
spawn(30)
if(loc == user)
user.adjust_fire_stacks(5)
user.adjust_divine_fire_stacks(5)
user.IgniteMob()
return
else
Expand Down
Loading

0 comments on commit 9b603bb

Please sign in to comment.