diff --git a/code/datums/components/damage_over_time.dm b/code/datums/components/damage_over_time.dm index 0811db9d4dbd..b1d7d5e674b1 100644 --- a/code/datums/components/damage_over_time.dm +++ b/code/datums/components/damage_over_time.dm @@ -15,20 +15,28 @@ var/cause_path /// Whether the damage is considered to be from an environmental source var/enviro = FALSE + /// Whether the DOT applies fire stacks or not + var/apply_fire = FALSE + /// stuff for fire stacks + var/burn_reagent = /datum/reagent/napalm/ut + var/burn_stacks = 30 /// Parent as a living mob var/mob/living/living_parent -/datum/component/damage_over_time/InheritComponent(cause_path, dam_amount, dam_type, target_temp, temp_delta, synth_dmg_mult, pred_dmg_mult, warning_message, enviro) +/datum/component/damage_over_time/InheritComponent(cause_path, dam_amount, dam_type, target_temp, temp_delta, synth_dmg_mult, pred_dmg_mult, warning_message, enviro, apply_fire, burn_reagent, burn_stacks) return // Ultimately just here to suppress named arg errors -/datum/component/damage_over_time/Initialize(cause_path, dam_amount=5, dam_type=BURN, target_temp=T90C, temp_delta=5, synth_dmg_mult=0.5, pred_dmg_mult=0.5, warning_message="You feel your body start to shake as the scalding water sears your skin, heat overwhelming your senses...", enviro=FALSE) +/datum/component/damage_over_time/Initialize(cause_path, dam_amount=5, dam_type=BURN, target_temp=T90C, temp_delta=5, synth_dmg_mult=0.5, pred_dmg_mult=0.5, warning_message="You feel your body start to shake as the scalding water sears your skin, heat overwhelming your senses...", enviro=FALSE, apply_fire=FALSE, burn_reagent = /datum/reagent/napalm/ut, burn_stacks = 30) src.dam_amount = dam_amount src.dam_type = dam_type src.target_temp = target_temp src.temp_delta = temp_delta src.cause_path = cause_path src.enviro = enviro + src.apply_fire = apply_fire + src.burn_reagent = burn_reagent + src.burn_stacks = burn_stacks living_parent = parent @@ -78,6 +86,12 @@ living_parent.bodytemperature -= temp_delta else living_parent.bodytemperature = target_temp + if(apply_fire) + if(ispath(burn_reagent)) + var/datum/reagent/temp = burn_reagent + burn_reagent = GLOB.chemical_reagents_list[initial(temp.id)] + living_parent.TryIgniteMob(burn_stacks, burn_reagent) //30 burn stacks, proc needs a reagent to work. + /datum/component/damage_over_time/RegisterWithParent() START_PROCESSING(SSdcs, src) diff --git a/code/modules/fire_colony/lava.dm b/code/modules/fire_colony/lava.dm new file mode 100644 index 000000000000..cf3a9a62bfc8 --- /dev/null +++ b/code/modules/fire_colony/lava.dm @@ -0,0 +1,31 @@ +/obj/effect/blocker/lava + anchored = TRUE + density = FALSE + opacity = FALSE + unacidable = 1 + layer = ABOVE_FLY_LAYER //to make it visible in the map editor + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + icon = 'icons/landmarks.dmi' + + icon_state = "map_blocker_hazard" + + var/dam_amount = 2 + var/dam_type = BURN + var/target_temp = T120C + var/temp_delta = 10 + var/warning_message = "You are in lava now" //TODO: change this + var/burn_reagent = /datum/reagent/napalm/ut + var/burn_stacks = 30 + +/obj/effect/blocker/lava/Initialize(mapload, ...) + . = ..() + invisibility = 101 + +/obj/effect/blocker/lava/Crossed(mob/living/affected_mob) + if(!ismob(affected_mob)) + return + if(!ishuman(affected_mob) && !isxeno(affected_mob)) //affects everything + return + + affected_mob.AddComponent(/datum/component/damage_over_time, /obj/effect/blocker/lava, dam_amount = dam_amount, dam_type = dam_type, target_temp = target_temp, temp_delta = temp_delta, synth_dmg_mult=0.8, pred_dmg_mult=0.8, warning_message=warning_message, enviro=TRUE, apply_fire=TRUE, burn_reagent = burn_reagent, burn_stacks = burn_stacks) + diff --git a/colonialmarines.dme b/colonialmarines.dme index ec87af4f1fae..916d0b2d15cd 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1931,6 +1931,7 @@ #include "code\modules\events\destructible_terrain.dm" #include "code\modules\events\inflation.dm" #include "code\modules\events\nothing_happens.dm" +#include "code\modules\fire_colony\lava.dm" #include "code\modules\fishing\bait\generic.dm" #include "code\modules\fishing\datums\generic.dm" #include "code\modules\fishing\datums\helpers.dm"