Converts Lizards to Basic Mobs (#75515)

This was pretty simple since they didn't have too much custom behavior,
and whatever they did have already had AI behavior. I got really burned
out the last two times I wrote intricate AI action/decision behaviors so
I'm just taking it light and doing the bare minimum.

one day our shackles will be free of the simple animal scourge. they're
also a bit more intelligent, and i daresay a bit cuter too now.

also that lizard gib animation has been sitting there for god knows how
long completely unseen, so let's actually hook it into the mob.
This commit is contained in:
san7890
2023-05-19 00:52:20 +00:00
committed by GitHub
parent bb15a56637
commit e2bc712714
23 changed files with 111 additions and 91 deletions
@@ -0,0 +1,85 @@
/*
* ## Lizards
*
* Green things that crawl around and eat bugs. Not to be confused with the human species lizardpersons, these are just small little fellas.
*/
/mob/living/basic/lizard
name = "Lizard"
desc = "A cute tiny lizard."
icon_state = "lizard"
icon_living = "lizard"
icon_dead = "lizard_dead"
icon_gib = "lizard_gib"
speak_emote = list("hisses")
health = 10
maxHealth = 10
faction = list(FACTION_LIZARD)
attack_verb_continuous = "bites"
attack_verb_simple = "bite"
melee_damage_lower = 1
melee_damage_upper = 2
response_help_continuous = "pets"
response_help_simple = "pet"
response_disarm_continuous = "shoos"
response_disarm_simple = "shoo"
response_harm_continuous = "stomps on"
response_harm_simple = "stomp on"
density = FALSE
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_SMALL
mob_biotypes = MOB_ORGANIC|MOB_BEAST|MOB_REPTILE
gold_core_spawnable = FRIENDLY_SPAWN
obj_damage = 0
environment_smash = ENVIRONMENT_SMASH_NONE
can_be_held = TRUE
ai_controller = /datum/ai_controller/basic_controller/lizard
/// Typecache of things that we seek out to eat. Yummy.
var/static/list/edibles = typecacheof(list(
/mob/living/basic/cockroach,
/mob/living/simple_animal/butterfly,
))
/mob/living/basic/lizard/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
AddElement(/datum/element/pet_bonus, "sticks its tongue out contentedly!")
AddElement(/datum/element/basic_eating, 5, 0, null, edibles)
ai_controller.set_blackboard_key(BB_BASIC_FOODS, edibles)
/datum/ai_controller/basic_controller/lizard
blackboard = list(
BB_TARGETTING_DATUM = new /datum/targetting_datum/basic/allow_items(),
)
ai_traits = STOP_MOVING_WHEN_PULLED
ai_movement = /datum/ai_movement/basic_avoidance
idle_behavior = /datum/idle_behavior/idle_random_walk
planning_subtrees = list(
/datum/ai_planning_subtree/find_food,
/datum/ai_planning_subtree/basic_melee_attack_subtree,
/datum/ai_planning_subtree/random_speech/lizard,
)
//Subtypes of lizards follow.
/// Lizards that can survive in space.
/mob/living/basic/lizard/space
name = "Space Lizard"
desc = "A cute tiny lizard with a tiny space helmet."
icon_state = "lizard_space"
icon_living = "lizard_space"
unsuitable_atmos_damage = 0
minimum_survivable_temperature = TCMB
maximum_survivable_temperature = T0C + 40
/// Janitor's pet lizard.
/mob/living/basic/lizard/wags_his_tail
name = "Wags-His-Tail"
desc = "The janitorial department's trusty pet lizard."
/// Another pet lizard for the janitor.
/mob/living/basic/lizard/eats_the_roaches
name = "Eats-The-Roaches"
desc = "The janitorial department's less trusty pet lizard."