Coonflict fiiixeeess
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
nutrition_ratio *= 1.2
|
||||
if(satiety > 80)
|
||||
nutrition_ratio *= 1.25
|
||||
nutrition = max(0, nutrition - nutrition_ratio * HUNGER_FACTOR)
|
||||
adjust_nutrition(-nutrition_ratio * HUNGER_FACTOR)
|
||||
blood_volume = min((BLOOD_VOLUME_NORMAL * blood_ratio), blood_volume + 0.5 * nutrition_ratio)
|
||||
|
||||
//Effects of bloodloss
|
||||
|
||||
@@ -21,10 +21,10 @@ Doesn't work on other aliens/AI.*/
|
||||
. = ..()
|
||||
action = new(src)
|
||||
|
||||
/obj/effect/proc_holder/alien/Trigger(mob/living/carbon/user, skip_cost_check)
|
||||
if(!istype(user))
|
||||
/obj/effect/proc_holder/alien/Trigger(mob/living/carbon/user, skip_cost_check = FALSE)
|
||||
if(!skip_cost_check || !istype(user))
|
||||
return TRUE
|
||||
if(!skip_cost_check || cost_check(check_turf,user))
|
||||
if(cost_check(check_turf,user))
|
||||
if(fire(user) && user) // Second check to prevent runtimes when evolving
|
||||
user.adjustPlasma(-plasma_cost)
|
||||
return TRUE
|
||||
|
||||
@@ -520,7 +520,7 @@
|
||||
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!blood)
|
||||
nutrition -= lost_nutrition
|
||||
adjust_nutrition(-lost_nutrition)
|
||||
adjustToxLoss(-3)
|
||||
for(var/i=0 to distance)
|
||||
if(blood)
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
. = ..()
|
||||
if(. && (movement_type & FLOATING)) //floating is easy
|
||||
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
|
||||
nutrition = NUTRITION_LEVEL_FED - 1 //just less than feeling vigorous
|
||||
set_nutrition(NUTRITION_LEVEL_FED - 1) //just less than feeling vigorous
|
||||
else if(nutrition && stat != DEAD)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
var/loss = HUNGER_FACTOR/10
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
nutrition -= HUNGER_FACTOR/10
|
||||
loss *= 2
|
||||
adjust_nutrition(loss)
|
||||
|
||||
/mob/living/carbon/can_move_under_living(mob/living/other)
|
||||
. = ..()
|
||||
|
||||
@@ -68,4 +68,5 @@
|
||||
var/creamed = FALSE //to use with creampie overlays
|
||||
var/static/list/can_ride_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/simple_animal/slime, /mob/living/simple_animal/parrot))
|
||||
var/lastpuke = 0
|
||||
var/account_id
|
||||
var/last_fire_update
|
||||
|
||||
@@ -127,6 +127,17 @@
|
||||
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/get_bank_account()
|
||||
RETURN_TYPE(/datum/bank_account)
|
||||
var/datum/bank_account/account
|
||||
var/obj/item/card/id/I = get_idcard()
|
||||
|
||||
if(I && I.registered_account)
|
||||
account = I.registered_account
|
||||
return account
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/can_see_reagents()
|
||||
. = ..()
|
||||
if(.) //No need to run through all of this if it's already true.
|
||||
|
||||
@@ -1290,7 +1290,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
H.Jitter(5)
|
||||
hunger_rate = 3 * HUNGER_FACTOR
|
||||
hunger_rate *= H.physiology.hunger_mod
|
||||
H.nutrition = max(0, H.nutrition - hunger_rate)
|
||||
H.adjust_nutrition(-hunger_rate)
|
||||
|
||||
|
||||
if (H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
|
||||
@@ -293,9 +293,7 @@
|
||||
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.nutrition += light_amount * 10
|
||||
if(H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
H.nutrition = NUTRITION_LEVEL_FULL
|
||||
H.adjust_nutrition(light_amount * 10, NUTRITION_LEVEL_FULL)
|
||||
if(light_amount > 0.2) //if there's enough light, heal
|
||||
H.heal_overall_damage(1,1)
|
||||
H.adjustToxLoss(-1)
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
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.nutrition += light_amount * light_nutrition_gain_factor
|
||||
if(H.nutrition >= NUTRITION_LEVEL_FULL)
|
||||
H.nutrition = NUTRITION_LEVEL_FULL - 1
|
||||
H.adjust_nutrition(light_amount * light_nutrition_gain_factor, NUTRITION_LEVEL_FULL)
|
||||
if(light_amount > 0.2) //if there's enough light, heal
|
||||
H.heal_overall_damage(light_bruteheal, light_burnheal)
|
||||
H.adjustToxLoss(-light_toxheal)
|
||||
@@ -70,8 +68,7 @@
|
||||
H.adjustFireLoss(rand(5,15))
|
||||
H.show_message("<span class='userdanger'>The radiation beam singes you!</span>")
|
||||
if(/obj/item/projectile/energy/florayield)
|
||||
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
|
||||
|
||||
H.adjust_nutrition(30, NUTRITION_LEVEL_FULL)
|
||||
|
||||
/datum/species/pod/pseudo_weak
|
||||
name = "Anthromorphic Plant"
|
||||
|
||||
@@ -476,7 +476,7 @@
|
||||
if(SSmobs.times_fired%3==1)
|
||||
if(!(M.status_flags & GODMODE))
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
adjust_nutrition(10)
|
||||
|
||||
|
||||
/*
|
||||
@@ -502,11 +502,23 @@ GLOBAL_LIST_INIT(ballmer_good_msg, list("Hey guys, what if we rolled out a blues
|
||||
"Hear me out here. What if, and this is just a theory, we made R&D controllable from our PDAs?",
|
||||
"I'm thinking we should roll out a git repository for our research under the AGPLv3 license so that we can share it among the other stations freely.",
|
||||
"I dunno about you guys, but IDs and PDAs being separate is clunky as fuck. Maybe we should merge them into a chip in our arms? That way they can't be stolen easily.",
|
||||
"Why the fuck aren't we just making every pair of shoes into galoshes? We have the technology."))
|
||||
"Why the fuck aren't we just making every pair of shoes into galoshes? We have the technology.",
|
||||
"We can link the Ore Silo to our protolathes, so why don't we also link it to autolathes?",
|
||||
"If we can make better bombs with heated plasma, oxygen, and tritium, then why do station nukes still use plutonium?",
|
||||
"We should port all our NT programs to modular consoles and do away with computers. They're way more customizable, support cross-platform usage, and would allow crazy amounts of multitasking.",
|
||||
"Wait, if we use more manipulators in something, then it prints for cheaper, right? So what if we just made a new type of printer that has like 12 manipulators inside of it to print stuff for really cheap?"
|
||||
))
|
||||
GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put a webserver that's automatically turned on with default admin passwords into every PDA?",
|
||||
"So like, you know how we separate our codebase from the master copy that runs on our consumer boxes? What if we merged the two and undid the separation between codebase and server?",
|
||||
"Dude, radical idea: H.O.N.K mechs but with no bananium required.",
|
||||
"Best idea ever: Disposal pipes instead of hallways."))
|
||||
"So like, you know how we separate our codebase from the master copy that runs on our consumer boxes? What if we merged the two and undid the separation between codebase and server?",
|
||||
"Dude, radical idea: H.O.N.K mechs but with no bananium required.",
|
||||
"Best idea ever: Disposal pipes instead of hallways.",
|
||||
"What if we use a language that was written on a napkin and created over 1 weekend for all of our servers?",
|
||||
"What if we took a locker, some random trash, and made an exosuit out of it? Wouldn't that be like, super cool and stuff?",
|
||||
"Okay, hear me out, what if we make illegal things not illegal, so that sec stops arresting us for having it?",
|
||||
"I have a crazy idea, guys. Rather than having monkeys to test on, what if we only used apes?",
|
||||
"Woh man ok, what if we took slime cores and smashed them into other slimes, be kinda cool to see what happens.",
|
||||
"We're NANOtrasen but we need to unlock nano parts, what's the deal with that?"
|
||||
))
|
||||
|
||||
//this updates all special effects: stun, sleeping, knockdown, druggy, stuttering, etc..
|
||||
/mob/living/carbon/handle_status_effects()
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
SetAllImmobility(0, FALSE)
|
||||
SetSleeping(0, FALSE)
|
||||
radiation = 0
|
||||
nutrition = NUTRITION_LEVEL_FED + 50
|
||||
set_nutrition(NUTRITION_LEVEL_FED + 50)
|
||||
bodytemperature = BODYTEMP_NORMAL
|
||||
set_blindness(0)
|
||||
set_blurriness(0)
|
||||
|
||||
@@ -3,122 +3,7 @@
|
||||
real_name = "Cyborg"
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "robot"
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
bubble_icon = "robot"
|
||||
designation = "Default" //used for displaying the prefix & getting the current module of cyborg
|
||||
has_limbs = 1
|
||||
hud_type = /datum/hud/robot
|
||||
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
var/custom_name = ""
|
||||
var/braintype = "Cyborg"
|
||||
var/obj/item/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of..
|
||||
var/obj/item/mmi/mmi = null
|
||||
|
||||
var/shell = FALSE
|
||||
var/deployed = FALSE
|
||||
var/mob/living/silicon/ai/mainframe = null
|
||||
var/datum/action/innate/undeployment/undeployment_action = new
|
||||
|
||||
//Hud stuff
|
||||
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
var/obj/screen/lamp_button = null
|
||||
var/obj/screen/thruster_button = null
|
||||
var/obj/screen/hands = null
|
||||
|
||||
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
|
||||
var/obj/screen/robot_modules_background
|
||||
|
||||
//3 Modules can be activated at any one time.
|
||||
var/obj/item/robot_module/module = null
|
||||
var/obj/item/module_active = null
|
||||
held_items = list(null, null, null) //we use held_items for the module holding, because that makes sense to do!
|
||||
|
||||
var/mutable_appearance/eye_lights
|
||||
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/stock_parts/cell/cell = null
|
||||
|
||||
var/opened = 0
|
||||
var/emagged = FALSE
|
||||
var/emag_cooldown = 0
|
||||
var/wiresexposed = 0
|
||||
|
||||
var/ident = 0
|
||||
var/locked = TRUE
|
||||
var/list/req_access = list(ACCESS_ROBOTICS)
|
||||
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
|
||||
|
||||
var/speed = 0 // VTEC speed boost.
|
||||
var/magpulse = FALSE // Magboot-like effect.
|
||||
var/ionpulse = FALSE // Jetpack-like effect.
|
||||
var/ionpulse_on = FALSE // Jetpack-like effect.
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail // Ionpulse effect.
|
||||
|
||||
var/low_power_mode = 0 //whether the robot has no charge left.
|
||||
var/datum/effect_system/spark_spread/spark_system // So they can initialize sparks whenever/N
|
||||
|
||||
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
var/locked_down //Boolean of whether the borg is locked down or not
|
||||
|
||||
var/toner = 0
|
||||
var/tonermax = 40
|
||||
|
||||
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
|
||||
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
|
||||
light_color = "#FFCC66"
|
||||
light_power = 0.8
|
||||
var/lamp_cooldown = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
|
||||
|
||||
var/sight_mode = 0
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/list/upgrades = list()
|
||||
|
||||
var/hasExpanded = FALSE
|
||||
var/obj/item/hat
|
||||
var/hat_offset = -3
|
||||
var/list/equippable_hats = list(/obj/item/clothing/head/caphat,
|
||||
/obj/item/clothing/head/hardhat,
|
||||
/obj/item/clothing/head/centhat,
|
||||
/obj/item/clothing/head/HoS,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/head/hopcap,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/nursehat,
|
||||
/obj/item/clothing/head/sombrero,
|
||||
/obj/item/clothing/head/helmet/chaplain/witchunter_hat,
|
||||
/obj/item/clothing/head/soft/, //All baseball caps
|
||||
/obj/item/clothing/head/that, //top hat
|
||||
/obj/item/clothing/head/collectable/tophat, //Not sure where this one is found, but it looks the same so might as well include
|
||||
/obj/item/clothing/mask/bandana/, //All bandanas (which only work in hat mode)
|
||||
/obj/item/clothing/head/fedora,
|
||||
/obj/item/clothing/head/beanie/, //All beanies
|
||||
/obj/item/clothing/ears/headphones,
|
||||
/obj/item/clothing/head/helmet/skull,
|
||||
/obj/item/clothing/head/crown/fancy)
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
|
||||
|
||||
var/sitting = 0
|
||||
var/bellyup = 0
|
||||
var/dogborg = FALSE
|
||||
|
||||
var/cansprint = 1
|
||||
|
||||
var/orebox = null
|
||||
|
||||
/mob/living/silicon/robot
|
||||
|
||||
/mob/living/silicon/robot/get_cell()
|
||||
return cell
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
|
||||
/mob/living/silicon/robot
|
||||
designation = "Default" //used for displaying the prefix & getting the current module of cyborg
|
||||
has_limbs = TRUE
|
||||
hud_type = /datum/hud/robot
|
||||
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
maxHealth = 100
|
||||
health = 100
|
||||
|
||||
var/custom_name = ""
|
||||
var/braintype = "Cyborg"
|
||||
var/obj/item/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of..
|
||||
var/obj/item/mmi/mmi = null
|
||||
|
||||
var/shell = FALSE
|
||||
var/deployed = FALSE
|
||||
var/mob/living/silicon/ai/mainframe = null
|
||||
var/datum/action/innate/undeployment/undeployment_action = new
|
||||
|
||||
//Hud stuff
|
||||
|
||||
var/obj/screen/inv1 = null
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
var/obj/screen/lamp_button = null
|
||||
var/obj/screen/thruster_button = null
|
||||
var/obj/screen/hands = null
|
||||
|
||||
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
|
||||
var/obj/screen/robot_modules_background
|
||||
|
||||
//3 Modules can be activated at any one time.
|
||||
var/obj/item/robot_module/module = null
|
||||
var/obj/item/module_active = null
|
||||
held_items = list(null, null, null) //we use held_items for the module holding, because that makes sense to do!
|
||||
|
||||
var/mutable_appearance/eye_lights
|
||||
|
||||
var/mob/living/silicon/ai/connected_ai = null
|
||||
var/obj/item/stock_parts/cell/cell = null
|
||||
|
||||
var/opened = 0
|
||||
var/emagged = FALSE
|
||||
var/emag_cooldown = 0
|
||||
var/wiresexposed = 0
|
||||
|
||||
var/ident = 0
|
||||
var/locked = TRUE
|
||||
var/list/req_access = list(ACCESS_ROBOTICS)
|
||||
|
||||
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
|
||||
|
||||
var/speed = 0 // VTEC speed boost.
|
||||
var/magpulse = FALSE // Magboot-like effect.
|
||||
var/ionpulse = FALSE // Jetpack-like effect.
|
||||
var/ionpulse_on = FALSE // Jetpack-like effect.
|
||||
var/datum/effect_system/trail_follow/ion/ion_trail // Ionpulse effect.
|
||||
|
||||
var/low_power_mode = 0 //whether the robot has no charge left.
|
||||
var/datum/effect_system/spark_spread/spark_system // So they can initialize sparks whenever/N
|
||||
|
||||
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
|
||||
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
|
||||
var/locked_down //Boolean of whether the borg is locked down or not
|
||||
|
||||
var/toner = 0
|
||||
var/tonermax = 40
|
||||
|
||||
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
|
||||
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
|
||||
light_color = "#FFCC66"
|
||||
light_power = 0.8
|
||||
var/lamp_cooldown = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
|
||||
|
||||
var/sight_mode = 0
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/list/upgrades = list()
|
||||
|
||||
var/hasExpanded = FALSE
|
||||
var/obj/item/hat
|
||||
var/hat_offset = -3
|
||||
var/list/equippable_hats = list(/obj/item/clothing/head/caphat,
|
||||
/obj/item/clothing/head/hardhat,
|
||||
/obj/item/clothing/head/centhat,
|
||||
/obj/item/clothing/head/HoS,
|
||||
/obj/item/clothing/head/beret,
|
||||
/obj/item/clothing/head/kitty,
|
||||
/obj/item/clothing/head/hopcap,
|
||||
/obj/item/clothing/head/wizard,
|
||||
/obj/item/clothing/head/nursehat,
|
||||
/obj/item/clothing/head/sombrero,
|
||||
/obj/item/clothing/head/helmet/chaplain/witchunter_hat,
|
||||
/obj/item/clothing/head/soft/, //All baseball caps
|
||||
/obj/item/clothing/head/that, //top hat
|
||||
/obj/item/clothing/head/collectable/tophat, //Not sure where this one is found, but it looks the same so might as well include
|
||||
/obj/item/clothing/mask/bandana/, //All bandanas (which only work in hat mode)
|
||||
/obj/item/clothing/head/fedora,
|
||||
/obj/item/clothing/head/beanie/, //All beanies
|
||||
/obj/item/clothing/ears/headphones,
|
||||
/obj/item/clothing/head/helmet/skull,
|
||||
/obj/item/clothing/head/crown/fancy)
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/static/list/can_ride_typecache = typecacheof(/mob/living/carbon/human)
|
||||
|
||||
var/sitting = 0
|
||||
var/bellyup = 0
|
||||
var/dogborg = FALSE
|
||||
|
||||
var/cansprint = 1
|
||||
|
||||
var/orebox = null
|
||||
|
||||
//doggie borg stuff.
|
||||
var/disabler
|
||||
var/laser
|
||||
var/sleeper_g
|
||||
var/sleeper_r
|
||||
var/sleeper_nv
|
||||
@@ -769,9 +769,9 @@
|
||||
/obj/item/toy/crayon/spraycan/borg,
|
||||
/obj/item/hand_labeler/borg,
|
||||
/obj/item/razor,
|
||||
/obj/item/rsf,
|
||||
/obj/item/instrument/violin,
|
||||
/obj/item/instrument/guitar,
|
||||
/obj/item/rsf/cyborg,
|
||||
/obj/item/reagent_containers/dropper,
|
||||
/obj/item/lighter,
|
||||
/obj/item/storage/bag/tray,
|
||||
|
||||
@@ -55,8 +55,9 @@
|
||||
if(isclosedturf(T))
|
||||
continue
|
||||
possible_ends |= T
|
||||
var/turf/end = pick(possible_ends)
|
||||
do_teleport(src, end, 0, channel=TELEPORT_CHANNEL_BLUESPACE, forced = TRUE)
|
||||
if(length(possible_ends))
|
||||
var/turf/end = pick(possible_ends)
|
||||
do_teleport(src, end, 0, channel=TELEPORT_CHANNEL_BLUESPACE, forced = TRUE)
|
||||
SLEEP_CHECK_DEATH(8)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/proc/spawn_crusher_loot()
|
||||
butcher_results[crusher_loot] = 1
|
||||
LAZYSET(butcher_results, crusher_loot, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/handle_temperature_damage()
|
||||
if(bodytemperature < minbodytemp)
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
Feedstop(0, 0)
|
||||
return
|
||||
|
||||
add_nutrition((rand(7, 15) * CONFIG_GET(number/damage_multiplier)))
|
||||
adjust_nutrition((rand(7, 15) * CONFIG_GET(number/damage_multiplier)), get_max_nutrition(), TRUE)
|
||||
|
||||
//Heal yourself.
|
||||
adjustBruteLoss(-3)
|
||||
@@ -244,15 +244,13 @@
|
||||
return
|
||||
|
||||
if(prob(15))
|
||||
nutrition -= 1 + is_adult
|
||||
adjust_nutrition(-1 - is_adult)
|
||||
|
||||
if(nutrition <= 0)
|
||||
nutrition = 0
|
||||
if(prob(75))
|
||||
adjustBruteLoss(rand(0,5))
|
||||
if(nutrition <= 0 && prob(75))
|
||||
adjustBruteLoss(rand(0,5))
|
||||
|
||||
else if (nutrition >= get_grow_nutrition() && amount_grown < SLIME_EVOLUTION_THRESHOLD)
|
||||
nutrition -= 20
|
||||
adjust_nutrition(-20)
|
||||
amount_grown++
|
||||
update_action_buttons_icon()
|
||||
|
||||
@@ -262,9 +260,11 @@
|
||||
else
|
||||
Evolve()
|
||||
|
||||
/mob/living/simple_animal/slime/proc/add_nutrition(nutrition_to_add = 0)
|
||||
nutrition = min((nutrition + nutrition_to_add), get_max_nutrition())
|
||||
if(nutrition >= get_grow_nutrition())
|
||||
/mob/living/simple_animal/slime/adjust_nutrition(change, max = INFINITY, slime_check = FALSE)
|
||||
. = ..()
|
||||
if(!slime_check)
|
||||
return
|
||||
if(nutrition == max)
|
||||
if(powerlevel<10)
|
||||
if(prob(30-powerlevel*2))
|
||||
powerlevel++
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
var/mob/living/simple_animal/slime/M
|
||||
M = new(loc, child_colour)
|
||||
if(ckey)
|
||||
M.nutrition = new_nutrition //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
||||
M.set_nutrition(new_nutrition) //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature!
|
||||
M.powerlevel = new_powerlevel
|
||||
if(i != 1)
|
||||
step_away(M,src)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
healable = 0
|
||||
gender = NEUTER
|
||||
blood_volume = 0 //Until someome reworks for them to have slime jelly
|
||||
nutrition = 700
|
||||
|
||||
see_in_dark = 8
|
||||
|
||||
@@ -102,7 +103,6 @@
|
||||
create_reagents(100, NONE, NO_REAGENTS_VALUE)
|
||||
set_colour(new_colour)
|
||||
. = ..()
|
||||
nutrition = 700
|
||||
|
||||
/mob/living/simple_animal/slime/Destroy()
|
||||
for (var/A in actions)
|
||||
@@ -267,8 +267,8 @@
|
||||
return
|
||||
attacked += 5
|
||||
if(nutrition >= 100) //steal some nutrition. negval handled in life()
|
||||
nutrition -= (50 + (40 * M.is_adult))
|
||||
M.add_nutrition(50 + (40 * M.is_adult))
|
||||
adjust_nutrition(-50 - (40 * M.is_adult))
|
||||
M.adjust_nutrition(50 + (40 * M.is_adult), get_max_nutrition(), TRUE)
|
||||
if(health > 0)
|
||||
M.adjustBruteLoss(-10 + (-10 * M.is_adult))
|
||||
M.updatehealth()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
continue
|
||||
var/datum/atom_hud/alternate_appearance/AA = v
|
||||
AA.onNewMob(src)
|
||||
nutrition = rand(NUTRITION_LEVEL_START_MIN, NUTRITION_LEVEL_START_MAX)
|
||||
set_nutrition(rand(NUTRITION_LEVEL_START_MIN, NUTRITION_LEVEL_START_MAX))
|
||||
. = ..()
|
||||
update_config_movespeed()
|
||||
update_movespeed(TRUE)
|
||||
@@ -1023,6 +1023,14 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
var/datum/language_holder/H = get_language_holder()
|
||||
H.open_language_menu(usr)
|
||||
|
||||
///Adjust the nutrition of a mob
|
||||
/mob/proc/adjust_nutrition(change, max = INFINITY) //Honestly FUCK the oldcoders for putting nutrition on /mob someone else can move it up because holy hell I'd have to fix SO many typechecks
|
||||
nutrition = clamp(0, nutrition + change, max)
|
||||
|
||||
///Force set the mob nutrition
|
||||
/mob/proc/set_nutrition(var/change) //Seriously fuck you oldcoders.
|
||||
nutrition = max(0, change)
|
||||
|
||||
/mob/setMovetype(newval)
|
||||
. = ..()
|
||||
update_movespeed(FALSE)
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
var/list/babies = list()
|
||||
for(var/i=1,i<=number,i++)
|
||||
var/mob/living/simple_animal/slime/M = new/mob/living/simple_animal/slime(loc)
|
||||
M.nutrition = round(nutrition/number)
|
||||
M.set_nutrition(round(nutrition/number))
|
||||
step_away(M,src)
|
||||
babies += M
|
||||
new_slime = pick(babies)
|
||||
|
||||
Reference in New Issue
Block a user