mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
-Fixed issue 741, Aliens now recover a small amount of oxygen loss when not in critical. Weeds will also help heal you.
-Fixed issue 742, the transfer will now use the absolute value. -Fixed issue 743, someone forgot to change the label and the amount it takes. It was originally 200 but it was changed to 50. Cleaned up alien/life.dm by removing unneeded code. Made it so weeds don't heal you so god damn much. Buffed eating people to heal you, now that nutriments are not handled. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4334 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -64,6 +64,7 @@ Doesn't work on other aliens/AI.*/
|
|||||||
if(isalien(M))
|
if(isalien(M))
|
||||||
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
|
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
|
||||||
if (amount)
|
if (amount)
|
||||||
|
amount = abs(round(amount))
|
||||||
if(powerc(amount))
|
if(powerc(amount))
|
||||||
if (get_dist(src,M) <= 1)
|
if (get_dist(src,M) <= 1)
|
||||||
M.adjustToxLoss(amount)
|
M.adjustToxLoss(amount)
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
if (stat != DEAD) //still breathing
|
if (stat != DEAD) //still breathing
|
||||||
|
|
||||||
//First, resolve location and get a breath
|
|
||||||
|
|
||||||
if(air_master.current_cycle%4==2)
|
if(air_master.current_cycle%4==2)
|
||||||
//Only try to take a breath every 4 seconds, unless suffocating
|
//Only try to take a breath every 4 seconds, unless suffocating
|
||||||
spawn(0) breathe()
|
spawn(0) breathe()
|
||||||
@@ -30,19 +28,9 @@
|
|||||||
var/obj/location_as_object = loc
|
var/obj/location_as_object = loc
|
||||||
location_as_object.handle_internal_lifeform(src, 0)
|
location_as_object.handle_internal_lifeform(src, 0)
|
||||||
|
|
||||||
//Mutations and radiation
|
|
||||||
handle_mutations_and_radiation()
|
|
||||||
|
|
||||||
//Chemicals in the body
|
//Chemicals in the body
|
||||||
handle_chemicals_in_body()
|
handle_chemicals_in_body()
|
||||||
|
|
||||||
//Disabilities
|
|
||||||
handle_disabilities()
|
|
||||||
|
|
||||||
//Apparently, the person who wrote this code designed it so that
|
|
||||||
//blinded get reset each cycle and then get activated later in the
|
|
||||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
|
||||||
//to find it.
|
|
||||||
blinded = null
|
blinded = null
|
||||||
|
|
||||||
//Disease Check
|
//Disease Check
|
||||||
@@ -71,26 +59,6 @@
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid
|
/mob/living/carbon/alien/humanoid
|
||||||
proc/handle_disabilities()
|
|
||||||
if (disabilities & EPILEPSY)
|
|
||||||
if ((prob(1) && paralysis < 10))
|
|
||||||
src << "\red You have a seizure!"
|
|
||||||
Paralyse(10)
|
|
||||||
if (disabilities & COUGHING)
|
|
||||||
if ((prob(5) && paralysis <= 1))
|
|
||||||
drop_item()
|
|
||||||
spawn( 0 )
|
|
||||||
emote("cough")
|
|
||||||
return
|
|
||||||
if (disabilities & TOURETTES)
|
|
||||||
if ((prob(10) && paralysis <= 1))
|
|
||||||
Stun(10)
|
|
||||||
spawn( 0 )
|
|
||||||
emote("twitch")
|
|
||||||
return
|
|
||||||
if (disabilities & NERVOUS)
|
|
||||||
if (prob(10))
|
|
||||||
stuttering = max(10, stuttering)
|
|
||||||
|
|
||||||
proc/update_mind()
|
proc/update_mind()
|
||||||
if(!mind && client)
|
if(!mind && client)
|
||||||
@@ -99,60 +67,6 @@
|
|||||||
mind.assigned_role = "Hunter"
|
mind.assigned_role = "Hunter"
|
||||||
mind.key = key
|
mind.key = key
|
||||||
|
|
||||||
proc/handle_mutations_and_radiation()
|
|
||||||
|
|
||||||
if(getFireLoss())
|
|
||||||
if((COLD_RESISTANCE in mutations) || prob(50))
|
|
||||||
switch(getFireLoss())
|
|
||||||
if(1 to 50)
|
|
||||||
adjustFireLoss(-1)
|
|
||||||
if(51 to 100)
|
|
||||||
adjustFireLoss(-5)
|
|
||||||
|
|
||||||
if ((HULK in mutations) && health <= 25)
|
|
||||||
mutations.Remove(HULK)
|
|
||||||
src << "\red You suddenly feel very weak."
|
|
||||||
Weaken(3)
|
|
||||||
emote("collapse")
|
|
||||||
|
|
||||||
if (radiation)
|
|
||||||
if (radiation > 100)
|
|
||||||
radiation = 100
|
|
||||||
Weaken(10)
|
|
||||||
src << "\red You feel weak."
|
|
||||||
emote("collapse")
|
|
||||||
|
|
||||||
if (radiation < 0)
|
|
||||||
radiation = 0
|
|
||||||
|
|
||||||
switch(radiation)
|
|
||||||
if(1 to 49)
|
|
||||||
radiation--
|
|
||||||
if(prob(25))
|
|
||||||
adjustToxLoss(1)
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
if(50 to 74)
|
|
||||||
radiation -= 2
|
|
||||||
adjustToxLoss(1)
|
|
||||||
if(prob(5))
|
|
||||||
radiation -= 5
|
|
||||||
Weaken(3)
|
|
||||||
src << "\red You feel weak."
|
|
||||||
emote("collapse")
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
if(75 to 100)
|
|
||||||
radiation -= 3
|
|
||||||
adjustToxLoss(3)
|
|
||||||
if(prob(1))
|
|
||||||
src << "\red You mutate!"
|
|
||||||
randmutb(src)
|
|
||||||
domutcheck(src,null)
|
|
||||||
emote("gasp")
|
|
||||||
updatehealth()
|
|
||||||
|
|
||||||
|
|
||||||
proc/breathe()
|
proc/breathe()
|
||||||
if(reagents)
|
if(reagents)
|
||||||
if(reagents.has_reagent("lexorin")) return
|
if(reagents.has_reagent("lexorin")) return
|
||||||
@@ -160,22 +74,9 @@
|
|||||||
|
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
var/datum/air_group/breath
|
var/datum/air_group/breath
|
||||||
// HACK NEED CHANGING LATER
|
|
||||||
if(health < 0)
|
|
||||||
losebreath++
|
|
||||||
|
|
||||||
if(losebreath>0) //Suffocating so do not take a breath
|
// This is mostly here for the smoke grenades and getting toxins in the air.
|
||||||
losebreath--
|
|
||||||
if (prob(75)) //High chance of gasping for air
|
|
||||||
spawn emote("gasp")
|
|
||||||
if(istype(loc, /obj/))
|
|
||||||
var/obj/location_as_object = loc
|
|
||||||
location_as_object.handle_internal_lifeform(src, 0)
|
|
||||||
else
|
|
||||||
//First, check for air from internal atmosphere (using an air tank and mask generally)
|
|
||||||
breath = get_breath_from_internal(BREATH_VOLUME)
|
|
||||||
|
|
||||||
//No breath from internal atmosphere so get breath from location
|
|
||||||
if(!breath)
|
if(!breath)
|
||||||
if(istype(loc, /obj/))
|
if(istype(loc, /obj/))
|
||||||
var/obj/location_as_object = loc
|
var/obj/location_as_object = loc
|
||||||
@@ -211,23 +112,8 @@
|
|||||||
if(breath)
|
if(breath)
|
||||||
loc.assume_air(breath)
|
loc.assume_air(breath)
|
||||||
|
|
||||||
|
|
||||||
proc/get_breath_from_internal(volume_needed)
|
|
||||||
if(internal)
|
|
||||||
if (!contents.Find(internal))
|
|
||||||
internal = null
|
|
||||||
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
|
|
||||||
internal = null
|
|
||||||
if(internal)
|
|
||||||
if (internals)
|
|
||||||
internals.icon_state = "internal1"
|
|
||||||
return internal.remove_air_volume(volume_needed)
|
|
||||||
else
|
|
||||||
if (internals)
|
|
||||||
internals.icon_state = "internal0"
|
|
||||||
return null
|
|
||||||
|
|
||||||
proc/handle_breath(datum/gas_mixture/breath)
|
proc/handle_breath(datum/gas_mixture/breath)
|
||||||
|
// Mostly for getting toxins from the air into your plasma storage.
|
||||||
if(nodamage)
|
if(nodamage)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -255,15 +141,6 @@
|
|||||||
breath.toxins -= toxins_used
|
breath.toxins -= toxins_used
|
||||||
breath.oxygen += toxins_used
|
breath.oxygen += toxins_used
|
||||||
|
|
||||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
|
|
||||||
if(prob(20))
|
|
||||||
src << "\red You feel a searing heat in your lungs!"
|
|
||||||
fire_alert = max(fire_alert, 1)
|
|
||||||
else
|
|
||||||
fire_alert = 0
|
|
||||||
|
|
||||||
//Temporary fixes to the alerts.
|
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
proc/handle_environment()
|
proc/handle_environment()
|
||||||
@@ -274,46 +151,12 @@
|
|||||||
adjustToxLoss(15)
|
adjustToxLoss(15)
|
||||||
|
|
||||||
else
|
else
|
||||||
adjustBruteLoss(-15)
|
adjustBruteLoss(-5)
|
||||||
adjustFireLoss(-15)
|
adjustFireLoss(-5)
|
||||||
|
adjustOxyLoss(-5) // This shouldn't be needed, it's a failsafe.
|
||||||
|
|
||||||
|
|
||||||
proc/adjust_body_temperature(current, loc_temp, boost)
|
|
||||||
var/temperature = current
|
|
||||||
var/difference = abs(current-loc_temp) //get difference
|
|
||||||
var/increments// = difference/10 //find how many increments apart they are
|
|
||||||
if(difference > 50)
|
|
||||||
increments = difference/5
|
|
||||||
else
|
|
||||||
increments = difference/10
|
|
||||||
var/change = increments*boost // Get the amount to change by (x per increment)
|
|
||||||
var/temp_change
|
|
||||||
if(current < loc_temp)
|
|
||||||
temperature = min(loc_temp, temperature+change)
|
|
||||||
else if(current > loc_temp)
|
|
||||||
temperature = max(loc_temp, temperature-change)
|
|
||||||
temp_change = (temperature - current)
|
|
||||||
return temp_change
|
|
||||||
|
|
||||||
proc/get_thermal_protection()
|
proc/get_thermal_protection()
|
||||||
var/thermal_protection = 1.0
|
var/thermal_protection = 1000.0
|
||||||
//Handle normal clothing
|
|
||||||
if(head && (head.body_parts_covered & HEAD))
|
|
||||||
thermal_protection += 0.5
|
|
||||||
if(wear_suit && (wear_suit.body_parts_covered & UPPER_TORSO))
|
|
||||||
thermal_protection += 0.5
|
|
||||||
if(wear_suit && (wear_suit.body_parts_covered & LEGS))
|
|
||||||
thermal_protection += 0.2
|
|
||||||
if(wear_suit && (wear_suit.body_parts_covered & ARMS))
|
|
||||||
thermal_protection += 0.2
|
|
||||||
if(wear_suit && (wear_suit.body_parts_covered & HANDS))
|
|
||||||
thermal_protection += 0.2
|
|
||||||
if(wear_suit && (wear_suit.flags & SUITSPACE))
|
|
||||||
thermal_protection += 3
|
|
||||||
if(COLD_RESISTANCE in mutations)
|
|
||||||
thermal_protection += 5
|
|
||||||
|
|
||||||
return thermal_protection
|
return thermal_protection
|
||||||
|
|
||||||
proc/add_fire_protection(var/temp)
|
proc/add_fire_protection(var/temp)
|
||||||
@@ -335,20 +178,6 @@
|
|||||||
|
|
||||||
if(reagents) reagents.metabolize(src)
|
if(reagents) reagents.metabolize(src)
|
||||||
|
|
||||||
if(FAT in mutations)
|
|
||||||
if(nutrition < 100)
|
|
||||||
if(prob(round((50 - nutrition) / 100)))
|
|
||||||
src << "\blue You feel fit again!"
|
|
||||||
mutations.Remove(FAT)
|
|
||||||
else
|
|
||||||
if(nutrition > 500)
|
|
||||||
if(prob(5 + round((nutrition - 200) / 2)))
|
|
||||||
src << "\red You suddenly feel blubbery!"
|
|
||||||
mutations.Add(FAT)
|
|
||||||
|
|
||||||
if (nutrition > 0)
|
|
||||||
nutrition -= HUNGER_FACTOR
|
|
||||||
|
|
||||||
if (drowsyness)
|
if (drowsyness)
|
||||||
drowsyness--
|
drowsyness--
|
||||||
eye_blurry = max(2, eye_blurry)
|
eye_blurry = max(2, eye_blurry)
|
||||||
@@ -385,13 +214,15 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
//UNCONSCIOUS. NO-ONE IS HOME
|
//UNCONSCIOUS. NO-ONE IS HOME
|
||||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
if( (getOxyLoss() > 75) || (config.health_threshold_crit > health) )
|
||||||
if( health <= 20 && prob(1) )
|
if( health <= 20 && prob(1) )
|
||||||
spawn(0)
|
spawn(0)
|
||||||
emote("gasp")
|
emote("gasp")
|
||||||
if(!reagents.has_reagent("inaprovaline"))
|
if(!reagents.has_reagent("inaprovaline"))
|
||||||
adjustOxyLoss(1)
|
adjustOxyLoss(1)
|
||||||
Paralyse(3)
|
Paralyse(3)
|
||||||
|
else
|
||||||
|
adjustOxyLoss(-1)
|
||||||
|
|
||||||
if(paralysis)
|
if(paralysis)
|
||||||
AdjustParalysis(-1)
|
AdjustParalysis(-1)
|
||||||
@@ -542,4 +373,6 @@
|
|||||||
if(air_master.current_cycle%3==1)
|
if(air_master.current_cycle%3==1)
|
||||||
if(!M.nodamage)
|
if(!M.nodamage)
|
||||||
M.adjustBruteLoss(5)
|
M.adjustBruteLoss(5)
|
||||||
nutrition += 10
|
adjustBruteLoss(-10)
|
||||||
|
adjustFireLoss(-10)
|
||||||
|
adjustOxyLoss(-10)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
//Queen verbs
|
//Queen verbs
|
||||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||||
|
|
||||||
set name = "Lay Egg (200)"
|
set name = "Lay Egg (50)"
|
||||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||||
set category = "Alien"
|
set category = "Alien"
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
|
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
|
||||||
adjustToxLoss(-200)
|
adjustToxLoss(-50)
|
||||||
for(var/mob/O in viewers(src, null))
|
for(var/mob/O in viewers(src, null))
|
||||||
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
|
||||||
new /obj/effect/alien/egg(loc)
|
new /obj/effect/alien/egg(loc)
|
||||||
|
|||||||
Reference in New Issue
Block a user