diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index a9bb1b1393..24e0746f7c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -72,9 +72,6 @@ else visible_message("\The [user] strains fruitlessly to force \the [src] [density ? "open" : "closed"].") return - if(isanimal(user) && user.a_intent == I_HELP) - user.visible_message(SPAN_NOTICE("\The [user] scratches at the bottom of \the [src].")) - return ..() /obj/machinery/door/airlock/attack_alien(var/mob/user) //Familiar, right? Doors. -Mechoid diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 0e968cb160..105f05a9c3 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -41,13 +41,17 @@ /obj/machinery/door/attack_generic(var/mob/user, var/damage) if(isanimal(user)) var/mob/living/simple_mob/S = user - if(damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD) - visible_message("\The [user] smashes into [src]!") + if(S.a_intent == I_HURT && damage >= STRUCTURE_MIN_DAMAGE_THRESHOLD) + visible_message(SPAN_DANGER("\The [user] smashes into [src]!")) playsound(src, S.attack_sound, 75, 1) take_damage(damage) + else if(user.a_intent == I_HELP) + user.visible_message(SPAN_NOTICE("\The [user] scratches at the bottom of \the [src].")) else - visible_message("\The [user] bonks \the [src] harmlessly.") - user.do_attack_animation(src) + visible_message(SPAN_NOTICE("\The [user] bonks \the [src] harmlessly.")) + user.do_attack_animation(src) + return + ..() /obj/machinery/door/Initialize() . = ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm index 13abd6a9d1..26b7ce937c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm @@ -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)) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm index dc562e665d..8721d44035 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm @@ -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() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/sif.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/sif.dm index a9d2ae3faa..7b739e465c 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/sif.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/sif.dm @@ -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.") diff --git a/icons/turf/outdoors.dmi b/icons/turf/outdoors.dmi index a16e37d4a5..9d93d9b7f9 100644 Binary files a/icons/turf/outdoors.dmi and b/icons/turf/outdoors.dmi differ