Merge nutrition refactor for vorestation

This commit is contained in:
Aronai Sieyes
2020-04-29 18:34:22 -04:00
parent f1cabd6742
commit 893130bdff
32 changed files with 98 additions and 469 deletions
-15
View File
@@ -79,7 +79,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>")
<<<<<<< HEAD
if (fullness > 550 && fullness <= 650)
to_chat(M, "<span class='notice'>You swallow some more of the [src], causing your belly to swell out a little.</span>")
if (fullness > 650 && fullness <= 1000)
@@ -93,12 +92,7 @@
if (fullness > 6000) // There has to be a limit eventually.
to_chat(M, "<span class='danger'>Your stomach blorts and aches, prompting you to stop. You literally cannot force any more of [src] to go down your throat.</span>")
return 0
/*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*/
//VOREStation Edit End
=======
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
else if(user.a_intent == I_HURT)
return ..()
@@ -126,16 +120,7 @@
to_chat(user, "<span class='warning'>\The [blocked] is in the way!</span>")
return
<<<<<<< HEAD
/*if (fullness <= (550 * (1 + M.overeatduration / 1000))) // Vorestation edit
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>") // Vorestation edit
=======
user.visible_message("<span class='danger'>[user] attempts to feed [M] [src].</span>")
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
user.setClickCooldown(user.get_attack_speed(src))
if(!do_mob(user, M)) return
-9
View File
@@ -36,14 +36,6 @@
/* VOREStation Edit - Duplicated in our code
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
<<<<<<< HEAD
if(src.nutrition && src.stat != 2)
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
if(src.m_intent == "run")
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2
=======
if(.)
if(src.nutrition && src.stat != 2)
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
@@ -52,7 +44,6 @@
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
// Moving around increases germ_level faster
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
@@ -1141,6 +1141,7 @@
// Clear out their species abilities.
species.remove_inherent_verbs(src)
holder_type = null
hunger_rate = initial(hunger_rate) //VOREStation Add
species = GLOB.all_species[new_species]
@@ -1184,6 +1185,7 @@
maxHealth = species.total_health
hunger_rate = species.hunger_factor //VOREStation Add
if(LAZYLEN(descriptors))
descriptors = null
@@ -60,19 +60,13 @@
//Overriding carbon move proc that forces default hunger factor
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
if(src.nutrition && src.stat != 2)
if(ishuman(src))
var/mob/living/carbon/human/M = src
if(M.stat != 2 && M.nutrition > 0)
M.nutrition -= M.species.hunger_factor/10
if(M.m_intent == "run")
M.nutrition -= M.species.hunger_factor/10
if(M.nutrition < 0)
M.nutrition = 0
else
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
if(src.m_intent == "run")
src.nutrition -= DEFAULT_HUNGER_FACTOR/10
// Technically this does mean being dragged takes nutrition
if(stat != DEAD)
adjust_nutrition(hunger_rate/-10)
if(m_intent == "run")
adjust_nutrition(hunger_rate/-10)
// Moving around increases germ_level faster
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
germ_level++
@@ -217,7 +217,7 @@
H.adjustFireLoss(-(light_amount * co2buff)) //this won't let you tank environmental damage from fire. MAYBE cold until your body temp drops.
if(H.nutrition < (200 + 400*co2buff)) //if no CO2, a fully lit tile gives them 1/tick up to 200. With CO2, potentially up to 600.
H.nutrition += (light_amount*(1+co2buff*5))
H.adjust_nutrition(light_amount*(1+co2buff*5))
// Too much poison in the air.
if(toxins_pp > safe_toxins_max)
@@ -357,7 +357,7 @@
var/short_emote_descriptor = list("picks", "grabs")
var/self_emote_descriptor = list("grab", "pick", "snatch")
var/fruit_type = "apple"
var/mob/organ_owner = null
var/mob/living/organ_owner = null
var/gen_cost = 0.5
/obj/item/organ/internal/fruitgland/New()
@@ -382,7 +382,7 @@
to_chat(organ_owner, "<span class='warning'>[pick(full_message)]</span>")
/obj/item/organ/internal/fruitgland/proc/do_generation()
organ_owner.nutrition -= gen_cost
organ_owner.adjust_nutrition(-gen_cost)
for(var/reagent in generated_reagents)
reagents.add_reagent(reagent, generated_reagents[reagent])
@@ -194,51 +194,29 @@ var/datum/species/shapeshifter/promethean/prometheans
var/turf/simulated/S = T
T.clean_blood()
S.dirt = 0
<<<<<<< HEAD
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
//VOREStation Edit Start
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
if(H.clean_blood(1))
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
if(H.r_hand)
if(H.r_hand.clean_blood())
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
if(H.l_hand)
if(H.l_hand.clean_blood())
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0)
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0)
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0)
H.nutrition = max(H.nutrition, min(500, H.nutrition + rand(15, 30))) //VOREStation Edit: Gives nutrition up to a point instead of being capped
=======
H.adjust_nutrition(rand(10, 20))
if(H.clean_blood(1))
H.adjust_nutrition(rand(5, 15))
if(H.r_hand)
if(H.r_hand.clean_blood())
H.adjust_nutrition(rand(5, 15))
if(H.l_hand)
if(H.l_hand.clean_blood())
H.adjust_nutrition(rand(5, 15))
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0)
H.adjust_nutrition(rand(5, 15))
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0)
H.adjust_nutrition(rand(5, 15))
if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0)
H.adjust_nutrition(rand(5, 15))
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
H.adjust_nutrition(H.nutrition < 500 ? rand(15, 30) : 0)
//VOREStation Edit End
//End cleaning code.
var/datum/gas_mixture/environment = T.return_air()
@@ -390,7 +390,7 @@
src.visible_message("<font color='red'><b>[src] suddenly extends their fangs and plunges them down into [B]'s neck!</b></font>")
B.apply_damage(5, BRUTE, BP_HEAD) //You're getting fangs pushed into your neck. What do you expect????
B.drip(80) //Remove enough blood to make them a bit woozy, but not take oxyloss.
src.nutrition += 400
adjust_nutrition(400)
sleep(50)
B.drip(1)
sleep(50)
@@ -836,7 +836,7 @@
if(!C.anchored && !C.pulledby) //Not currently anchored, and not pulled by anyone.
C.anchored = 1 //This is the only way to stop the inertial_drift.
C.nutrition -= 25
C.adjust_nutrition(-25)
update_floating()
to_chat(C, "<span class='notice'>You hover in place.</span>")
spawn(6) //.6 seconds.
@@ -376,7 +376,7 @@
icobase_tail = 1
inherent_verbs = list(
/mob/proc/weaveWebBindings)
/mob/living/proc/weaveWebBindings)
min_age = 18
max_age = 80
@@ -74,7 +74,7 @@
"uses their tongue to disinfect \a [W.desc] on [M]'s [affecting.name].",
"licks \a [W.desc] on [M]'s [affecting.name], cleaning it.")]</span>", \
"<span class='notice'>You treat \a [W.desc] on [M]'s [affecting.name] with your antiseptic saliva.</span>" )
nutrition -= 20
adjust_nutrition(-20)
W.salve()
W.bandage()
W.disinfect()
@@ -5,6 +5,7 @@
var/ooc_notes = null
var/obj/structure/mob_spawner/source_spawner = null
appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER
var/hunger_rate = DEFAULT_HUNGER_FACTOR
//custom say verbs
var/custom_say = null
@@ -1,10 +1,10 @@
<<<<<<< HEAD
// These slimes have the mechanics xenobiologists care about, such as reproduction, mutating into new colors, and being able to submit through fear.
/mob/living/simple_mob/slime/xenobio
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.
@@ -74,25 +74,25 @@
..()
/mob/living/simple_mob/slime/xenobio/examine(mob/user)
..()
. = ..()
if(hat)
to_chat(user, "It is wearing \a [hat].")
. += "It is wearing \a [hat]."
if(stat == DEAD)
to_chat(user, "It appears to be dead.")
. += "It appears to be dead."
else if(incapacitated(INCAPACITATION_DISABLED))
to_chat(user, "It appears to be incapacitated.")
. += "It appears to be incapacitated."
else if(harmless)
to_chat(user, "It appears to have been pacified.")
. += "It appears to have been pacified."
else
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
if(AI.rabid)
to_chat(user, "It seems very, very angry and upset.")
. += "It seems very, very angry and upset."
else if(AI.obedience >= 5)
to_chat(user, "It looks rather obedient.")
. += "It looks rather obedient."
else if(AI.discipline)
to_chat(user, "It has been subjugated by force, at least for now.")
. += "It has been subjugated by force, at least for now."
/mob/living/simple_mob/slime/xenobio/proc/make_adult()
if(is_adult)
@@ -102,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()
@@ -277,285 +278,3 @@
lines.Add(description_info)
return lines.Join("\n")
=======
// These slimes have the mechanics xenobiologists care about, such as reproduction, mutating into new colors, and being able to submit through fear.
/mob/living/simple_mob/slime/xenobio
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.
var/mob/living/victim = null // the person the slime is currently feeding on
var/rainbow_core_candidate = TRUE // If false, rainbow cores cannot make this type randomly.
var/mutation_chance = 25 // Odds of spawning as a new color when reproducing. Can be modified by certain xenobio products. Carried across generations of slimes.
var/list/slime_mutation = list(
/mob/living/simple_mob/slime/xenobio/orange,
/mob/living/simple_mob/slime/xenobio/metal,
/mob/living/simple_mob/slime/xenobio/blue,
/mob/living/simple_mob/slime/xenobio/purple
)
var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces
var/number = 0 // This is used to make the slime semi-unique for indentification.
var/harmless = FALSE // Set to true when pacified. Makes the slime harmless, not get hungry, and not be able to grow/reproduce.
/mob/living/simple_mob/slime/xenobio/Initialize(mapload, var/mob/living/simple_mob/slime/xenobio/my_predecessor)
ASSERT(ispath(ai_holder_type, /datum/ai_holder/simple_mob/xenobio_slime))
number = rand(1, 1000)
update_name()
. = ..() // This will make the AI and do the other mob constructor things. It will also return the default hint at the end.
if(my_predecessor)
inherit_information(my_predecessor)
/mob/living/simple_mob/slime/xenobio/Destroy()
if(victim)
stop_consumption() // Unbuckle us from our victim.
return ..()
// Called when a slime makes another slime by splitting. The predecessor slime will be deleted shortly afterwards.
/mob/living/simple_mob/slime/xenobio/proc/inherit_information(var/mob/living/simple_mob/slime/xenobio/predecessor)
if(!predecessor)
return
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
var/datum/ai_holder/simple_mob/xenobio_slime/previous_AI = predecessor.ai_holder
ASSERT(istype(AI))
ASSERT(istype(previous_AI))
// Now to transfer the information.
// Newly made slimes are bit more rebellious than their predecessors, but they also somewhat forget the atrocities the xenobiologist may have done.
AI.discipline = max(previous_AI.discipline - 1, 0)
AI.obedience = max(previous_AI.obedience - 1, 0)
AI.resentment = max(previous_AI.resentment - 1, 0)
AI.rabid = previous_AI.rabid
/mob/living/simple_mob/slime/xenobio/update_icon()
icon_living = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"][victim ? " eating" : ""]"
icon_dead = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"] dead"
icon_rest = icon_dead
..() // This will apply the correct icon_state and do the other overlay-related things.
/mob/living/simple_mob/slime/xenobio/handle_special()
if(stat != DEAD)
handle_nutrition()
if(victim)
handle_consumption()
handle_stuttering() // ??
..()
/mob/living/simple_mob/slime/xenobio/examine(mob/user)
. = ..()
if(hat)
. += "It is wearing \a [hat]."
if(stat == DEAD)
. += "It appears to be dead."
else if(incapacitated(INCAPACITATION_DISABLED))
. += "It appears to be incapacitated."
else if(harmless)
. += "It appears to have been pacified."
else
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
if(AI.rabid)
. += "It seems very, very angry and upset."
else if(AI.obedience >= 5)
. += "It looks rather obedient."
else if(AI.discipline)
. += "It has been subjugated by force, at least for now."
/mob/living/simple_mob/slime/xenobio/proc/make_adult()
if(is_adult)
return
is_adult = TRUE
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()
/mob/living/simple_mob/slime/xenobio/proc/update_name()
if(harmless) // Docile slimes are generally named, so we shouldn't mess with it.
return
name = "[slime_color] [is_adult ? "adult" : "baby"] [initial(name)] ([number])"
real_name = name
/mob/living/simple_mob/slime/xenobio/update_mood()
var/old_mood = mood
if(incapacitated(INCAPACITATION_DISABLED))
mood = "sad"
else if(harmless)
mood = ":33"
else if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
if(AI.rabid)
mood = "angry"
else if(AI.target)
mood = "mischevous"
else if(AI.discipline)
mood = "pout"
else
mood = ":3"
else
mood = ":3"
if(old_mood != mood)
update_icon()
/mob/living/simple_mob/slime/xenobio/proc/enrage()
if(harmless)
return
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
AI.enrage()
/mob/living/simple_mob/slime/xenobio/proc/pacify()
harmless = TRUE
if(has_AI())
var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder
AI.pacify()
faction = "neutral"
// If for whatever reason the mob AI (or player) decides to try to attack something anyways.
melee_damage_upper = 0
melee_damage_lower = 0
update_mood()
// These are verbs so that player slimes can evolve/split.
/mob/living/simple_mob/slime/xenobio/verb/evolve()
set category = "Slime"
set desc = "This will let you evolve from baby to adult slime."
if(stat)
to_chat(src, span("warning", "I must be conscious to do this..."))
return
if(harmless)
to_chat(src, span("warning", "I have been pacified. I cannot evolve..."))
return
if(!is_adult)
if(amount_grown >= 10)
make_adult()
else
to_chat(src, span("warning", "I am not ready to evolve yet..."))
else
to_chat(src, span("warning", "I have already evolved..."))
/mob/living/simple_mob/slime/xenobio/verb/reproduce()
set category = "Slime"
set desc = "This will make you split into four new slimes."
if(stat)
to_chat(src, span("warning", "I must be conscious to do this..."))
return
if(harmless)
to_chat(src, span("warning", "I have been pacified. I cannot reproduce..."))
return
if(is_adult)
if(amount_grown >= 10)
// Check if there's enough 'room' to split.
var/list/nearby_things = orange(1, src)
var/free_tiles = 0
for(var/turf/T in nearby_things)
var/free = TRUE
if(T.density) // No walls.
continue
for(var/atom/movable/AM in T)
if(AM.density)
free = FALSE
break
if(free)
free_tiles++
if(free_tiles < 3) // Three free tiles are needed, as four slimes are made and the 4th tile is from the center tile that the current slime occupies.
to_chat(src, span("warning", "It is too cramped here to reproduce..."))
return
var/list/babies = list()
for(var/i = 1 to 4)
babies.Add(make_new_slime())
var/mob/living/simple_mob/slime/new_slime = pick(babies)
new_slime.universal_speak = universal_speak
if(src.mind)
src.mind.transfer_to(new_slime)
else
new_slime.key = src.key
qdel(src)
else
to_chat(src, span("warning", "I am not ready to reproduce yet..."))
else
to_chat(src, span("warning", "I have not evolved enough to reproduce yet..."))
// Used when reproducing or dying.
/mob/living/simple_mob/slime/xenobio/proc/make_new_slime(var/desired_type)
var/t = src.type
if(desired_type)
t = desired_type
if(prob(mutation_chance / 10))
t = /mob/living/simple_mob/slime/xenobio/rainbow
else if(prob(mutation_chance) && slime_mutation.len)
t = slime_mutation[rand(1, slime_mutation.len)]
var/mob/living/simple_mob/slime/xenobio/baby = new t(loc, src)
// Handle 'inheriting' from parent slime.
baby.mutation_chance = mutation_chance
baby.power_charge = round(power_charge / 4)
if(!istype(baby, /mob/living/simple_mob/slime/xenobio/rainbow))
baby.unity = unity
baby.faction = faction
baby.friends = friends.Copy()
step_away(baby, src)
return baby
/mob/living/simple_mob/slime/xenobio/get_description_interaction()
var/list/results = list()
if(!stat)
results += "[desc_panel_image("slimebaton")]to stun the slime, if it's being bad."
results += ..()
return results
/mob/living/simple_mob/slime/xenobio/get_description_info()
var/list/lines = list()
var/intro_line = "Slimes are generally the test subjects of Xenobiology, with different colors having different properties. \
They can be extremely dangerous if not handled properly."
lines.Add(intro_line)
lines.Add(null) // To pad the line breaks.
var/list/rewards = list()
for(var/potential_color in slime_mutation)
var/mob/living/simple_mob/slime/S = potential_color
rewards.Add(initial(S.slime_color))
var/reward_line = "This color of slime can mutate into [english_list(rewards)] colors, when it reproduces. It will do so when it has eatten enough."
lines.Add(reward_line)
lines.Add(null)
lines.Add(description_info)
return lines.Join("\n")
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
+22 -27
View File
@@ -205,38 +205,33 @@
if(throwing)
return
if(ismob(src))
var/mob/H = src //VOREStation Edit Start. Flight on mobs.
if(H.flying) //Some other checks are done in the wings_toggle proc
if(H.nutrition > 2)
H.nutrition -= 2 //You use up 2 nutrition per TILE and tick of flying above open spaces. If people wanna flap their wings in the hallways, shouldn't penalize them for it.
if(H.incapacitated(INCAPACITATION_ALL))
H.stop_flying()
//VOREStation Edit Start. Flight on mobs.
if(isliving(src))
var/mob/living/L = src //VOREStation Edit Start. Flight on mobs.
if(L.flying) //Some other checks are done in the wings_toggle proc
if(L.nutrition > 2)
L.adjust_nutrition(-2) //You use up 2 nutrition per TILE and tick of flying above open spaces. If people wanna flap their wings in the hallways, shouldn't penalize them for it.
if(L.incapacitated(INCAPACITATION_ALL))
L.stop_flying()
//Just here to see if the person is KO'd, stunned, etc. If so, it'll move onto can_fall.
else if (H.nutrition > 1000) //Eat too much while flying? Get fat and fall.
to_chat(H, "<span class='danger'>You're too heavy! Your wings give out and you plummit to the ground!</span>")
H.stop_flying() //womp womp.
else if(H.nutrition < 300 && H.nutrition > 289) //290 would be risky, as metabolism could mess it up. Let's do 289.
to_chat(H, "<span class='danger'>You are starting to get fatigued... You probably have a good minute left in the air, if that. Even less if you continue to fly around! You should get to the ground soon!</span>") //Ticks are, on average, 3 seconds. So this would most likely be 90 seconds, but lets just say 60.
H.nutrition -= 10
else if (L.nutrition > 1000) //Eat too much while flying? Get fat and fall.
to_chat(L, "<span class='danger'>You're too heavy! Your wings give out and you plummit to the ground!</span>")
L.stop_flying() //womp womp.
else if(L.nutrition < 300 && L.nutrition > 289) //290 would be risky, as metabolism could mess it up. Let's do 289.
to_chat(L, "<span class='danger'>You are starting to get fatigued... You probably have a good minute left in the air, if that. Even less if you continue to fly around! You should get to the ground soon!</span>") //Ticks are, on average, 3 seconds. So this would most likely be 90 seconds, but lets just say 60.
L.adjust_nutrition(-10)
return
else if(H.nutrition < 100 && H.nutrition > 89)
to_chat(H, "<span class='danger'>You're seriously fatigued! You need to get to the ground immediately and eat before you fall!</span>")
else if(L.nutrition < 100 && L.nutrition > 89)
to_chat(L, "<span class='danger'>You're seriously fatigued! You need to get to the ground immediately and eat before you fall!</span>")
return
else if(H.nutrition < 2) //Should have listened to the warnings!
to_chat(H, "<span class='danger'>You lack the strength to keep yourself up in the air...</span>")
H.stop_flying()
else if(L.nutrition < 2) //Should have listened to the warnings!
to_chat(L, "<span class='danger'>You lack the strength to keep yourself up in the air...</span>")
L.stop_flying()
else
return
else if(ishuman(H)) //Needed to prevent 2 people from grabbing eachother in the air.
var/mob/living/carbon/human/F = H
if(F.grabbed_by.len) //If you're grabbed (presumably by someone flying) let's not have you fall. This also allows people to grab onto you while you jump over a railing to prevent you from falling!
var/obj/item/weapon/grab/G = F.get_active_hand()
var/obj/item/weapon/grab/J = F.get_inactive_hand()
if(istype(G) || istype(J))
//fall
else
return
if(LAZYLEN(L.grabbed_by)) //If you're grabbed (presumably by someone flying) let's not have you fall. This also allows people to grab onto you while you jump over a railing to prevent you from falling!
return
//VOREStation Edit End
if(can_fall())
// We spawn here to let the current move operation complete before we start falling. fall() is normally called from
+1 -1
View File
@@ -376,7 +376,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
return FALSE
//Was enough, reduce and return.
human.nutrition -= use_charge
human.adjust_nutrition(-use_charge)
return TRUE
//Install a piece of software
-5
View File
@@ -18,13 +18,8 @@
owner.visible_message("<span class='danger'>\The [owner] twitches visibly!</span>")
/obj/item/organ/internal/cell/emp_act(severity)
<<<<<<< HEAD
// ..() // VOREStation Edit - Don't take damage
owner.nutrition = max(0, owner.nutrition - rand(10/severity, 50/severity))
=======
..()
owner.adjust_nutrition(-rand(10 / severity, 50 / severity))
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
// Used for an MMI or posibrain being installed into a human.
/obj/item/organ/internal/mmi_holder
@@ -46,7 +46,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.gets_food_nutrition == 0)
H.nutrition += removed
H.adjust_nutrition(removed)
is_vampire = 1 //VOREStation Edit END
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.
@@ -46,12 +46,8 @@
if(IS_CHIMERA) removed *= 0.25 //VOREStation Edit
if(issmall(M)) removed *= 2 // Small bodymass, more effect from lower volume.
M.heal_organ_damage(0.5 * removed, 0)
<<<<<<< HEAD
if(M.species.gets_food_nutrition) //VOREStation edit. If this is set to 0, they don't get nutrition from food.
M.nutrition += nutriment_factor * removed // For hunger and fatness
=======
M.adjust_nutrition(nutriment_factor * removed)
>>>>>>> 61c4929... Merge pull request #7045 from Neerti/let_them_eat_all_the_cake
M.adjust_nutrition(nutriment_factor * removed) // For hunger and fatness
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
/datum/reagent/nutriment/glucose
@@ -29,10 +29,7 @@
color = "#fff200"
/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.nutrition = max(M.nutrition - 20 * removed, 0)
M.overeatduration = 0
if(M.nutrition < 0)
M.nutrition = 0
M.adjust_nutrition(-20 * removed)
/datum/reagent/ethanol/deathbell
name = "Deathbell"
@@ -79,13 +76,13 @@
if(IS_SKRELL)
M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
if(IS_TESHARI)
M.nutrition += (alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
M.adjust_nutrition(alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
if(IS_UNATHI)
M.nutrition += (alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
M.adjust_nutrition(alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
//Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
//Chimera don't need their own case here since their factors for nutriment and protein cancel out.
else
M.nutrition += (alt_nutriment_factor * removed)
M.adjust_nutrition(alt_nutriment_factor * removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling
@@ -101,7 +98,7 @@
M.adjustToxLoss(removed) //Equivalent to half as much protein, since it's half protein.
if(M.species.gets_food_nutrition)
if(alien == IS_SLIME || alien == IS_CHIMERA) //slimes and chimera can get nutrition from injected nutriment and protein
M.nutrition += (alt_nutriment_factor * removed)
M.adjust_nutrition(alt_nutriment_factor * removed)
@@ -7,7 +7,7 @@
if("blood")
user.show_message("<span class='warning'>You sink your fangs into \the [src] and suck the blood out of it!</span>")
user.visible_message("<font color='red'>[user] sinks their fangs into \the [src] and drains it!</font>")
user.nutrition += remove_volume*5
user.adjust_nutrition(remove_volume*5)
reagents.remove_reagent(reagent_to_remove, remove_volume)
update_icon()
return
@@ -1,15 +1,4 @@
// ---------------------------------------------
// -!-!-!-!-!-!-!-!- READ ME -!-!-!-!-!-!-!-!-!-
// ---------------------------------------------
//Beep beep hello
//
//Use this file to define the exclusive abilities of the spidertaur folk
//
//ahuhuhuhu
//-Antsnap
obj/item/clothing/suit/web_bindings
/obj/item/clothing/suit/web_bindings
icon = 'icons/vore/custom_clothes_vr.dmi'
icon_override = 'icons/vore/custom_clothes_vr.dmi'
name = "web bindings"
@@ -19,25 +8,12 @@ obj/item/clothing/suit/web_bindings
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
/* //Commenting all this out, as people keep abusing it. Sorry!
mob/proc/weaveWeb()
set name = "Weave Web"
set category = "Species Powers"
if(nutrition >= 500) //People decided to abuse it. Sorry. It was asked to be made so it couldn't be spammed, and what do ya know, people are spamming it everywhere.
src.visible_message("<span class='notice'>\the [src] weaves a web from their spinneret silk.</span>")
nutrition -= 500
spawn(30) //3 seconds to form
new /obj/effect/spider/stickyweb(src.loc)
else
to_chat(src, "You do not have enough nutrition to create webbing!")
*/
mob/proc/weaveWebBindings()
/mob/living/proc/weaveWebBindings()
set name = "Weave Web Bindings"
set category = "Species Powers"
if(nutrition >= 30) //This isn't a huge problem. This is so you can bind people up.
src.visible_message("<span class='notice'>\the [src] pulls silk from their manibles and delicately weaves it into bindings.</span>")
nutrition -= 30
adjust_nutrition(-30)
spawn(30) //5 seconds to weave the bindings~
var/obj/item/clothing/suit/web_bindings/bindings = new() //This sprite is amazing, I must say.
src.put_in_hands(bindings)
+1 -1
View File
@@ -486,7 +486,7 @@
if(!digested)
items_preserved |= item
else
owner.nutrition += ((nutrition_percent / 100) * 5 * digested)
owner.adjust_nutrition((nutrition_percent / 100) * 5 * digested)
if(isrobot(owner))
var/mob/living/silicon/robot/R = owner
R.cell.charge += (50 * digested)
+2 -2
View File
@@ -59,8 +59,8 @@
continue
if(stabilize_nutrition)
if(O.nutrition > 400 && H.nutrition < 400)
O.nutrition -= 2
H.nutrition += 1.5
O.adjust_nutrition(-2)
H.adjust_nutrition(1.5)
if(changes_eyes && check_eyes(H))
change_eyes(H, 1)
continue
+9 -9
View File
@@ -143,9 +143,9 @@
var/mob/living/silicon/robot/R = owner
R.cell.charge += 25 * damage_gain
if(offset) // If any different than default weight, multiply the % of offset.
owner.nutrition += offset*((nutrition_percent / 100) * 4.5 * (damage_gain) / difference) //4.5 nutrition points per health point. Normal same size 100+100 health prey with average weight would give 900 points if the digestion was instant. With all the size/weight offset taxes plus over time oxyloss+hunger taxes deducted with non-instant digestion, this should be enough to not leave the pred starved.
owner.adjust_nutrition(offset*((nutrition_percent / 100) * 4.5 * (damage_gain) / difference)) //4.5 nutrition points per health point. Normal same size 100+100 health prey with average weight would give 900 points if the digestion was instant. With all the size/weight offset taxes plus over time oxyloss+hunger taxes deducted with non-instant digestion, this should be enough to not leave the pred starved.
else
owner.nutrition += (nutrition_percent / 100) * 4.5 * (damage_gain) / difference
owner.adjust_nutrition((nutrition_percent / 100) * 4.5 * (damage_gain) / difference)
if(DM_ABSORB)
if(!L.absorbable || L.absorbed)
continue
@@ -159,7 +159,7 @@
L.absorbed = FALSE
to_chat(L, "<span class='notice'>You suddenly feel solid again.</span>")
to_chat(owner,"<span class='notice'>You feel like a part of you is missing.</span>")
owner.nutrition -= 100
owner.adjust_nutrition(-100)
to_update = TRUE
if(DM_DRAIN)
digestion_noise_chance = 10
@@ -189,12 +189,12 @@
L.adjustToxLoss(-5)
L.adjustOxyLoss(-5)
L.adjustCloneLoss(-1.25)
owner.nutrition -= 2
owner.adjust_nutrition(-2)
if(L.nutrition <= 400)
L.nutrition += 1
L.adjust_nutrition(1)
else if(owner.nutrition > 90 && (L.nutrition <= 400))
owner.nutrition -= 1
L.nutrition += 1
owner.adjust_nutrition(-1)
L.adjust_nutrition(1)
/////////////////////////// Make any noise ///////////////////////////
if(digestion_noise_chance && prob(digestion_noise_chance))
@@ -283,13 +283,13 @@
var/mob/living/silicon/robot/R = owner
R.cell.charge += 25*compensation
else
owner.nutrition += (nutrition_percent / 100)*4.5*compensation
owner.adjust_nutrition((nutrition_percent / 100)*4.5*compensation)
/obj/belly/proc/steal_nutrition(mob/living/L)
if(L.nutrition >= 100)
var/oldnutrition = (L.nutrition * 0.05)
L.nutrition = (L.nutrition * 0.95)
owner.nutrition += oldnutrition
owner.adjust_nutrition(oldnutrition)
/obj/belly/proc/updateVRPanels()
for(var/mob/living/M in contents)
+2 -2
View File
@@ -748,11 +748,11 @@
if(O.material in rock_munch)
var/S = rock_munch[O.material]
to_chat(src, "<span class='notice'>[S["remark"]]</span>")
nutrition += S["nutrition"]
adjust_nutrition(S["nutrition"])
else //Handle everything else.
if(istype(O, /obj/item/weapon/ore/slag/))
to_chat(src, "<span class='notice'>You taste dusty, crunchy mistakes. This is a travesty... but at least it is an edible one.</span>")
nutrition += 15
adjust_nutrition(15)
else //Random rock.
to_chat(src, "<span class='notice'>You taste stony, gravelly goodness - but you crave something with actual nutritional value.</span>")
@@ -20,7 +20,7 @@
else //If they have enough nutrition and body weight, they can exercise.
user.setClickCooldown(cooldown)
user.nutrition -= 10 * weightloss_power
user.adjust_nutrition(-10 * weightloss_power)
user.weight -= 0.025 * weightloss_power * (0.01 * user.weight_loss)
flick("[icon_state]2", src)
var/message = pick(messages)
@@ -10,7 +10,7 @@ Slime specific life events go here.
if(is_child)
if(nutrition >= 275)
growthcounter++
nutrition -= hunger_factor
adjust_nutrition(-hunger_factor)
if(nutrition <= 75)
growthcounter--
if(growthcounter >= growthpoint)
+1 -1
View File
@@ -75,7 +75,7 @@ Divergence proc, used in mutation to make unique datums.
heal_overall_damage(reagent_response["heal"] * reagent_total)
if(reagent_response["nutr"])
nutrition += reagent_response["nutr"] * reagent_total
adjust_nutrition(reagent_response["nutr"] * reagent_total)
if(reagent_response["mut"])
mut_level += reagent_response["mut"] * reagent_total
+1 -1
View File
@@ -67,7 +67,7 @@ Also includes Life and New
nutrition = 0
if((nutrition > 0 ) && traitdat.traits[TRAIT_XENO_EATS])
if(nutrition >= 300)
nutrition -= hunger_factor
adjust_nutrition(-hunger_factor)
else
if(traitdat.traits[TRAIT_XENO_EATS])
health = starve_damage