Simple animal update (#6553)

This commit is contained in:
Alberyk
2019-06-12 23:47:22 +02:00
committed by Werner
parent 65b1bb501e
commit 2d4cac126f
24 changed files with 227 additions and 71 deletions
+1
View File
@@ -1856,6 +1856,7 @@
#include "code\modules\mob\living\simple_animal\constructs\constructs.dm"
#include "code\modules\mob\living\simple_animal\constructs\soulstone.dm"
#include "code\modules\mob\living\simple_animal\familiars\familiars.dm"
#include "code\modules\mob\living\simple_animal\friendly\adhomai.dm"
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
#include "code\modules\mob\living\simple_animal\friendly\crab.dm"
+16
View File
@@ -1230,3 +1230,19 @@
E.charge_cost *= 2
E.self_recharge = 0
E.reliability = 90
/obj/random/animal_crate
name = "random animal"
desc = "Contains a random crate with some animal."
icon = 'icons/obj/storage.dmi'
icon_state = "densecrate"
spawnlist = list(
/obj/structure/largecrate/animal/corgi = 3,
/obj/structure/largecrate/animal/cow = 4,
/obj/structure/largecrate/animal/goat = 3,
/obj/structure/largecrate/animal/cat = 2,
/obj/structure/largecrate/animal/chick = 4,
/obj/structure/largecrate/animal/adhomai = 0.5,
/obj/structure/largecrate/animal/adhomai/fatshouter = 0.5,
/obj/structure/largecrate/animal/adhomai/rafama = 0.5
)
@@ -87,3 +87,13 @@
/obj/structure/largecrate/animal/dog/pug
held_type = /mob/living/simple_animal/hostile/commanded/dog/pug
/obj/structure/largecrate/animal/adhomai
name = "adhomian animal crate"
held_type = /mob/living/simple_animal/ice_tunneler
/obj/structure/largecrate/animal/adhomai/fatshouter
held_type = /mob/living/simple_animal/fatshouter
/obj/structure/largecrate/animal/adhomai/rafama
held_type = /mob/living/simple_animal/hostile/retaliate/rafama
+1 -8
View File
@@ -81,14 +81,7 @@ STOCK_ITEM_LARGE(suspension, 2)
new /obj/machinery/suspension_gen(L)
STOCK_ITEM_LARGE(animal, 2.5)
var/type = pick( \
/obj/structure/largecrate/animal/chick, \
/obj/structure/largecrate/animal/cat, \
/obj/structure/largecrate/animal/goat, \
/obj/structure/largecrate/animal/cow, \
/obj/structure/largecrate/animal/corgi \
)
new type(L)
new /obj/random/animal_crate(L)
STOCK_ITEM_LARGE(cablelayer, 1)
new /obj/machinery/cablelayer(L)
@@ -134,6 +134,10 @@
density = 0
wizardy_spells = list(/spell/aoe_turf/smoke)
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
meat_amount = 6
butchering_products = list(/obj/item/stack/material/animalhide = 3)
/mob/living/simple_animal/familiar/pet //basically variants of normal animals with spells.
icon = 'icons/mob/npc/animal.dmi'
@@ -173,6 +177,9 @@
wizardy_spells = list(/spell/targeted/subjugation)
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
butchering_products = list(/obj/item/stack/material/animalhide/cat = 2)
/mob/living/simple_animal/mouse/familiar
name = "ancient mouse"
@@ -0,0 +1,100 @@
/mob/living/simple_animal/ice_tunneler
name = "ice tunneler"
desc = "An egg producing beast from Adhomai. It is known for burrowing in ice and snow."
icon_state = "tunneler"
icon_living = "tunneler"
icon_dead = "tunneler_dead"
speak = list("Fiiiiiii!")
speak_emote = list("whistles")
emote_hear = list("whistles loudly")
emote_see = list("whistles")
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/adhomai
meat_amount = 2
var/eggsleft = 0
/mob/living/simple_animal/ice_tunneler/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown)) //feedin' dem chickens
var/obj/item/weapon/reagent_containers/food/snacks/grown/G = O
if(G.seed && G.seed.kitchen_tag == "nfrihi")
if(!stat && eggsleft < 8)
user.visible_message(
span("notice", "\The [user] feeds \the [O] to \the [name]! It whistles happily."),
span("notice", "You feed \the [O] to \the [name]! It whistles happily."),
"You hear a cluck.")
user.drop_from_inventory(O,get_turf(src))
qdel(O)
eggsleft += rand(1, 4)
else
to_chat(user, "\The [name] doesn't seem hungry!")
else
to_chat(user, "\The [name] doesn't seem interested in that.")
else
..()
/mob/living/simple_animal/ice_tunneler/Life()
. =..()
if(!.)
return
if(!stat && prob(3) && eggsleft > 0)
visible_message("[src] lays an egg.")
eggsleft--
new /obj/item/weapon/reagent_containers/food/snacks/egg(get_turf(src))
/mob/living/simple_animal/fatshouter
name = "fatshouter"
desc = "An adhomian animal known for its production of milk and wool."
icon_state = "fatshouter"
icon_living = "fatshouter"
icon_dead = "fatshouter_dead"
speak_emote = list("brays")
emote_hear = list("brays")
emote_see = list("shakes its head")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/adhomai
meat_amount = 30
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
attacktext = "kicked"
health = 200
maxHealth = 200
autoseek_food = 0
beg_for_food = 0
mob_size = 15
has_udder = TRUE
milk_type = "fatshouter_milk"
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/adhomai
butchering_products = list(/obj/item/stack/material/animalhide = 5)
/mob/living/simple_animal/hostile/retaliate/rafama
name = "steed of Mata'ke"
desc = "An animal native to Adhomai, known for its agressive behavior and mighty tusks."
icon_state = "rafama"
icon_living = "rafama"
icon_dead = "rafama_dead"
turns_per_move = 3
speak_emote = list("chuffs")
emote_hear = list("growls")
emote_see = list("shakes its head", "stamps a foot", "glares around")
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
mob_size = 12
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/adhomai
maxHealth = 150
health = 150
harm_intent_damage = 3
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bitten"
attack_sound = 'sound/weapons/bite.ogg'
butchering_products = list(/obj/item/stack/material/animalhide = 5)
meat_amount = 8
@@ -34,6 +34,7 @@
seek_speed = 5
pass_flags = PASSTABLE
possession_candidate = 1
butchering_products = list(/obj/item/stack/material/animalhide/cat = 2)
/mob/living/simple_animal/cat/think()
//MICE!
@@ -26,6 +26,8 @@
holder_type = /obj/item/weapon/holder/corgi
butchering_products = list(/obj/item/stack/material/animalhide/corgi = 3)
var/obj/item/inventory_head
var/obj/item/inventory_back
@@ -110,6 +112,8 @@
icon_living = "puppy"
icon_dead = "puppy_dead"
butchering_products = list(/obj/item/stack/material/animalhide/corgi = 1)
//pupplies cannot wear anything.
/mob/living/simple_animal/corgi/puppy/Topic(href, href_list)
if(href_list["remove_inv"] || href_list["add_inv"])
@@ -23,12 +23,9 @@
maxHealth = 40
melee_damage_lower = 1
melee_damage_upper = 5
var/datum/reagents/udder = null
has_udder = TRUE
/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
. = ..()
udder = new(50)
udder.my_atom = src
butchering_products = list(/obj/item/stack/material/animalhide = 3)
/mob/living/simple_animal/hostile/retaliate/goat/beg(var/atom/thing, var/atom/holder)
visible_emote("butts insistently at [holder]'s legs and reaches towards their [thing].",0)
@@ -36,10 +33,6 @@
/mob/living/simple_animal/hostile/retaliate/goat/Life()
. = ..()
if(.)
if(stat == CONSCIOUS)
if(udder && prob(5))
udder.add_reagent("milk", rand(5, 10))
if(locate(/obj/effect/plant) in loc)
var/obj/effect/plant/SV = locate() in loc
SV.die_off(1)
@@ -76,17 +69,6 @@
for(var/obj/effect/plant/SV in loc)
SV.die_off(1)
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/obj/item/weapon/reagent_containers/glass/G = O
if(stat == CONSCIOUS && istype(G) && G.is_open_container())
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
if(G.reagents.total_volume >= G.volume)
to_chat(user, "<span class='warning'>The [O] is full.</span>")
if(!transfered)
to_chat(user, "<span class='warning'>The udder is dry. Wait a bit longer...</span>")
else
..()
//cow
/mob/living/simple_animal/cow
name = "cow"
@@ -111,31 +93,9 @@
health = 250
autoseek_food = 0
beg_for_food = 0
var/datum/reagents/udder = null
mob_size = 20//based on mass of holstein fresian dairy cattle, what the sprite is based on
/mob/living/simple_animal/cow/Initialize()
. = ..()
udder = new(50)
udder.my_atom = src
/mob/living/simple_animal/cow/attackby(var/obj/item/O as obj, var/mob/user as mob)
var/obj/item/weapon/reagent_containers/glass/G = O
if(stat == CONSCIOUS && istype(G) && G.is_open_container())
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
if(G.reagents.total_volume >= G.volume)
to_chat(user, "<span class='warning'>The [O] is full.</span>")
if(!transfered)
to_chat(user, "<span class='warning'>The udder is dry. Wait a bit longer...</span>")
else
..()
/mob/living/simple_animal/cow/Life()
. = ..()
if(stat == CONSCIOUS)
if(udder && prob(5))
udder.add_reagent("milk", rand(5, 10))
has_udder = TRUE
butchering_products = list(/obj/item/stack/material/animalhide = 8)
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead)
@@ -21,6 +21,7 @@
mob_size = 4
max_nutrition = 90
holder_type = /obj/item/weapon/holder/fox
butchering_products = list(/obj/item/stack/material/animalhide = 3)
//Captain fox
/mob/living/simple_animal/corgi/fox/Chauncey
@@ -20,6 +20,8 @@
density = 0
seek_speed = 0.75
butchering_products = list(/obj/item/stack/material/animalhide/lizard = 2)
var/decompose_time = 18000
/mob/living/simple_animal/lizard/Initialize()
@@ -39,6 +39,8 @@
attack_emote = "growls at"
smart = TRUE
butchering_products = list(/obj/item/stack/material/animalhide/xeno = 5)
/mob/living/simple_animal/hostile/alien/drone
name = "alien drone"
icon_state = "aliend_running"
@@ -38,6 +38,7 @@
faction = "scarybat"
flying = TRUE
butchering_products = list(/obj/item/stack/material/animalhide = 1)
var/mob/living/owner
/mob/living/simple_animal/hostile/scarybat/Initialize(mapload, mob/living/L as mob)
@@ -27,6 +27,7 @@
melee_damage_upper = 18
break_stuff_probability = 80
mob_size = 17
butchering_products = list(/obj/item/clothing/head/bearpelt = 1)
var/safety //used to prevent infinite loops
var/turns_since_hit = 0//If the bear chases someone too long without hitting them, it will try to change to another nearby target instead
@@ -81,11 +82,6 @@
. = ..()
update_bearmode()
/mob/living/simple_animal/hostile/bear/harvest()
new /obj/item/clothing/head/bearpelt(get_turf(src))
..()
/mob/living/simple_animal/hostile/bear/proc/set_stance(var/input)
var/previous = stance
stance = input
@@ -30,6 +30,10 @@
tameable = FALSE
meat_type = /obj/item/weapon/reagent_containers/food/snacks/bearmeat
butchering_products = list(/obj/item/clothing/head/bearpelt = 1)
meat_amount = 5
/mob/living/simple_animal/hostile/commanded/bear/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone)
. = ..()
if(!.)
@@ -47,6 +47,8 @@
destroy_surroundings = FALSE
attack_emote = "growls at"
butchering_products = list(/obj/item/stack/material/animalhide = 2)
/mob/living/simple_animal/hostile/commanded/dog/verb/befriend()
set name = "Befriend Dog"
set category = "IC"
@@ -131,4 +133,6 @@
harm_intent_damage = 5
melee_damage_lower = 5
melee_damage_upper = 5
melee_damage_upper = 5
butchering_products = list(/obj/item/stack/material/animalhide = 2)
@@ -18,7 +18,7 @@
response_help = "pets"
response_disarm = "shoves"
response_harm = "harmlessly punches"
maxHealth = 100
maxHealth = 1000
health = 1000
harm_intent_damage = 0
melee_damage_lower = 30
@@ -26,6 +26,7 @@
attack_sound = 'sound/misc/monstergrowl.ogg'
faction = "lizard"
butchering_products = list(/obj/item/stack/material/animalhide/lizard = 20)
/mob/living/simple_animal/hostile/biglizard/AttackingTarget()
. =..()
@@ -104,6 +104,12 @@
var/flying = FALSE //if they can fly, which stops them from falling down and allows z-space travel
var/has_udder = FALSE
var/datum/reagents/udder = null
var/milk_type = "milk"
var/list/butchering_products //if anything else is created when butchering this creature, like bones and leather
/mob/living/simple_animal/proc/beg(var/atom/thing, var/atom/holder)
visible_emote("gazes longingly at [holder]'s [thing]",0)
@@ -141,6 +147,10 @@
if (can_nap)
verbs += /mob/living/simple_animal/lay_down
if(has_udder)
udder = new(50)
udder.my_atom = src
/mob/living/simple_animal/Move(NewLoc, direct)
. = ..()
if(.)
@@ -239,6 +249,12 @@
if(!atmos_suitable)
apply_damage(unsuitable_atoms_damage, OXY, used_weapon = "Atmosphere")
if(has_udder)
if(stat == CONSCIOUS)
if(udder && prob(5))
udder.add_reagent(milk_type, rand(5, 10))
return 1
/mob/living/simple_animal/think()
@@ -411,6 +427,17 @@ 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(has_udder)
var/obj/item/weapon/reagent_containers/glass/G = O
if(stat == CONSCIOUS && istype(G) && G.is_open_container())
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
if(G.reagents.total_volume >= G.volume)
to_chat(user, "<span class='warning'>The [O] is full.</span>")
if(!transfered)
to_chat(user, "<span class='warning'>The udder is dry.</span>")
return
if(istype(O, /obj/item/weapon/reagent_containers) || istype(O, /obj/item/stack/medical) || istype(O,/obj/item/weapon/gripper/))
..()
poke()
@@ -546,9 +573,14 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
var/actual_meat_amount = max(1,(meat_amount*0.75))
if(meat_type && actual_meat_amount>0 && (stat == DEAD))
for(var/i=0;i<actual_meat_amount;i++)
var/obj/item/meat = new meat_type(get_turf(src))
if (meat.name == "meat")
meat.name = "[src.name] [meat.name]"
new meat_type(get_turf(src))
if(butchering_products)
for(var/path in butchering_products)
var/number = butchering_products[path]
for(var/i in 1 to number)
new path(get_turf(src))
if(issmall(src))
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
@@ -1015,13 +1015,10 @@
glass_desc = "White and nutritious soy goodness!"
/datum/reagent/drink/milk/adhomai
name = "Fermented Fatshouters Milk"
id = "adhomai_milk"
description = "A tajaran made fermented dairy product, traditionally consumed by nomadic population of Adhomai."
taste_description = "sour milk"
glass_name = "glass of fermented fatshouters milk"
glass_desc = "A tajaran made fermented dairy product, traditionally consumed by nomadic population of Adhomai."
name = "Fatshouters Milk"
id = "fatshouter_milk"
description = "An opaque white liquid produced by the mammary glands of native adhomian animal."
taste_description = "fatty milk"
/datum/reagent/drink/milk/adhomai/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
@@ -1030,6 +1027,15 @@
if(alien != IS_TAJARA && prob(5))
H.delayed_vomit()
/datum/reagent/drink/milk/adhomai/fermented
name = "Fermented Fatshouters Milk"
id = "adhomai_milk"
description = "A tajaran made fermented dairy product, traditionally consumed by nomadic population of Adhomai."
taste_description = "sour milk"
glass_name = "glass of fermented fatshouters milk"
glass_desc = "A tajaran made fermented dairy product, traditionally consumed by nomadic population of Adhomai."
/datum/reagent/drink/milk/beetle
name = "Hakhma Milk"
id = "beetle_milk"
@@ -3211,3 +3211,11 @@
result = "kois_odyne"
result_amount = 3
required_reagents = list("tonic" = 1, "koispaste" = 1, "toothpaste" = 1)
/datum/chemical_reaction/adhomai_milk
name = "Fermented Fatshouters Milk"
id = "adhomai_milk"
result = "adhomai_milk"
required_reagents = list("fatshouter_milk" = 1)
catalysts = list("enzyme" = 5)
result_amount = 1
@@ -88,8 +88,8 @@
reagents.add_reagent("undead_ichor", 5)
/obj/item/weapon/reagent_containers/food/snacks/meat/adhomai
name = "snow strider meat"
desc = "A slab of nav'twir's meat, an animal native from Adhomai."
name = "adhomian meat"
desc = "A slab of an animal native from Adhomai."
icon_state = "adhomai_meat"
description_fluff = "For much of Tajaran history, the herbivorous and graceful Nav'twir were the main prey of Tajaran hunters, and still are today in rural areas of the planet. \
Their meat was nice and hearty and healthy, and the thick furs were good for making clothes to keep themselves warm in the snow. As the modern ages came, the hunting of the \
+7
View File
@@ -0,0 +1,7 @@
author: Alberyk, Kyres1
delete-after: True
changes:
- rscadd: "You can now butcher some animals for their hide."
- rscadd: "Added a couple of adhomian animals."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 270 KiB