Fixes Spirit for AI Overhaul

- Also fixes an error with Phi's ring
This commit is contained in:
Unknown
2019-01-22 12:05:36 -05:00
committed by Novacat
parent fcfba922bf
commit de18c9321f
4 changed files with 76 additions and 8 deletions

View File

@@ -21,6 +21,9 @@
has_langs = list("Cat") has_langs = list("Cat")
var/mob/living/friend = null // Our best pal, who we'll follow. Meow. var/mob/living/friend = null // Our best pal, who we'll follow. Meow.
var/befriend_job = null //VOREStation Edit - Lock befriending to this job
var/friend_name = null //VOREStation Edit - Lock befriending to this character
/mob/living/simple_mob/animal/passive/cat/handle_special() /mob/living/simple_mob/animal/passive/cat/handle_special()
if(!stat && prob(2)) // spooky if(!stat && prob(2)) // spooky
@@ -72,10 +75,15 @@
to_chat(L, span("warning", "\The [src] ignores you.")) to_chat(L, span("warning", "\The [src] ignores you."))
return return
friend = L //VOREStation Edit Start - Adds befriend_job and friend_name var checks
face_atom(L) if((!friend_name || L.real_name == friend_name) && (!befriend_job || L.job == befriend_job))
to_chat(L, span("notice", "\The [src] is now your friend! Meow.")) friend = L
visible_emote(pick("nuzzles [friend].", "brushes against [friend].", "rubs against [friend].", "purrs.")) face_atom(L)
to_chat(L, span("notice", "\The [src] is now your friend! Meow."))
visible_emote(pick("nuzzles [friend].", "brushes against [friend].", "rubs against [friend].", "purrs."))
else
to_chat(L, span("notice", "[src] ignores you."))
//VOREStation Edit End
if(has_AI()) if(has_AI())
var/datum/ai_holder/AI = ai_holder var/datum/ai_holder/AI = ai_holder
@@ -93,6 +101,7 @@
icon_living = "cat" icon_living = "cat"
icon_dead = "cat_dead" icon_dead = "cat_dead"
icon_rest = "cat_rest" icon_rest = "cat_rest"
befriend_job = "Chief Medical Officer" //VOREStation Edit
/mob/living/simple_mob/animal/passive/cat/kitten /mob/living/simple_mob/animal/passive/cat/kitten
name = "kitten" name = "kitten"
@@ -102,6 +111,7 @@
icon_living = "kitten" icon_living = "kitten"
icon_dead = "kitten_dead" icon_dead = "kitten_dead"
gender = NEUTER gender = NEUTER
holder_type = /obj/item/weapon/holder/cat/kitten //VOREStation Edit
/mob/living/simple_mob/animal/passive/cat/kitten/initialize() /mob/living/simple_mob/animal/passive/cat/kitten/initialize()
if(gender == NEUTER) if(gender == NEUTER)
@@ -125,7 +135,7 @@
icon_dead = "cat3_dead" icon_dead = "cat3_dead"
icon_rest = "cat3_rest" icon_rest = "cat3_rest"
holder_type = /obj/item/weapon/holder/cat/fluff/bones holder_type = /obj/item/weapon/holder/cat/fluff/bones
friend_name = "Erstatz Vryroxes" //VOREStation Edit
/datum/say_list/cat /datum/say_list/cat
speak = list("Meow!","Esp!","Purr!","HSSSSS") speak = list("Meow!","Esp!","Purr!","HSSSSS")
@@ -134,3 +144,7 @@
say_maybe_target = list("Meow?","Mew?","Mao?") say_maybe_target = list("Meow?","Mew?","Mao?")
say_got_target = list("MEOW!","HSSSS!","REEER!") say_got_target = list("MEOW!","HSSSS!","REEER!")
// VOREStation Edit - Adds generic tactical kittens
/obj/item/weapon/holder/cat/kitten
icon_state = "kitten"
w_class = ITEMSIZE_SMALL

View File

