mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] /mob/living/proc/Life(delta_time) (#3509)
* /mob/living/proc/Life(delta_time) * a Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
Gandalf2k15
parent
b3802820c1
commit
d0dc199815
@@ -7,10 +7,15 @@
|
||||
organ_flags = NONE
|
||||
beating = TRUE
|
||||
var/true_name = "baseline placebo referencer"
|
||||
var/cooldown_low = 300
|
||||
var/cooldown_high = 300
|
||||
var/next_activation = 0
|
||||
var/uses // -1 For infinite
|
||||
|
||||
/// The minimum time between activations
|
||||
var/cooldown_low = 30 SECONDS
|
||||
/// The maximum time between activations
|
||||
var/cooldown_high = 30 SECONDS
|
||||
/// The cooldown for activations
|
||||
COOLDOWN_DECLARE(activation_cooldown)
|
||||
/// The number of remaining uses this gland has.
|
||||
var/uses = 0 // -1 For infinite
|
||||
var/human_only = FALSE
|
||||
var/active = FALSE
|
||||
|
||||
@@ -36,7 +41,7 @@
|
||||
|
||||
/obj/item/organ/heart/gland/proc/Start()
|
||||
active = 1
|
||||
next_activation = world.time + rand(cooldown_low,cooldown_high)
|
||||
COOLDOWN_START(src, activation_cooldown, rand(cooldown_low, cooldown_high))
|
||||
|
||||
/obj/item/organ/heart/gland/proc/update_gland_hud()
|
||||
if(!owner)
|
||||
@@ -91,7 +96,7 @@
|
||||
hud.add_to_hud(owner)
|
||||
update_gland_hud()
|
||||
|
||||
/obj/item/organ/heart/gland/on_life()
|
||||
/obj/item/organ/heart/gland/on_life(delta_time, times_fired)
|
||||
if(!beating)
|
||||
// alien glands are immune to stopping.
|
||||
beating = TRUE
|
||||
@@ -100,10 +105,10 @@
|
||||
if(!ownerCheck())
|
||||
active = FALSE
|
||||
return
|
||||
if(next_activation <= world.time)
|
||||
if(COOLDOWN_FINISHED(src, activation_cooldown))
|
||||
activate()
|
||||
uses--
|
||||
next_activation = world.time + rand(cooldown_low,cooldown_high)
|
||||
COOLDOWN_START(src, activation_cooldown, rand(cooldown_low, cooldown_high))
|
||||
if(!uses)
|
||||
active = FALSE
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
notify_ghosts("A controllable spore has been created in \the [get_area(src)].", source = src, action = NOTIFY_ORBIT, flashwindow = FALSE, header = "Sentient Spore Created")
|
||||
add_cell_sample()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/Life()
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(!is_zombie && isturf(src.loc))
|
||||
for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile
|
||||
if(!is_weak && H.stat == DEAD)
|
||||
@@ -278,39 +278,41 @@
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/add_cell_sample()
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_BLOBBERNAUT, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/Life()
|
||||
if(..())
|
||||
var/list/blobs_in_area = range(2, src)
|
||||
if(independent)
|
||||
return // strong independent blobbernaut that don't need no blob
|
||||
var/damagesources = 0
|
||||
if(!(locate(/obj/structure/blob) in blobs_in_area))
|
||||
damagesources++
|
||||
if(!factory)
|
||||
damagesources++
|
||||
else
|
||||
if(locate(/obj/structure/blob/special/core) in blobs_in_area)
|
||||
adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_CORE)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed
|
||||
if(overmind)
|
||||
H.color = overmind.blobstrain.complementary_color
|
||||
else
|
||||
H.color = "#000000"
|
||||
if(locate(/obj/structure/blob/special/node) in blobs_in_area)
|
||||
adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_NODE)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src))
|
||||
if(overmind)
|
||||
H.color = overmind.blobstrain.complementary_color
|
||||
else
|
||||
H.color = "#000000"
|
||||
if(damagesources)
|
||||
for(var/i in 1 to damagesources)
|
||||
adjustHealth(maxHealth*BLOBMOB_BLOBBERNAUT_HEALTH_DECAY) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both
|
||||
var/image/I = new('icons/mob/blob.dmi', src, "nautdamage", MOB_LAYER+0.01)
|
||||
I.appearance_flags = RESET_COLOR
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(!..())
|
||||
return
|
||||
var/list/blobs_in_area = range(2, src)
|
||||
if(independent)
|
||||
return // strong independent blobbernaut that don't need no blob
|
||||
var/damagesources = 0
|
||||
if(!(locate(/obj/structure/blob) in blobs_in_area))
|
||||
damagesources++
|
||||
|
||||
if(!factory)
|
||||
damagesources++
|
||||
else
|
||||
if(locate(/obj/structure/blob/special/core) in blobs_in_area)
|
||||
adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_CORE * delta_time)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src)) //hello yes you are being healed
|
||||
if(overmind)
|
||||
I.color = overmind.blobstrain.complementary_color
|
||||
flick_overlay_view(I, src, 8)
|
||||
H.color = overmind.blobstrain.complementary_color
|
||||
else
|
||||
H.color = "#000000"
|
||||
if(locate(/obj/structure/blob/special/node) in blobs_in_area)
|
||||
adjustHealth(-maxHealth*BLOBMOB_BLOBBERNAUT_HEALING_NODE * delta_time)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(src))
|
||||
if(overmind)
|
||||
H.color = overmind.blobstrain.complementary_color
|
||||
else
|
||||
H.color = "#000000"
|
||||
|
||||
if(damagesources)
|
||||
adjustHealth(maxHealth * BLOBMOB_BLOBBERNAUT_HEALTH_DECAY * damagesources * delta_time) //take 2.5% of max health as damage when not near the blob or if the naut has no factory, 5% if both
|
||||
var/image/I = new('icons/mob/blob.dmi', src, "nautdamage", MOB_LAYER+0.01)
|
||||
I.appearance_flags = RESET_COLOR
|
||||
if(overmind)
|
||||
I.color = overmind.blobstrain.complementary_color
|
||||
flick_overlay_view(I, src, 8)
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
. = ..()
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
exposed_mob.reagents.add_reagent(/datum/reagent/blob/cryogenic_poison, 0.3*reac_volume)
|
||||
exposed_mob.apply_damage(0.2*reac_volume, BRUTE, wound_bonus=CANT_WOUND)
|
||||
|
||||
/datum/reagent/blob/cryogenic_poison/on_mob_life(mob/living/carbon/exposed_mob)
|
||||
exposed_mob.adjustBruteLoss(0.5*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
exposed_mob.adjustFireLoss(0.5*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
exposed_mob.adjustToxLoss(0.5*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
/datum/reagent/blob/cryogenic_poison/on_mob_life(mob/living/carbon/exposed_mob, delta_time, times_fired)
|
||||
exposed_mob.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, FALSE)
|
||||
exposed_mob.adjustFireLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, FALSE)
|
||||
exposed_mob.adjustToxLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, FALSE)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
exposed_mob.reagents.add_reagent(/datum/reagent/toxin/spore, 0.2*reac_volume)
|
||||
exposed_mob.apply_damage(0.7*reac_volume, TOX)
|
||||
|
||||
/datum/reagent/blob/regenerative_materia/on_mob_life(mob/living/carbon/C)
|
||||
C.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER)
|
||||
/datum/reagent/blob/regenerative_materia/on_mob_life(mob/living/carbon/C, delta_time, times_fired)
|
||||
C.adjustToxLoss(1 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
C.hal_screwyhud = SCREWYHUD_HEALTHY //fully healed, honest
|
||||
..()
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/trueabsorbs = 0//dna gained using absorb, not dna sting
|
||||
var/chem_charges = 20
|
||||
var/chem_storage = 75
|
||||
var/chem_recharge_rate = 1
|
||||
var/chem_recharge_rate = 0.5
|
||||
var/chem_recharge_slowdown = 0
|
||||
var/sting_range = 2
|
||||
var/geneticdamage = 0
|
||||
@@ -209,15 +209,15 @@
|
||||
return FALSE
|
||||
|
||||
//Called in life()
|
||||
/datum/antagonist/changeling/proc/regenerate()//grants the HuD in life.dm
|
||||
/datum/antagonist/changeling/proc/regenerate(delta_time, times_fired)//grants the HuD in life.dm
|
||||
var/mob/living/carbon/the_ling = owner.current
|
||||
if(istype(the_ling))
|
||||
if(the_ling.stat == DEAD)
|
||||
chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), (chem_storage*0.5))
|
||||
geneticdamage = max(LING_DEAD_GENETICDAMAGE_HEAL_CAP,geneticdamage-1)
|
||||
chem_charges = min(max(0, chem_charges + ((chem_recharge_rate - chem_recharge_slowdown) * delta_time)), (chem_storage * 0.5))
|
||||
geneticdamage = max(geneticdamage - (0.5 * delta_time), LING_DEAD_GENETICDAMAGE_HEAL_CAP)
|
||||
else //not dead? no chem/geneticdamage caps.
|
||||
chem_charges = min(max(0, chem_charges + chem_recharge_rate - chem_recharge_slowdown), chem_storage)
|
||||
geneticdamage = max(0, geneticdamage-1)
|
||||
chem_charges = min(max(0, chem_charges + ((chem_recharge_rate - chem_recharge_slowdown) * delta_time)), chem_storage)
|
||||
geneticdamage = max(geneticdamage - (0.5 * delta_time), 0)
|
||||
|
||||
|
||||
/datum/antagonist/changeling/proc/get_dna(dna_owner)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling.mimicing)
|
||||
changeling.mimicing = ""
|
||||
changeling.chem_recharge_slowdown -= 0.5
|
||||
changeling.chem_recharge_slowdown -= 0.25
|
||||
to_chat(user, "<span class='notice'>We return our vocal glands to their original position.</span>")
|
||||
return
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
return
|
||||
..()
|
||||
changeling.mimicing = mimic_voice
|
||||
changeling.chem_recharge_slowdown += 0.5
|
||||
changeling.chem_recharge_slowdown += 0.25
|
||||
to_chat(user, "<span class='notice'>We shape our glands to take the voice of <b>[mimic_voice]</b>, this will slow down regenerating chemicals while active.</span>")
|
||||
to_chat(user, "<span class='notice'>Use this power again to return to our original voice and return chemical production to normal levels.</span>")
|
||||
return TRUE
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
helmet_type = /obj/item/clothing/head/helmet/space/changeling
|
||||
suit_name_simple = "flesh shell"
|
||||
helmet_name_simple = "space helmet"
|
||||
recharge_slowdown = 0.5
|
||||
recharge_slowdown = 0.25
|
||||
blood_on_castoff = 1
|
||||
|
||||
/obj/item/clothing/suit/space/changeling
|
||||
@@ -520,7 +520,7 @@
|
||||
chemical_cost = 20
|
||||
dna_cost = 1
|
||||
req_human = 1
|
||||
recharge_slowdown = 0.25
|
||||
recharge_slowdown = 0.125
|
||||
|
||||
suit_type = /obj/item/clothing/suit/armor/changeling
|
||||
helmet_type = /obj/item/clothing/head/helmet/changeling
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(!receptors_active)
|
||||
to_chat(user, "<span class='warning'>We search for the scent of any nearby changelings.</span>")
|
||||
changeling.chem_recharge_slowdown += 0.5
|
||||
changeling.chem_recharge_slowdown += 0.25
|
||||
user.apply_status_effect(/datum/status_effect/agent_pinpointer/changeling)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>We stop searching for now.</span>")
|
||||
changeling.chem_recharge_slowdown -= 0.5
|
||||
changeling.chem_recharge_slowdown -= 0.25
|
||||
user.remove_status_effect(/datum/status_effect/agent_pinpointer/changeling)
|
||||
|
||||
receptors_active = !receptors_active
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/// How many life ticks are required for the nightmare's heart to revive the nightmare.
|
||||
#define HEART_RESPAWN_THRESHHOLD 40
|
||||
#define HEART_RESPAWN_THRESHHOLD (80 SECONDS)
|
||||
/// A special flag value used to make a nightmare heart not grant a light eater. Appears to be unused.
|
||||
#define HEART_SPECIAL_SHADOWIFY 2
|
||||
|
||||
@@ -73,14 +73,14 @@
|
||||
/obj/item/organ/heart/nightmare/Stop()
|
||||
return 0
|
||||
|
||||
/obj/item/organ/heart/nightmare/on_death()
|
||||
/obj/item/organ/heart/nightmare/on_death(delta_time, times_fired)
|
||||
if(!owner)
|
||||
return
|
||||
var/turf/T = get_turf(owner)
|
||||
if(istype(T))
|
||||
var/light_amount = T.get_lumcount()
|
||||
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
|
||||
respawn_progress++
|
||||
respawn_progress += delta_time SECONDS
|
||||
playsound(owner, 'sound/effects/singlebeat.ogg', 40, TRUE)
|
||||
if(respawn_progress < HEART_RESPAWN_THRESHHOLD)
|
||||
return
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/essence = 75 //The resource, and health, of revenants.
|
||||
var/essence_regen_cap = 75 //The regeneration cap of essence (go figure); regenerates every Life() tick up to this amount.
|
||||
var/essence_regenerating = TRUE //If the revenant regenerates essence or not
|
||||
var/essence_regen_amount = 5 //How much essence regenerates
|
||||
var/essence_regen_amount = 2.5 //How much essence regenerates per second
|
||||
var/essence_accumulated = 0 //How much essence the revenant has stolen
|
||||
var/essence_excess = 0 //How much stolen essence avilable for unlocks
|
||||
var/revealed = FALSE //If the revenant can take damage from normal sources.
|
||||
@@ -113,7 +113,7 @@
|
||||
mind.add_antag_datum(/datum/antagonist/revenant)
|
||||
|
||||
//Life, Stat, Hud Updates, and Say
|
||||
/mob/living/simple_animal/revenant/Life()
|
||||
/mob/living/simple_animal/revenant/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(stasis)
|
||||
return
|
||||
if(revealed && essence <= 0)
|
||||
@@ -129,7 +129,7 @@
|
||||
notransform = FALSE
|
||||
to_chat(src, "<span class='revenboldnotice'>You can move again!</span>")
|
||||
if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate
|
||||
essence = min(essence_regen_cap, essence+essence_regen_amount)
|
||||
essence = min(essence + (essence_regen_amount * delta_time), essence_regen_cap)
|
||||
update_action_buttons_icon() //because we update something required by our spells in life, we need to update our buttons
|
||||
update_spooky_icon()
|
||||
update_health_hud()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/datum/disease/revblight
|
||||
name = "Unnatural Wasting"
|
||||
max_stages = 5
|
||||
stage_prob = 10
|
||||
stage_prob = 5
|
||||
spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS
|
||||
cure_text = "Holy water or extensive rest."
|
||||
spread_text = "A burst of unholy energy"
|
||||
cures = list(/datum/reagent/water/holywater)
|
||||
cure_chance = 50 //higher chance to cure, because revenants are assholes
|
||||
cure_chance = 30 //higher chance to cure, because revenants are assholes
|
||||
agent = "Unholy Forces"
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
disease_flags = CURABLE
|
||||
@@ -25,42 +25,42 @@
|
||||
..()
|
||||
|
||||
|
||||
/datum/disease/revblight/stage_act()
|
||||
/datum/disease/revblight/stage_act(delta_time, times_fired)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
if(!finalstage)
|
||||
if(affected_mob.body_position == LYING_DOWN && prob(stage * 6))
|
||||
if(affected_mob.body_position == LYING_DOWN && DT_PROB(3 * stage, delta_time))
|
||||
cure()
|
||||
return FALSE
|
||||
if(prob(stage * 3))
|
||||
if(DT_PROB(1.5 * stage, delta_time))
|
||||
to_chat(affected_mob, "<span class='revennotice'>You suddenly feel [pick("sick and tired", "disoriented", "tired and confused", "nauseated", "faint", "dizzy")]...</span>")
|
||||
affected_mob.add_confusion(8)
|
||||
affected_mob.adjustStaminaLoss(20, FALSE)
|
||||
new /obj/effect/temp_visual/revenant(affected_mob.loc)
|
||||
if(stagedamage < stage)
|
||||
stagedamage++
|
||||
affected_mob.adjustToxLoss(stage * 2, FALSE) //should, normally, do about 30 toxin damage.
|
||||
affected_mob.adjustToxLoss(1 * stage * delta_time, FALSE) //should, normally, do about 30 toxin damage.
|
||||
new /obj/effect/temp_visual/revenant(affected_mob.loc)
|
||||
if(prob(45))
|
||||
if(DT_PROB(25, delta_time))
|
||||
affected_mob.adjustStaminaLoss(stage, FALSE)
|
||||
|
||||
switch(stage)
|
||||
if(2)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
affected_mob.emote("pale")
|
||||
if(3)
|
||||
if(prob(10))
|
||||
if(DT_PROB(5, delta_time))
|
||||
affected_mob.emote(pick("pale","shiver"))
|
||||
if(4)
|
||||
if(prob(15))
|
||||
if(DT_PROB(7.5, delta_time))
|
||||
affected_mob.emote(pick("pale","shiver","cries"))
|
||||
if(5)
|
||||
if(!finalstage)
|
||||
finalstage = TRUE
|
||||
to_chat(affected_mob, "<span class='revenbignotice'>You feel like [pick("nothing's worth it anymore", "nobody ever needed your help", "nothing you did mattered", "everything you tried to do was worthless")].</span>")
|
||||
affected_mob.adjustStaminaLoss(45, FALSE)
|
||||
affected_mob.adjustStaminaLoss(22.5 * delta_time, FALSE)
|
||||
new /obj/effect/temp_visual/revenant(affected_mob.loc)
|
||||
if(affected_mob.dna && affected_mob.dna.species)
|
||||
affected_mob.dna.species.handle_mutant_bodyparts(affected_mob,"#1d2953")
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
human.update_spacesuit_hud_icon("0")
|
||||
|
||||
// Space Suit temperature regulation and power usage
|
||||
/obj/item/clothing/suit/space/process()
|
||||
/obj/item/clothing/suit/space/process(delta_time)
|
||||
var/mob/living/carbon/human/user = src.loc
|
||||
if(!user || !ishuman(user) || !(user.wear_suit == src))
|
||||
return
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
// If we got here, it means thermals are on, the cell is in and the cell has
|
||||
// just had enough charge subtracted from it to power the thermal regulator
|
||||
user.adjust_bodytemperature(get_temp_change_amount((temperature_setting - user.bodytemperature), 0.16))
|
||||
user.adjust_bodytemperature(get_temp_change_amount((temperature_setting - user.bodytemperature), 0.08 * delta_time))
|
||||
update_hud_icon(user)
|
||||
|
||||
// Clean up the cell on destroy
|
||||
|
||||
@@ -661,7 +661,7 @@ This section is for the crystal monsters variations
|
||||
attack_verb_simple = "smash"
|
||||
attack_sound = 'sound/effects/supermatter.ogg'
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 10
|
||||
unsuitable_atmos_damage = 5
|
||||
robust_searching = 1
|
||||
stat_attack = HARD_CRIT
|
||||
faction = list("crystal")
|
||||
|
||||
@@ -25,12 +25,11 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
))
|
||||
|
||||
|
||||
/mob/living/carbon/proc/handle_hallucinations()
|
||||
/mob/living/carbon/proc/handle_hallucinations(delta_time, times_fired)
|
||||
if(!hallucination)
|
||||
return
|
||||
|
||||
hallucination = max(hallucination - 1, 0)
|
||||
|
||||
hallucination = max(hallucination - (0.5 * delta_time), 0)
|
||||
if(world.time < next_hallucination)
|
||||
return
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
owner.revive(full_heal = TRUE, admin_revive = FALSE)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/regenerative_core/on_life()
|
||||
/obj/item/organ/regenerative_core/on_life(delta_time, times_fired)
|
||||
..()
|
||||
if(owner.health <= owner.crit_threshold)
|
||||
ui_action_click()
|
||||
|
||||
@@ -966,7 +966,7 @@
|
||||
cures = list(/datum/reagent/medicine/adminordrazine)
|
||||
agent = "dragon's blood"
|
||||
desc = "What do dragons have to do with Space Station 13?"
|
||||
stage_prob = 20
|
||||
stage_prob = 10
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
stage1 = list("Your bones ache.")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
****************************************************/
|
||||
|
||||
// Takes care blood loss and regeneration
|
||||
/mob/living/carbon/human/handle_blood()
|
||||
/mob/living/carbon/human/handle_blood(delta_time, times_fired)
|
||||
|
||||
if(NOBLOOD in dna.species.species_traits || HAS_TRAIT(src, TRAIT_NOBLEED) || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
|
||||
return
|
||||
@@ -28,31 +28,31 @@
|
||||
nutrition_ratio = 1
|
||||
if(satiety > 80)
|
||||
nutrition_ratio *= 1.25
|
||||
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
|
||||
blood_volume = min(BLOOD_VOLUME_NORMAL, blood_volume + 0.5 * nutrition_ratio)
|
||||
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR * delta_time)
|
||||
blood_volume = min(blood_volume + (BLOOD_REGEN_FACTOR * nutrition_ratio * delta_time), BLOOD_VOLUME_NORMAL)
|
||||
|
||||
//Effects of bloodloss
|
||||
var/word = pick("dizzy","woozy","faint")
|
||||
switch(blood_volume)
|
||||
if(BLOOD_VOLUME_EXCESS to BLOOD_VOLUME_MAX_LETHAL)
|
||||
if(prob(15))
|
||||
if(DT_PROB(7.5, delta_time))
|
||||
to_chat(src, "<span class='userdanger'>Blood starts to tear your skin apart. You're going to burst!</span>")
|
||||
inflate_gib()
|
||||
if(BLOOD_VOLUME_MAXIMUM to BLOOD_VOLUME_EXCESS)
|
||||
if(prob(10))
|
||||
if(DT_PROB(5, delta_time))
|
||||
to_chat(src, "<span class='warning'>You feel terribly bloated.</span>")
|
||||
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
to_chat(src, "<span class='warning'>You feel [word].</span>")
|
||||
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.01, 1))
|
||||
adjustOxyLoss(round(0.005 * (BLOOD_VOLUME_NORMAL - blood_volume) * delta_time, 1))
|
||||
if(BLOOD_VOLUME_BAD to BLOOD_VOLUME_OKAY)
|
||||
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
|
||||
if(prob(5))
|
||||
adjustOxyLoss(round(0.01 * (BLOOD_VOLUME_NORMAL - blood_volume) * delta_time, 1))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
blur_eyes(6)
|
||||
to_chat(src, "<span class='warning'>You feel very [word].</span>")
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
|
||||
adjustOxyLoss(5)
|
||||
if(prob(15))
|
||||
adjustOxyLoss(2.5 * delta_time)
|
||||
if(DT_PROB(7.5, delta_time))
|
||||
Unconscious(rand(20,60))
|
||||
to_chat(src, "<span class='warning'>You feel extremely [word].</span>")
|
||||
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
|
||||
@@ -63,7 +63,7 @@
|
||||
//Bleeding out
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
temp_bleed += BP.get_bleed_rate()
|
||||
temp_bleed += BP.get_bleed_rate() * delta_time
|
||||
BP.generic_bleedstacks = max(0, BP.generic_bleedstacks - 1)
|
||||
|
||||
if(temp_bleed)
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
owner.mind.current = null
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/brain/on_life()
|
||||
/obj/item/organ/brain/on_life(delta_time, times_fired)
|
||||
if(damage >= BRAIN_DAMAGE_DEATH) //rip
|
||||
to_chat(owner, "<span class='userdanger'>The last spark of life in your brain fizzles out...</span>")
|
||||
owner.death()
|
||||
|
||||
@@ -1,37 +1,40 @@
|
||||
|
||||
/mob/living/brain/Life()
|
||||
/mob/living/brain/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if (notransform)
|
||||
return
|
||||
if(!loc)
|
||||
return
|
||||
. = ..()
|
||||
handle_emp_damage()
|
||||
handle_emp_damage(delta_time, times_fired)
|
||||
|
||||
/mob/living/brain/update_stat()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(health <= HEALTH_THRESHOLD_DEAD)
|
||||
if(stat != DEAD)
|
||||
death()
|
||||
var/obj/item/organ/brain/BR
|
||||
if(container?.brain)
|
||||
BR = container.brain
|
||||
else if(istype(loc, /obj/item/organ/brain))
|
||||
BR = loc
|
||||
if(BR)
|
||||
BR.damage = BRAIN_DAMAGE_DEATH //beaten to a pulp
|
||||
if(health > HEALTH_THRESHOLD_DEAD)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
death()
|
||||
var/obj/item/organ/brain/BR
|
||||
if(container?.brain)
|
||||
BR = container.brain
|
||||
else if(istype(loc, /obj/item/organ/brain))
|
||||
BR = loc
|
||||
if(BR)
|
||||
BR.damage = BRAIN_DAMAGE_DEATH //beaten to a pulp
|
||||
|
||||
/mob/living/brain/proc/handle_emp_damage()
|
||||
if(emp_damage)
|
||||
if(stat == DEAD)
|
||||
emp_damage = 0
|
||||
else
|
||||
emp_damage = max(emp_damage-1, 0)
|
||||
/mob/living/brain/proc/handle_emp_damage(delta_time, times_fired)
|
||||
if(!emp_damage)
|
||||
return
|
||||
|
||||
/mob/living/brain/handle_status_effects()
|
||||
if(stat == DEAD)
|
||||
emp_damage = 0
|
||||
else
|
||||
emp_damage = max(emp_damage - (0.5 * delta_time), 0)
|
||||
|
||||
/mob/living/brain/handle_status_effects(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/brain/handle_traits()
|
||||
/mob/living/brain/handle_traits(delta_time, times_fired)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/mob/living/carbon/alien/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) // beepsky won't hunt aliums
|
||||
return -10
|
||||
|
||||
/mob/living/carbon/alien/handle_environment(datum/gas_mixture/environment)
|
||||
/mob/living/carbon/alien/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
|
||||
// Run base mob body temperature proc before taking damage
|
||||
// this balances body temp to the environment and natural stabilization
|
||||
. = ..()
|
||||
@@ -58,19 +58,19 @@
|
||||
throw_alert("alien_fire", /atom/movable/screen/alert/alien_fire)
|
||||
switch(bodytemperature)
|
||||
if(360 to 400)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_1, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_1 * delta_time, BURN)
|
||||
if(400 to 460)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2 * delta_time, BURN)
|
||||
if(460 to INFINITY)
|
||||
if(on_fire)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_3, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_3 * delta_time, BURN)
|
||||
else
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
|
||||
apply_damage(HEAT_DAMAGE_LEVEL_2 * delta_time, BURN)
|
||||
else
|
||||
clear_alert("alien_fire")
|
||||
|
||||
/mob/living/carbon/alien/reagent_check(datum/reagent/R) //can metabolize all reagents
|
||||
return 0
|
||||
/mob/living/carbon/alien/reagent_check(datum/reagent/R, delta_time, times_fired) //can metabolize all reagents
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/alien/get_status_tab_items()
|
||||
. = ..()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/Life()
|
||||
/mob/living/carbon/alien/larva/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if (notransform)
|
||||
return
|
||||
if(..() && !IS_IN_STASIS(src)) //not dead and not in stasis
|
||||
// GROW!
|
||||
if(amount_grown < max_grown)
|
||||
amount_grown++
|
||||
update_icons()
|
||||
if(!..() || IS_IN_STASIS(src) || (amount_grown >= max_grown))
|
||||
return // We're dead, in stasis, or already grown.
|
||||
// GROW!
|
||||
amount_grown = min(amount_grown + (0.5 * delta_time), max_grown)
|
||||
update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/update_stat()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/alien/Life()
|
||||
/mob/living/carbon/alien/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
findQueen()
|
||||
return..()
|
||||
|
||||
@@ -38,17 +38,17 @@
|
||||
//BREATH TEMPERATURE
|
||||
handle_breath_temperature(breath)
|
||||
|
||||
/mob/living/carbon/alien/handle_status_effects()
|
||||
/mob/living/carbon/alien/handle_status_effects(delta_time, times_fired)
|
||||
..()
|
||||
//natural reduction of movement delay due to stun.
|
||||
if(move_delay_add > 0)
|
||||
move_delay_add = max(0, move_delay_add - rand(1, 2))
|
||||
move_delay_add = max(0, move_delay_add - (0.5 * rand(1, 2) * delta_time))
|
||||
|
||||
/mob/living/carbon/alien/handle_changeling()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
|
||||
/mob/living/carbon/alien/handle_fire(delta_time, times_fired)//Aliens on fire code
|
||||
. = ..()
|
||||
if(.) //if the mob isn't on fire anymore
|
||||
return
|
||||
adjust_bodytemperature(BODYTEMP_HEATING_MAX) //If you're on fire, you heat up!
|
||||
adjust_bodytemperature(BODYTEMP_HEATING_MAX * 0.5 * delta_time) //If you're on fire, you heat up!
|
||||
|
||||
@@ -35,10 +35,14 @@
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/plant, /obj/effect/proc_holder/alien/transfer)
|
||||
food_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/toxin/plasma = 10)
|
||||
|
||||
/// The current amount of stored plasma.
|
||||
var/storedPlasma = 100
|
||||
/// The maximum plasma this organ can store.
|
||||
var/max_plasma = 250
|
||||
var/heal_rate = 5
|
||||
var/plasma_rate = 10
|
||||
/// The rate this organ regenerates its owners health at per damage type per second.
|
||||
var/heal_rate = 2.5
|
||||
/// The rate this organ regenerates plasma at per second.
|
||||
var/plasma_rate = 5
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/large
|
||||
name = "large plasma vessel"
|
||||
@@ -46,10 +50,10 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
storedPlasma = 200
|
||||
max_plasma = 500
|
||||
plasma_rate = 15
|
||||
plasma_rate = 7.5
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/large/queen
|
||||
plasma_rate = 20
|
||||
plasma_rate = 10
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/small
|
||||
name = "small plasma vessel"
|
||||
@@ -57,7 +61,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
storedPlasma = 100
|
||||
max_plasma = 150
|
||||
plasma_rate = 5
|
||||
plasma_rate = 2.5
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/small/tiny
|
||||
name = "tiny plasma vessel"
|
||||
@@ -66,22 +70,22 @@
|
||||
max_plasma = 100
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/transfer)
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/on_life()
|
||||
/obj/item/organ/alien/plasmavessel/on_life(delta_time, times_fired)
|
||||
//If there are alien weeds on the ground then heal if needed or give some plasma
|
||||
if(locate(/obj/structure/alien/weeds) in owner.loc)
|
||||
if(owner.health >= owner.maxHealth)
|
||||
owner.adjustPlasma(plasma_rate)
|
||||
owner.adjustPlasma(plasma_rate * delta_time)
|
||||
else
|
||||
var/heal_amt = heal_rate
|
||||
if(!isalien(owner))
|
||||
heal_amt *= 0.2
|
||||
owner.adjustPlasma(plasma_rate*0.5)
|
||||
owner.adjustBruteLoss(-heal_amt)
|
||||
owner.adjustFireLoss(-heal_amt)
|
||||
owner.adjustOxyLoss(-heal_amt)
|
||||
owner.adjustCloneLoss(-heal_amt)
|
||||
owner.adjustPlasma(0.5 * plasma_rate * delta_time)
|
||||
owner.adjustBruteLoss(-heal_amt * delta_time)
|
||||
owner.adjustFireLoss(-heal_amt * delta_time)
|
||||
owner.adjustOxyLoss(-heal_amt * delta_time)
|
||||
owner.adjustCloneLoss(-heal_amt * delta_time)
|
||||
else
|
||||
owner.adjustPlasma(plasma_rate * 0.1)
|
||||
owner.adjustPlasma(0.1 * plasma_rate * delta_time)
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
|
||||
@@ -25,34 +25,34 @@
|
||||
if(prob(10))
|
||||
AttemptGrow(0)
|
||||
|
||||
/obj/item/organ/body_egg/alien_embryo/on_life()
|
||||
/obj/item/organ/body_egg/alien_embryo/on_life(delta_time, times_fired)
|
||||
. = ..()
|
||||
switch(stage)
|
||||
if(3, 4)
|
||||
if(prob(2))
|
||||
if(DT_PROB(1, delta_time))
|
||||
owner.emote("sneeze")
|
||||
if(prob(2))
|
||||
if(DT_PROB(1, delta_time))
|
||||
owner.emote("cough")
|
||||
if(prob(2))
|
||||
if(DT_PROB(1, delta_time))
|
||||
to_chat(owner, "<span class='danger'>Your throat feels sore.</span>")
|
||||
if(prob(2))
|
||||
if(DT_PROB(1, delta_time))
|
||||
to_chat(owner, "<span class='danger'>Mucous runs down the back of your throat.</span>")
|
||||
if(5)
|
||||
if(prob(2))
|
||||
if(DT_PROB(1, delta_time))
|
||||
owner.emote("sneeze")
|
||||
if(prob(2))
|
||||
if(DT_PROB(1, delta_time))
|
||||
owner.emote("cough")
|
||||
if(prob(4))
|
||||
if(DT_PROB(2, delta_time))
|
||||
to_chat(owner, "<span class='danger'>Your muscles ache.</span>")
|
||||
if(prob(20))
|
||||
owner.take_bodypart_damage(1)
|
||||
if(prob(4))
|
||||
if(DT_PROB(2, delta_time))
|
||||
to_chat(owner, "<span class='danger'>Your stomach hurts.</span>")
|
||||
if(prob(20))
|
||||
owner.adjustToxLoss(1)
|
||||
if(6)
|
||||
to_chat(owner, "<span class='danger'>You feel something tearing its way out of your chest...</span>")
|
||||
owner.adjustToxLoss(10)
|
||||
owner.adjustToxLoss(5 * delta_time) // Why is this [TOX]?
|
||||
|
||||
/// Controls Xenomorph Embryo growth. If embryo is fully grown (or overgrown), stop the proc. If not, increase the stage by one and if it's not fully grown (stage 6), add a timer to do this proc again after however long the growth time variable is.
|
||||
/obj/item/organ/body_egg/alien_embryo/proc/advance_embryo_stage()
|
||||
@@ -62,7 +62,6 @@
|
||||
INVOKE_ASYNC(src, .proc/RefreshInfectionImage)
|
||||
addtimer(CALLBACK(src, .proc/advance_embryo_stage), growth_time)
|
||||
|
||||
|
||||
/obj/item/organ/body_egg/alien_embryo/egg_process()
|
||||
if(stage == 6 && prob(50))
|
||||
for(var/datum/surgery/S in owner.surgeries)
|
||||
|
||||
@@ -11,7 +11,7 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
|
||||
in_use = FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/dummy/Life()
|
||||
/mob/living/carbon/human/dummy/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/dummy/attach_rot(mapload)
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
//Check inventory slots
|
||||
return (wear_id?.GetID() || belt?.GetID())
|
||||
|
||||
/mob/living/carbon/human/reagent_check(datum/reagent/R)
|
||||
return dna.species.handle_chemicals(R,src)
|
||||
/mob/living/carbon/human/reagent_check(datum/reagent/R, delta_time, times_fired)
|
||||
return dna.species.handle_chemicals(R, src, delta_time, times_fired)
|
||||
// if it returns 0, it will run the usual on_mob_life for that reagent. otherwise, it will stop after running handle_chemicals for the species.
|
||||
|
||||
|
||||
|
||||
@@ -18,34 +18,33 @@
|
||||
#define THERMAL_PROTECTION_HAND_LEFT 0.025
|
||||
#define THERMAL_PROTECTION_HAND_RIGHT 0.025
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
if (notransform)
|
||||
/mob/living/carbon/human/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(notransform)
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
if (QDELETED(src))
|
||||
if(QDELETED(src))
|
||||
return FALSE
|
||||
|
||||
//Body temperature stability and damage
|
||||
dna.species.handle_body_temperature(src)
|
||||
dna.species.handle_body_temperature(src, delta_time, times_fired)
|
||||
|
||||
if(!IS_IN_STASIS(src))
|
||||
if(.) //not dead
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations) // Handle active genes
|
||||
HM.on_life()
|
||||
HM.on_life(delta_time, times_fired)
|
||||
|
||||
if(stat != DEAD)
|
||||
//heart attack stuff
|
||||
handle_heart()
|
||||
handle_liver()
|
||||
handle_heart(delta_time, times_fired)
|
||||
handle_liver(delta_time, times_fired)
|
||||
|
||||
dna.species.spec_life(src) // for mutantraces
|
||||
dna.species.spec_life(src, delta_time, times_fired) // for mutantraces
|
||||
else
|
||||
for(var/i in all_wounds)
|
||||
var/datum/wound/iter_wound = i
|
||||
iter_wound.on_stasis()
|
||||
iter_wound.on_stasis(delta_time, times_fired)
|
||||
|
||||
//Update our name based on whether our face is obscured/disfigured
|
||||
name = get_visible_name()
|
||||
@@ -68,15 +67,15 @@
|
||||
return pressure
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_traits()
|
||||
/mob/living/carbon/human/handle_traits(delta_time, times_fired)
|
||||
if (getOrganLoss(ORGAN_SLOT_BRAIN) >= 60)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "brain_damage", /datum/mood_event/brain_damage)
|
||||
else
|
||||
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "brain_damage")
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
if(!dna || !dna.species.handle_mutations_and_radiation(src))
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation(delta_time, times_fired)
|
||||
if(!dna || !dna.species.handle_mutations_and_radiation(src, delta_time, times_fired))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/breathe()
|
||||
@@ -113,12 +112,12 @@
|
||||
lun.check_breath(breath,src)
|
||||
|
||||
/// Environment handlers for species
|
||||
/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment)
|
||||
/mob/living/carbon/human/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
|
||||
// If we are in a cryo bed do not process life functions
|
||||
if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
|
||||
return
|
||||
|
||||
dna.species.handle_environment(environment, src)
|
||||
dna.species.handle_environment(src, environment, delta_time, times_fired)
|
||||
|
||||
/**
|
||||
* Adjust the core temperature of a mob
|
||||
@@ -146,13 +145,13 @@
|
||||
return dna.species.bodytemp_normal + get_body_temp_normal_change()
|
||||
|
||||
///FIRE CODE
|
||||
/mob/living/carbon/human/handle_fire()
|
||||
/mob/living/carbon/human/handle_fire(delta_time, times_fired)
|
||||
. = ..()
|
||||
if(.) //if the mob isn't on fire anymore
|
||||
return
|
||||
|
||||
if(dna)
|
||||
. = dna.species.handle_fire(src) //do special handling based on the mob's species. TRUE = they are immune to the effects of the fire.
|
||||
. = dna.species.handle_fire(src, delta_time, times_fired) //do special handling based on the mob's species. TRUE = they are immune to the effects of the fire.
|
||||
|
||||
if(!last_fire_update)
|
||||
last_fire_update = fire_stacks
|
||||
@@ -303,14 +302,17 @@
|
||||
|
||||
return min(1, thermal_protection)
|
||||
|
||||
/mob/living/carbon/human/handle_random_events()
|
||||
/mob/living/carbon/human/handle_random_events(delta_time, times_fired)
|
||||
//Puke if toxloss is too high
|
||||
if(!stat)
|
||||
if(getToxLoss() >= 45 && nutrition > 20)
|
||||
lastpuke += prob(50)
|
||||
if(lastpuke >= 50) // about 25 second delay I guess
|
||||
vomit(20)
|
||||
lastpuke = 0
|
||||
if(stat)
|
||||
return
|
||||
if(getToxLoss() < 45 || nutrition <= 20)
|
||||
return
|
||||
|
||||
lastpuke += DT_PROB(30, delta_time)
|
||||
if(lastpuke >= 50) // about 25 second delay I guess // This is actually closer to 150 seconds
|
||||
vomit(20)
|
||||
lastpuke = 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/has_smoke_protection()
|
||||
@@ -326,17 +328,17 @@
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/proc/handle_heart()
|
||||
/mob/living/carbon/human/proc/handle_heart(delta_time, times_fired)
|
||||
var/we_breath = !HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT)
|
||||
|
||||
if(!undergoing_cardiac_arrest())
|
||||
return
|
||||
|
||||
if(we_breath)
|
||||
adjustOxyLoss(8)
|
||||
adjustOxyLoss(4 * delta_time)
|
||||
Unconscious(80)
|
||||
// Tissues die without blood circulation
|
||||
adjustBruteLoss(2)
|
||||
adjustBruteLoss(1 * delta_time)
|
||||
|
||||
#undef THERMAL_PROTECTION_HEAD
|
||||
#undef THERMAL_PROTECTION_CHEST
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if(relic_mask)
|
||||
equip_to_slot_or_del(new relic_mask, ITEM_SLOT_MASK)
|
||||
|
||||
/mob/living/carbon/human/species/monkey/punpun/Life()
|
||||
/mob/living/carbon/human/species/monkey/punpun/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(FALSE, FALSE)
|
||||
memory_saved = TRUE
|
||||
|
||||
@@ -973,14 +973,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return "FRONT"
|
||||
|
||||
|
||||
/datum/species/proc/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/proc/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(HAS_TRAIT(H, TRAIT_NOBREATH))
|
||||
H.setOxyLoss(0)
|
||||
H.losebreath = 0
|
||||
|
||||
var/takes_crit_damage = (!HAS_TRAIT(H, TRAIT_NOCRITDAMAGE))
|
||||
if((H.health < H.crit_threshold) && takes_crit_damage)
|
||||
H.adjustBruteLoss(1)
|
||||
H.adjustBruteLoss(0.5 * delta_time)
|
||||
if(flying_species)
|
||||
HandleFlight(H)
|
||||
|
||||
@@ -1149,7 +1149,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/after_equip_job(datum/job/J, mob/living/carbon/human/H)
|
||||
H.update_mutant_bodyparts()
|
||||
|
||||
/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(chem.type == exotic_blood)
|
||||
H.blood_volume = min(H.blood_volume + round(chem.volume, 0.1), BLOOD_VOLUME_MAXIMUM)
|
||||
H.reagents.del_reagent(chem.type)
|
||||
@@ -1173,20 +1173,20 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
////////
|
||||
//LIFE//
|
||||
////////
|
||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
return //hunger is for BABIES
|
||||
|
||||
//The fucking TRAIT_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||
if(HAS_TRAIT_FROM(H, TRAIT_FAT, OBESITY))//I share your pain, past coder.
|
||||
if(H.overeatduration < 100)
|
||||
if(H.overeatduration < (200 SECONDS))
|
||||
to_chat(H, "<span class='notice'>You feel fit again!</span>")
|
||||
REMOVE_TRAIT(H, TRAIT_FAT, OBESITY)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/obesity)
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
else
|
||||
if(H.overeatduration >= 100)
|
||||
if(H.overeatduration >= (200 SECONDS))
|
||||
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
|
||||
ADD_TRAIT(H, TRAIT_FAT, OBESITY)
|
||||
H.add_movespeed_modifier(/datum/movespeed_modifier/obesity)
|
||||
@@ -1199,7 +1199,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/hunger_rate = HUNGER_FACTOR
|
||||
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
|
||||
if(mood && mood.sanity > SANITY_DISTURBED)
|
||||
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
|
||||
hunger_rate *= max(1 - 0.002 * mood.sanity, 0.5) //0.85 to 0.75
|
||||
// Whether we cap off our satiety or move it towards 0
|
||||
if(H.satiety > MAX_SATIETY)
|
||||
H.satiety = MAX_SATIETY
|
||||
@@ -1209,19 +1209,18 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.satiety = -MAX_SATIETY
|
||||
else if(H.satiety < 0)
|
||||
H.satiety++
|
||||
if(prob(round(-H.satiety/40)))
|
||||
if(DT_PROB(round(-H.satiety/77), delta_time))
|
||||
H.Jitter(5)
|
||||
hunger_rate = 3 * HUNGER_FACTOR
|
||||
hunger_rate *= H.physiology.hunger_mod
|
||||
H.adjust_nutrition(-hunger_rate)
|
||||
H.adjust_nutrition(-hunger_rate * delta_time)
|
||||
|
||||
|
||||
if (H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
if(H.overeatduration < 600) //capped so people don't take forever to unfat
|
||||
H.overeatduration++
|
||||
if(H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
if(H.overeatduration < 20 MINUTES) //capped so people don't take forever to unfat
|
||||
H.overeatduration = min(H.overeatduration + (1 SECONDS * delta_time), 20 MINUTES)
|
||||
else
|
||||
if(H.overeatduration > 1)
|
||||
H.overeatduration -= 2 //doubled the unfat rate
|
||||
if(H.overeatduration > 0)
|
||||
H.overeatduration = max(H.overeatduration - (2 SECONDS * delta_time), 0) //doubled the unfat rate
|
||||
|
||||
//metabolism change
|
||||
if(H.nutrition > NUTRITION_LEVEL_FAT)
|
||||
@@ -1265,41 +1264,53 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/H)
|
||||
if(HAS_TRAIT(H, TRAIT_RADIMMUNE))
|
||||
H.radiation = 0
|
||||
/**
|
||||
* Species based handling for irradiation
|
||||
*
|
||||
* Arguments:
|
||||
* - [source][/mob/living/carbon/human]: The mob requesting handling
|
||||
* - delta_time: The amount of time that has passed since the last tick
|
||||
* - times_fired: The number of times SSmobs has fired
|
||||
*/
|
||||
/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/source, delta_time, times_fired)
|
||||
if(HAS_TRAIT(source, TRAIT_RADIMMUNE))
|
||||
source.radiation = 0
|
||||
return TRUE
|
||||
|
||||
. = FALSE
|
||||
var/radiation = H.radiation
|
||||
var/radiation = source.radiation
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && DT_PROB(RAD_MOB_KNOCKDOWN_PROB, delta_time))
|
||||
if(!source.IsParalyzed())
|
||||
source.emote("collapse")
|
||||
source.Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
to_chat(source, "<span class='danger'>You feel weak.</span>")
|
||||
|
||||
if(radiation > RAD_MOB_KNOCKDOWN && prob(RAD_MOB_KNOCKDOWN_PROB))
|
||||
if(!H.IsParalyzed())
|
||||
H.emote("collapse")
|
||||
H.Paralyze(RAD_MOB_KNOCKDOWN_AMOUNT)
|
||||
to_chat(H, "<span class='danger'>You feel weak.</span>")
|
||||
if(radiation > RAD_MOB_VOMIT && DT_PROB(RAD_MOB_VOMIT_PROB, delta_time))
|
||||
source.vomit(10, TRUE)
|
||||
|
||||
if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
|
||||
H.vomit(10, TRUE)
|
||||
if(radiation > RAD_MOB_MUTATE && DT_PROB(RAD_MOB_MUTATE_PROB, delta_time))
|
||||
to_chat(source, "<span class='danger'>You mutate!</span>")
|
||||
source.easy_randmut(NEGATIVE + MINOR_NEGATIVE)
|
||||
source.emote("gasp")
|
||||
source.domutcheck()
|
||||
|
||||
if(radiation > RAD_MOB_MUTATE)
|
||||
if(prob(1))
|
||||
to_chat(H, "<span class='danger'>You mutate!</span>")
|
||||
H.easy_randmut(NEGATIVE+MINOR_NEGATIVE)
|
||||
H.emote("gasp")
|
||||
H.domutcheck()
|
||||
if(radiation > RAD_MOB_HAIRLOSS && DT_PROB(RAD_MOB_HAIRLOSS_PROB, delta_time))
|
||||
if(!(source.hairstyle == "Bald") && (HAIR in species_traits))
|
||||
to_chat(source, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
|
||||
addtimer(CALLBACK(src, .proc/go_bald, source), 5 SECONDS)
|
||||
|
||||
if(radiation > RAD_MOB_HAIRLOSS)
|
||||
if(prob(15) && !(H.hairstyle == "Bald") && (HAIR in species_traits))
|
||||
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
|
||||
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
|
||||
|
||||
/datum/species/proc/go_bald(mob/living/carbon/human/H)
|
||||
if(QDELETED(H)) //may be called from a timer
|
||||
/**
|
||||
* Makes the target human bald.
|
||||
*
|
||||
* Arguments:
|
||||
* - [target][/mob/living/carbon/human]: The mob to make go bald.
|
||||
*/
|
||||
/datum/species/proc/go_bald(mob/living/carbon/human/target)
|
||||
if(QDELETED(target)) //may be called from a timer
|
||||
return
|
||||
H.facial_hairstyle = "Shaved"
|
||||
H.hairstyle = "Bald"
|
||||
H.update_hair()
|
||||
target.facial_hairstyle = "Shaved"
|
||||
target.hairstyle = "Bald"
|
||||
target.update_hair()
|
||||
|
||||
//////////////////
|
||||
// ATTACK PROCS //
|
||||
@@ -1677,8 +1688,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
* * environment (required) The environment gas mix
|
||||
* * humi (required)(type: /mob/living/carbon/human) The mob we will target
|
||||
*/
|
||||
/datum/species/proc/handle_environment(datum/gas_mixture/environment, mob/living/carbon/human/humi)
|
||||
handle_environment_pressure(environment, humi)
|
||||
/datum/species/proc/handle_environment(mob/living/carbon/human/humi, datum/gas_mixture/environment, delta_time, times_fired)
|
||||
handle_environment_pressure(humi, environment, delta_time, times_fired)
|
||||
|
||||
/**
|
||||
* Body temperature handler for species
|
||||
@@ -1688,18 +1699,22 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
* vars:
|
||||
* * humi (required)(type: /mob/living/carbon/human) The mob we will target
|
||||
*/
|
||||
/datum/species/proc/handle_body_temperature(mob/living/carbon/human/humi)
|
||||
/datum/species/proc/handle_body_temperature(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
//when in a cryo unit we suspend all natural body regulation
|
||||
if(istype(humi.loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
|
||||
return
|
||||
//when dead the air still effects your skin temp
|
||||
if(humi.stat == DEAD || IS_IN_STASIS(humi))
|
||||
body_temperature_skin(humi)
|
||||
else //when alive do all the things
|
||||
body_temperature_core(humi)
|
||||
body_temperature_skin(humi)
|
||||
body_temperature_alerts(humi)
|
||||
body_temperature_damage(humi)
|
||||
|
||||
//Only stabilise core temp when alive and not in statis
|
||||
if(humi.stat < DEAD && !IS_IN_STASIS(humi))
|
||||
body_temperature_core(humi, delta_time, times_fired)
|
||||
|
||||
//These do run in statis
|
||||
body_temperature_skin(humi, delta_time, times_fired)
|
||||
body_temperature_alerts(humi, delta_time, times_fired)
|
||||
|
||||
//Do not cause more damage in statis
|
||||
if(!IS_IN_STASIS(humi))
|
||||
body_temperature_damage(humi, delta_time, times_fired)
|
||||
|
||||
/**
|
||||
* Used to stabilize the core temperature back to normal on living mobs
|
||||
@@ -1708,8 +1723,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
* vars:
|
||||
* * humi (required) The mob we will stabilize
|
||||
*/
|
||||
/datum/species/proc/body_temperature_core(mob/living/carbon/human/humi)
|
||||
var/natural_change = get_temp_change_amount(humi.get_body_temp_normal() - humi.coretemperature, 0.12)
|
||||
/datum/species/proc/body_temperature_core(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
var/natural_change = get_temp_change_amount(humi.get_body_temp_normal() - humi.coretemperature, 0.06 * delta_time)
|
||||
humi.adjust_coretemperature(humi.metabolism_efficiency * natural_change)
|
||||
|
||||
/**
|
||||
@@ -1719,13 +1734,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
* This happens even when dead so bodies revert to room temp over time.
|
||||
* vars:
|
||||
* * humi (required) The mob we will targeting
|
||||
* - delta_time: The amount of time that is considered as elapsing
|
||||
* - times_fired: The number of times SSmobs has fired
|
||||
*/
|
||||
/datum/species/proc/body_temperature_skin(mob/living/carbon/human/humi)
|
||||
/datum/species/proc/body_temperature_skin(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
|
||||
// change the core based on the skin temp
|
||||
var/skin_core_diff = humi.bodytemperature - humi.coretemperature
|
||||
// change rate of 0.08 to be slightly below area to skin change rate and still have a solid curve
|
||||
var/skin_core_change = get_temp_change_amount(skin_core_diff, 0.08)
|
||||
// change rate of 0.04 per second to be slightly below area to skin change rate and still have a solid curve
|
||||
var/skin_core_change = get_temp_change_amount(skin_core_diff, 0.04 * delta_time)
|
||||
|
||||
humi.adjust_coretemperature(skin_core_change)
|
||||
|
||||
@@ -1743,8 +1760,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
// Changes to the skin temperature based on the area
|
||||
var/area_skin_diff = area_temp - humi.bodytemperature
|
||||
if(!humi.on_fire || area_skin_diff > 0)
|
||||
// change rate of 0.1 as area temp has large impact on the surface
|
||||
var/area_skin_change = get_temp_change_amount(area_skin_diff, 0.1)
|
||||
// change rate of 0.05 as area temp has large impact on the surface
|
||||
var/area_skin_change = get_temp_change_amount(area_skin_diff, 0.05 * delta_time)
|
||||
|
||||
// We need to apply the thermal protection of the clothing when applying area to surface change
|
||||
// If the core bodytemp goes over the normal body temp you are overheating and becom sweaty
|
||||
@@ -1762,8 +1779,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(!humi.on_fire)
|
||||
// Get the changes to the skin from the core temp
|
||||
var/core_skin_diff = humi.coretemperature - humi.bodytemperature
|
||||
// change rate of 0.09 to reflect temp back to the skin at the slight higher rate then core to skin
|
||||
var/core_skin_change = (1 + thermal_protection) * get_temp_change_amount(core_skin_diff, 0.09)
|
||||
// change rate of 0.045 to reflect temp back to the skin at the slight higher rate then core to skin
|
||||
var/core_skin_change = (1 + thermal_protection) * get_temp_change_amount(core_skin_diff, 0.045 * delta_time)
|
||||
|
||||
// We do not want to over shoot after using protection
|
||||
if(core_skin_diff > 0)
|
||||
@@ -1825,17 +1842,17 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
* vars:
|
||||
* * humi (required) The mob we will targeting
|
||||
*/
|
||||
/datum/species/proc/body_temperature_damage(mob/living/carbon/human/humi)
|
||||
/datum/species/proc/body_temperature_damage(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
|
||||
//If the body temp is above the wound limit start adding exposure stacks
|
||||
if(humi.bodytemperature > BODYTEMP_HEAT_WOUND_LIMIT)
|
||||
humi.heat_exposure_stacks = min(humi.heat_exposure_stacks + 1, 40)
|
||||
humi.heat_exposure_stacks = min(humi.heat_exposure_stacks + (0.5 * delta_time), 40)
|
||||
else //When below the wound limit, reduce the exposure stacks fast.
|
||||
humi.heat_exposure_stacks = max(humi.heat_exposure_stacks - 4, 0)
|
||||
humi.heat_exposure_stacks = max(humi.heat_exposure_stacks - (2 * delta_time), 0)
|
||||
|
||||
//when exposure stacks are greater then 10 + rand20 try to apply wounds and reset stacks
|
||||
if(humi.heat_exposure_stacks > (10 + rand(0, 20)))
|
||||
apply_burn_wounds(humi)
|
||||
apply_burn_wounds(humi, delta_time, times_fired)
|
||||
humi.heat_exposure_stacks = 0
|
||||
|
||||
// Body temperature is too hot, and we do not have resist traits
|
||||
@@ -1846,10 +1863,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
firemodifier = min(firemodifier, 0)
|
||||
|
||||
// this can go below 5 at log 2.5
|
||||
var/burn_damage = max(log(2 - firemodifier, (humi.coretemperature - humi.get_body_temp_normal(apply_change=FALSE))) - 5,0)
|
||||
var/burn_damage = max(log(2 - firemodifier, (humi.coretemperature - humi.get_body_temp_normal(apply_change=FALSE))) - 5, 0)
|
||||
|
||||
// Apply species and physiology modifiers to heat damage
|
||||
burn_damage = burn_damage * heatmod * humi.physiology.heat_mod
|
||||
burn_damage = burn_damage * heatmod * humi.physiology.heat_mod * 0.5 * delta_time
|
||||
|
||||
// 40% for level 3 damage on humans to scream in pain
|
||||
if (humi.stat < UNCONSCIOUS && (prob(burn_damage) * 10) / 4)
|
||||
@@ -1864,15 +1881,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/cold_damage_limit = bodytemp_cold_damage_limit + (is_hulk ? BODYTEMP_HULK_COLD_DAMAGE_LIMIT_MODIFIER : 0)
|
||||
|
||||
if(humi.coretemperature < cold_damage_limit && !HAS_TRAIT(humi, TRAIT_RESISTCOLD))
|
||||
var/damage_type = is_hulk ? BRUTE : BURN
|
||||
var/damage_type = is_hulk ? BRUTE : BURN // Why?
|
||||
var/damage_mod = coldmod * humi.physiology.cold_mod * (is_hulk ? HULK_COLD_DAMAGE_MOD : 1)
|
||||
switch(humi.coretemperature)
|
||||
if(201 to cold_damage_limit)
|
||||
humi.apply_damage(COLD_DAMAGE_LEVEL_1 * damage_mod, damage_type)
|
||||
humi.apply_damage(COLD_DAMAGE_LEVEL_1 * damage_mod * delta_time, damage_type)
|
||||
if(120 to 200)
|
||||
humi.apply_damage(COLD_DAMAGE_LEVEL_2 * damage_mod, damage_type)
|
||||
humi.apply_damage(COLD_DAMAGE_LEVEL_2 * damage_mod * delta_time, damage_type)
|
||||
else
|
||||
humi.apply_damage(COLD_DAMAGE_LEVEL_3 * damage_mod, damage_type)
|
||||
humi.apply_damage(COLD_DAMAGE_LEVEL_3 * damage_mod * delta_time, damage_type)
|
||||
|
||||
/**
|
||||
* Used to apply burn wounds on random limbs
|
||||
@@ -1882,7 +1899,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
* vars:
|
||||
* * humi (required) The mob we will targeting
|
||||
*/
|
||||
/datum/species/proc/apply_burn_wounds(mob/living/carbon/human/humi)
|
||||
/datum/species/proc/apply_burn_wounds(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
// If we are resistant to heat exit
|
||||
if(HAS_TRAIT(humi, TRAIT_RESISTHEAT))
|
||||
return
|
||||
@@ -1914,21 +1931,19 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(humi.bodytemperature > BODYTEMP_HEAT_WOUND_LIMIT + 2800)
|
||||
burn_damage = HEAT_DAMAGE_LEVEL_3
|
||||
|
||||
humi.apply_damage(burn_damage, BURN, bodypart)
|
||||
humi.apply_damage(burn_damage * delta_time, BURN, bodypart)
|
||||
|
||||
/// Handle the air pressure of the environment
|
||||
/datum/species/proc/handle_environment_pressure(datum/gas_mixture/environment, mob/living/carbon/human/H)
|
||||
/datum/species/proc/handle_environment_pressure(mob/living/carbon/human/H, datum/gas_mixture/environment, delta_time, times_fired)
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = H.calculate_affecting_pressure(pressure)
|
||||
|
||||
// Set alerts and apply damage based on the amount of pressure
|
||||
switch(adjusted_pressure)
|
||||
|
||||
// Very high pressure, show an alert and take damage
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
if(!HAS_TRAIT(H, TRAIT_RESISTHIGHPRESSURE))
|
||||
H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 ) * \
|
||||
PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod)
|
||||
H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) - 1) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod * delta_time)
|
||||
H.throw_alert("pressure", /atom/movable/screen/alert/highpressure, 2)
|
||||
else
|
||||
H.clear_alert("pressure")
|
||||
@@ -1955,7 +1970,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE))
|
||||
H.clear_alert("pressure")
|
||||
else
|
||||
H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod)
|
||||
H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod * delta_time)
|
||||
H.throw_alert("pressure", /atom/movable/screen/alert/lowpressure, 2)
|
||||
|
||||
|
||||
@@ -1963,7 +1978,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
// FIRE //
|
||||
//////////
|
||||
|
||||
/datum/species/proc/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
|
||||
/datum/species/proc/handle_fire(mob/living/carbon/human/H, delta_time, times_fired, no_protection = FALSE)
|
||||
if(!CanIgniteMob(H))
|
||||
return TRUE
|
||||
if(H.on_fire)
|
||||
@@ -2020,9 +2035,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT && !no_protection)
|
||||
return
|
||||
if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT && !no_protection)
|
||||
H.adjust_bodytemperature(11)
|
||||
H.adjust_bodytemperature(5.5 * delta_time)
|
||||
else
|
||||
H.adjust_bodytemperature(BODYTEMP_HEATING_MAX + (H.fire_stacks * 12))
|
||||
H.adjust_bodytemperature((BODYTEMP_HEATING_MAX + (H.fire_stacks * 12)) * 0.5 * delta_time)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "on_fire", /datum/mood_event/on_fire)
|
||||
|
||||
/datum/species/proc/CanIgniteMob(mob/living/carbon/human/H)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
H.regenerate_limb(BODY_ZONE_HEAD,FALSE)
|
||||
..()
|
||||
|
||||
/datum/species/dullahan/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/dullahan/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(QDELETED(myhead))
|
||||
myhead = null
|
||||
H.gib()
|
||||
|
||||
@@ -121,9 +121,9 @@
|
||||
source.emp_act(EMP_LIGHT)
|
||||
return COMPONENT_BLOCK_LIGHT_EATER
|
||||
|
||||
/datum/species/ethereal/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/ethereal/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
.=..()
|
||||
handle_charge(H)
|
||||
handle_charge(H, delta_time, times_fired)
|
||||
|
||||
|
||||
/datum/species/ethereal/proc/stop_emp(mob/living/carbon/human/H)
|
||||
@@ -144,7 +144,7 @@
|
||||
spec_updatehealth(H)
|
||||
H.visible_message("<span class='danger'>[H] stops flickering and goes back to their normal state!</span>")
|
||||
|
||||
/datum/species/ethereal/proc/handle_charge(mob/living/carbon/human/H)
|
||||
/datum/species/ethereal/proc/handle_charge(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
switch(get_charge(H))
|
||||
if(-INFINITY to ETHEREAL_CHARGE_NONE)
|
||||
H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 3)
|
||||
@@ -153,7 +153,7 @@
|
||||
if(ETHEREAL_CHARGE_NONE to ETHEREAL_CHARGE_LOWPOWER)
|
||||
H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 2)
|
||||
if(H.health > 10.5)
|
||||
apply_damage(0.65, TOX, null, null, H)
|
||||
apply_damage(0.325 * delta_time, TOX, null, null, H)
|
||||
if(ETHEREAL_CHARGE_LOWPOWER to ETHEREAL_CHARGE_NORMAL)
|
||||
H.throw_alert("ethereal_charge", /atom/movable/screen/alert/etherealcharge, 1)
|
||||
if(ETHEREAL_CHARGE_FULL to ETHEREAL_CHARGE_OVERLOAD)
|
||||
@@ -161,8 +161,8 @@
|
||||
apply_damage(0.2, TOX, null, null, H)
|
||||
if(ETHEREAL_CHARGE_OVERLOAD to ETHEREAL_CHARGE_DANGEROUS)
|
||||
H.throw_alert("ethereal_overcharge", /atom/movable/screen/alert/ethereal_overcharge, 2)
|
||||
apply_damage(0.65, TOX, null, null, H)
|
||||
if(prob(10)) //10% each tick for ethereals to explosively release excess energy if it reaches dangerous levels
|
||||
apply_damage(0.325 * delta_time, TOX, null, null, H)
|
||||
if(DT_PROB(5, delta_time)) // 5% each seacond for ethereals to explosively release excess energy if it reaches dangerous levels
|
||||
discharge_process(H)
|
||||
else
|
||||
H.clear_alert("ethereal_charge")
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
mutantappendix = /obj/item/organ/appendix/fly
|
||||
mutant_organs = list(/obj/item/organ/fly, /obj/item/organ/fly/groin)
|
||||
|
||||
/datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(chem.type == /datum/reagent/toxin/pestkiller)
|
||||
H.adjustToxLoss(3)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
name = odd_organ_name()
|
||||
icon_state = pick("brain-x-d", "liver-x", "kidneys-x", "stomach-x", "lungs-x", "random_fly_1", "random_fly_2", "random_fly_3", "random_fly_4", "random_fly_5")
|
||||
|
||||
/obj/item/organ/stomach/fly/on_life()
|
||||
/obj/item/organ/stomach/fly/on_life(delta_time, times_fired)
|
||||
if(locate(/datum/reagent/consumable) in reagents.reagent_list)
|
||||
var/mob/living/carbon/body = owner
|
||||
// we do not loss any nutrition as a fly when vomiting out food
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
var/boom_warning = FALSE
|
||||
var/datum/action/innate/ignite/ignite
|
||||
|
||||
/datum/species/golem/plasma/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/golem/plasma/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(H.bodytemperature > 750)
|
||||
if(!boom_warning && H.on_fire)
|
||||
to_chat(H, "<span class='userdanger'>You feel like you could blow up at any moment!</span>")
|
||||
@@ -107,11 +107,11 @@
|
||||
boom_warning = FALSE
|
||||
|
||||
if(H.bodytemperature > 850 && H.on_fire && prob(25))
|
||||
explosion(get_turf(H),1,2,4,flame_range = 5)
|
||||
explosion(get_turf(H), 1, 2, 4, flame_range = 5)
|
||||
if(H)
|
||||
H.gib()
|
||||
if(H.fire_stacks < 2) //flammable
|
||||
H.adjust_fire_stacks(1)
|
||||
H.adjust_fire_stacks(0.5 * delta_time)
|
||||
..()
|
||||
|
||||
/datum/species/golem/plasma/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
@@ -263,12 +263,12 @@
|
||||
special_names = list("Outsider", "Technology", "Watcher", "Stranger") //ominous and unknown
|
||||
|
||||
//Regenerates because self-repairing super-advanced alien tech
|
||||
/datum/species/golem/alloy/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/golem/alloy/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(H.stat == DEAD)
|
||||
return
|
||||
H.heal_overall_damage(2,2, 0, BODYPART_ORGANIC)
|
||||
H.adjustToxLoss(-2)
|
||||
H.adjustOxyLoss(-2)
|
||||
H.heal_overall_damage(1 * delta_time, 1 * delta_time, 0, BODYPART_ORGANIC)
|
||||
H.adjustToxLoss(-1 * delta_time)
|
||||
H.adjustOxyLoss(-1 * delta_time)
|
||||
|
||||
//Since this will usually be created from a collaboration between podpeople and free golems, wood golems are a mix between the two races
|
||||
/datum/species/golem/wood
|
||||
@@ -288,29 +288,29 @@
|
||||
special_name_chance = 100
|
||||
inherent_factions = list("plants", "vines")
|
||||
|
||||
/datum/species/golem/wood/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/golem/wood/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(H.stat == DEAD)
|
||||
return
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
if(isturf(H.loc)) //else, there's considered to be no light
|
||||
var/turf/T = H.loc
|
||||
light_amount = min(1,T.get_lumcount()) - 0.5
|
||||
H.adjust_nutrition(light_amount * 10)
|
||||
light_amount = min(1, T.get_lumcount()) - 0.5
|
||||
H.adjust_nutrition(5 * light_amount * delta_time)
|
||||
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
|
||||
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)
|
||||
if(light_amount > 0.2) //if there's enough light, heal
|
||||
H.heal_overall_damage(1,1,0, BODYPART_ORGANIC)
|
||||
H.adjustToxLoss(-1)
|
||||
H.adjustOxyLoss(-1)
|
||||
H.heal_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
|
||||
H.adjustToxLoss(-0.5 * delta_time)
|
||||
H.adjustOxyLoss(-0.5 * delta_time)
|
||||
|
||||
if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
|
||||
H.take_overall_damage(2,0)
|
||||
|
||||
/datum/species/golem/wood/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/golem/wood/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(chem.type == /datum/reagent/toxin/plantbgone)
|
||||
H.adjustToxLoss(3)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
return TRUE
|
||||
|
||||
//Radioactive puncher, hits for burn but only as hard as human, slightly more durable against brute but less against everything else
|
||||
/datum/species/golem/uranium
|
||||
@@ -556,16 +556,19 @@
|
||||
prefix = "Bananium"
|
||||
special_names = null
|
||||
|
||||
var/last_honk = 0
|
||||
var/honkooldown = 0
|
||||
var/last_banana = 0
|
||||
var/banana_cooldown = 100
|
||||
var/active = null
|
||||
/// Cooldown for producing honks
|
||||
COOLDOWN_DECLARE(honkooldown)
|
||||
/// Cooldown for producing bananas
|
||||
COOLDOWN_DECLARE(banana_cooldown)
|
||||
/// Time between possible banana productions
|
||||
var/banana_delay = 10 SECONDS
|
||||
/// Same as the uranium golem. I'm pretty sure this is vestigial.
|
||||
var/active = FALSE
|
||||
|
||||
/datum/species/golem/bananium/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
..()
|
||||
last_banana = world.time
|
||||
last_honk = world.time
|
||||
COOLDOWN_START(src, honkooldown, 0)
|
||||
COOLDOWN_START(src, banana_cooldown, banana_delay)
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(liver)
|
||||
@@ -586,21 +589,21 @@
|
||||
|
||||
/datum/species/golem/bananium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
|
||||
..()
|
||||
if(world.time > last_banana + banana_cooldown && M != H && M.combat_mode)
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
last_banana = world.time
|
||||
if(COOLDOWN_FINISHED(src, banana_cooldown) && M != H && M.combat_mode)
|
||||
new /obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
COOLDOWN_START(src, banana_cooldown, banana_delay)
|
||||
|
||||
/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_banana + banana_cooldown && user != H)
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
last_banana = world.time
|
||||
if((user != H) && COOLDOWN_FINISHED(src, banana_cooldown))
|
||||
new /obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
COOLDOWN_START(src, banana_cooldown, banana_delay)
|
||||
|
||||
/datum/species/golem/bananium/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
..()
|
||||
if(world.time > last_banana + banana_cooldown)
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
last_banana = world.time
|
||||
if(COOLDOWN_FINISHED(src, banana_cooldown))
|
||||
new /obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
COOLDOWN_START(src, banana_cooldown, banana_delay)
|
||||
|
||||
/datum/species/golem/bananium/spec_hitby(atom/movable/AM, mob/living/carbon/human/H)
|
||||
..()
|
||||
@@ -611,16 +614,14 @@
|
||||
return 0
|
||||
else
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
|
||||
last_banana = world.time
|
||||
COOLDOWN_START(src, banana_cooldown, banana_delay)
|
||||
|
||||
/datum/species/golem/bananium/spec_life(mob/living/carbon/human/H)
|
||||
if(!active)
|
||||
if(world.time > last_honk + honkooldown)
|
||||
active = 1
|
||||
playsound(get_turf(H), 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
last_honk = world.time
|
||||
honkooldown = rand(20, 80)
|
||||
active = null
|
||||
/datum/species/golem/bananium/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(!active && COOLDOWN_FINISHED(src, honkooldown))
|
||||
active = TRUE
|
||||
playsound(get_turf(H), 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
COOLDOWN_START(src, honkooldown, rand(2 SECONDS, 8 SECONDS))
|
||||
active = FALSE
|
||||
..()
|
||||
|
||||
/datum/species/golem/bananium/spec_death(gibbed, mob/living/carbon/human/H)
|
||||
@@ -673,15 +674,15 @@
|
||||
if(dominate)
|
||||
C.RemoveSpell(dominate)
|
||||
|
||||
/datum/species/golem/runic/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/golem/runic/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(istype(chem, /datum/reagent/water/holywater))
|
||||
H.adjustFireLoss(4)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
H.adjustFireLoss(4 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
|
||||
if(chem.type == /datum/reagent/fuel/unholywater)
|
||||
H.adjustBruteLoss(-4)
|
||||
H.adjustFireLoss(-4)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
H.adjustBruteLoss(-4 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.adjustFireLoss(-4 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
|
||||
/datum/species/golem/cloth
|
||||
name = "Cloth Golem"
|
||||
@@ -995,12 +996,12 @@
|
||||
bonechill.Remove(C)
|
||||
..()
|
||||
|
||||
/datum/species/golem/bone/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/golem/bone/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
. = ..()
|
||||
if(chem.type == /datum/reagent/toxin/bonehurtingjuice)
|
||||
H.adjustStaminaLoss(7.5, 0)
|
||||
H.adjustBruteLoss(0.5, 0)
|
||||
if(prob(20))
|
||||
H.adjustStaminaLoss(7.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
H.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
if(DT_PROB(10, delta_time))
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
@@ -1009,7 +1010,7 @@
|
||||
if(3)
|
||||
to_chat(H, "<span class='warning'>Your bones hurt!</span>")
|
||||
if(chem.overdosed)
|
||||
if(prob(4) && iscarbon(H)) //big oof
|
||||
if(DT_PROB(2, delta_time) && iscarbon(H)) //big oof
|
||||
var/selected_part = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) //God help you if the same limb gets picked twice quickly.
|
||||
var/obj/item/bodypart/bp = H.get_bodypart(selected_part) //We're so sorry skeletons, you're so misunderstood
|
||||
if(bp)
|
||||
@@ -1020,7 +1021,7 @@
|
||||
else
|
||||
to_chat(H, "<span class='warning'>Your missing arm aches from wherever you left it.</span>")
|
||||
H.emote("sigh")
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/bonechill
|
||||
|
||||
@@ -41,23 +41,27 @@
|
||||
slime_change.Grant(C)
|
||||
//SKYRAT EDIT ADDITION END
|
||||
|
||||
/datum/species/jelly/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/jelly/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(H.stat == DEAD) //can't farm slime jelly from a dead slime/jelly person indefinitely
|
||||
return
|
||||
|
||||
if(!H.blood_volume)
|
||||
H.blood_volume += 5
|
||||
H.adjustBruteLoss(5)
|
||||
H.blood_volume += 2.5 * delta_time
|
||||
H.adjustBruteLoss(2.5 * delta_time)
|
||||
to_chat(H, "<span class='danger'>You feel empty!</span>")
|
||||
|
||||
if(H.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
if(H.nutrition >= NUTRITION_LEVEL_STARVING)
|
||||
H.blood_volume += 3
|
||||
H.adjust_nutrition(-2.5)
|
||||
H.blood_volume += 1.5 * delta_time
|
||||
H.adjust_nutrition(-1.25 * delta_time)
|
||||
|
||||
if(H.blood_volume < BLOOD_VOLUME_OKAY)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
to_chat(H, "<span class='danger'>You feel drained!</span>")
|
||||
|
||||
if(H.blood_volume < BLOOD_VOLUME_BAD)
|
||||
Cannibalize_Body(H)
|
||||
|
||||
if(regenerate_limbs)
|
||||
regenerate_limbs.UpdateButtonIcon()
|
||||
|
||||
@@ -175,13 +179,14 @@
|
||||
/datum/species/jelly/slime/copy_properties_from(datum/species/jelly/slime/old_species)
|
||||
bodies = old_species.bodies
|
||||
|
||||
/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
to_chat(H, "<span class='notice'>You feel very bloated!</span>")
|
||||
|
||||
else if(H.nutrition >= NUTRITION_LEVEL_WELL_FED)
|
||||
H.blood_volume += 3
|
||||
H.adjust_nutrition(-2.5)
|
||||
H.blood_volume += 1.5 * delta_time
|
||||
H.adjust_nutrition(-1.25 * delta_time)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
ass_image = 'icons/ass/asslizard.png'
|
||||
|
||||
/// Lizards are cold blooded and do not stabilize body temperature naturally
|
||||
/datum/species/lizard/body_temperature_core(mob/living/carbon/human/humi)
|
||||
/datum/species/lizard/body_temperature_core(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
return
|
||||
|
||||
/datum/species/lizard/random_name(gender,unique,lastname)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
return randname
|
||||
|
||||
/datum/species/moth/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
|
||||
/datum/species/moth/handle_fire(mob/living/carbon/human/H, delta_time, times_fired, no_protection = FALSE)
|
||||
. = ..()
|
||||
if(.) //if the mob is immune to fire, don't burn wings off.
|
||||
return
|
||||
@@ -59,11 +59,11 @@
|
||||
H.dna.features["wings"] = "None"
|
||||
handle_mutant_bodyparts(H)
|
||||
|
||||
/datum/species/moth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/moth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
. = ..()
|
||||
if(chem.type == /datum/reagent/toxin/pestkiller)
|
||||
H.adjustToxLoss(3)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
|
||||
/datum/species/moth/check_species_weakness(obj/item/weapon, mob/living/attacker)
|
||||
if(istype(weapon, /obj/item/melee/flyswatter))
|
||||
|
||||
@@ -46,10 +46,10 @@
|
||||
mush.remove(C)
|
||||
QDEL_NULL(mush)
|
||||
|
||||
/datum/species/mush/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/mush/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(chem.type == /datum/reagent/toxin/plantbgone/weedkiller)
|
||||
H.adjustToxLoss(3)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
return TRUE
|
||||
|
||||
/datum/species/mush/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
|
||||
|
||||
@@ -41,22 +41,21 @@
|
||||
. = ..()
|
||||
C.set_safe_hunger_level()
|
||||
|
||||
/datum/species/plasmaman/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/plasmaman/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
var/atmos_sealed = CanIgniteMob(H) && (isclothing(H.wear_suit) && H.wear_suit.clothing_flags & STOPSPRESSUREDAMAGE) && (isclothing(H.head) && H.head.clothing_flags & STOPSPRESSUREDAMAGE)
|
||||
if(!atmos_sealed && (!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman) || !istype(H.gloves, /obj/item/clothing/gloves)))
|
||||
var/datum/gas_mixture/environment = H.loc.return_air()
|
||||
if(environment)
|
||||
if(environment.total_moles())
|
||||
if(environment.gases[/datum/gas/hypernoblium] && (environment.gases[/datum/gas/hypernoblium][MOLES]) >= 5)
|
||||
if(H.on_fire && H.fire_stacks > 0)
|
||||
H.adjust_fire_stacks(-20)
|
||||
else if(!HAS_TRAIT(H, TRAIT_NOFIRE))
|
||||
if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire
|
||||
H.adjust_fire_stacks(0.5)
|
||||
if(!H.on_fire && H.fire_stacks > 0)
|
||||
H.visible_message("<span class='danger'>[H]'s body reacts with the atmosphere and bursts into flames!</span>","<span class='userdanger'>Your body reacts with the atmosphere and bursts into flame!</span>")
|
||||
H.IgniteMob()
|
||||
internal_fire = TRUE
|
||||
if(environment?.total_moles())
|
||||
if(environment.gases[/datum/gas/hypernoblium] && (environment.gases[/datum/gas/hypernoblium][MOLES]) >= 5)
|
||||
if(H.on_fire && H.fire_stacks > 0)
|
||||
H.adjust_fire_stacks(-10 * delta_time)
|
||||
else if(!HAS_TRAIT(H, TRAIT_NOFIRE))
|
||||
if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire
|
||||
H.adjust_fire_stacks(0.25 * delta_time)
|
||||
if(!H.on_fire && H.fire_stacks > 0)
|
||||
H.visible_message("<span class='danger'>[H]'s body reacts with the atmosphere and bursts into flames!</span>","<span class='userdanger'>Your body reacts with the atmosphere and bursts into flame!</span>")
|
||||
H.IgniteMob()
|
||||
internal_fire = TRUE
|
||||
else if(H.fire_stacks)
|
||||
var/obj/item/clothing/under/plasmaman/P = H.w_uniform
|
||||
if(istype(P))
|
||||
@@ -66,7 +65,7 @@
|
||||
internal_fire = FALSE
|
||||
H.update_fire()
|
||||
|
||||
/datum/species/plasmaman/handle_fire(mob/living/carbon/human/H, no_protection)
|
||||
/datum/species/plasmaman/handle_fire(mob/living/carbon/human/H, delta_time, times_fired, no_protection = FALSE)
|
||||
if(internal_fire)
|
||||
no_protection = TRUE
|
||||
. = ..()
|
||||
@@ -180,18 +179,18 @@
|
||||
|
||||
return randname
|
||||
|
||||
/datum/species/plasmaman/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/plasmaman/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
. = ..()
|
||||
if(istype(chem, /datum/reagent/toxin/plasma))
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
|
||||
for(var/i in H.all_wounds)
|
||||
var/datum/wound/iter_wound = i
|
||||
iter_wound.on_xadone(4) // plasmamen use plasma to reform their bones or whatever
|
||||
iter_wound.on_xadone(4 * REAGENTS_EFFECT_MULTIPLIER * delta_time) // plasmamen use plasma to reform their bones or whatever
|
||||
return TRUE
|
||||
if(istype(chem, /datum/reagent/toxin/bonehurtingjuice))
|
||||
H.adjustStaminaLoss(7.5, 0)
|
||||
H.adjustBruteLoss(0.5, 0)
|
||||
if(prob(20))
|
||||
H.adjustStaminaLoss(7.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
H.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
if(DT_PROB(10, delta_time))
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
@@ -200,7 +199,7 @@
|
||||
if(3)
|
||||
to_chat(H, "<span class='warning'>Your bones hurt!</span>")
|
||||
if(chem.overdosed)
|
||||
if(prob(4) && iscarbon(H)) //big oof
|
||||
if(DT_PROB(2, delta_time) && iscarbon(H)) //big oof
|
||||
var/selected_part = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) //God help you if the same limb gets picked twice quickly.
|
||||
var/obj/item/bodypart/bp = H.get_bodypart(selected_part) //We're so sorry skeletons, you're so misunderstood
|
||||
if(bp)
|
||||
@@ -211,5 +210,5 @@
|
||||
else
|
||||
to_chat(H, "<span class='warning'>Your missing arm aches from wherever you left it.</span>")
|
||||
H.emote("sigh")
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
|
||||
return TRUE
|
||||
|
||||
@@ -17,29 +17,30 @@
|
||||
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT
|
||||
species_language_holder = /datum/language_holder/plant
|
||||
|
||||
/datum/species/pod/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/pod/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(H.stat == DEAD)
|
||||
return
|
||||
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
if(isturf(H.loc)) //else, there's considered to be no light
|
||||
var/turf/T = H.loc
|
||||
light_amount = min(1,T.get_lumcount()) - 0.5
|
||||
H.adjust_nutrition(light_amount * 10)
|
||||
light_amount = min(1, T.get_lumcount()) - 0.5
|
||||
H.adjust_nutrition(5 * light_amount * delta_time)
|
||||
if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL)
|
||||
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)
|
||||
if(light_amount > 0.2) //if there's enough light, heal
|
||||
H.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
|
||||
H.adjustToxLoss(-1)
|
||||
H.adjustOxyLoss(-1)
|
||||
H.heal_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
|
||||
H.adjustToxLoss(-0.5 * delta_time)
|
||||
H.adjustOxyLoss(-0.5 * delta_time)
|
||||
|
||||
if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
|
||||
H.take_overall_damage(2,0)
|
||||
H.take_overall_damage(1 * delta_time, 0)
|
||||
|
||||
/datum/species/pod/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/pod/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(chem.type == /datum/reagent/toxin/plantbgone)
|
||||
H.adjustToxLoss(3)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
H.adjustToxLoss(3 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
return TRUE
|
||||
|
||||
/datum/species/pod/on_hit(obj/projectile/P, mob/living/carbon/human/H)
|
||||
switch(P.type)
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
species_language_holder = /datum/language_holder/shadowpeople
|
||||
|
||||
|
||||
/datum/species/shadow/spec_life(mob/living/carbon/human/H)
|
||||
/datum/species/shadow/spec_life(mob/living/carbon/human/H, delta_time, times_fired)
|
||||
var/turf/T = H.loc
|
||||
if(istype(T))
|
||||
var/light_amount = T.get_lumcount()
|
||||
|
||||
if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying
|
||||
H.take_overall_damage(1,1, 0, BODYPART_ORGANIC)
|
||||
H.take_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
|
||||
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
|
||||
H.heal_overall_damage(1,1, 0, BODYPART_ORGANIC)
|
||||
H.heal_overall_damage(0.5 * delta_time, 0.5 * delta_time, 0, BODYPART_ORGANIC)
|
||||
|
||||
/datum/species/shadow/check_roundstart_eligible()
|
||||
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
return ..()
|
||||
|
||||
//Can still metabolize milk through meme magic
|
||||
/datum/species/skeleton/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/skeleton/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
. = ..()
|
||||
if(chem.type == /datum/reagent/toxin/bonehurtingjuice)
|
||||
H.adjustStaminaLoss(7.5, 0)
|
||||
H.adjustBruteLoss(0.5, 0)
|
||||
if(prob(20))
|
||||
H.adjustStaminaLoss(7.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
H.adjustBruteLoss(0.5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
if(DT_PROB(10, delta_time))
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
H.say(pick("oof.", "ouch.", "my bones.", "oof ouch.", "oof ouch my bones."), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
@@ -42,7 +42,7 @@
|
||||
if(3)
|
||||
to_chat(H, "<span class='warning'>Your bones hurt!</span>")
|
||||
if(chem.overdosed)
|
||||
if(prob(4) && iscarbon(H)) //big oof
|
||||
if(DT_PROB(2, delta_time) && iscarbon(H)) //big oof
|
||||
var/selected_part = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) //God help you if the same limb gets picked twice quickly.
|
||||
var/obj/item/bodypart/bp = H.get_bodypart(selected_part) //We're so sorry skeletons, you're so misunderstood
|
||||
if(bp)
|
||||
@@ -53,5 +53,5 @@
|
||||
else
|
||||
to_chat(H, "<span class='warning'>Your missing arm aches from wherever you left it.</span>")
|
||||
H.emote("sigh")
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate)
|
||||
H.reagents.remove_reagent(chem.type, chem.metabolization_rate * delta_time)
|
||||
return TRUE
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
mutanttongue = /obj/item/organ/tongue/snail
|
||||
exotic_blood = /datum/reagent/lube
|
||||
|
||||
/datum/species/snail/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/snail/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(istype(chem,/datum/reagent/consumable/salt))
|
||||
H.adjustFireLoss(2)
|
||||
H.adjustFireLoss(2 * REAGENTS_EFFECT_MULTIPLIER * delta_time)
|
||||
playsound(H, 'sound/weapons/sear.ogg', 30, TRUE)
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
return TRUE
|
||||
|
||||
/datum/species/snail/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load)
|
||||
. = ..()
|
||||
|
||||
@@ -42,13 +42,12 @@
|
||||
. = ..()
|
||||
UnregisterSignal(H, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H, delta_time, times_fired)
|
||||
if(chem.type == /datum/reagent/medicine/c2/synthflesh)
|
||||
chem.expose_mob(H, TOUCH, 2 ,0) //heal a little
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
chem.expose_mob(H, TOUCH, 2 * REAGENTS_EFFECT_MULTIPLIER * delta_time,0) //heal a little
|
||||
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM * delta_time)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/proc/assume_disguise(datum/species/S, mob/living/carbon/human/H)
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
C.RemoveSpell(batform)
|
||||
QDEL_NULL(batform)
|
||||
|
||||
/datum/species/vampire/spec_life(mob/living/carbon/human/C)
|
||||
/datum/species/vampire/spec_life(mob/living/carbon/human/C, delta_time, times_fired)
|
||||
. = ..()
|
||||
if(istype(C.loc, /obj/structure/closet/crate/coffin))
|
||||
C.heal_overall_damage(4,4,0, BODYPART_ORGANIC)
|
||||
C.adjustToxLoss(-4)
|
||||
C.adjustOxyLoss(-4)
|
||||
C.adjustCloneLoss(-4)
|
||||
C.heal_overall_damage(2 * delta_time, 2 * delta_time, 0, BODYPART_ORGANIC)
|
||||
C.adjustToxLoss(-2 * delta_time)
|
||||
C.adjustOxyLoss(-2 * delta_time)
|
||||
C.adjustCloneLoss(-2 * delta_time)
|
||||
return
|
||||
C.blood_volume -= 0.25
|
||||
C.blood_volume -= 0.125 * delta_time
|
||||
if(C.blood_volume <= BLOOD_VOLUME_SURVIVE)
|
||||
to_chat(C, "<span class='danger'>You ran out of blood!</span>")
|
||||
var/obj/shapeshift_holder/H = locate() in C
|
||||
@@ -55,8 +55,8 @@
|
||||
var/area/A = get_area(C)
|
||||
if(istype(A, /area/service/chapel))
|
||||
to_chat(C, "<span class='warning'>You don't belong here!</span>")
|
||||
C.adjustFireLoss(20)
|
||||
C.adjust_fire_stacks(6)
|
||||
C.adjustFireLoss(10 * delta_time)
|
||||
C.adjust_fire_stacks(3 * delta_time)
|
||||
C.IgniteMob()
|
||||
|
||||
/datum/species/vampire/check_species_weakness(obj/item/weapon, mob/living/attacker)
|
||||
|
||||
@@ -32,12 +32,14 @@
|
||||
armor = 20 // 120 damage to KO a zombie, which kills it
|
||||
speedmod = 1.6
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
|
||||
var/heal_rate = 1
|
||||
var/regen_cooldown = 0
|
||||
changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN
|
||||
/// The rate the zombies regenerate at
|
||||
var/heal_rate = 0.5
|
||||
/// The cooldown before the zombie can start regenerating
|
||||
COOLDOWN_DECLARE(regen_cooldown)
|
||||
|
||||
/// Zombies do not stabilize body temperature they are the walking dead and are cold blooded
|
||||
/datum/species/zombie/body_temperature_core(mob/living/carbon/human/humi)
|
||||
/datum/species/zombie/body_temperature_core(mob/living/carbon/human/humi, delta_time, times_fired)
|
||||
return
|
||||
|
||||
/datum/species/zombie/infectious/check_roundstart_eligible()
|
||||
@@ -49,25 +51,25 @@
|
||||
/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, spread_damage = FALSE, forced = FALSE, wound_bonus = 0, bare_wound_bonus = 0, sharpness = NONE)
|
||||
. = ..()
|
||||
if(.)
|
||||
regen_cooldown = world.time + REGENERATION_DELAY
|
||||
COOLDOWN_START(src, regen_cooldown, REGENERATION_DELAY)
|
||||
|
||||
/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
|
||||
/datum/species/zombie/infectious/spec_life(mob/living/carbon/C, delta_time, times_fired)
|
||||
. = ..()
|
||||
C.set_combat_mode(TRUE) // THE SUFFERING MUST FLOW
|
||||
|
||||
//Zombies never actually die, they just fall down until they regenerate enough to rise back up.
|
||||
//They must be restrained, beheaded or gibbed to stop being a threat.
|
||||
if(regen_cooldown < world.time)
|
||||
if(COOLDOWN_FINISHED(src, regen_cooldown))
|
||||
var/heal_amt = heal_rate
|
||||
if(HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION))
|
||||
heal_amt *= 2
|
||||
C.heal_overall_damage(heal_amt,heal_amt)
|
||||
C.adjustToxLoss(-heal_amt)
|
||||
C.heal_overall_damage(heal_amt * delta_time, heal_amt * delta_time)
|
||||
C.adjustToxLoss(-heal_amt * delta_time)
|
||||
for(var/i in C.all_wounds)
|
||||
var/datum/wound/iter_wound = i
|
||||
if(prob(4-iter_wound.severity))
|
||||
if(DT_PROB(2-(iter_wound.severity/2), delta_time))
|
||||
iter_wound.remove_wound()
|
||||
if(!HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION) && prob(4))
|
||||
if(!HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION) && DT_PROB(2, delta_time))
|
||||
playsound(C, pick(spooks), 50, TRUE, 10)
|
||||
|
||||
//Congrats you somehow died so hard you stopped being a zombie
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/Life()
|
||||
/mob/living/carbon/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
|
||||
if(notransform)
|
||||
return
|
||||
@@ -7,37 +7,34 @@
|
||||
damageoverlaytemp = 0
|
||||
update_damage_hud()
|
||||
|
||||
if(!IS_IN_STASIS(src))
|
||||
|
||||
if(IS_IN_STASIS(src))
|
||||
. = ..()
|
||||
else
|
||||
//Reagent processing needs to come before breathing, to prevent edge cases.
|
||||
handle_organs()
|
||||
handle_organs(delta_time, times_fired)
|
||||
|
||||
. = ..()
|
||||
|
||||
if (QDELETED(src))
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
if(.) //not dead
|
||||
handle_blood()
|
||||
handle_blood(delta_time, times_fired)
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_brain_damage()
|
||||
|
||||
else
|
||||
. = ..()
|
||||
handle_brain_damage(delta_time, times_fired)
|
||||
|
||||
if(stat == DEAD)
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
else
|
||||
var/bprv = handle_bodyparts()
|
||||
var/bprv = handle_bodyparts(delta_time, times_fired)
|
||||
if(bprv & BODYPART_LIFE_UPDATE_HEALTH)
|
||||
update_stamina() //needs to go before updatehealth to remove stamcrit
|
||||
updatehealth()
|
||||
|
||||
check_cremation()
|
||||
check_cremation(delta_time, times_fired)
|
||||
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
handle_changeling(delta_time, times_fired)
|
||||
|
||||
if(staminaloss) //SKYRAT EDIT ADDITION bEGIN
|
||||
//Stamina regeneration: Regens faster, the more health you have, and the more staminaloss you have
|
||||
@@ -64,7 +61,7 @@
|
||||
if(mind)
|
||||
for(var/key in mind.addiction_points)
|
||||
var/datum/addiction/addiction = SSaddiction.all_addictions[key]
|
||||
addiction.process_addiction(src)
|
||||
addiction.process_addiction(src, delta_time, times_fired)
|
||||
if(stat != DEAD)
|
||||
return 1
|
||||
|
||||
@@ -73,7 +70,7 @@
|
||||
///////////////
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/handle_breathing(times_fired)
|
||||
/mob/living/carbon/handle_breathing(delta_time, times_fired)
|
||||
var/next_breath = 4
|
||||
var/obj/item/organ/lungs/L = getorganslot(ORGAN_SLOT_LUNGS)
|
||||
var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART)
|
||||
@@ -85,7 +82,7 @@
|
||||
next_breath--
|
||||
|
||||
if((times_fired % next_breath) == 0 || failed_last_breath)
|
||||
breathe() //Breathe per 4 ticks if healthy, down to 2 if our lungs or heart are damaged, unless suffocating
|
||||
breathe(delta_time, times_fired) //Breathe per 4 ticks if healthy, down to 2 if our lungs or heart are damaged, unless suffocating
|
||||
if(failed_last_breath)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation)
|
||||
else
|
||||
@@ -96,7 +93,7 @@
|
||||
location_as_object.handle_internal_lifeform(src,0)
|
||||
|
||||
//Second link in a breath chain, calls check_breath()
|
||||
/mob/living/carbon/proc/breathe()
|
||||
/mob/living/carbon/proc/breathe(delta_time, times_fired)
|
||||
var/obj/item/organ/lungs = getorganslot(ORGAN_SLOT_LUNGS)
|
||||
if(reagents.has_reagent(/datum/reagent/toxin/lexorin, needs_metabolizing = TRUE))
|
||||
return
|
||||
@@ -352,12 +349,13 @@
|
||||
if(!.)
|
||||
return FALSE //to differentiate between no internals and active, but empty internals
|
||||
|
||||
/mob/living/carbon/proc/handle_blood()
|
||||
/mob/living/carbon/proc/handle_blood(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/handle_bodyparts()
|
||||
/mob/living/carbon/proc/handle_bodyparts(delta_time, times_fired)
|
||||
return //SKYRAT EDIT ADDITION
|
||||
/* SKYRAT EDIT REMVOAL
|
||||
/mob/living/carbon/proc/handle_bodyparts(delta_time, times_fired)
|
||||
var/stam_regen = FALSE
|
||||
if(stam_regen_start_time <= world.time)
|
||||
stam_regen = TRUE
|
||||
@@ -368,50 +366,50 @@
|
||||
for(var/I in bodyparts)
|
||||
var/obj/item/bodypart/BP = I
|
||||
if(BP.needs_processing)
|
||||
. |= BP.on_life(stam_regen)
|
||||
. |= BP.on_life(delta_time, times_fired, stam_regen)
|
||||
*/ //SKYRAT EDIT END
|
||||
|
||||
/mob/living/carbon/proc/handle_organs()
|
||||
/mob/living/carbon/proc/handle_organs(delta_time, times_fired)
|
||||
if(stat != DEAD)
|
||||
for(var/organ_slot in GLOB.organ_process_order)
|
||||
var/obj/item/organ/organ = getorganslot(organ_slot)
|
||||
if(organ?.owner) // This exist mostly because reagent metabolization can cause organ reshuffling
|
||||
organ.on_life()
|
||||
organ.on_life(delta_time, times_fired)
|
||||
else
|
||||
if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 1)) // No organ decay if the body contains formaldehyde.
|
||||
return
|
||||
for(var/V in internal_organs)
|
||||
var/obj/item/organ/O = V
|
||||
O.on_death() //Needed so organs decay while inside the body.
|
||||
O.on_death(delta_time, times_fired) //Needed so organs decay while inside the body.
|
||||
|
||||
/mob/living/carbon/handle_diseases()
|
||||
/mob/living/carbon/handle_diseases(delta_time, times_fired)
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
if(prob(D.infectivity))
|
||||
if(DT_PROB(D.infectivity, delta_time))
|
||||
D.spread()
|
||||
|
||||
if(stat != DEAD || D.process_dead)
|
||||
D.stage_act()
|
||||
D.stage_act(delta_time, times_fired)
|
||||
|
||||
/mob/living/carbon/handle_wounds()
|
||||
/mob/living/carbon/handle_wounds(delta_time, times_fired)
|
||||
for(var/thing in all_wounds)
|
||||
var/datum/wound/W = thing
|
||||
if(W.processes) // meh
|
||||
W.handle_process()
|
||||
W.handle_process(delta_time, times_fired)
|
||||
|
||||
//todo generalize this and move hud out
|
||||
/mob/living/carbon/proc/handle_changeling()
|
||||
/mob/living/carbon/proc/handle_changeling(delta_time, times_fired)
|
||||
if(mind && hud_used?.lingchemdisplay)
|
||||
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling)
|
||||
changeling.regenerate()
|
||||
changeling.regenerate(delta_time, times_fired)
|
||||
hud_used.lingchemdisplay.invisibility = 0
|
||||
hud_used.lingchemdisplay.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#dd66dd'>[round(changeling.chem_charges)]</font></div>")
|
||||
else
|
||||
hud_used.lingchemdisplay.invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
|
||||
/mob/living/carbon/handle_mutations_and_radiation()
|
||||
/mob/living/carbon/handle_mutations_and_radiation(delta_time, times_fired)
|
||||
if(dna?.temporary_mutations.len)
|
||||
for(var/mut in dna.temporary_mutations)
|
||||
if(dna.temporary_mutations[mut] < world.time)
|
||||
@@ -439,9 +437,9 @@
|
||||
if(HM?.timed)
|
||||
dna.remove_mutation(HM.type)
|
||||
|
||||
radiation -= min(radiation, RAD_LOSS_PER_TICK)
|
||||
radiation = max(radiation - (RAD_LOSS_PER_SECOND * delta_time), 0)
|
||||
if(radiation > RAD_MOB_SAFE)
|
||||
adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT)
|
||||
adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT*delta_time)
|
||||
|
||||
|
||||
/*
|
||||
@@ -465,10 +463,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
#define BALLMER_POINTS 5
|
||||
|
||||
//this updates all special effects: stun, sleeping, knockdown, druggy, stuttering, etc..
|
||||
/mob/living/carbon/handle_status_effects()
|
||||
/mob/living/carbon/handle_status_effects(delta_time, times_fired)
|
||||
..()
|
||||
|
||||
var/restingpwr = 1 + 4 * resting
|
||||
var/restingpwr = 0.5 + 2 * resting
|
||||
|
||||
//Dizziness
|
||||
if(dizziness)
|
||||
@@ -481,7 +479,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
var/oldsrc = src
|
||||
var/amplitude = dizziness*(sin(dizziness * world.time) + 1) // This shit is annoying at high strength
|
||||
src = null
|
||||
spawn(0)
|
||||
spawn(0) // AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
if(C)
|
||||
temp = amplitude * sin(saved_dizz * world.time)
|
||||
pixel_x_diff += temp
|
||||
@@ -502,48 +500,48 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
C.pixel_x -= pixel_x_diff
|
||||
C.pixel_y -= pixel_y_diff
|
||||
src = oldsrc
|
||||
dizziness = max(dizziness - restingpwr, 0)
|
||||
dizziness = max(dizziness - (restingpwr * delta_time), 0)
|
||||
|
||||
if(drowsyness)
|
||||
drowsyness = max(drowsyness - restingpwr, 0)
|
||||
blur_eyes(2)
|
||||
if(prob(5))
|
||||
drowsyness = max(drowsyness - (restingpwr * delta_time), 0)
|
||||
blur_eyes(1 * delta_time)
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
AdjustSleeping(100)
|
||||
|
||||
//Jitteriness
|
||||
if(jitteriness)
|
||||
do_jitter_animation(jitteriness)
|
||||
jitteriness = max(jitteriness - restingpwr, 0)
|
||||
jitteriness = max(jitteriness - (restingpwr * delta_time), 0)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "jittery", /datum/mood_event/jittery)
|
||||
else
|
||||
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "jittery")
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
stuttering = max(stuttering - (0.5 * delta_time), 0)
|
||||
|
||||
if(slurring)
|
||||
slurring = max(slurring-1,0)
|
||||
slurring = max(slurring - (0.5 * delta_time),0)
|
||||
|
||||
if(cultslurring)
|
||||
cultslurring = max(cultslurring-1, 0)
|
||||
cultslurring = max(cultslurring - (0.5 * delta_time), 0)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
silent = max(silent - (0.5 * delta_time), 0)
|
||||
|
||||
if(druggy)
|
||||
adjust_drugginess(-1)
|
||||
adjust_drugginess(-0.5 * delta_time)
|
||||
|
||||
if(hallucination)
|
||||
handle_hallucinations()
|
||||
handle_hallucinations(delta_time, times_fired)
|
||||
|
||||
if(drunkenness)
|
||||
//drunkenness = max(drunkenness - (drunkenness * 0.04) - 0.01, 0) //ORIGINAL
|
||||
//drunkenness = max(drunkenness - ((0.005 + (drunkenness * 0.02)) * delta_time), 0) //ORIGINAL
|
||||
drunkenness = max(drunkenness - (drunkenness * 0.01) - 0.01, 0) //SKYRAT EDIT CHANGE - booze
|
||||
if(drunkenness >= 6)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "drunk", /datum/mood_event/drunk)
|
||||
if(prob(25))
|
||||
if(DT_PROB(16, delta_time))
|
||||
slurring += 2
|
||||
jitteriness = max(jitteriness - 3, 0)
|
||||
jitteriness = max(jitteriness - (1.5 * delta_time), 0)
|
||||
throw_alert("drunk", /atom/movable/screen/alert/drunk)
|
||||
sound_environment_override = SOUND_ENVIRONMENT_PSYCHOTIC
|
||||
else
|
||||
@@ -552,7 +550,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
sound_environment_override = SOUND_ENVIRONMENT_NONE
|
||||
|
||||
if(drunkenness >= 11 && slurring < 5)
|
||||
slurring += 1.2
|
||||
slurring += 0.6 * delta_time
|
||||
|
||||
if(mind && (mind.assigned_role == "Scientist" || mind.assigned_role == "Research Director"))
|
||||
if(SSresearch.science_tech)
|
||||
@@ -563,41 +561,41 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
ballmer_percent = 1
|
||||
else
|
||||
ballmer_percent = (-abs(drunkenness - 13.35) / 0.9) + 1
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
say(pick_list_replacements(VISTA_FILE, "ballmer_good_msg"), forced = "ballmer")
|
||||
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = BALLMER_POINTS * ballmer_percent))
|
||||
if(drunkenness > 26) // by this point you're into windows ME territory
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
SSresearch.science_tech.remove_point_list(list(TECHWEB_POINT_TYPE_GENERIC = BALLMER_POINTS))
|
||||
say(pick_list_replacements(VISTA_FILE, "ballmer_windows_me_msg"), forced = "ballmer")
|
||||
|
||||
if(drunkenness >= 41)
|
||||
if(prob(25))
|
||||
if(DT_PROB(16, delta_time))
|
||||
add_confusion(2)
|
||||
Dizzy(10)
|
||||
Dizzy(5 * delta_time)
|
||||
|
||||
if(drunkenness >= 51)
|
||||
if(prob(3))
|
||||
if(DT_PROB(1.5, delta_time))
|
||||
add_confusion(15)
|
||||
vomit() // vomiting clears toxloss, consider this a blessing
|
||||
Dizzy(25)
|
||||
Dizzy(12.5 * delta_time)
|
||||
|
||||
if(drunkenness >= 61)
|
||||
if(prob(50))
|
||||
if(DT_PROB(30, delta_time))
|
||||
blur_eyes(5)
|
||||
|
||||
if(drunkenness >= 71)
|
||||
blur_eyes(5)
|
||||
blur_eyes(2.5 * delta_time)
|
||||
|
||||
if(drunkenness >= 81)
|
||||
adjustToxLoss(1)
|
||||
if(prob(5) && !stat)
|
||||
adjustToxLoss(0.5 * delta_time)
|
||||
if(!stat && DT_PROB(2.5, delta_time))
|
||||
to_chat(src, "<span class='warning'>Maybe you should lie down for a bit...</span>")
|
||||
|
||||
if(drunkenness >= 91)
|
||||
adjustToxLoss(1)
|
||||
adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.4)
|
||||
if(prob(20) && !stat)
|
||||
adjustToxLoss(0.5 * delta_time)
|
||||
adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * delta_time)
|
||||
if(DT_PROB(10, delta_time) && !stat)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && is_station_level(z)) //QoL mainly
|
||||
to_chat(src, "<span class='warning'>You're so tired... but you can't miss that shuttle...</span>")
|
||||
else
|
||||
@@ -605,14 +603,14 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
Sleeping(900)
|
||||
|
||||
if(drunkenness >= 101)
|
||||
adjustToxLoss(2) //Let's be honest you shouldn't be alive by now
|
||||
adjustToxLoss(1 * delta_time) //Let's be honest you shouldn't be alive by now
|
||||
|
||||
/// Base carbon environment handler, adds natural stabilization
|
||||
/mob/living/carbon/handle_environment(datum/gas_mixture/environment)
|
||||
/mob/living/carbon/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
|
||||
var/areatemp = get_temperature(environment)
|
||||
|
||||
if(stat != DEAD) // If you are dead your body does not stabilize naturally
|
||||
natural_bodytemperature_stabilization(environment)
|
||||
natural_bodytemperature_stabilization(environment, delta_time, times_fired)
|
||||
|
||||
if(!on_fire || areatemp > bodytemperature) // If we are not on fire or the area is hotter
|
||||
adjust_bodytemperature((areatemp - bodytemperature), use_insulation=TRUE, use_steps=TRUE)
|
||||
@@ -620,15 +618,17 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/**
|
||||
* Used to stabilize the body temperature back to normal on living mobs
|
||||
*
|
||||
* vars:
|
||||
* * environment The environment gas mix
|
||||
* Arguments:
|
||||
* - [environemnt][/datum/gas_mixture]: The environment gas mix
|
||||
* - delta_time: The amount of time that has elapsed since the last tick
|
||||
* - times_fired: The number of times SSmobs has ticked
|
||||
*/
|
||||
/mob/living/carbon/proc/natural_bodytemperature_stabilization(datum/gas_mixture/environment)
|
||||
/mob/living/carbon/proc/natural_bodytemperature_stabilization(datum/gas_mixture/environment, delta_time, times_fired)
|
||||
var/areatemp = get_temperature(environment)
|
||||
var/body_temperature_difference = get_body_temp_normal() - bodytemperature
|
||||
var/natural_change = 0
|
||||
|
||||
// We are very cold, increate body temperature
|
||||
// We are very cold, increase body temperature
|
||||
if(bodytemperature <= BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
natural_change = max((body_temperature_difference * metabolism_efficiency / BODYTEMP_AUTORECOVERY_DIVISOR), \
|
||||
BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
@@ -669,7 +669,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
natural_change = (1 / (thermal_protection + 1)) * natural_change
|
||||
|
||||
// Apply the natural stabilization changes
|
||||
adjust_bodytemperature(natural_change)
|
||||
adjust_bodytemperature(natural_change * delta_time)
|
||||
|
||||
/**
|
||||
* Get the insulation that is appropriate to the temperature you're being exposed to.
|
||||
@@ -772,31 +772,31 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/////////
|
||||
|
||||
///Decides if the liver is failing or not.
|
||||
/mob/living/carbon/proc/handle_liver()
|
||||
/mob/living/carbon/proc/handle_liver(delta_time, times_fired)
|
||||
if(!dna)
|
||||
return
|
||||
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(!liver)
|
||||
liver_failure()
|
||||
liver_failure(delta_time, times_fired)
|
||||
|
||||
/mob/living/carbon/proc/undergoing_liver_failure()
|
||||
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(liver && (liver.organ_flags & ORGAN_FAILING))
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/liver_failure()
|
||||
/mob/living/carbon/proc/liver_failure(delta_time, times_fired)
|
||||
reagents.end_metabolization(src, keep_liverless = TRUE) //Stops trait-based effects on reagents, to prevent permanent buffs
|
||||
reagents.metabolize(src, can_overdose=FALSE, liverless = TRUE)
|
||||
reagents.metabolize(src, delta_time, times_fired, can_overdose=FALSE, liverless = TRUE)
|
||||
if(HAS_TRAIT(src, TRAIT_STABLELIVER) || HAS_TRAIT(src, TRAIT_NOMETABOLISM))
|
||||
return
|
||||
adjustToxLoss(4, TRUE, TRUE)
|
||||
if(prob(30))
|
||||
adjustToxLoss(2 * delta_time, TRUE, TRUE)
|
||||
if(DT_PROB(15, delta_time))
|
||||
to_chat(src, "<span class='warning'>You feel a stabbing pain in your abdomen!</span>")
|
||||
|
||||
/////////////
|
||||
//CREMATION//
|
||||
/////////////
|
||||
/mob/living/carbon/proc/check_cremation()
|
||||
/mob/living/carbon/proc/check_cremation(delta_time, times_fired)
|
||||
//Only cremate while actively on fire
|
||||
if(!on_fire)
|
||||
return
|
||||
@@ -815,7 +815,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
if(limb)
|
||||
still_has_limbs = TRUE
|
||||
if(limb.get_damage() >= limb.max_damage)
|
||||
limb.cremation_progress += rand(2,5)
|
||||
limb.cremation_progress += rand(1 * delta_time, 2.5 * delta_time)
|
||||
if(limb.cremation_progress >= 100)
|
||||
if(limb.status == BODYPART_ORGANIC) //Non-organic limbs don't burn
|
||||
limb.drop_limb()
|
||||
@@ -831,7 +831,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
var/obj/item/bodypart/head = get_bodypart(BODY_ZONE_HEAD)
|
||||
if(head)
|
||||
if(head.get_damage() >= head.max_damage)
|
||||
head.cremation_progress += rand(2,5)
|
||||
head.cremation_progress += rand(1 * delta_time, 2.5 * delta_time)
|
||||
if(head.cremation_progress >= 100)
|
||||
if(head.status == BODYPART_ORGANIC) //Non-organic limbs don't burn
|
||||
head.drop_limb()
|
||||
@@ -843,7 +843,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
return
|
||||
|
||||
//Nothing left: dust the body, drop the items (if they're flammable they'll burn on their own)
|
||||
chest.cremation_progress += rand(2,5)
|
||||
chest.cremation_progress += rand(1 * delta_time, 2.5 * delta_time)
|
||||
if(chest.cremation_progress >= 100)
|
||||
visible_message("<span class='warning'>[src]'s body crumbles into a pile of ash!</span>")
|
||||
dust(TRUE, TRUE)
|
||||
@@ -852,10 +852,10 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
//BRAIN DAMAGE//
|
||||
////////////////
|
||||
|
||||
/mob/living/carbon/proc/handle_brain_damage()
|
||||
/mob/living/carbon/proc/handle_brain_damage(delta_time, times_fired)
|
||||
for(var/T in get_traumas())
|
||||
var/datum/brain_trauma/BT = T
|
||||
BT.on_life()
|
||||
BT.on_life(delta_time, times_fired)
|
||||
|
||||
/////////////////////////////////////
|
||||
//MONKEYS WITH TOO MUCH CHOLOESTROL//
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
/// This divisor controls how fast body temperature changes to match the environment
|
||||
#define BODYTEMP_DIVISOR 8
|
||||
#define BODYTEMP_DIVISOR 16
|
||||
|
||||
/mob/living/proc/Life(times_fired)
|
||||
/**
|
||||
* Handles the biological and general over-time processes of the mob.
|
||||
*
|
||||
*
|
||||
* Arguments:
|
||||
* - delta_time: The amount of time that has elapsed since this last fired.
|
||||
* - times_fired: The number of times SSmobs has fired
|
||||
*/
|
||||
/mob/living/proc/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
set waitfor = FALSE
|
||||
|
||||
if (client)
|
||||
@@ -33,35 +41,35 @@
|
||||
|
||||
if(stat != DEAD)
|
||||
//Mutations and radiation
|
||||
handle_mutations_and_radiation()
|
||||
handle_mutations_and_radiation(delta_time, times_fired)
|
||||
|
||||
if(stat != DEAD)
|
||||
//Breathing, if applicable
|
||||
handle_breathing(times_fired)
|
||||
handle_breathing(delta_time, times_fired)
|
||||
|
||||
handle_diseases()// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
|
||||
handle_diseases(delta_time, times_fired)// DEAD check is in the proc itself; we want it to spread even if the mob is dead, but to handle its disease-y properties only if you're not.
|
||||
|
||||
handle_wounds()
|
||||
handle_wounds(delta_time, times_fired)
|
||||
|
||||
if (QDELETED(src)) // diseases can qdel the mob via transformations
|
||||
return
|
||||
|
||||
if(stat != DEAD)
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
handle_random_events(delta_time, times_fired)
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
handle_environment(environment, delta_time, times_fired)
|
||||
|
||||
handle_gravity()
|
||||
handle_gravity(delta_time, times_fired)
|
||||
|
||||
if(stat != DEAD)
|
||||
handle_traits() // eye, ear, brain damages
|
||||
handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
|
||||
handle_traits(delta_time, times_fired) // eye, ear, brain damages
|
||||
handle_status_effects(delta_time, times_fired) //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
handle_fire()
|
||||
handle_fire(delta_time, times_fired)
|
||||
|
||||
if(machine)
|
||||
machine.check_eye(src)
|
||||
@@ -69,39 +77,40 @@
|
||||
if(stat != DEAD)
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_breathing(times_fired)
|
||||
/mob/living/proc/handle_breathing(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_mutations_and_radiation()
|
||||
/mob/living/proc/handle_mutations_and_radiation(delta_time, times_fired)
|
||||
radiation = 0 //so radiation don't accumulate in simple animals
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_diseases()
|
||||
/mob/living/proc/handle_diseases(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_wounds()
|
||||
/mob/living/proc/handle_wounds(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_random_events()
|
||||
/mob/living/proc/handle_random_events(delta_time, times_fired)
|
||||
return
|
||||
|
||||
// Base mob environment handler for body temperature
|
||||
/mob/living/proc/handle_environment(datum/gas_mixture/environment)
|
||||
/mob/living/proc/handle_environment(datum/gas_mixture/environment, delta_time, times_fired)
|
||||
var/loc_temp = get_temperature(environment)
|
||||
var/temp_delta = loc_temp - bodytemperature
|
||||
|
||||
if(loc_temp < bodytemperature) // it is cold here
|
||||
if(temp_delta < 0) // it is cold here
|
||||
if(!on_fire) // do not reduce body temp when on fire
|
||||
adjust_bodytemperature(max((loc_temp - bodytemperature) / BODYTEMP_DIVISOR, BODYTEMP_COOLING_MAX))
|
||||
adjust_bodytemperature(max(max(temp_delta / BODYTEMP_DIVISOR, BODYTEMP_COOLING_MAX) * delta_time, temp_delta))
|
||||
else // this is a hot place
|
||||
adjust_bodytemperature(min((loc_temp - bodytemperature) / BODYTEMP_DIVISOR, BODYTEMP_HEATING_MAX))
|
||||
adjust_bodytemperature(min(min(temp_delta / BODYTEMP_DIVISOR, BODYTEMP_HEATING_MAX) * delta_time, temp_delta))
|
||||
|
||||
/mob/living/proc/handle_fire()
|
||||
/mob/living/proc/handle_fire(delta_time, times_fired)
|
||||
if(fire_stacks < 0) //If we've doused ourselves in water to avoid fire, dry off slowly
|
||||
set_fire_stacks(min(0, fire_stacks + 1)) //So we dry ourselves back to default, nonflammable.
|
||||
set_fire_stacks(min(0, fire_stacks + (0.5 * delta_time))) //So we dry ourselves back to default, nonflammable.
|
||||
if(!on_fire)
|
||||
return TRUE //the mob is no longer on fire, no need to do the rest.
|
||||
if(fire_stacks > 0)
|
||||
adjust_fire_stacks(-0.1) //the fire is slowly consumed
|
||||
adjust_fire_stacks(-0.05 * delta_time) //the fire is slowly consumed
|
||||
else
|
||||
extinguish_mob()
|
||||
return TRUE //mob was put out, on_fire = FALSE via extinguish_mob(), no need to update everything down the chain.
|
||||
@@ -110,7 +119,7 @@
|
||||
extinguish_mob() //If there's no oxygen in the tile we're on, put out the fire
|
||||
return TRUE
|
||||
var/turf/location = get_turf(src)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
location.hotspot_expose(700, 25 * delta_time, TRUE)
|
||||
|
||||
/**
|
||||
* Get the fullness of the mob
|
||||
@@ -142,28 +151,29 @@
|
||||
return reagents.has_reagent(reagent, amount, needs_metabolizing)
|
||||
|
||||
//this updates all special effects: knockdown, druggy, stuttering, etc..
|
||||
/mob/living/proc/handle_status_effects()
|
||||
/mob/living/proc/handle_status_effects(delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_traits()
|
||||
/mob/living/proc/handle_traits(delta_time, times_fired)
|
||||
//Eyes
|
||||
if(eye_blind) //blindness, heals slowly over time
|
||||
if(HAS_TRAIT_FROM(src, TRAIT_BLIND, EYES_COVERED)) //covering your eyes heals blurry eyes faster
|
||||
adjust_blindness(-3)
|
||||
adjust_blindness(-1.5 * delta_time)
|
||||
else if(!stat && !(HAS_TRAIT(src, TRAIT_BLIND)))
|
||||
adjust_blindness(-1)
|
||||
adjust_blindness(-0.5 * delta_time)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
adjust_blurriness(-1)
|
||||
adjust_blurriness(-0.5 * delta_time)
|
||||
|
||||
/mob/living/proc/update_damage_hud()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_gravity()
|
||||
/mob/living/proc/handle_gravity(delta_time, times_fired)
|
||||
var/gravity = mob_has_gravity()
|
||||
update_gravity(gravity)
|
||||
|
||||
if(gravity > STANDARD_GRAVITY)
|
||||
gravity_animate()
|
||||
handle_high_gravity(gravity)
|
||||
handle_high_gravity(gravity, delta_time, times_fired)
|
||||
|
||||
/mob/living/proc/gravity_animate()
|
||||
if(!get_filter("gravity"))
|
||||
@@ -175,9 +185,11 @@
|
||||
sleep(10)
|
||||
animate(get_filter("gravity"), y = 0, time = 10)
|
||||
|
||||
/mob/living/proc/handle_high_gravity(gravity)
|
||||
if(gravity >= GRAVITY_DAMAGE_TRESHOLD) //Aka gravity values of 3 or more
|
||||
var/grav_stregth = gravity - GRAVITY_DAMAGE_TRESHOLD
|
||||
adjustBruteLoss(min(grav_stregth,3))
|
||||
/mob/living/proc/handle_high_gravity(gravity, delta_time, times_fired)
|
||||
if(gravity < GRAVITY_DAMAGE_THRESHOLD) //Aka gravity values of 3 or more
|
||||
return
|
||||
|
||||
var/grav_strength = gravity - GRAVITY_DAMAGE_THRESHOLD
|
||||
adjustBruteLoss(min(GRAVITY_DAMAGE_SCALING * grav_strength, GRAVITY_DAMAGE_MAXIMUM) * delta_time)
|
||||
|
||||
#undef BODYTEMP_DIVISOR
|
||||
|
||||
@@ -1015,7 +1015,7 @@
|
||||
if(has_gravity == 1)
|
||||
clear_alert("gravity")
|
||||
else
|
||||
if(has_gravity >= GRAVITY_DAMAGE_TRESHOLD)
|
||||
if(has_gravity >= GRAVITY_DAMAGE_THRESHOLD)
|
||||
throw_alert("gravity", /atom/movable/screen/alert/veryhighgravity)
|
||||
else
|
||||
throw_alert("gravity", /atom/movable/screen/alert/highgravity)
|
||||
@@ -1905,7 +1905,7 @@
|
||||
|
||||
// Trait removal if obese
|
||||
if(HAS_TRAIT_FROM(src, TRAIT_FAT, OBESITY))
|
||||
if(overeatduration >= 100)
|
||||
if(overeatduration >= (200 SECONDS))
|
||||
to_chat(src, "<span class='notice'>Your transformation restores your body's natural fitness!</span>")
|
||||
|
||||
REMOVE_TRAIT(src, TRAIT_FAT, OBESITY)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/silicon/ai/Life()
|
||||
/mob/living/silicon/ai/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if (stat == DEAD)
|
||||
return
|
||||
else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
|
||||
handle_status_effects()
|
||||
handle_status_effects(delta_time, times_fired)
|
||||
|
||||
handle_traits()
|
||||
|
||||
@@ -29,16 +29,16 @@
|
||||
to_chat(src, "<span class='warning'>Your backup battery's output drops below usable levels. It takes only a moment longer for your systems to fail, corrupted and unusable.</span>")
|
||||
adjustOxyLoss(200)
|
||||
else
|
||||
battery --
|
||||
battery--
|
||||
else
|
||||
// Gain Power
|
||||
if (battery < 200)
|
||||
battery ++
|
||||
battery++
|
||||
|
||||
if(!lacks_power())
|
||||
var/area/home = get_area(src)
|
||||
if(home.powered(AREA_USAGE_EQUIP))
|
||||
home.use_power(1000, AREA_USAGE_EQUIP)
|
||||
home.use_power(500 * delta_time, AREA_USAGE_EQUIP)
|
||||
|
||||
if(aiRestorePowerRoutine >= POWER_RESTORATION_SEARCH_APC)
|
||||
ai_restore_power()
|
||||
|
||||
@@ -163,11 +163,11 @@
|
||||
aiPDA.ownjob = "pAI Messenger"
|
||||
aiPDA.name = real_name + " (" + aiPDA.ownjob + ")"
|
||||
|
||||
/mob/living/silicon/pai/proc/process_hack()
|
||||
/mob/living/silicon/pai/proc/process_hack(delta_time, times_fired)
|
||||
|
||||
|
||||
if(hacking_cable && hacking_cable.machine && istype(hacking_cable.machine, /obj/machinery/door) && hacking_cable.machine == hackdoor && get_dist(src, hackdoor) <= 1)
|
||||
hackprogress = clamp(hackprogress + 4, 0, 100)
|
||||
hackprogress = clamp(hackprogress + (2 * delta_time), 0, 100)
|
||||
else
|
||||
temp = "Door Jack: Connection to airlock has been lost. Hack aborted."
|
||||
hackprogress = 0
|
||||
@@ -293,7 +293,7 @@
|
||||
. = ..()
|
||||
. += "A personal AI in holochassis mode. Its master ID string seems to be [master]."
|
||||
|
||||
/mob/living/silicon/pai/Life()
|
||||
/mob/living/silicon/pai/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(QDELETED(src) || stat == DEAD)
|
||||
return
|
||||
@@ -305,8 +305,8 @@
|
||||
if(!QDELETED(card))
|
||||
card.update_appearance()
|
||||
else if(hacking)
|
||||
process_hack()
|
||||
silent = max(silent - 1, 0)
|
||||
process_hack(delta_time, times_fired)
|
||||
silent = max(silent - (0.5 * delta_time), 0)
|
||||
|
||||
/mob/living/silicon/pai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
/mob/living/silicon/robot/Life()
|
||||
/mob/living/silicon/robot/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if (src.notransform)
|
||||
return
|
||||
|
||||
..()
|
||||
handle_robot_hud_updates()
|
||||
handle_robot_cell()
|
||||
handle_robot_cell(delta_time, times_fired)
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_robot_cell()
|
||||
if(stat != DEAD)
|
||||
if(low_power_mode)
|
||||
if(cell?.charge)
|
||||
low_power_mode = FALSE
|
||||
else if(stat == CONSCIOUS)
|
||||
use_power()
|
||||
/mob/living/silicon/robot/proc/handle_robot_cell(delta_time, times_fired)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/proc/use_power()
|
||||
if(low_power_mode)
|
||||
if(cell?.charge)
|
||||
low_power_mode = FALSE
|
||||
else if(stat == CONSCIOUS)
|
||||
use_power(delta_time, times_fired)
|
||||
|
||||
/mob/living/silicon/robot/proc/use_power(delta_time, times_fired)
|
||||
if(cell?.charge)
|
||||
if(cell.charge <= 100)
|
||||
uneq_all()
|
||||
var/amt = clamp((lamp_enabled * lamp_intensity),1,cell.charge) //Lamp will use a max of 5 charge, depending on brightness of lamp. If lamp is off, borg systems consume 1 point of charge, or the rest of the cell if it's lower than that.
|
||||
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
|
||||
var/amt = clamp(lamp_enabled * lamp_intensity * delta_time, 0.5 * delta_time, cell.charge) //Lamp will use a max of 5 charge, depending on brightness of lamp. If lamp is off, borg systems consume 1 point of charge, or the rest of the cell if it's lower than that.
|
||||
cell.use(amt) //Usage table: 0.5/second if off/lowest setting, 4 = 2/second, 6 = 4/second, 8 = 6/second, 10 = 8/second
|
||||
else
|
||||
uneq_all()
|
||||
low_power_mode = TRUE
|
||||
@@ -70,12 +72,12 @@
|
||||
throw_alert("charge", /atom/movable/screen/alert/nocell)
|
||||
|
||||
//Robots on fire
|
||||
/mob/living/silicon/robot/handle_fire()
|
||||
/mob/living/silicon/robot/handle_fire(delta_time, times_fired)
|
||||
. = ..()
|
||||
if(.) //if the mob isn't on fire anymore
|
||||
return
|
||||
if(fire_stacks > 0)
|
||||
adjust_fire_stacks(-1)
|
||||
adjust_fire_stacks(-0.5 * delta_time)
|
||||
else
|
||||
extinguish_mob()
|
||||
return TRUE
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
/mob/living/silicon/get_inactive_held_item()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/handle_high_gravity(gravity)
|
||||
/mob/living/silicon/handle_high_gravity(gravity, delta_time, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/silicon/rust_heretic_act()
|
||||
|
||||
@@ -327,13 +327,13 @@
|
||||
. = ..()
|
||||
playsound(src, 'sound/effects/footstep/rustystep1.ogg', 100, TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/eldritch/rust_spirit/Life()
|
||||
/mob/living/simple_animal/hostile/eldritch/rust_spirit/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(stat == DEAD)
|
||||
return ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T,/turf/open/floor/plating/rust))
|
||||
adjustBruteLoss(-3, FALSE)
|
||||
adjustFireLoss(-3, FALSE)
|
||||
adjustBruteLoss(-1.5 * delta_time, FALSE)
|
||||
adjustFireLoss(-1.5 * delta_time, FALSE)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/eldritch/ash_spirit
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BEAST
|
||||
minbodytemp = 200
|
||||
maxbodytemp = 400
|
||||
unsuitable_atmos_damage = 1
|
||||
unsuitable_atmos_damage = 0.5
|
||||
animal_species = /mob/living/simple_animal/pet/cat
|
||||
childtype = list(/mob/living/simple_animal/pet/cat/kitten)
|
||||
butcher_results = list(/obj/item/food/meat/slab = 1, /obj/item/organ/ears/cat = 1, /obj/item/organ/tail/cat = 1, /obj/item/stack/sheet/animalhide/cat = 1)
|
||||
@@ -32,7 +32,7 @@
|
||||
var/turns_since_scan = 0
|
||||
var/mob/living/simple_animal/mouse/movement_target
|
||||
///Limits how often cats can spam chasing mice.
|
||||
var/emote_cooldown = 0
|
||||
COOLDOWN_DECLARE(emote_cooldown)
|
||||
///Can this cat catch special mice?
|
||||
var/inept_hunter = FALSE
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
@@ -126,7 +126,7 @@
|
||||
Read_Memory()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/runtime/Life()
|
||||
/mob/living/simple_animal/pet/cat/runtime/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP)
|
||||
Deploy_The_Cats()
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
@@ -202,17 +202,17 @@
|
||||
regenerate_icons()
|
||||
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Life()
|
||||
/mob/living/simple_animal/pet/cat/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(!stat && !buckled && !client)
|
||||
if(prob(1))
|
||||
if(DT_PROB(0.5, delta_time))
|
||||
manual_emote(pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
|
||||
set_resting(TRUE)
|
||||
else if (prob(1))
|
||||
else if(DT_PROB(0.5, delta_time))
|
||||
manual_emote(pick("sits down.", "crouches on its hind legs.", "looks alert."))
|
||||
set_resting(TRUE)
|
||||
icon_state = "[icon_living]_sit"
|
||||
collar_type = "[initial(collar_type)]_sit"
|
||||
else if (prob(1))
|
||||
else if(DT_PROB(0.5, delta_time))
|
||||
if (resting)
|
||||
manual_emote(pick("gets up and meows.", "walks around.", "stops resting."))
|
||||
set_resting(FALSE)
|
||||
@@ -224,10 +224,10 @@
|
||||
if(!stat && !resting && !buckled)
|
||||
for(var/mob/living/simple_animal/mouse/M in view(1,src))
|
||||
if(istype(M, /mob/living/simple_animal/mouse/brown/tom) && inept_hunter)
|
||||
if (emote_cooldown < (world.time - 600))
|
||||
if(COOLDOWN_FINISHED(src, emote_cooldown))
|
||||
visible_message("<span class='warning'>[src] chases [M] around, to no avail!</span>")
|
||||
step(M, pick(GLOB.cardinals))
|
||||
emote_cooldown = world.time
|
||||
COOLDOWN_START(src, emote_cooldown, 1 MINUTES)
|
||||
break
|
||||
if(!M.stat && Adjacent(M))
|
||||
manual_emote("splats \the [M]!")
|
||||
@@ -247,7 +247,7 @@
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
walk_to(src,0)
|
||||
walk_to(src, 0)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
|
||||
movement_target = null
|
||||
@@ -305,12 +305,12 @@
|
||||
to_chat(src, "<span class='notice'>Your name is now <b>\"new_name\"</b>!</span>")
|
||||
name = new_name
|
||||
|
||||
/mob/living/simple_animal/pet/cat/cak/Life()
|
||||
/mob/living/simple_animal/pet/cat/cak/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(stat)
|
||||
return
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-8) //Fast life regen
|
||||
adjustBruteLoss(-4 * delta_time) //Fast life regen
|
||||
for(var/obj/item/food/donut/D in range(1, src)) //Frosts nearby donuts!
|
||||
if(!D.is_decorated)
|
||||
D.decorate_donut()
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
|
||||
|
||||
/mob/living/simple_animal/crab/Life()
|
||||
/mob/living/simple_animal/crab/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
//CRAB movement
|
||||
if(!ckey && !stat)
|
||||
if(isturf(loc) && !resting && !buckled) //This is so it only moves if it's not inside a closet, gentics machine, etc.
|
||||
turns_since_move++
|
||||
if(turns_since_move >= turns_per_move)
|
||||
var/east_vs_west = pick(4,8)
|
||||
var/east_vs_west = pick(4, 8)
|
||||
if(Process_Spacemove(east_vs_west))
|
||||
Move(get_step(src,east_vs_west), east_vs_west)
|
||||
turns_since_move = 0
|
||||
|
||||
@@ -28,57 +28,60 @@
|
||||
. = ..()
|
||||
add_cell_sample()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/Life()
|
||||
/mob/living/simple_animal/pet/dog/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
|
||||
//Feeding, chasing food, FOOOOODDDD
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
|
||||
movement_target = null
|
||||
stop_automated_movement = FALSE
|
||||
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
|
||||
movement_target = null
|
||||
stop_automated_movement = FALSE
|
||||
for(var/obj/item/potential_snack in oview(src,3))
|
||||
if(IS_EDIBLE(potential_snack) && (isturf(potential_snack.loc) || ishuman(potential_snack.loc)))
|
||||
movement_target = potential_snack
|
||||
break
|
||||
if(movement_target)
|
||||
stop_automated_movement = TRUE
|
||||
step_to(src,movement_target,1)
|
||||
sleep(3)
|
||||
step_to(src,movement_target,1)
|
||||
sleep(3)
|
||||
step_to(src,movement_target,1)
|
||||
if(stat || resting || buckled)
|
||||
return
|
||||
|
||||
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
|
||||
var/turf/T = get_turf(movement_target)
|
||||
if(!T)
|
||||
return
|
||||
if (T.x < src.x)
|
||||
setDir(WEST)
|
||||
else if (T.x > src.x)
|
||||
setDir(EAST)
|
||||
else if (T.y < src.y)
|
||||
setDir(SOUTH)
|
||||
else if (T.y > src.y)
|
||||
setDir(NORTH)
|
||||
else
|
||||
setDir(SOUTH)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
turns_since_scan = 0
|
||||
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc)))
|
||||
movement_target = null
|
||||
stop_automated_movement = FALSE
|
||||
if(!movement_target || !(movement_target.loc in oview(src, 3)))
|
||||
movement_target = null
|
||||
stop_automated_movement = FALSE
|
||||
for(var/obj/item/potential_snack in oview(src,3))
|
||||
if(IS_EDIBLE(potential_snack) && (isturf(potential_snack.loc) || ishuman(potential_snack.loc)))
|
||||
movement_target = potential_snack
|
||||
break
|
||||
|
||||
if(!Adjacent(movement_target)) //can't reach food through windows.
|
||||
return
|
||||
if(movement_target)
|
||||
stop_automated_movement = TRUE
|
||||
step_to(src, movement_target, 1)
|
||||
sleep(3)
|
||||
step_to(src, movement_target, 1)
|
||||
sleep(3)
|
||||
step_to(src, movement_target, 1)
|
||||
|
||||
if(isturf(movement_target.loc))
|
||||
movement_target.attack_animal(src)
|
||||
else if(ishuman(movement_target.loc) )
|
||||
if(prob(20))
|
||||
manual_emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
|
||||
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
|
||||
var/turf/T = get_turf(movement_target)
|
||||
if(!T)
|
||||
return
|
||||
if(T.x < src.x)
|
||||
setDir(WEST)
|
||||
else if (T.x > src.x)
|
||||
setDir(EAST)
|
||||
else if (T.y < src.y)
|
||||
setDir(SOUTH)
|
||||
else if (T.y > src.y)
|
||||
setDir(NORTH)
|
||||
else
|
||||
setDir(SOUTH)
|
||||
|
||||
if(prob(1))
|
||||
if(!Adjacent(movement_target)) //can't reach food through windows.
|
||||
return
|
||||
|
||||
if(isturf(movement_target.loc))
|
||||
movement_target.attack_animal(src)
|
||||
else if(ishuman(movement_target.loc))
|
||||
if(DT_PROB(10, delta_time))
|
||||
manual_emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
|
||||
|
||||
if(DT_PROB(0.5, delta_time))
|
||||
manual_emote(pick("dances around.","chases its tail!"))
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/dance_rotate, src)
|
||||
|
||||
@@ -448,7 +451,7 @@
|
||||
desc = "At a ripe old age of [record_age], Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP
|
||||
turns_per_move = 20
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/ian/Life()
|
||||
/mob/living/simple_animal/pet/dog/corgi/ian/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(FALSE)
|
||||
memory_saved = TRUE
|
||||
@@ -519,7 +522,7 @@
|
||||
unique_pet = TRUE
|
||||
held_state = "narsian"
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/narsie/Life()
|
||||
/mob/living/simple_animal/pet/dog/corgi/narsie/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
for(var/mob/living/simple_animal/pet/P in range(1, src))
|
||||
if(P != src && !istype(P,/mob/living/simple_animal/pet/dog/corgi/narsie))
|
||||
@@ -656,7 +659,6 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/lisa/Life()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/lisa/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
make_babies()
|
||||
|
||||
@@ -46,26 +46,29 @@
|
||||
udder = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Life()
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(.)
|
||||
//chance to go crazy and start wacking stuff
|
||||
if(!enemies.len && prob(1))
|
||||
if(!enemies.len && DT_PROB(0.5, delta_time))
|
||||
Retaliate()
|
||||
|
||||
if(enemies.len && prob(10))
|
||||
if(enemies.len && DT_PROB(5, delta_time))
|
||||
enemies = list()
|
||||
LoseTarget()
|
||||
src.visible_message("<span class='notice'>[src] calms down.</span>")
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
eat_plants()
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/structure/spacevine) in step || locate(/obj/structure/glowshroom) in step)
|
||||
Move(step, get_dir(src, step))
|
||||
if(stat != CONSCIOUS)
|
||||
return
|
||||
|
||||
udder.generateMilk()
|
||||
eat_plants()
|
||||
if(pulledby)
|
||||
return
|
||||
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step && ((locate(/obj/structure/spacevine) in step) || (locate(/obj/structure/glowshroom) in step)))
|
||||
Move(step, get_dir(src, step))
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
@@ -173,7 +176,7 @@
|
||||
buckle_lying = 0
|
||||
AddElement(/datum/element/ridable, /datum/component/riding/creature/cow)
|
||||
|
||||
/mob/living/simple_animal/cow/Life()
|
||||
/mob/living/simple_animal/cow/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
@@ -277,17 +280,17 @@
|
||||
/mob/living/simple_animal/chick/add_cell_sample()
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_CHICKEN, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
|
||||
/mob/living/simple_animal/chick/Life()
|
||||
/mob/living/simple_animal/chick/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if(!stat && !ckey)
|
||||
amount_grown += rand(1,2)
|
||||
amount_grown += rand(0.5 * delta_time, 1 * delta_time)
|
||||
if(amount_grown >= 100)
|
||||
new /mob/living/simple_animal/chicken(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/chick/holo/Life()
|
||||
/mob/living/simple_animal/chick/holo/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
amount_grown = 0
|
||||
|
||||
@@ -366,16 +369,16 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chicken/Life()
|
||||
/mob/living/simple_animal/chicken/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if((!stat && prob(3) && eggsleft > 0) && egg_type)
|
||||
if((!stat && DT_PROB(1.5, delta_time) && eggsleft > 0) && egg_type)
|
||||
visible_message("<span class='alertalien'>[src] [pick(layMessage)]</span>")
|
||||
eggsleft--
|
||||
var/obj/item/E = new egg_type(get_turf(src))
|
||||
E.pixel_x = rand(-6,6)
|
||||
E.pixel_y = rand(-6,6)
|
||||
E.pixel_x = rand(-6, 6)
|
||||
E.pixel_y = rand(-6, 6)
|
||||
if(eggsFertile)
|
||||
if(chicken_count < MAX_CHICKENS && prob(25))
|
||||
START_PROCESSING(SSobj, E)
|
||||
|
||||
@@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
visible_message("<span class='notice'>Your new name <span class='name'>[new_name]</span> anchors itself in your mind.</span>")
|
||||
fully_replace_character_name(null, new_name)
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/Life() //Dies if the summoner dies
|
||||
/mob/living/simple_animal/hostile/guardian/Life(delta_time = SSMOBS_DT, times_fired) //Dies if the summoner dies
|
||||
. = ..()
|
||||
update_health_hud() //we need to update all of our health displays to match our summoner and we can't practically give the summoner a hook to do it
|
||||
med_hud_set_health()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
. = ..()
|
||||
stealthcooldown = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/assassin/Life()
|
||||
/mob/living/simple_animal/hostile/guardian/assassin/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
updatestealthalert()
|
||||
if(loc == summoner && toggle)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/charging = 0
|
||||
var/atom/movable/screen/alert/chargealert
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/charger/Life()
|
||||
/mob/living/simple_animal/hostile/guardian/charger/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(ranged_cooldown <= world.time)
|
||||
if(!chargealert)
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
carp_fluff_string = "<span class='holoparasite'>CARP CARP CARP! You caught one! OH GOD, EVERYTHING'S ON FIRE. Except you and the fish.</span>"
|
||||
miner_fluff_string = "<span class='holoparasite'>You encounter... Plasma, the bringer of fire.</span>"
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/fire/Life()
|
||||
/mob/living/simple_animal/hostile/guardian/fire/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(summoner)
|
||||
summoner.extinguish_mob()
|
||||
summoner.adjust_fire_stacks(-20)
|
||||
summoner.adjust_fire_stacks(-10 * delta_time)
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
|
||||
. = ..()
|
||||
|
||||
@@ -147,11 +147,11 @@
|
||||
/mob/living/simple_animal/hostile/bear/butter/add_cell_sample()
|
||||
return //You cannot grow a real bear from butter.
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/butter/Life() //Heals butter bear really fast when he takes damage.
|
||||
/mob/living/simple_animal/hostile/bear/butter/Life(delta_time = SSMOBS_DT, times_fired) //Heals butter bear really fast when he takes damage.
|
||||
if(stat)
|
||||
return
|
||||
if(health < maxHealth)
|
||||
heal_overall_damage(10) //Fast life regen, makes it hard for you to get eaten to death.
|
||||
heal_overall_damage(5 * delta_time) //Fast life regen, makes it hard for you to get eaten to death.
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/butter/attack_hand(mob/living/user, list/modifiers) //Borrowed code from Cak, feeds people if they hit you. More nutriment but less vitamin to represent BUTTER.
|
||||
..()
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
adjustBruteLoss(5)
|
||||
qdel(tasty_plastic)
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/Life()
|
||||
/mob/living/simple_animal/hostile/carp/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(stat == CONSCIOUS)
|
||||
chomp_plastic()
|
||||
@@ -214,10 +214,10 @@
|
||||
can_buckle = TRUE
|
||||
buckle_lying = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/megacarp/Life()
|
||||
/mob/living/simple_animal/hostile/carp/megacarp/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(regen_cooldown < world.time)
|
||||
heal_overall_damage(4)
|
||||
heal_overall_damage(2 * delta_time)
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/cayenne
|
||||
name = "Cayenne"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/cat_butcher, /obj/item/circular_saw)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
faction = list("hostile")
|
||||
check_friendly_fire = 1
|
||||
status_flags = CANPUSH
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
maxHealth = 80
|
||||
health = 80
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 1, OXY = 1)
|
||||
unsuitable_cold_damage = 20
|
||||
unsuitable_heat_damage = 20
|
||||
unsuitable_cold_damage = 10
|
||||
unsuitable_heat_damage = 10
|
||||
obj_damage = 30
|
||||
melee_damage_lower = 20
|
||||
melee_damage_upper = 25
|
||||
|
||||
@@ -156,11 +156,11 @@
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/suffocate), 300)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goose/Life()
|
||||
/mob/living/simple_animal/hostile/retaliate/goose/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(choking && !stat)
|
||||
do_jitter_animation(50)
|
||||
if(prob(20))
|
||||
if(DT_PROB(10, delta_time))
|
||||
emote("gasp")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goose/proc/suffocate()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define EGG_INCUBATION_TIME 120
|
||||
#define EGG_INCUBATION_TIME 4 MINUTES
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab
|
||||
name = "headslug"
|
||||
@@ -57,11 +57,11 @@
|
||||
name = "changeling egg"
|
||||
desc = "Twitching and disgusting."
|
||||
var/datum/mind/origin
|
||||
var/time
|
||||
var/time = 0
|
||||
|
||||
/obj/item/organ/body_egg/changeling_egg/egg_process()
|
||||
/obj/item/organ/body_egg/changeling_egg/egg_process(delta_time, times_fired)
|
||||
// Changeling eggs grow in dead people
|
||||
time++
|
||||
time += delta_time
|
||||
if(time >= EGG_INCUBATION_TIME)
|
||||
Pop()
|
||||
Remove(owner)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
targets_from = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/Life()
|
||||
/mob/living/simple_animal/hostile/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!.) //dead
|
||||
walk(src, 0) //stops walking
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
deathmessage = "vanishes into thin air! It was a fake!"
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/illusion/Life()
|
||||
/mob/living/simple_animal/hostile/illusion/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(world.time > life_span)
|
||||
death()
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
taste_description = "french cuisine"
|
||||
taste_mult = 1.3
|
||||
|
||||
/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/M)
|
||||
/datum/reagent/toxin/leaper_venom/on_mob_life(mob/living/carbon/M, delta_time, times_fired)
|
||||
if(volume >= 10)
|
||||
M.adjustToxLoss(5, 0)
|
||||
M.adjustToxLoss(5 * REAGENTS_EFFECT_MULTIPLIER * delta_time, 0)
|
||||
..()
|
||||
|
||||
/obj/effect/temp_visual/leaper_crush
|
||||
@@ -172,7 +172,7 @@
|
||||
if(!hopping)
|
||||
Hop()
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/leaper/Life()
|
||||
/mob/living/simple_animal/hostile/jungle/leaper/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
/mob/living/simple_animal/hostile/jungle/mega_arachnid/Life()
|
||||
/mob/living/simple_animal/hostile/jungle/mega_arachnid/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(target && ranged_cooldown > world.time && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
|
||||
@@ -550,7 +550,7 @@ Difficulty: Hard
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum)) // hallucinations should not be stopping bubblegum or eachother
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/Life()
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
|
||||
@@ -380,7 +380,7 @@ Difficulty: Hard
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/burst(turf/original, spread_speed)
|
||||
hierophant_burst(src, original, burst_range, spread_speed)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/Life()
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(. && spawned_beacon && !QDELETED(spawned_beacon) && !client)
|
||||
if(target || loc == spawned_beacon.loc)
|
||||
|
||||
@@ -75,7 +75,7 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
|
||||
step(R, ddir) //Step the swarmers, instead of spawning them there, incase the turf is solid
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/Life()
|
||||
/mob/living/simple_animal/hostile/megafauna/swarmer_swarm_beacon/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/createtype = GetUncappedAISwarmerType()
|
||||
|
||||
@@ -115,7 +115,7 @@ Difficulty: Hard
|
||||
if(3)
|
||||
disorienting_scream()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/wendigo/Life()
|
||||
/mob/living/simple_animal/hostile/megafauna/wendigo/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
@@ -116,10 +116,10 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
|
||||
overlay_googly_eyes = FALSE
|
||||
CopyObject(copy, creator, destroy_original)
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Life()
|
||||
/mob/living/simple_animal/hostile/mimic/copy/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(idledamage && !target && !ckey) //Objects eventually revert to normal if no one is around to terrorize
|
||||
adjustBruteLoss(1)
|
||||
adjustBruteLoss(0.5 * delta_time)
|
||||
for(var/mob/living/M in contents) //a fix for animated statues from the flesh to stone spell
|
||||
death()
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
search_objects = 1
|
||||
wanted_objects = list(/obj/item/pen/survival, /obj/item/stack/ore/diamond)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(stat == CONSCIOUS)
|
||||
consume_bait()
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@
|
||||
if(CALL_CHILDREN)
|
||||
call_children()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/broodmother/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/broodmother/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!.) //Checks if they are dead as a rock.
|
||||
return
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
if(AOE_SQUARES)
|
||||
aoe_squares(target)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/pandora/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/pandora/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(health >= maxHealth * 0.5)
|
||||
cooldown_time = 2 SECONDS
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_HEAVY
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
handle_preattack()
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
var/turf/last_location
|
||||
var/tentacle_recheck_cooldown = 100
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/beast/ancient/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!.) // dead
|
||||
return
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
name = "guthen"
|
||||
gender = FEMALE
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/gutlunch/guthen/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/gutlunch/guthen/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(udder.reagents.total_volume == udder.reagents.maximum_volume) //Only breed when we're full.
|
||||
make_babies()
|
||||
@@ -138,7 +138,7 @@
|
||||
resize = 0.45
|
||||
update_transform()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/gutlunch/grublunch/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/gutlunch/grublunch/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
growth++
|
||||
if(growth > 50) //originally used a timer for this but was more problem that it's worth.
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
var/can_infest_dead = FALSE
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(stat == DEAD || !isturf(loc))
|
||||
return
|
||||
|
||||
@@ -67,11 +67,11 @@
|
||||
SLEEP_CHECK_DEATH(8)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_demon/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_demon/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!. || target)
|
||||
return
|
||||
adjustHealth(-maxHealth*0.025)
|
||||
adjustHealth(-0.0125 * maxHealth * delta_time)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_demon/death(gibbed)
|
||||
move_force = MOVE_FORCE_DEFAULT
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
var/list/burn_turfs = getline(src, T) - get_turf(src)
|
||||
dragon_fire_line(src, burn_turfs)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_whelp/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_whelp/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!. || target)
|
||||
return
|
||||
adjustHealth(-maxHealth*0.025)
|
||||
adjustHealth(-0.0125 * maxHealth * delta_time)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_whelp/death(gibbed)
|
||||
move_force = MOVE_FORCE_DEFAULT
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
aggressive_message_said = TRUE
|
||||
rapid_melee = 2
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/polarbear/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/polarbear/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!. || target)
|
||||
return
|
||||
adjustHealth(-maxHealth*0.025)
|
||||
adjustHealth(-0.0125 * maxHealth * delta_time)
|
||||
aggressive_message_said = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/polarbear/death(gibbed)
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
retreat_message_said = TRUE
|
||||
retreat_distance = 30
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/wolf/Life()
|
||||
/mob/living/simple_animal/hostile/asteroid/wolf/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(!. || target)
|
||||
return
|
||||
adjustHealth(-maxHealth*0.025)
|
||||
adjustHealth(-0.0125 * maxHealth * delta_time)
|
||||
retreat_message_said = FALSE
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
else
|
||||
. += "<span class='info'>It looks like it's been roughed up.</span>"
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/Life()
|
||||
/mob/living/simple_animal/hostile/mushroom/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
|
||||
adjustBruteLoss(-2)
|
||||
adjustBruteLoss(-1 * delta_time)
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/Initialize()//Makes every shroom a little unique
|
||||
melee_damage_lower += rand(3, 5)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
combat_mode = TRUE
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
faction = list(ROLE_DEATHSQUAD)
|
||||
check_friendly_fire = TRUE
|
||||
status_flags = CANPUSH
|
||||
|
||||
@@ -115,11 +115,11 @@
|
||||
var/chosen_sound = pick(migo_sounds)
|
||||
playsound(src, chosen_sound, 50, TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/netherworld/migo/Life()
|
||||
/mob/living/simple_animal/hostile/netherworld/migo/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(stat)
|
||||
return
|
||||
if(prob(10))
|
||||
if(DT_PROB(5, delta_time))
|
||||
var/chosen_sound = pick(migo_sounds)
|
||||
playsound(src, chosen_sound, 50, TRUE)
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
eat_atom(A)
|
||||
|
||||
///Handles nutrition gain/loss of mob and also makes it take damage if it's too low on nutrition, only happens for sentient mobs.
|
||||
/mob/living/simple_animal/hostile/ooze/Life()
|
||||
/mob/living/simple_animal/hostile/ooze/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
|
||||
if(!mind && stat != DEAD)//no mind no change
|
||||
@@ -69,7 +69,7 @@
|
||||
//Eat a bit of all the reagents we have. Gaining nutrition for actual nutritional ones.
|
||||
for(var/i in reagents.reagent_list)
|
||||
var/datum/reagent/reagent = i
|
||||
var/consumption_amount = min(reagents.get_reagent_amount(reagent.type), ooze_metabolism_modifier * REAGENTS_METABOLISM)
|
||||
var/consumption_amount = min(reagents.get_reagent_amount(reagent.type), ooze_metabolism_modifier * REAGENTS_METABOLISM * delta_time)
|
||||
if(istype(reagent, /datum/reagent/consumable))
|
||||
var/datum/reagent/consumable/consumable = reagent
|
||||
nutrition_change += consumption_amount * consumable.nutriment_factor
|
||||
@@ -77,7 +77,7 @@
|
||||
adjust_ooze_nutrition(nutrition_change)
|
||||
|
||||
if(ooze_nutrition <= 0)
|
||||
adjustBruteLoss(0.5)
|
||||
adjustBruteLoss(0.25 * delta_time)
|
||||
|
||||
///Returns whether or not the supplied movable atom is edible.
|
||||
/mob/living/simple_animal/hostile/ooze/proc/check_edible(atom/movable/potential_food)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
combat_mode = TRUE
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
speak_emote = list("yarrs")
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/pirate,
|
||||
/obj/item/melee/transforming/energy/sword/pirate)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
..()
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/Life()
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(banana_time && banana_time < world.time)
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
combat_mode = TRUE
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
status_flags = CANPUSH
|
||||
search_objects = 1
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/russian,
|
||||
/obj/item/kitchen/knife)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
faction = list("russian")
|
||||
status_flags = CANPUSH
|
||||
del_on_death = 1
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
attack_verb_simple = "slash"
|
||||
attack_sound = 'sound/hallucinations/growl1.ogg'
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 10
|
||||
unsuitable_atmos_damage = 5
|
||||
robust_searching = 1
|
||||
stat_attack = HARD_CRIT
|
||||
faction = list("skeleton")
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
color_selection()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/space_dragon/Life(mapload)
|
||||
/mob/living/simple_animal/hostile/space_dragon/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
tiredness = max(tiredness - 1, 0)
|
||||
tiredness = max(tiredness - (0.5 * delta_time), 0)
|
||||
for(var/mob/living/consumed_mob in src)
|
||||
if(consumed_mob.stat == DEAD)
|
||||
continue
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/Life()
|
||||
/mob/living/simple_animal/hostile/statue/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(!client && target) // If we have a target and we're AI controlled
|
||||
var/mob/watching = can_be_seen()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
combat_mode = TRUE
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
faction = list("hostile","stickman")
|
||||
check_friendly_fire = 1
|
||||
status_flags = CANPUSH
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
combat_mode = TRUE
|
||||
loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier)
|
||||
atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
unsuitable_atmos_damage = 7.5
|
||||
faction = list(ROLE_SYNDICATE)
|
||||
check_friendly_fire = 1
|
||||
status_flags = CANPUSH
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
taunt_chance = 20
|
||||
|
||||
atmos_requirements = list("min_oxy" = 2, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 5
|
||||
unsuitable_atmos_damage = 2.5
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 1200
|
||||
|
||||
@@ -49,17 +49,19 @@
|
||||
. = ..()
|
||||
add_cell_sample()
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/Life()
|
||||
/mob/living/simple_animal/hostile/tree/Life(delta_time = SSMOBS_DT, times_fired)
|
||||
..()
|
||||
if(is_tree && isopenturf(loc))
|
||||
var/turf/open/T = src.loc
|
||||
if(T.air && T.air.gases[/datum/gas/carbon_dioxide])
|
||||
var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES]
|
||||
if(co2 > 0)
|
||||
if(prob(25))
|
||||
var/amt = min(co2, 9)
|
||||
T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt
|
||||
T.atmos_spawn_air("o2=[amt]")
|
||||
if(!is_tree || !isopenturf(loc))
|
||||
return
|
||||
var/turf/open/T = src.loc
|
||||
if(!T.air || !T.air.gases[/datum/gas/carbon_dioxide])
|
||||
return
|
||||
|
||||
var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES]
|
||||
if(co2 > 0 && DT_PROB(13, delta_time))
|
||||
var/amt = min(co2, 9)
|
||||
T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt
|
||||
T.atmos_spawn_air("o2=[amt]")
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/AttackingTarget()
|
||||
. = ..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user