Skip to content

Commit

Permalink
Kobun the breaddog (tgstation#68906)
Browse files Browse the repository at this point in the history
Adds third kitchen craftable animal - Kobun the bread dog. Currently we have Keeki the cak and Terrygold the butter bear. Keeki is best friend of sec due to frosting and Terrygold seems like second clown with its slips, Kobun is designed as help to Psychologist due to powerfull mood aura. Mood granted by aura stays as long as you are within range of aura and when you step out is expires in 10 seconds. You can trade mood aura for a possibility of wearing Kobun as hat

We already have two crafting animals, one made out of cake and another out of butter so why not add another one made out bread? Kobun was made to help people with low mood by giving it mood aura that will bring them back onto their feets
  • Loading branch information
CursedBirb authored Aug 14, 2022
1 parent 91db938 commit e86982d
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 13 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define span_boldnicegreen(str) ("<span class='boldnicegreen'>" + str + "</span>")
#define span_boldnotice(str) ("<span class='boldnotice'>" + str + "</span>")
#define span_boldwarning(str) ("<span class='boldwarning'>" + str + "</span>")
#define span_boldbig(str) ("<span class='big bold'>" + str + "</span>")
#define span_centcomradio(str) ("<span class='centcomradio'>" + str + "</span>")
#define span_changeling(str) ("<span class='changeling'>" + str + "</span>")
#define span_clown(str) ("<span class='clown'>" + str + "</span>")
Expand Down
1 change: 1 addition & 0 deletions code/datums/memory/memory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
/mob/living/simple_animal/pet/fox,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/pet/cat/cak,
/mob/living/simple_animal/pet/dog/breaddog,
/mob/living/simple_animal/chick,
/mob/living/basic/cow/wisdom,
/obj/item/skub,
Expand Down
5 changes: 5 additions & 0 deletions code/datums/mood_events/generic_positive_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,8 @@
description = "Fishing is relaxing."
mood_change = 5
timeout = 3 MINUTES

/datum/mood_event/kobun
description = "You are all loved by the Universe. I’m not alone, and you aren’t either."
mood_change = 14
timeout = 10 SECONDS
13 changes: 13 additions & 0 deletions code/modules/food_and_drinks/recipes/tablecraft/recipes_bread.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,19 @@
result = /obj/item/food/raw_breadstick
subcategory = CAT_BREAD

/datum/crafting_recipe/food/breaddog
name = "Living dog/bread hybrid"
reqs = list(
/obj/item/organ/internal/brain = 1,
/obj/item/organ/internal/heart = 1,
/obj/item/food/bread = 2,
/obj/item/food/meat/slab = 3,
/datum/reagent/blood = 30,
/datum/reagent/teslium = 1 //To shock the whole thing into life
)
result = /mob/living/simple_animal/pet/dog/breaddog
subcategory = CAT_BREAD

////////////////////////////////////////////////TOAST////////////////////////////////////////////////

/datum/crafting_recipe/food/slimetoast
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@
/mob/living/simple_animal/pet/fox,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/pet/cat/cak,
/mob/living/simple_animal/pet/dog/breaddog,
/mob/living/simple_animal/chick,
)
new_mob = new path(loc)
Expand Down
13 changes: 7 additions & 6 deletions code/modules/mob/living/simple_animal/friendly/cat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,17 @@

