mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-29 16:18:35 +01:00
Making previous commits actually work.
This commit is contained in:
@@ -66,7 +66,8 @@
|
||||
/obj/structure/flora,
|
||||
/turf/simulated/floor/outdoors,
|
||||
/obj/item/organ,
|
||||
/obj/item/reagent_containers/food
|
||||
/obj/item/reagent_containers/food,
|
||||
/obj/machinery/door
|
||||
)
|
||||
for(var/checktype in atom_types_with_animal_interactions)
|
||||
if(istype(A, checktype))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(istype(holder, /mob/living/simple_mob/animal/sif))
|
||||
|
||||
var/mob/living/simple_mob/animal/sif/critter = holder
|
||||
if(critter.health >= critter.sap_heal_threshold)
|
||||
if(critter.health >= (critter.getMaxHealth() * critter.sap_heal_threshold))
|
||||
return
|
||||
|
||||
if(holder.resting)
|
||||
@@ -99,7 +99,7 @@ var/global/list/last_drake_howl = list()
|
||||
continue
|
||||
var/turf/reference_point = locate(T.x, T.y, user_turf.z)
|
||||
if(reference_point)
|
||||
var/direction = get_dir(reference_point, T)
|
||||
var/direction = get_dir(reference_point, user_turf)
|
||||
if(direction)
|
||||
to_chat(M, SPAN_NOTICE("You hear an eerie howl from somewhere to the [dir2text(direction)]"))
|
||||
M << 'sound/effects/drakehowl_far.ogg'
|
||||
@@ -158,6 +158,13 @@ var/global/list/last_drake_howl = list()
|
||||
attack_armor_pen = 15
|
||||
attack_sound = 'sound/weapons/slice.ogg'
|
||||
|
||||
tame_items = list(
|
||||
/obj/item/reagent_containers/food/snacks/siffruit = 20,
|
||||
/obj/item/reagent_containers/food/snacks/grown/sif/sifpod = 10,
|
||||
/obj/item/reagent_containers/food/snacks/xenomeat/spidermeat = 20,
|
||||
/obj/item/reagent_containers/food/snacks/meat = 10
|
||||
)
|
||||
|
||||
// Attack strings for swapping.
|
||||
attacktext = null
|
||||
var/static/list/claw_attacktext = list("slashed", "clawed", "swiped", "gouged")
|
||||
@@ -196,7 +203,7 @@ var/global/list/last_drake_howl = list()
|
||||
return FALSE
|
||||
if(istype(friend, /mob/living/simple_mob/animal/sif))
|
||||
var/mob/living/simple_mob/animal/sif/critter = friend
|
||||
return critter.health < critter.sap_heal_threshold
|
||||
return critter.health < (critter.getMaxHealth() * critter.sap_heal_threshold)
|
||||
return (friend.health < friend.maxHealth)
|
||||
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/Initialize()
|
||||
|
||||
@@ -10,34 +10,36 @@
|
||||
)
|
||||
|
||||
// Healing threshold for grafadreka healing spit effect.
|
||||
var/sap_heal_threshold
|
||||
var/sap_heal_gradient = 0.25 // 25% of health each regen threshold
|
||||
var/sap_heal_threshold = 1
|
||||
var/const/scarification_period = 0.15
|
||||
|
||||
/mob/living/simple_mob/animal/sif/Initialize()
|
||||
/mob/living/simple_mob/animal/sif/Stat()
|
||||
. = ..()
|
||||
if(statpanel("Status"))
|
||||
stat("Scarring:", "[round((1-sap_heal_threshold)*100)]%")
|
||||
|
||||
/mob/living/simple_mob/animal/sif/updatehealth()
|
||||
. = ..()
|
||||
// Set our heal threshold to a 0-1 percentage value. This times our max HP
|
||||
// caps the amount drakes can heal with their sap wound tending interaction.
|
||||
sap_heal_threshold = min(sap_heal_threshold, (round(health / getMaxHealth() / scarification_period)+1) * scarification_period)
|
||||
|
||||
/mob/living/simple_mob/animal/sif/rejuvenate()
|
||||
sap_heal_threshold = 1
|
||||
. = ..()
|
||||
sap_heal_threshold = round(getMaxHealth() * 0.15)
|
||||
|
||||
/mob/living/simple_mob/animal/sif/examine(mob/user)
|
||||
. = ..()
|
||||
if(stat != DEAD)
|
||||
var/scarification = 1-(sap_heal_threshold / getMaxHealth())
|
||||
var/scarification = 1-sap_heal_threshold
|
||||
var/datum/gender/G = gender_datums[get_visible_gender()]
|
||||
if(scarification <= 0)
|
||||
. += SPAN_NOTICE("[G.He] [G.is] unscarred.")
|
||||
else if(scarification <= 0.25)
|
||||
. += SPAN_WARNING("[G.He] [G.is] lightly scarred.")
|
||||
else if(scarification <= 0.5)
|
||||
. += SPAN_WARNING("[G.He] [G.is] moderately scarred.")
|
||||
else if(scarification <= 0.75)
|
||||
. += SPAN_DANGER("[G.He] [G.is] heavily scarred.")
|
||||
else
|
||||
if(scarification >= 0.75)
|
||||
. += SPAN_DANGER("[G.He] [G.is] a solid mass of scar tissue.")
|
||||
|
||||
/mob/living/simple_mob/animal/sif/updatehealth()
|
||||
. = ..()
|
||||
var/sap_threshold = round(getMaxHealth() * sap_heal_gradient)
|
||||
sap_heal_threshold = min(getMaxHealth(), min(sap_heal_threshold, n_ceil(health % sap_threshold)*sap_threshold))
|
||||
|
||||
/mob/living/simple_mob/animal/sif/rejuvenate()
|
||||
. = ..()
|
||||
sap_heal_threshold = getMaxHealth()
|
||||
else if(scarification > 0.5)
|
||||
. += SPAN_DANGER("[G.He] [G.is] heavily scarred.")
|
||||
else if(scarification > 0.25)
|
||||
. += SPAN_WARNING("[G.He] [G.is] moderately scarred.")
|
||||
else if(scarification > 0)
|
||||
. += SPAN_WARNING("[G.He] [G.is] lightly scarred.")
|
||||
else
|
||||
. += SPAN_NOTICE("[G.He] [G.is] unscarred.")
|
||||
|
||||
Reference in New Issue
Block a user