Merge pull request #6404 from Ketrai/iwantdie

adds food cubes.
This commit is contained in:
Novacat
2020-01-09 22:51:32 -05:00
committed by GitHub
9 changed files with 162 additions and 8 deletions
+86 -4
View File
@@ -117,23 +117,26 @@
desc = "A basket of chicken wings! Get some before they're all gone! Or maybe you're too late..."
icon = 'icons/obj/food_vr.dmi'
icon_state = "wings5"
var/icon_base = "wings"
var/startswith = 5
max_storage_space = ITEMSIZE_COST_SMALL * 5
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/chickenwing)
starts_with = list(
/obj/item/weapon/reagent_containers/food/snacks/chickenwing = 5
)
foldable = null
/obj/item/weapon/storage/box/wings/Initialize()
..()
for(var/i=1 to startswith)
new /obj/item/weapon/reagent_containers/food/snacks/chickenwing(src)
update_icon()
return
/obj/item/weapon/storage/box/wings/update_icon()
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/chickenwing/W in contents)
for(var/obj/item/weapon/reagent_containers/food/snacks/W in contents)
i++
icon_state = "wings[i]"
icon_state = "[icon_base][i]"
/obj/item/weapon/reagent_containers/food/snacks/chickenwing
name = "chicken wing"
@@ -391,7 +394,7 @@
icon_state = "sharkmeat_chunk"
nutriment_amt = 15
w_class = ITEMSIZE_LARGE
slice_path = /obj/item/weapon/reagent_containers/food/snacks/sharkmeat
slice_path = /obj/item/weapon/reagent_containers/food/snacks/carpmeat/fish/sharkmeat
slices_num = 5
/obj/item/weapon/reagent_containers/food/snacks/sliceable/sharkchunk/Initialize()
@@ -678,3 +681,82 @@
/obj/item/pizzabox/meat/Initialize()
pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatcargo(src)
// food cubes
/obj/item/weapon/reagent_containers/food/snacks/cube
name = "protein cube"
desc = "A colony of meat cells, Just add water!"
icon = 'icons/obj/food_vr.dmi'
icon_state = "proteincube"
w_class = ITEMSIZE_TINY
flags = OPENCONTAINER
bitesize = 12
filling_color = "#ADAC7F"
center_of_mass = list("x"=16, "y"=14)
var/food_type = "/obj/item/weapon/reagent_containers/food/snacks/proteinslab"
/obj/item/weapon/reagent_containers/food/snacks/cube/Initialize()
. = ..()
/obj/item/weapon/reagent_containers/food/snacks/cube/proc/Expand()
src.visible_message("<span class='notice'>\The [src] expands!</span>")
new food_type(get_turf(src))
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/cube/on_reagent_change()
if(reagents.has_reagent("water"))
Expand()
/obj/item/weapon/reagent_containers/food/snacks/cube/protein
/obj/item/weapon/reagent_containers/food/snacks/cube/protein/Initialize()
. = ..()
reagents.add_reagent("meatcolony", 5)
/obj/item/weapon/reagent_containers/food/snacks/proteinslab
name = "Protein slab"
desc = "A slab of near pure protein, extremely artificial, and thoroughly disgusting."
icon = 'icons/obj/food_vr.dmi'
icon_state = "proteinslab"
bitesize = 10
nutriment_amt = 5
nutriment_desc = list("bitter chyme" = 50)
/obj/item/weapon/reagent_containers/food/snacks/proteinslab/Initialize()
..()
reagents.add_reagent("protein", 30)
/obj/item/weapon/reagent_containers/food/snacks/cube/nutriment
name = "Nutriment cube"
desc = "A colony of plant cells, Just add water!"
icon_state = "nutrimentcube"
food_type = "/obj/item/weapon/reagent_containers/food/snacks/nutrimentslab"
/obj/item/weapon/reagent_containers/food/snacks/cube/nutriment/Initialize()
. = ..()
reagents.add_reagent("plantcolony", 5)
/obj/item/weapon/reagent_containers/food/snacks/nutrimentslab
name = "Nutriment slab"
desc = "A slab of near pure plant-based nutrients, extremely artificial, and thoroughly disgusting."
icon = 'icons/obj/food_vr.dmi'
icon_state = "nutrimentslab"
bitesize = 10
nutriment_amt = 20
nutriment_desc = list("compost" = 50)
/obj/item/weapon/storage/box/wings/tray //Might as well re-use this code.
name = "ration cube tray"
desc = "A tray of food cubes, the label warns not to consume before adding water or mixing with virusfood."
icon_state = "tray8"
icon_base = "tray"
startswith = 8
w_class = ITEMSIZE_SMALL
max_storage_space = ITEMSIZE_COST_TINY * 8
starts_with = list(
/obj/item/weapon/reagent_containers/food/snacks/cube/protein = 4,
/obj/item/weapon/reagent_containers/food/snacks/cube/nutriment = 4
)
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/cube/protein,
/obj/item/weapon/reagent_containers/food/snacks/cube/nutriment)
@@ -223,3 +223,10 @@
/obj/item/weapon/reagent_containers/food/snacks/pizza/vegfrozen
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegcargo
//// food cubes
/datum/recipe/foodcubes
reagents = list("enzyme" = 20,"virusfood" = 5, "nutriment" = 15, "protein" = 15) // labor intensive
items = list()
result = /obj/item/weapon/storage/box/wings/tray
@@ -1,12 +1,39 @@
/datum/reagent/nutriment
nutriment_factor = 10
/datum/reagent/toxin/meatcolony
name = "A colony of meat cells"
id = "meatcolony"
description = "Specialised cells designed to produce a large amount of meat once activated, whilst manufacturers have managed to stop these cells from taking over the body when ingested, it's still poisonous."
taste_description = "a fibrous mess"
reagent_state = LIQUID
color = "#ff2424"
strength = 10
/datum/reagent/toxin/plantcolony
name = "A colony of plant cells"
id = "plantcolony"
description = "Specialised cells designed to produce a large amount of nutriment once activated, whilst manufacturers have managed to stop these cells from taking over the body when ingested, it's still poisonous."
taste_description = "a fibrous mess"
reagent_state = LIQUID
color = "#7ce01f"
strength = 10
/datum/reagent/nutriment/grubshake
name = "Grub shake"
id = "grubshake"
description = "An odd fluid made from grub guts, supposedly filling."
taste_description = "sparkles"
taste_mult = 1.3
nutriment_factor = 5
color = "#fff200"
/datum/reagent/lipozine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.nutrition = max(M.nutrition - 20 * removed, 0)
M.overeatduration = 0
if(M.nutrition < 0)
M.nutrition = 0
/datum/reagent/ethanol/deathbell
name = "Deathbell"
id = "deathbell"
@@ -20,7 +47,7 @@
glass_name = "Deathbell"
glass_desc = "The perfect blend of the most alcoholic things a bartender can get their hands on."
/datum/reagent/ethanol/deathbell/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
@@ -49,7 +76,7 @@
if(M.species.gets_food_nutrition) //it's still food!
switch(alien)
if(IS_DIONA) //Diona don't get any nutrition from nutriment or protein.
if(IS_SKRELL)
if(IS_SKRELL)
M.adjustToxLoss(0.25 * removed) //Equivalent to half as much protein, since it's half protein.
if(IS_TESHARI)
M.nutrition += (alt_nutriment_factor * 1.2 * removed) //Give them the same nutrition they would get from protein.
@@ -57,7 +84,7 @@
M.nutrition += (alt_nutriment_factor * 1.125 * removed) //Give them the same nutrition they would get from protein.
//Takes into account the 0.5 factor for all nutriment which is applied on top of the 2.25 factor for protein.
//Chimera don't need their own case here since their factors for nutriment and protein cancel out.
else
else
M.nutrition += (alt_nutriment_factor * removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -129,6 +129,22 @@
required_reagents = list("whiskey" = 1, "protein" = 1)
result_amount = 2
///////////////////////////////////////////////////////////////////////////////////
/// Reagent colonies.
/datum/chemical_reaction/meatcolony
name = "protein"
id = "meatcolony"
result = "protein"
required_reagents = list("meatcolony" = 5, "virusfood" = 5)
result_amount = 60
/datum/chemical_reaction/plantcolony
name = "nutriment"
id = "plantcolony"
result = "nutriment"
required_reagents = list("plantcolony" = 5, "virusfood" = 5)
result_amount = 60
///////////////////////////////
//SLIME CORES BELOW HERE///////
///////////////////////////////