mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 16:08:32 +01:00
finishing what i started (and cake people!))
hopefully this fixes some bugs that were made present due to a botched PR I did a few days ago, as well as properly implementing craftable cake people (or cake golems, if you wanna call them that). sadly the code that was present when i tried to make my modifications for some reason does not give the person attempting to eat the cake person any nutriment or vitamins, so i would appreciate it if a more experienced coder gave me a hint on how to fix this, or just fixed it themselves.
This commit is contained in:
@@ -190,16 +190,16 @@
|
||||
result = /obj/item/reagent_containers/food/snacks/store/cake/trumpet
|
||||
subcategory = CAT_CAKE
|
||||
|
||||
/datum/crafting_recipe/food/cak
|
||||
/datum/crafting_recipe/food/cakeperson
|
||||
name = "Living cake person"
|
||||
reqs = list(
|
||||
/obj/item/organ/brain = 1,
|
||||
/obj/item/organ/heart = 1,
|
||||
/obj/item/reagent_containers/food/snacks/store/cake/birthday = 3, //the cake person is quite fat, so more cake is needed. good thing b-day cakes are in mealvendors
|
||||
/obj/item/reagent_containers/food/snacks/store/cake/birthday = 1,
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab = 3,
|
||||
/datum/reagent/blood = 30,
|
||||
/datum/reagent/consumable/sprinkles = 5,
|
||||
/datum/reagent/teslium = 1 //To shock the whole thing into life
|
||||
)
|
||||
// result = /mob/living/simple_animal/cakegolem
|
||||
// subcategory = CAT_CAKE //Cat! Haha, get it? CAT? GET IT? We get it - Love Catpeople
|
||||
result = /mob/living/simple_animal/friendly/cakegolem
|
||||
subcategory = CAT_CAKE //Cat! Haha, get it? CAT? GET IT? We get it - Love Catpeople
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/mob/living/simple_animal/friendly/cakegolem //I told you I'd do it, Remie //sorry Remie -Eye
|
||||
name = "Puffball"
|
||||
desc = "It's a person made out of cake."
|
||||
icon = 'GainStation13/icons/mob/cakegolem.dmi'
|
||||
icon_state = "cakegolem"
|
||||
icon_living = "cakegolem"
|
||||
icon_dead = "cakegolem_dead"
|
||||
health = 200
|
||||
maxHealth = 200 //health buffed because you all know how people get here -Eye
|
||||
gender = FEMALE
|
||||
harm_intent_damage = 10
|
||||
butcher_results = list(/obj/item/organ/brain = 1, /obj/item/organ/heart = 1, /obj/item/reagent_containers/food/snacks/cakeslice/birthday = 9, \
|
||||
/obj/item/reagent_containers/food/snacks/meat/slab = 2)
|
||||
response_harm = "takes a bite out of"
|
||||
attacked_sound = 'sound/items/eatfood.ogg'
|
||||
deathmessage = "loses its false life and collapses!"
|
||||
death_sound = "bodyfall"
|
||||
//held_icon = "cakegolem"
|
||||
|
||||
/mob/living/simple_animal/friendly/cakegolem/CheckParts(list/parts)
|
||||
..()
|
||||
var/obj/item/organ/brain/B = locate(/obj/item/organ/brain) in contents
|
||||
if(!B || !B.brainmob || !B.brainmob.mind)
|
||||
return
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
to_chat(src, "<span class='big bold'>You are a cake person!</span><b> You're a harmless cake/person hybrid that everyone loves. People can take bites out of you if they're hungry, but there is plenty of you to go around, and 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 = stripped_input(src, "Enter your name, or press \"Cancel\" to stick with Puffball.", "Name Change")
|
||||
if(new_name)
|
||||
to_chat(src, "<span class='notice'>Your name is now <b>\"new_name\"</b>!</span>")
|
||||
name = new_name
|
||||
|
||||
/mob/living/simple_animal/friendly/cakegolem/Life()
|
||||
..()
|
||||
if(stat)
|
||||
return
|
||||
if(health < maxHealth)
|
||||
adjustBruteLoss(-8) //Fast life regen
|
||||
for(var/obj/item/reagent_containers/food/snacks/donut/D in range(1, src)) //Frosts nearby donuts!
|
||||
if(!D.is_decorated)
|
||||
D.decorate_donut()
|
||||
|
||||
/mob/living/simple_animal/friendly/cakegolem/attack_hand(mob/living/L)
|
||||
. = ..()
|
||||
if(.) //the attack was blocked
|
||||
return
|
||||
if(L.a_intent == INTENT_HARM && L.reagents && !stat)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment, 0.4)
|
||||
L.reagents.add_reagent(/datum/reagent/consumable/nutriment/vitamin, 0.4)
|
||||
@@ -209,7 +209,7 @@
|
||||
/mob/living/simple_animal/hostile/lizard,
|
||||
/mob/living/simple_animal/pet/fox,
|
||||
/mob/living/simple_animal/butterfly,
|
||||
// /mob/living/simple_animal/cakegolem //pet/cat/cak,
|
||||
/mob/living/simple_animal/friendly/cakegolem //pet/cat/cak,
|
||||
/mob/living/simple_animal/chick)
|
||||
new_mob = new path(M.loc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user