/mob/living/simple_animal/pet/cat/cak/CheckParts(list/parts)
..()
var/obj/item/organ/internal/brain/B = locate(/obj/item/organ/internal/brain) in contents
if(!B || !B.brainmob || !B.brainmob.mind)
var/obj/item/organ/internal/brain/candidate = locate(/obj/item/organ/internal/brain) in contents
if(!candidate || !candidate.brainmob || !candidate.brainmob.mind)
return
B.brainmob.mind.transfer_to(src)
to_chat(src, "<span class='big bold'>You are a cak!</span><b> You're a harmless cat/cake hybrid that everyone loves. People can take bites out of you if they're hungry, but you regenerate health \
candidate.brainmob.mind.transfer_to(src)
to_chat(src, "[span_boldbig("You are a cak!")]<b> You're a harmless cat/cake hybrid that everyone loves. People can take bites out of you if they're hungry, but you regenerate health \
so quickly that it generally doesn't matter. You're remarkably resilient to any damage besides this and it's hard for you to really die at all. You should go around and bring happiness and \
free cake to the station!</b>")
var/new_name = tgui_input_text(src, "Enter your name, or press \"Cancel\" to stick with Keeki.", "Name Change", max_length = MAX_NAME_LEN)
var/default_name = "Keeki"
var/new_name = sanitize_name(reject_bad_text(tgui_input_text(src, "You are the [name]. Would you like to change your name to something else?", "Name change", default_name, MAX_NAME_LEN)), cap_after_symbols = FALSE)
if(new_name)
to_chat(src, span_notice("Your name is now <b>\"new_name\"</b>!"))
to_chat(src, span_notice("Your name is now <b>[new_name]</b>!"))
name = new_name

/mob/living/simple_animal/pet/cat/cak/Life(delta_time = SSMOBS_DT, times_fired)
Expand Down
55 changes: 54 additions & 1 deletion code/modules/mob/living/simple_animal/friendly/dog.dm
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
/mob/living/simple_animal/pet/dog/corgi/puppy/void/Process_Spacemove(movement_dir = 0, continuous_move = FALSE)
return 1 //Void puppies can navigate space.


//LISA! SQUEEEEEEEEE~
/mob/living/simple_animal/pet/dog/corgi/lisa
name = "Lisa"
Expand Down Expand Up @@ -711,3 +710,57 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
/mob/living/simple_animal/pet/dog/corgi/lisa/Life(delta_time = SSMOBS_DT, times_fired)
. = ..()
make_babies()

/mob/living/simple_animal/pet/dog/breaddog //Most of the code originates from Cak
name = "Kobun"
desc = "It is a dog made out of bread. 'The universe is definitely half full'."
icon_state = "breaddog"
icon_living = "breaddog"
icon_dead = "breaddog_dead"
head_icon = 'icons/mob/pets_held_head.dmi'
health = 50
maxHealth = 50
gender = NEUTER
harm_intent_damage = 10
butcher_results = list(/obj/item/organ/internal/brain = 1, /obj/item/organ/internal/heart = 1, /obj/item/food/breadslice = 3, \
/obj/item/food/meat/slab = 2)
response_harm_continuous = "takes a bite out of"
response_harm_simple = "take a bite out of"
attacked_sound = 'sound/items/eatfood.ogg'
held_state = "breaddog"
worn_slot_flags = ITEM_SLOT_HEAD

/mob/living/simple_animal/pet/dog/breaddog/add_cell_sample()
return

/mob/living/simple_animal/pet/dog/breaddog/CheckParts(list/parts)
..()
var/obj/item/organ/internal/brain/candidate = locate(/obj/item/organ/internal/brain) in contents
if(!candidate || !candidate.brainmob || !candidate.brainmob.mind)
return
candidate.brainmob.mind.transfer_to(src)
to_chat(src, "[span_boldbig("You are a bread dog!")]<b> You're a harmless dog/bread hybrid that everyone loves. People can take bites out of you if they're hungry, but you regenerate health \
so quickly that it generally doesn't matter. You're remarkably resilient to any damage besides this and it's hard for you to really die at all. You should go around and bring happiness and \
free bread to the station! 'I’m not alone, and you aren’t either'</b>")
var/default_name = "Kobun"
var/new_name = sanitize_name(reject_bad_text(tgui_input_text(src, "You are the [name]. Would you like to change your name to something else?", "Name change", default_name, MAX_NAME_LEN)), cap_after_symbols = FALSE)
if(new_name)
to_chat(src, span_notice("Your name is now <b>[new_name]</b>!"))
name = new_name

/mob/living/simple_animal/pet/dog/breaddog/Life(delta_time = SSMOBS_DT, times_fired)
..()
if(stat)
return

if(health < maxHealth)
adjustBruteLoss(-4 * delta_time) //Fast life regen

for(var/mob/living/carbon/humanoid_entities in view(3, src)) //Mood aura which stay as long you do not wear Sanallite as hat or carry(I will try to make it work with hat someday(obviously weaker than normal one))
humanoid_entities.add_mood_event("kobun", /datum/mood_event/kobun)

/mob/living/simple_animal/pet/dog/breaddog/attack_hand(mob/living/user, list/modifiers)
..()
if(user.combat_mode && user.reagents && !stat)
user.reagents.add_reagent(/datum/reagent/consumable/nutriment, 0.4)
user.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.4)
13 changes: 7 additions & 6 deletions code/modules/mob/living/simple_animal/hostile/bear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,17 @@

/mob/living/simple_animal/hostile/bear/butter/CheckParts(list/parts) //Borrowed code from Cak, allows the brain used to actually control the bear.
..()
var/obj/item/organ/internal/brain/B = locate(/obj/item/organ/internal/brain) in contents
if(!B || !B.brainmob || !B.brainmob.mind)
var/obj/item/organ/internal/brain/candidate = locate(/obj/item/organ/internal/brain) in contents
if(!candidate || !candidate.brainmob || !candidate.brainmob.mind)
return
B.brainmob.mind.transfer_to(src)
to_chat(src, "<span class='big bold'>You are a butter bear!</span><b> You're a mostly harmless bear/butter hybrid that everyone loves. People can take bites out of you if they're hungry, but you regenerate health \
candidate.brainmob.mind.transfer_to(src)
to_chat(src, "[span_boldbig("You are a butter bear!")]<b> You're a mostly harmless bear/butter hybrid that everyone loves. People can take bites out of you if they're hungry, but you regenerate health \
so quickly that it generally doesn't matter. You're remarkably resilient to any damage besides this and it's hard for you to really die at all. You should go around and bring happiness and \
free butter to the station!</b>")
var/new_name = sanitize_name(tgui_input_text(src, "Enter your name, or press \"Cancel\" to stick with Terrygold.", "Name Change"))
var/default_name = "Terrygold"
var/new_name = sanitize_name(reject_bad_text(tgui_input_text(src, "You are the [name]. Would you like to change your name to something else?", "Name change", default_name, MAX_NAME_LEN)), cap_after_symbols = FALSE)
if(new_name)
to_chat(src, span_notice("Your name is now <b>\"new_name\"</b>!"))
to_chat(src, span_notice("Your name is now <b>[new_name]</b>!"))
name = new_name

/mob/living/simple_animal/hostile/bear/butter/AttackingTarget() //Makes the butter bear's attacks against vertical targets slip said targets
Expand Down
Binary file modified icons/mob/pets.dmi
Binary file not shown.
Binary file added icons/mob/pets_held_head.dmi
Binary file not shown.
Binary file modified icons/mob/pets_held_lh.dmi
Binary file not shown.
Binary file modified icons/mob/pets_held_rh.dmi
Binary file not shown.

0 comments on commit e86982d

Please sign in to comment.