@@ -0,0 +1,54 @@
// Ascian's Tactical Kitten
/obj/item/weapon/holder/cat/fluff/tabiranth
name = "Spirit"
desc = "A small, inquisitive feline, who constantly seems to investigate his surroundings."
gender = MALE
icon_state = "kitten"
w_class = ITEMSIZE_SMALL
/mob/living/simple_mob/animal/passive/cat/tabiranth
name = "Spirit"
desc = "A small, inquisitive feline, who constantly seems to investigate his surroundings."
icon = 'icons/mob/custom_items_mob.dmi'
icon_state = "kitten"
item_state = "kitten"
icon_living = "kitten"
icon_dead = "kitten" //Teleports out
gender = MALE
holder_type = /obj/item/weapon/holder/cat/fluff/tabiranth
friend_name = "Ascian"
digestable = 0
meat_amount = 0
maxHealth = 50
health = 50
/mob/living/simple_mob/animal/passive/cat/tabiranth/handle_special()
. = ..()
if (has_AI() && friend)
var/friend_dist = get_dist(src,friend)
if (friend_dist <= 1)
if (friend.stat >= DEAD || friend.health <= config.health_threshold_softcrit)
if (prob((friend.stat < DEAD)? 50 : 15))
var/verb = pick("meows", "mews", "mrowls")
audible_emote(pick("[verb] in distress.", "[verb] anxiously."))
else
if (prob(5))
visible_emote(pick("nuzzles [friend].",
"brushes against [friend].",
"rubs against [friend].",
"purrs."))
else if (friend.health <= 50)
if (prob(10))
var/verb = pick("meows", "mews", "mrowls")
audible_emote("[verb] anxiously.")
//Emergency teleport - Until a spriter makes something better
/mob/living/simple_mob/animal/passive/cat/tabiranth/death(gibbed, deathmessage = "teleports away!")
overlays = list()
icon_state = ""
flick("kphaseout",src)
spawn(1 SECOND)
qdel(src) //Back from whence you came!
. = ..(FALSE, deathmessage)

View File

@@ -235,14 +235,13 @@
/obj/item/clothing/accessory/medal/bronze_heart, /obj/item/clothing/accessory/medal/bronze_heart,
/obj/item/clothing/gloves/ring/seal/signet/fluff/phi) /obj/item/clothing/gloves/ring/seal/signet/fluff/phi)
/* //VORESTATION AI TEMPORARY REMOVAL
// Tabiranth: Ascian // Tabiranth: Ascian
/obj/item/weapon/grenade/spawnergrenade/spirit /obj/item/weapon/grenade/spawnergrenade/spirit
name = "spirit's pet carrier" name = "spirit's pet carrier"
desc = "Contains kitten." desc = "Contains kitten."
spawner_type = /mob/living/simple_mob/cat/fluff/tabiranth spawner_type = /mob/living/simple_mob/animal/passive/cat/tabiranth
deliveryamt = 1 deliveryamt = 1
*/
/* /*
Swimsuits, for general use, to avoid arriving to work with your swimsuit. Swimsuits, for general use, to avoid arriving to work with your swimsuit.
*/ */

View File

@@ -2280,6 +2280,7 @@
#include "code\modules\mob\living\simple_mob\subtypes\animal\passive\penguin.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\passive\penguin.dm"
#include "code\modules\mob\living\simple_mob\subtypes\animal\pets\bird.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\pets\bird.dm"
#include "code\modules\mob\living\simple_mob\subtypes\animal\pets\cat.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\pets\cat.dm"
#include "code\modules\mob\living\simple_mob\subtypes\animal\pets\cat_vr.dm"
#include "code\modules\mob\living\simple_mob\subtypes\animal\pets\dog.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\pets\dog.dm"
#include "code\modules\mob\living\simple_mob\subtypes\animal\pets\fox_vr.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\pets\fox_vr.dm"
#include "code\modules\mob\living\simple_mob\subtypes\animal\pets\parrot.dm" #include "code\modules\mob\living\simple_mob\subtypes\animal\pets\parrot.dm"