mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +01:00
Merge branch 'upstream/development' into development
# Conflicts: # code/_helpers/time.dm # code/game/objects/items/devices/floor_painter.dm # code/game/objects/items/stacks/medical.dm # code/global.dm # code/modules/cargo/randomstock.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/simple_animal/simple_animal.dm # code/modules/mob/mob_movement.dm # code/modules/paperwork/faxmachine.dm
This commit is contained in:
@@ -1743,13 +1743,18 @@
|
||||
if (failed_last_breath || oxyloss > exhaust_threshold)//Can't catch our breath if we're suffocating
|
||||
return
|
||||
|
||||
if (nutrition <= 0)
|
||||
if (prob(1.5))
|
||||
src << span("warning", "You feel hungry and exhausted, eat something to regain your energy!")
|
||||
return
|
||||
|
||||
if (stamina != max_stamina)
|
||||
//Any suffocation damage slows stamina regen.
|
||||
//This includes oxyloss from low blood levels
|
||||
var/regen = stamina_recovery * (1 - min(((oxyloss*2) / exhaust_threshold), 1))
|
||||
if (regen > 0)
|
||||
stamina = min(max_stamina, stamina+regen)
|
||||
nutrition -= stamina_recovery*0.4
|
||||
nutrition = max(0, nutrition - stamina_recovery*0.18)
|
||||
hud_used.move_intent.update_move_icon(src)
|
||||
|
||||
/mob/living/carbon/human/proc/update_health_display()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
stamina = 120 // Vox are even faster than unathi and can go longer, but recover slowly
|
||||
sprint_speed_factor = 3
|
||||
stamina_recovery = 1
|
||||
sprint_cost_factor = 1.7
|
||||
sprint_cost_factor = 1
|
||||
|
||||
speech_sounds = list('sound/voice/shriek1.ogg')
|
||||
speech_chance = 20
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
|
||||
var/stamina = 100 // The maximum stamina this species has. Determines how long it can sprint
|
||||
var/stamina_recovery = 3 // Flat amount of stamina species recovers per proc
|
||||
var/sprint_speed_factor = 0.65 // The percentage of bonus speed you get when sprinting. 0.4 = 40%
|
||||
var/sprint_cost_factor = 1.0 // Multiplier on stamina cost for sprinting
|
||||
var/sprint_speed_factor = 0.7 // The percentage of bonus speed you get when sprinting. 0.4 = 40%
|
||||
var/sprint_cost_factor = 0.9 // Multiplier on stamina cost for sprinting
|
||||
var/exhaust_threshold = 50 // When stamina runs out, the mob takes oxyloss up til this value. Then collapses and drops to walk
|
||||
|
||||
// Determines the organs that the species spawns with and
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
stamina = 130 // Humans can sprint for longer than any other species
|
||||
stamina_recovery = 5
|
||||
sprint_speed_factor = 0.8
|
||||
sprint_cost_factor = 0.7
|
||||
sprint_speed_factor = 0.9
|
||||
sprint_cost_factor = 0.5
|
||||
|
||||
/datum/species/unathi
|
||||
name = "Unathi"
|
||||
@@ -43,9 +43,10 @@
|
||||
secondary_langs = list("Sinta'unathi")
|
||||
name_language = "Sinta'unathi"
|
||||
stamina = 120 // Unathi have the shortest but fastest sprint of all
|
||||
sprint_speed_factor = 3
|
||||
sprint_speed_factor = 3.2
|
||||
stamina_recovery = 5
|
||||
sprint_cost_factor = 1.8
|
||||
sprint_cost_factor = 1.45
|
||||
exhaust_threshold = 65
|
||||
rarity_value = 3
|
||||
|
||||
blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \
|
||||
@@ -116,8 +117,8 @@
|
||||
|
||||
stamina = 90 // Tajarans evolved to maintain a steady pace in the snow, sprinting wastes energy
|
||||
stamina_recovery = 4
|
||||
sprint_speed_factor = 0.55
|
||||
sprint_cost_factor = 1
|
||||
sprint_speed_factor = 0.65
|
||||
sprint_cost_factor = 0.75
|
||||
|
||||
|
||||
blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \
|
||||
@@ -184,7 +185,7 @@
|
||||
ethanol_resistance = 0.5//gets drunk faster
|
||||
|
||||
stamina = 90
|
||||
sprint_speed_factor = 1.1 //Evolved for rapid escapes from predators
|
||||
sprint_speed_factor = 1.25 //Evolved for rapid escapes from predators
|
||||
|
||||
|
||||
/datum/species/diona
|
||||
@@ -263,8 +264,8 @@
|
||||
reagent_tag = IS_DIONA
|
||||
|
||||
stamina = -1 // Diona sprinting uses energy instead of stamina
|
||||
sprint_speed_factor = 0.4 //Speed gained is minor
|
||||
|
||||
sprint_speed_factor = 0.5 //Speed gained is minor
|
||||
sprint_cost_factor = 0.8
|
||||
|
||||
/datum/species/diona/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost)
|
||||
var/datum/dionastats/DS = H.get_dionastats()
|
||||
@@ -272,7 +273,7 @@
|
||||
if (!DS)
|
||||
return 0 //Something is very wrong
|
||||
|
||||
var/remainder = cost
|
||||
var/remainder = cost * sprint_cost_factor
|
||||
|
||||
if (H.radiation)
|
||||
if (H.radiation > (cost*0.5))//Radiation counts as double energy
|
||||
@@ -402,13 +403,13 @@
|
||||
"Your CPU temperature probes warn you that you are approaching critical heat levels!"
|
||||
)
|
||||
stamina = -1 // Machines use power and generate heat, stamina is not a thing
|
||||
sprint_speed_factor = 0.85 // About as capable of speed as a human
|
||||
sprint_speed_factor = 1 // About as capable of speed as a human
|
||||
|
||||
|
||||
/datum/species/machine/handle_sprint_cost(var/mob/living/carbon/human/H, var/cost)
|
||||
if (H.stat == CONSCIOUS)
|
||||
H.bodytemperature += cost*1.35
|
||||
H.nutrition -= cost*0.9
|
||||
H.bodytemperature += cost*1.15
|
||||
H.nutrition -= cost*0.65
|
||||
if (H.nutrition > 0)
|
||||
return 1
|
||||
else
|
||||
@@ -470,8 +471,8 @@
|
||||
base_color = "#575757"
|
||||
|
||||
stamina = 100 // Long period of sprinting, but relatively low speed gain
|
||||
sprint_speed_factor = 0.5
|
||||
sprint_cost_factor = 0.27
|
||||
sprint_speed_factor = 0.55
|
||||
sprint_cost_factor = 0.20
|
||||
stamina_recovery = 1//slow recovery
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
else
|
||||
newspeed = text2num(response)
|
||||
|
||||
if (!newspeed || newspeed >= speed || newspeed <= 0)
|
||||
if (!newspeed || newspeed >= speed || newspeed <= 0.2)
|
||||
src << "Error, invalid value entered. Walk speed has not been changed"
|
||||
return
|
||||
|
||||
|
||||
@@ -142,6 +142,11 @@
|
||||
user << "<span class='notice'>It looks hungry.</span>"
|
||||
else if ((reagents.total_volume > 0 && nutrition > max_nutrition *0.75) || nutrition > max_nutrition *0.9)
|
||||
user << "It looks full and contented."
|
||||
if (health < maxHealth * 0.5)
|
||||
user << "<span class='danger'>It looks badly wounded.</span>"
|
||||
else if (health < maxHealth)
|
||||
user << "<span class='warning'>It looks wounded.</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/Life()
|
||||
..()
|
||||
@@ -293,7 +298,16 @@
|
||||
if (istype(current, /datum/reagent/nutriment))//If its food, it feeds us
|
||||
var/datum/reagent/nutriment/N = current
|
||||
nutrition += removed*N.nutriment_factor
|
||||
health = min(health+(removed*N.regen_factor), maxHealth)
|
||||
var/heal_amount = removed*N.regen_factor
|
||||
if (bruteloss > 0)
|
||||
var/n = min(heal_amount, bruteloss)
|
||||
adjustBruteLoss(-n)
|
||||
heal_amount -= n
|
||||
if (fireloss && heal_amount)
|
||||
var/n = min(heal_amount, fireloss)
|
||||
adjustFireLoss(-n)
|
||||
heal_amount -= n
|
||||
updatehealth()
|
||||
current.remove_self(removed)//If its not food, it just does nothing. no fancy effects
|
||||
|
||||
/mob/living/simple_animal/can_eat()
|
||||
@@ -373,21 +387,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O, /obj/item/stack/medical))
|
||||
if(stat != DEAD)
|
||||
var/obj/item/stack/medical/MED = O
|
||||
if(health < maxHealth)
|
||||
if(MED.amount >= 1)
|
||||
adjustBruteLoss(-MED.heal_brute)
|
||||
MED.amount -= 1
|
||||
if(MED.amount <= 0)
|
||||
qdel(MED)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("<span class='notice'>[user] applies the [MED] on [src].</span>")
|
||||
else
|
||||
user << "<span class='notice'>\The [src] is dead, medical items won't bring \him back to life.</span>"
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers))
|
||||
if(istype(O, /obj/item/weapon/reagent_containers) || istype(O, /obj/item/stack/medical))
|
||||
..()
|
||||
|
||||
else if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
|
||||
|
||||
@@ -192,7 +192,19 @@
|
||||
|
||||
if(moving) return 0
|
||||
|
||||
if(world.time < move_delay) return
|
||||
if(world.time < move_delay)
|
||||
return
|
||||
|
||||
|
||||
//This compensates for the inaccuracy of move ticks
|
||||
//Whenever world.time overshoots the movedelay, due to it only ticking once per decisecond
|
||||
//The overshoot value is subtracted from our next delay, farther down where move delay is set.
|
||||
//This doesn't entirely remove the problem, but it keeps travel times accurate to within 0.1 seconds
|
||||
//Over an infinite distance, and prevents the inaccuracy from compounding. Thus making it basically a non-issue
|
||||
var/leftover = world.time - move_delay
|
||||
if (leftover > 1)
|
||||
leftover = 0
|
||||
|
||||
|
||||
if(locate(/obj/effect/stop/, mob.loc))
|
||||
for(var/obj/effect/stop/S in mob.loc)
|
||||
@@ -266,9 +278,9 @@
|
||||
src << "\blue You're pinned to a wall by [mob.pinned[1]]!"
|
||||
return 0
|
||||
|
||||
move_delay = world.time //set move delay
|
||||
move_delay = world.time - leftover//set move delay
|
||||
|
||||
if (mob.buckled || mob.pulledby)
|
||||
if (mob.buckled)
|
||||
if(istype(mob.buckled, /obj/vehicle))
|
||||
//manually set move_delay for vehicles so we don't inherit any mob movement penalties
|
||||
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
|
||||
@@ -280,19 +292,22 @@
|
||||
|
||||
if(istype(mob.loc, /turf/space)) // Wheelchair driving!
|
||||
return // No wheelchair driving in space
|
||||
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
|
||||
return mob.pulledby.relaymove(mob, direct)
|
||||
|
||||
//TODO: Fuck wheelchairs.
|
||||
//Toss away all this snowflake code here, and rewrite wheelchairs as a vehicle.
|
||||
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
|
||||
var/min_move_delay = 0
|
||||
if(ishuman(mob.buckled))
|
||||
var/mob/living/carbon/human/driver = mob.buckled
|
||||
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
||||
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
|
||||
if((!l_hand || l_hand.is_stump()) && (!r_hand || r_hand.is_stump()))
|
||||
return // No hands to drive your chair? Tough luck!
|
||||
min_move_delay = driver.min_walk_delay
|
||||
//drunk wheelchair driving
|
||||
if(mob.confused && prob(20))
|
||||
direct = pick(cardinal)
|
||||
move_delay += 2
|
||||
move_delay += max((mob.movement_delay() + config.walk_speed) * config.walk_delay_multiplier, min_move_delay)
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
var/tally = mob.movement_delay() + config.walk_speed
|
||||
@@ -321,6 +336,13 @@
|
||||
if(mob.machine.relaymove(mob,direct))
|
||||
return
|
||||
|
||||
//Wheelchair pushing goes here for now.
|
||||
//TODO: Fuck wheelchairs.
|
||||
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
|
||||
move_delay += 1
|
||||
return mob.pulledby.relaymove(mob, direct)
|
||||
|
||||
|
||||
|
||||
//We are now going to move
|
||||
moving = 1
|
||||
|
||||
Reference in New Issue
Block a user