This commit is contained in:
Putnam3145
2022-08-07 17:59:28 -07:00
382 changed files with 5255 additions and 2567 deletions
@@ -35,6 +35,9 @@
collar_type = "cat"
var/held_icon = "cat2"
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "mutedc4"
vocal_pitch = 1.4
vocal_pitch_range = 0.4
/mob/living/simple_animal/pet/cat/Initialize(mapload)
. = ..()
@@ -115,7 +118,7 @@
Read_Memory()
. = ..()
/mob/living/simple_animal/pet/cat/Runtime/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/cat/Runtime/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP)
@@ -136,6 +139,7 @@
..()
/mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory()
var/saved_color
if(fexists("data/npc_saves/Runtime.sav")) //legacy compatability to convert old format to new
var/savefile/S = new /savefile("data/npc_saves/Runtime.sav")
S["family"] >> family
@@ -146,14 +150,21 @@
return
var/list/json = json_decode(file2text(json_file))
family = json["family"]
saved_color = json["color"]
if(isnull(family))
family = list()
if(!isnull(saved_color))
add_atom_colour(json_decode(saved_color), FIXED_COLOUR_PRIORITY)
/mob/living/simple_animal/pet/cat/Runtime/proc/Write_Memory(dead)
var/json_file = file("data/npc_saves/Runtime.json")
var/list/file_data = list()
family = list()
if(!dead)
if(color)
file_data["color"] = json_encode(color)
else
file_data["color"] = null
for(var/mob/living/simple_animal/pet/cat/kitten/C in children)
if(istype(C,type) || C.stat || !C.z || !C.butcher_results) //That last one is a work around for hologram cats
continue
@@ -161,6 +172,8 @@
family[C.type] += 1
else
family[C.type] = 1
else
file_data["color"] = null
file_data["family"] = family
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
@@ -178,7 +191,7 @@
gold_core_spawnable = NO_SPAWN
unique_pet = TRUE
/mob/living/simple_animal/pet/cat/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/cat/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(!stat && !buckled && !client)
@@ -272,7 +285,7 @@
to_chat(src, "<span class='notice'>Your name is now <b>\"new_name\"</b>!</span>")
name = new_name
/mob/living/simple_animal/pet/cat/cak/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/cat/cak/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(stat)
@@ -30,7 +30,7 @@
. = ..()
AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS)
/mob/living/simple_animal/crab/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/crab/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
//CRAB movement
@@ -20,6 +20,9 @@
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "bullet"
vocal_speed = 6
/mob/living/simple_animal/pet/dog/ComponentInitialize()
. = ..()
AddElement(/datum/element/wuv, "yaps happily!", EMOTE_AUDIBLE, /datum/mood_event/pet_animal, "growls!", EMOTE_AUDIBLE)
@@ -424,7 +427,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
RemoveElement(/datum/element/mob_holder, held_icon)
AddElement(/datum/element/mob_holder, "old_corgi")
/mob/living/simple_animal/pet/dog/corgi/Ian/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/dog/corgi/Ian/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
@@ -438,6 +441,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
/mob/living/simple_animal/pet/dog/corgi/Ian/proc/Read_Memory()
set waitfor = FALSE
var/saved_color
if(fexists("data/npc_saves/Ian.sav")) //legacy compatability to convert old format to new
var/savefile/S = new /savefile("data/npc_saves/Ian.sav")
S["age"] >> age
@@ -452,12 +456,15 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
age = json["age"]
record_age = json["record_age"]
saved_head = json["saved_head"]
saved_color = json["color"]
if(isnull(age))
age = 0
if(isnull(record_age))
record_age = 1
if(saved_head)
place_on_head(new saved_head)
if(!isnull(saved_color))
add_atom_colour(json_decode(saved_color), FIXED_COLOUR_PRIORITY)
/mob/living/simple_animal/pet/dog/corgi/Ian/proc/Write_Memory(dead)
var/json_file = file("data/npc_saves/Ian.json")
@@ -472,10 +479,15 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
file_data["saved_head"] = inventory_head.type
else
file_data["saved_head"] = null
if(color)
file_data["color"] = json_encode(color)
else
file_data["color"] = null
else
file_data["age"] = 0
file_data["record_age"] = record_age
file_data["saved_head"] = null
file_data["color"] = null
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
@@ -553,7 +565,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
nofur = TRUE
unique_pet = TRUE
/mob/living/simple_animal/pet/dog/corgi/narsie/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/dog/corgi/narsie/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
for(var/mob/living/simple_animal/pet/P in range(1, src))
@@ -632,6 +644,8 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
mob_size = MOB_SIZE_SMALL
collar_type = "puppy"
vocal_pitch = 1.6
//puppies cannot wear anything.
/mob/living/simple_animal/pet/dog/corgi/puppy/Topic(href, href_list)
if(href_list["remove_inv"] || href_list["add_inv"])
@@ -653,6 +667,8 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
maxbodytemp = T0C + 40
held_icon = "void_puppy"
vocal_pitch = 0.6
/mob/living/simple_animal/pet/dog/corgi/puppy/void/Process_Spacemove(movement_dir = 0)
return 1 //Void puppies can navigate space.
@@ -679,7 +695,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
return
..()
/mob/living/simple_animal/pet/dog/corgi/Lisa/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/dog/corgi/Lisa/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
@@ -693,7 +709,7 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
setDir(i)
sleep(1)
/mob/living/simple_animal/pet/dog/pug/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/dog/pug/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(!stat && CHECK_MULTIPLE_BITFIELDS(mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) && !buckled)
@@ -178,7 +178,7 @@
/mob/living/simple_animal/drone/examine(mob/user)
. = list("<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <b>[src]</b>!")
. = list("<span class='info'>This is [icon2html(src, user)] \a <b>[src]</b>!")
//Hands
for(var/obj/item/I in held_items)
@@ -214,7 +214,7 @@
. += "<span class='deadsay'>A message repeatedly flashes on its display: \"REBOOT -- REQUIRED\".</span>"
else
. += "<span class='deadsay'>A message repeatedly flashes on its display: \"ERROR -- OFFLINE\".</span>"
. += "*---------*</span>"
. += "</span>"
/mob/living/simple_animal/drone/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt maintenance drones.
@@ -36,6 +36,7 @@
var/datum/reagent/milk_reagent = /datum/reagent/consumable/milk
footstep_type = FOOTSTEP_MOB_SHOE
vocal_bark_id = "banjoc3"
/mob/living/simple_animal/hostile/retaliate/goat/Initialize(mapload, /datum/reagent/milk_reagent)
udder = new (null, milk_reagent)
@@ -46,7 +47,7 @@
udder = null
return ..()
/mob/living/simple_animal/hostile/retaliate/goat/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/hostile/retaliate/goat/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(stat == CONSCIOUS)
@@ -143,6 +144,8 @@
blood_volume = BLOOD_VOLUME_NORMAL
footstep_type = FOOTSTEP_MOB_SHOE
vocal_bark_id = "mutedc2"
vocal_pitch = 1.2
/mob/living/simple_animal/cow/Initialize(mapload)
udder = new(null, milk_reagent)
@@ -160,7 +163,7 @@
else
return ..()
/mob/living/simple_animal/cow/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/cow/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(stat == CONSCIOUS)
@@ -247,6 +250,8 @@
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "squeak"
vocal_pitch = 1.4
/mob/living/simple_animal/chick/Initialize(mapload)
. = ..()
@@ -254,7 +259,7 @@
pixel_y = rand(0, 10)
AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS)
/mob/living/simple_animal/chick/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/chick/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(!stat && !ckey)
@@ -263,7 +268,7 @@
new /mob/living/simple_animal/chicken(src.loc)
qdel(src)
/mob/living/simple_animal/chick/holo/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/chick/holo/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
amount_grown = 0
@@ -309,6 +314,9 @@
var/static/chicken_count = 0
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "synthgrunt"
vocal_pitch = 1.4
vocal_pitch_range = 0.4
/mob/living/simple_animal/chicken/Initialize(mapload)
. = ..()
@@ -339,7 +347,7 @@
else
..()
/mob/living/simple_animal/chicken/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/chicken/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if((!stat && prob(3) && eggsleft > 0) && egg_type)
@@ -403,6 +411,8 @@
var/static/kiwi_count = 0
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "squeak"
vocal_pitch = 1.4
/mob/living/simple_animal/kiwi/Destroy()
--kiwi_count
@@ -414,7 +424,7 @@
AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS)
/mob/living/simple_animal/kiwi/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/kiwi/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if((!stat && prob(3) && eggsleft > 0) && egg_type)
@@ -481,6 +491,8 @@
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "squeak"
vocal_pitch = 1.4
/mob/living/simple_animal/babyKiwi/Initialize(mapload)
. = ..()
@@ -489,7 +501,7 @@
AddElement(/datum/element/ventcrawling, given_tier = VENTCRAWLER_ALWAYS)
/mob/living/simple_animal/babyKiwi/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/babyKiwi/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(!stat && !ckey)
@@ -557,3 +569,4 @@
maxHealth = 75
blood_volume = BLOOD_VOLUME_NORMAL
footstep_type = FOOTSTEP_MOB_SHOE
vocal_bark_id = "mutedc4"
@@ -23,6 +23,11 @@
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
vocal_bark_id = "bullet"
vocal_speed = 2
vocal_pitch = 1.6
vocal_pitch_range = 0.4
/mob/living/simple_animal/pet/fox/ComponentInitialize()
. = ..()
AddElement(/datum/element/mob_holder, "fox")
@@ -29,6 +29,8 @@
gold_core_spawnable = FRIENDLY_SPAWN
var/chew_probability = 1
faction = list("rat")
vocal_bark_id = "squeak"
vocal_pitch = 1.4
/mob/living/simple_animal/mouse/Initialize(mapload)
. = ..()
@@ -29,6 +29,8 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
pressure_resistance = 200
vocal_bark_id = "squeak"
vocal_pitch_range = 0.4
/mob/living/simple_animal/pet/plushie/ComponentInitialize()
. = ..()
@@ -72,7 +74,7 @@
qdel(src)
//low regen over time
/mob/living/simple_animal/pet/plushie/BiologicalLife(seconds, times_fired)
/mob/living/simple_animal/pet/plushie/BiologicalLife(delta_time, times_fired)
if(!(. = ..()))
return
if(health < maxHealth)