mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-08 16:32:21 +00:00
Removes limits on eating, centralizes nutrition changing.
This commit is contained in:
@@ -426,4 +426,6 @@
|
||||
#define EXAMINE_SKIPARMS 0x0020
|
||||
#define EXAMINE_SKIPHANDS 0x0040
|
||||
#define EXAMINE_SKIPLEGS 0x0080
|
||||
#define EXAMINE_SKIPFEET 0x0100
|
||||
#define EXAMINE_SKIPFEET 0x0100
|
||||
|
||||
#define MAX_NUTRITION 500
|
||||
@@ -3,11 +3,11 @@
|
||||
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger if they were of our kind."
|
||||
ability_icon_state = "ling_absorb_dna"
|
||||
genomecost = 0
|
||||
verbpath = /mob/proc/changeling_absorb_dna
|
||||
verbpath = /mob/living/proc/changeling_absorb_dna
|
||||
|
||||
//Absorbs the victim's DNA. Requires a strong grip on the victim.
|
||||
//Doesn't cost anything as it's the most basic ability.
|
||||
/mob/proc/changeling_absorb_dna()
|
||||
/mob/living/proc/changeling_absorb_dna()
|
||||
set category = "Changeling"
|
||||
set name = "Absorb DNA"
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
to_chat(src, "<span class='notice'>We have absorbed [T]!</span>")
|
||||
src.visible_message("<span class='danger'>[src] sucks the fluids from [T]!</span>")
|
||||
to_chat(T, "<span class='danger'>You have been absorbed by the changeling!</span>")
|
||||
if(src.nutrition < 400)
|
||||
src.nutrition = min((src.nutrition + T.nutrition), 400)
|
||||
adjust_nutrition(T.nutrition)
|
||||
changeling.chem_charges += 10
|
||||
if(changeling.readapts <= 0)
|
||||
changeling.readapts = 0 //SANITYYYYYY
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
#define SIPHON_CORE_TO_ENERGY 0.5
|
||||
|
||||
// This is called every tick, so long as a link exists between the target and the Technomancer.
|
||||
/obj/item/weapon/spell/energy_siphon/proc/siphon(atom/movable/siphoning, mob/user)
|
||||
/obj/item/weapon/spell/energy_siphon/proc/siphon(atom/movable/siphoning, mob/living/user)
|
||||
var/list/things_to_drain = things_to_siphon // Temporary list copy of what we're gonna steal from.
|
||||
var/charge_to_give = 0 // How much energy to give to the Technomancer at the end.
|
||||
var/flow_remaining = calculate_spell_power(flow_rate)
|
||||
@@ -141,7 +141,7 @@
|
||||
if( (core.max_energy - core.energy) < charge_to_give ) // We have some overflow, if this is true.
|
||||
if(user.isSynthetic()) // Let's do something with it, if we're a robot.
|
||||
charge_to_give = charge_to_give - (core.max_energy - core.energy)
|
||||
user.nutrition = min(user.nutrition + (charge_to_give / SIPHON_FBP_TO_ENERGY), 400)
|
||||
user.adjust_nutrition(charge_to_give / SIPHON_FBP_TO_ENERGY)
|
||||
to_chat(user, "<span class='notice'>Redirected energy to internal microcell.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Stolen [charge_to_give * CELLRATE] kJ.</span>")
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
spaceport_freebie = 0
|
||||
last_spaceport_action = ""
|
||||
|
||||
/obj/machinery/computer/arcade/orion_trail/attack_hand(mob/user)
|
||||
/obj/machinery/computer/arcade/orion_trail/attack_hand(mob/living/user)
|
||||
if(..())
|
||||
return
|
||||
if(fuel <= 0 || food <=0 || settlers.len == 0)
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
H.adjustBrainLoss(-(rand(1,3)))
|
||||
|
||||
// Also recharge their internal battery.
|
||||
if(H.isSynthetic() && H.nutrition < 450)
|
||||
H.nutrition = min(H.nutrition+10, 450)
|
||||
if(H.isSynthetic() && H.nutrition < MAX_NUTRITION)
|
||||
H.nutrition = min(H.nutrition+10, MAX_NUTRITION)
|
||||
cell.use(7000/450*10)
|
||||
|
||||
// And clear up radiation
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/crayon/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the crayon and swallow it.")
|
||||
user.nutrition += 1
|
||||
@@ -195,7 +195,7 @@
|
||||
shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color
|
||||
return
|
||||
|
||||
/obj/item/weapon/pen/crayon/marker/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/marker/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(M == user)
|
||||
to_chat(user, "You take a bite of the marker and swallow it.")
|
||||
user.nutrition += 1
|
||||
|
||||
@@ -486,7 +486,7 @@ HALOGEN COUNTER - Radcount on mobs
|
||||
for(var/potential_color in S.slime_mutation)
|
||||
var/mob/living/simple_mob/slime/xenobio/slime = potential_color
|
||||
mutations.Add(initial(slime.slime_color))
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.<br>Extract potential: [S.cores]<br>Nutrition: [S.nutrition]/[S.get_max_nutrition()]")
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.<br>Extract potential: [S.cores]<br>Nutrition: [S.nutrition]/[S.max_nutrition]")
|
||||
|
||||
if (S.nutrition < S.get_starve_nutrition())
|
||||
user.show_message("<span class='alert'>Warning: Subject is starving!</span>")
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/living/M as mob, mob/user as mob, def_zone)
|
||||
if(reagents && !reagents.total_volume)
|
||||
to_chat(user, "<span class='danger'>None of [src] left!</span>")
|
||||
user.drop_from_inventory(src)
|
||||
@@ -78,9 +78,6 @@
|
||||
to_chat(M, "<span class='notice'>You take a bite of [src].</span>")
|
||||
if (fullness > 350 && fullness <= 550)
|
||||
to_chat(M, "<span class='notice'>You unwillingly chew a bit of [src].</span>")
|
||||
if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat
|
||||
to_chat(M, "<span class='danger'>You cannot force any more of [src] to go down your throat.</span>")
|
||||
return 0
|
||||
|
||||
else if(user.a_intent == I_HURT)
|
||||
return ..()
|
||||
@@ -108,11 +105,7 @@
|
||||
to_chat(user, "<span class='warning'>\The [blocked] is in the way!</span>")
|
||||
return
|
||||
|
||||
if (fullness <= (550 * (1 + M.overeatduration / 1000)))
|
||||
user.visible_message("<span class='danger'>[user] attempts to feed [M] [src].</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] cannot force anymore of [src] down [M]'s throat.</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='danger'>[user] attempts to feed [M] [src].</span>")
|
||||
|
||||
user.setClickCooldown(user.get_attack_speed(src))
|
||||
if(!do_mob(user, M)) return
|
||||
|
||||
@@ -83,7 +83,7 @@ the artifact triggers the rage.
|
||||
|
||||
/datum/modifier/berserk/on_applied()
|
||||
if(ishuman(holder)) // Most other mobs don't really use nutrition and can't get it back.
|
||||
holder.nutrition = max(0, holder.nutrition - nutrition_cost)
|
||||
holder.adjust_nutrition(-nutrition_cost)
|
||||
holder.visible_message("<span class='critical'>\The [holder] descends into an all consuming rage!</span>")
|
||||
|
||||
// End all stuns.
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
var/starting_nutrition = H.nutrition
|
||||
H.nutrition = max(0, H.nutrition - 10)
|
||||
H.adjust_nutrition(-10)
|
||||
var/healing_amount = starting_nutrition - H.nutrition
|
||||
if(healing_amount < 0) // If you are eating enough to somehow outpace this, congratulations, you are gluttonous enough to gain a boon.
|
||||
healing_amount *= -2
|
||||
|
||||
@@ -6,16 +6,14 @@
|
||||
var/turf/T = loc
|
||||
light_amount = T.get_lumcount() * 5
|
||||
|
||||
nutrition += light_amount
|
||||
adjust_nutrition(light_amount)
|
||||
|
||||
if(nutrition > 500)
|
||||
nutrition = 500
|
||||
if(light_amount > 2) //if there's enough light, heal
|
||||
adjustBruteLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
|
||||
|
||||
|
||||
if(!client)
|
||||
handle_npc(src)
|
||||
handle_npc(src)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
var/rads = radiation/25
|
||||
radiation -= rads
|
||||
nutrition += rads
|
||||
adjust_nutrition(rads)
|
||||
heal_overall_damage(rads,rads)
|
||||
adjustOxyLoss(-(rads))
|
||||
adjustToxLoss(-(rads))
|
||||
|
||||
@@ -37,9 +37,10 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(src.nutrition && src.stat != 2)
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
|
||||
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
|
||||
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
@@ -109,7 +110,7 @@
|
||||
src.apply_damage(0.4 * shock_damage, BURN, BP_TORSO, used_weapon="Electrocution") //shock the torso more
|
||||
src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
|
||||
src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
|
||||
|
||||
|
||||
playsound(loc, "sparks", 50, 1, -1)
|
||||
if (shock_damage > 15)
|
||||
src.visible_message(
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(can_feel_pain())
|
||||
if(halloss >= 10) tally += (halloss / 10) //halloss shouldn't slow you down if you can't even feel it
|
||||
|
||||
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
|
||||
var/hungry = (MAX_NUTRITION - nutrition) / 5
|
||||
if (hungry >= 70) tally += hungry/50
|
||||
|
||||
if(istype(buckled, /obj/structure/bed/chair/wheelchair))
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
var/delay_length = round(active_regen_delay * species.active_regen_mult)
|
||||
if(do_after(src,delay_length))
|
||||
nutrition -= 200
|
||||
adjust_nutrition(-200)
|
||||
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
if(I.robotic >= ORGAN_ROBOT) // No free robofix.
|
||||
@@ -345,5 +345,5 @@
|
||||
active_regen = FALSE
|
||||
else
|
||||
to_chat(src, "<span class='critical'>Your regeneration is interrupted!</span>")
|
||||
nutrition -= 75
|
||||
adjust_nutrition(-75)
|
||||
active_regen = FALSE
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
if(rad_organ && !rad_organ.is_broken())
|
||||
var/rads = radiation/25
|
||||
radiation -= rads
|
||||
nutrition += rads
|
||||
adjust_nutrition(rads)
|
||||
adjustBruteLoss(-(rads))
|
||||
adjustFireLoss(-(rads))
|
||||
adjustOxyLoss(-(rads))
|
||||
@@ -786,7 +786,7 @@
|
||||
|
||||
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
|
||||
nutrition -= 2
|
||||
adjust_nutrition(-2)
|
||||
var/recovery_amt = max((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
//to_world("Cold. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
// log_debug("Cold. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
@@ -916,15 +916,7 @@
|
||||
for(var/datum/modifier/mod in modifiers)
|
||||
if(!isnull(mod.metabolism_percent))
|
||||
nutrition_reduction *= mod.metabolism_percent
|
||||
|
||||
nutrition = max (0, nutrition - nutrition_reduction)
|
||||
|
||||
if (nutrition > 450)
|
||||
if(overeatduration < 600) //capped so people don't take forever to unfat
|
||||
overeatduration++
|
||||
else
|
||||
if(overeatduration > 1)
|
||||
overeatduration -= 2 //doubled the unfat rate
|
||||
adjust_nutrition(-nutrition_reduction)
|
||||
|
||||
// TODO: stomach and bloodstream organ.
|
||||
if(!isSynthetic())
|
||||
@@ -1448,7 +1440,7 @@
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!(M.status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
adjust_nutrition(10)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_changeling()
|
||||
if(mind && mind.changeling)
|
||||
|
||||
@@ -180,32 +180,32 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
if(!(H.shoes || (H.wear_suit && (H.wear_suit.body_parts_covered & FEET))))
|
||||
for(var/obj/O in T)
|
||||
O.clean_blood()
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
if (istype(T, /turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
T.clean_blood()
|
||||
S.dirt = 0
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(10, 20)))
|
||||
H.adjust_nutrition(rand(10, 20))
|
||||
if(H.clean_blood(1))
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
if(H.r_hand)
|
||||
if(H.r_hand.clean_blood())
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
if(H.l_hand)
|
||||
if(H.l_hand.clean_blood())
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
if(H.head)
|
||||
if(H.head.clean_blood())
|
||||
H.update_inv_head(0)
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.clean_blood())
|
||||
H.update_inv_wear_suit(0)
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
if(H.w_uniform)
|
||||
if(H.w_uniform.clean_blood())
|
||||
H.update_inv_w_uniform(0)
|
||||
H.nutrition = min(500, max(0, H.nutrition + rand(5, 15)))
|
||||
H.adjust_nutrition(rand(5, 15))
|
||||
//End cleaning code.
|
||||
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
@@ -288,8 +288,7 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
if(ToxReg)
|
||||
strain_negation += to_pay * max(0, (1 - ToxReg.get_strain_percent()))
|
||||
|
||||
H.nutrition -= (3 * nutrition_cost) //Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired.
|
||||
H.nutrition = max(0, H.nutrition) //Ensure it's not below 0.
|
||||
H.adjust_nutrition(-(3 * nutrition_cost)) // Costs Nutrition when damage is being repaired, corresponding to the amount of damage being repaired.
|
||||
|
||||
var/agony_to_apply = ((1 / starve_mod) * (nutrition_cost - strain_negation)) //Regenerating damage causes minor pain over time, if the organs responsible are nonexistant or too high on strain. Small injures will be no issue, large ones will cause problems.
|
||||
|
||||
|
||||
@@ -586,11 +586,9 @@
|
||||
if(isturf(H.loc)) //else, there's considered to be no light
|
||||
var/turf/T = H.loc
|
||||
light_amount = T.get_lumcount() * 10
|
||||
H.nutrition += light_amount
|
||||
H.adjust_nutrition(light_amount)
|
||||
H.shock_stage -= light_amount
|
||||
|
||||
if(H.nutrition > 450)
|
||||
H.nutrition = 450
|
||||
if(light_amount >= 3) //if there's enough light, heal
|
||||
H.adjustBruteLoss(-(round(light_amount/2)))
|
||||
H.adjustFireLoss(-(round(light_amount/2)))
|
||||
|
||||
@@ -1039,7 +1039,7 @@ default behaviour is:
|
||||
if(getBruteLoss() < 50)
|
||||
adjustBruteLoss(3)
|
||||
else
|
||||
nutrition -= 40
|
||||
adjust_nutrition(-40)
|
||||
adjustToxLoss(-3)
|
||||
|
||||
spawn(350)
|
||||
@@ -1302,6 +1302,9 @@ default behaviour is:
|
||||
/mob/living/proc/needs_to_breathe()
|
||||
return !isSynthetic()
|
||||
|
||||
/mob/living/proc/adjust_nutrition(amount)
|
||||
nutrition = between(0, nutrition + amount, max_nutrition)
|
||||
|
||||
/mob/living/vv_get_header()
|
||||
. = ..()
|
||||
. += {"
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
|
||||
var/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off.
|
||||
|
||||
var/nutrition = 400
|
||||
var/max_nutrition = MAX_NUTRITION
|
||||
|
||||
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
||||
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// Handles hunger, starvation, growth, and eatting humans.
|
||||
|
||||
// Might be best to make this a /mob/living proc and override.
|
||||
/mob/living/simple_mob/slime/xenobio/proc/adjust_nutrition(input, var/heal = 1)
|
||||
nutrition = between(0, nutrition + input, get_max_nutrition())
|
||||
/mob/living/simple_mob/slime/xenobio/adjust_nutrition(input, var/heal = 1)
|
||||
..(input)
|
||||
|
||||
if(input > 0)
|
||||
// Gain around one level per 50 nutrition.
|
||||
@@ -19,10 +18,6 @@
|
||||
adjustOxyLoss(-input * 0.2)
|
||||
adjustCloneLoss(-input * 0.2)
|
||||
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/proc/get_max_nutrition() // Can't go above it
|
||||
return is_adult ? 1200 : 1000
|
||||
|
||||
/mob/living/simple_mob/slime/xenobio/proc/get_grow_nutrition() // Above it we grow, below it we can eat
|
||||
return is_adult ? 1000 : 800
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
desc = "The most basic of slimes. The grey slime has no remarkable qualities, however it remains one of the most useful colors for scientists."
|
||||
layer = MOB_LAYER + 1 // Need them on top of other mobs or it looks weird when consuming something.
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/xenobio_slime // This should never be changed for xenobio slimes.
|
||||
max_nutrition = 1000
|
||||
var/is_adult = FALSE // Slimes turn into adults when fed enough. Adult slimes are somewhat stronger, and can reproduce if fed enough.
|
||||
var/maxHealth_adult = 200
|
||||
var/power_charge = 0 // Disarm attacks can shock someone if high/lucky enough.
|
||||
@@ -101,6 +102,7 @@
|
||||
melee_damage_lower = round(melee_damage_lower * 2) // 20
|
||||
melee_damage_upper = round(melee_damage_upper * 2) // 30
|
||||
maxHealth = maxHealth_adult
|
||||
max_nutrition = 1200
|
||||
amount_grown = 0
|
||||
update_icon()
|
||||
update_name()
|
||||
|
||||
@@ -112,9 +112,7 @@
|
||||
var/bodytemperature = 310.055 //98.7 F
|
||||
var/drowsyness = 0.0//Carbon
|
||||
var/charges = 0.0
|
||||
var/nutrition = 400.0//Carbon
|
||||
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/paralysis = 0.0
|
||||
var/stunned = 0.0
|
||||
var/weakened = 0.0
|
||||
|
||||
@@ -133,9 +133,9 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
// Without enough blood you slowly go hungry.
|
||||
if(blood_volume < BLOOD_VOLUME_SAFE)
|
||||
if(nutrition >= 300)
|
||||
nutrition -= 10
|
||||
adjust_nutrition(-10)
|
||||
else if(nutrition >= 200)
|
||||
nutrition -= 3
|
||||
adjust_nutrition(-3)
|
||||
|
||||
//Bleeding out
|
||||
var/blood_max = 0
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/item/organ/internal/cell/emp_act(severity)
|
||||
..()
|
||||
owner.nutrition = max(0, owner.nutrition - rand(10/severity, 50/severity))
|
||||
owner.adjust_nutrition(-rand(10 / severity, 50 / severity))
|
||||
|
||||
// Used for an MMI or posibrain being installed into a human.
|
||||
/obj/item/organ/internal/mmi_holder
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
used = TRUE
|
||||
desc += " This one has already been used."
|
||||
overlays.Cut()
|
||||
target.nutrition += amount
|
||||
target.adjust_nutrition(amount)
|
||||
user.custom_emote(message = "connects \the [src] to [user == target ? "their" : "[target]'s"] charging port, expending it.")
|
||||
|
||||
/obj/item/weapon/cell/emergency_light
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/start_nutrition = H.nutrition
|
||||
var/end_nutrition = 0
|
||||
|
||||
H.nutrition -= rechargeamt / 15
|
||||
H.adjust_nutrition(-rechargeamt / 15)
|
||||
|
||||
end_nutrition = H.nutrition
|
||||
|
||||
|
||||
@@ -197,11 +197,11 @@
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect/monochrome_laser
|
||||
|
||||
/obj/item/projectile/energy/florayield/on_hit(var/atom/target, var/blocked = 0)
|
||||
var/mob/M = target
|
||||
var/mob/living/M = target
|
||||
if(ishuman(target)) //These rays make plantmen fat.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
|
||||
M.nutrition += 30
|
||||
M.adjust_nutrition(30)
|
||||
else if (istype(target, /mob/living/carbon/))
|
||||
M.show_message("<font color='blue'>The radiation beam dissipates harmlessly through your body.</font>")
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
if(alien == IS_SLIME) // Treat it like nutriment for the jello, but not equivalent.
|
||||
M.heal_organ_damage(0.2 * removed * volume_mod, 0) // More 'effective' blood means more usable material.
|
||||
M.nutrition += 20 * removed * volume_mod
|
||||
M.adjust_nutrition(20 * removed * volume_mod)
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
M.adjustToxLoss(removed / 2) // Still has some water in the form of plasma.
|
||||
return
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/datum/reagent/ethanol/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(issmall(M)) removed *= 2
|
||||
M.nutrition += nutriment_factor * removed
|
||||
M.adjust_nutrition(nutriment_factor * removed)
|
||||
var/strength_mod = 1
|
||||
if(alien == IS_SKRELL)
|
||||
strength_mod *= 5
|
||||
@@ -448,7 +448,7 @@
|
||||
glass_icon = DRINK_ICON_NOISY
|
||||
|
||||
/datum/reagent/sugar/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.nutrition += removed * 3
|
||||
M.adjust_nutrition(removed * 3)
|
||||
|
||||
var/effective_dose = dose
|
||||
if(issmall(M))
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(IS_UNATHI) removed *= 0.5
|
||||
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
|
||||
M.heal_organ_damage(0.5 * removed, 0)
|
||||
M.nutrition += nutriment_factor * removed // For hunger and fatness
|
||||
M.adjust_nutrition(nutriment_factor * removed)
|
||||
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
|
||||
|
||||
/datum/reagent/nutriment/glucose
|
||||
@@ -382,10 +382,7 @@
|
||||
overdose = REAGENTS_OVERDOSE
|
||||
|
||||
/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.nutrition = max(M.nutrition - 10 * removed, 0)
|
||||
M.overeatduration = 0
|
||||
if(M.nutrition < 0)
|
||||
M.nutrition = 0
|
||||
M.adjust_nutrition(-10 * removed)
|
||||
|
||||
/* Non-food stuff like condiments */
|
||||
|
||||
@@ -653,7 +650,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/drink/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.nutrition += nutrition * removed
|
||||
M.adjust_nutrition(nutrition * removed)
|
||||
M.dizziness = max(0, M.dizziness + adj_dizzy)
|
||||
M.drowsyness = max(0, M.drowsyness + adj_drowsy)
|
||||
M.sleeping = max(0, M.sleeping + adj_sleepy)
|
||||
|
||||
@@ -519,7 +519,7 @@
|
||||
return
|
||||
if(alien == IS_SLIME)
|
||||
if(dose >= 5) //Not effective in small doses, though it causes toxloss at higher ones, it will make the regeneration for brute and burn more 'efficient' at the cost of more nutrition.
|
||||
M.nutrition -= removed * 2
|
||||
M.adjust_nutrition(removed * 2)
|
||||
M.adjustBruteLoss(-2 * removed)
|
||||
M.adjustFireLoss(-1 * removed)
|
||||
chem_effective = 0.5
|
||||
@@ -547,7 +547,7 @@
|
||||
if(alien == IS_SLIME)
|
||||
M.make_jittery(4) //Hyperactive fluid pumping results in unstable 'skeleton', resulting in vibration.
|
||||
if(dose >= 5)
|
||||
M.nutrition = (M.nutrition - (removed * 2)) //Sadly this movement starts burning food in higher doses.
|
||||
M.adjust_nutrition(-removed * 2) // Sadly this movement starts burning food in higher doses.
|
||||
..()
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch", "blink_r", "shiver"))
|
||||
@@ -737,7 +737,7 @@
|
||||
if(prob(10))
|
||||
H.vomit(1)
|
||||
else if(H.nutrition > 30)
|
||||
H.nutrition = max(0, H.nutrition - round(30 * removed))
|
||||
M.adjust_nutrition(-removed * 30)
|
||||
else
|
||||
H.adjustToxLoss(-10 * removed) // Carthatoline based, considering cost.
|
||||
|
||||
@@ -1091,7 +1091,7 @@
|
||||
M.make_jittery(5)
|
||||
if(dose >= 20 || M.toxloss >= 60) //Core disentigration, cellular mass begins treating itself as an enemy, while maintaining regeneration. Slime-cancer.
|
||||
M.adjustBrainLoss(2 * removed)
|
||||
M.nutrition = max(H.nutrition - 20, 0)
|
||||
M.adjust_nutrition(-20)
|
||||
if(M.bruteloss >= 60 && M.toxloss >= 60 && M.brainloss >= 30) //Total Structural Failure. Limbs start splattering.
|
||||
var/obj/item/organ/external/O = pick(H.organs)
|
||||
if(prob(20) && !istype(O, /obj/item/organ/external/chest/unbreakable/slime) && !istype(O, /obj/item/organ/external/groin/unbreakable/slime))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(alien == IS_SLIME)
|
||||
removed *= 0.25 // Results in half the standard tox as normal. Prometheans are 'Small' for flaps.
|
||||
if(dose >= 10)
|
||||
M.nutrition += strength * removed //Body has to deal with the massive influx of toxins, rather than try using them to repair.
|
||||
M.adjust_nutrition(removed * removed) // Body has to deal with the massive influx of toxins, rather than try using them to repair.
|
||||
else
|
||||
M.heal_organ_damage((10/strength) * removed, (10/strength) * removed) //Doses of toxins below 10 units, and 10 strength, are capable of providing useful compounds for repair.
|
||||
M.adjustToxLoss(strength * removed)
|
||||
@@ -396,7 +396,7 @@
|
||||
|
||||
/datum/reagent/toxin/sifslurry/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(alien == IS_DIONA) // Symbiotic bacteria.
|
||||
M.nutrition += strength * removed
|
||||
M.adjust_nutrition(removed * removed)
|
||||
return
|
||||
else
|
||||
M.add_modifier(/datum/modifier/slow_pulse, 30 SECONDS)
|
||||
|
||||
@@ -300,13 +300,11 @@
|
||||
icon_state ="booksmoke"
|
||||
desc = "This book is overflowing with the dank arts."
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/smoke/recoil(mob/user as mob)
|
||||
/obj/item/weapon/spellbook/oneuse/smoke/recoil(mob/living/user as mob)
|
||||
..()
|
||||
to_chat(user, "<span class='caution'>Your stomach rumbles...</span>")
|
||||
if(user.nutrition)
|
||||
user.nutrition -= 200
|
||||
if(user.nutrition <= 0)
|
||||
user.nutrition = 0
|
||||
user.adjust_nutrition(-200)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/blind
|
||||
spell = /spell/targeted/genetic/blind
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
stage = 2
|
||||
|
||||
/datum/disease2/effect/hungry/activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.nutrition = max(0, mob.nutrition - 200)
|
||||
mob.adjust_nutrition(-200)
|
||||
|
||||
/datum/disease2/effect/fridge
|
||||
name = "Reduced Circulation"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
affecting.heal_damage(25 * weakness, 25 * weakness)
|
||||
//H:heal_organ_damage(25, 25)
|
||||
H.vessel.add_reagent("blood",5)
|
||||
H.nutrition += 50 * weakness
|
||||
H.adjust_nutrition(50 * weakness)
|
||||
H.adjustBrainLoss(-25 * weakness)
|
||||
H.radiation -= min(H.radiation, 25 * weakness)
|
||||
H.bodytemperature = initial(H.bodytemperature)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
C.adjustFireLoss(rand(5,25) * weakness)
|
||||
C.adjustBrainLoss(rand(1,5) * weakness)
|
||||
C.apply_effect(25 * weakness, IRRADIATE)
|
||||
C.adjust_nutrition(-50 * weakness)
|
||||
C.nutrition -= min(50 * weakness, C.nutrition)
|
||||
C.make_dizzy(6 * weakness)
|
||||
C.weakened += 6 * weakness
|
||||
|
||||
Reference in New Issue
Block a user