Fixes Some Null Tastes and Fruit Wine

This commit is contained in:
Fox McCloud
2019-09-01 18:59:13 -04:00
parent f281e42ee4
commit 94cd248b20
10 changed files with 42 additions and 46 deletions
+10 -11
View File
@@ -19,17 +19,16 @@
var/list/tastes // for example list("crisps" = 2, "salt" = 1)
/obj/item/reagent_containers/food/snacks/add_initial_reagents()
if(!list_reagents)
return
if(!tastes || !tastes.len)
return ..()
var/list/nutritious_reagents = list("nutriment", "vitamin", "protein", "plantmatter")
for(var/reagent_id in list_reagents)
var/amount = list_reagents[reagent_id]
if(reagent_id in nutritious_reagents)
reagents.add_reagent(reagent_id, amount, tastes.Copy())
else
reagents.add_reagent(reagent_id, amount)
if(tastes && tastes.len)
if(list_reagents)
for(var/rid in list_reagents)
var/amount = list_reagents[rid]
if(rid == "nutriment" || rid == "vitamin" || rid == "protein" || rid == "plantmatter")
reagents.add_reagent(rid, amount, tastes.Copy())
else
reagents.add_reagent(rid, amount)
else
..()
//Placeholder for effect that trigger on eating that aren't tied to reagents.
/obj/item/reagent_containers/food/snacks/proc/On_Consume(mob/M, mob/user)
+4 -1
View File
@@ -20,6 +20,9 @@
/obj/item/reagent_containers/food/snacks/grown/New(newloc, var/obj/item/seeds/new_seed = null)
..()
if(!tastes)
tastes = list("[name]" = 1)
if(new_seed)
seed = new_seed.Copy()
else if(ispath(seed))
@@ -68,7 +71,7 @@
if(!isturf(loc) || !(locate(/obj/structure/table) in loc) && !(locate(/obj/machinery/optable) in loc) && !(locate(/obj/item/storage/bag/tray) in loc))
to_chat(user, "<span class='warning'>You cannot slice [src] here! You need a table or at least a tray to do it.</span>")
return TRUE
return TRUE
var/slices_lost = 0
if(!inaccurate)
+10 -10
View File
@@ -160,23 +160,23 @@
return result
/obj/item/seeds/proc/prepare_result(var/obj/item/T)
/obj/item/seeds/proc/prepare_result(obj/item/T)
if(!T.reagents)
CRASH("[T] has no reagents.")
for(var/reagent_id in reagents_add)
var/amount = 1 + round(potency * reagents_add[reagent_id], 1)
for(var/rid in reagents_add)
var/amount = 1 + round(potency * reagents_add[rid], 1)
var/list/data = null
if(reagent_id == "blood") // Hack to make blood in plants always O-
if(rid == "blood") // Hack to make blood in plants always O-
data = list("blood_type" = "O-")
continue
var/list/nutritious_reagents = list("nutriment", "vitamin", "protein", "plantmatter")
if(reagent_id in nutritious_reagents)
if(rid == "nutriment" || rid == "vitamin" || rid == "protein" || rid == "plantmatter")
// apple tastes of apple.
if(istype(T, /obj/item/reagent_containers/food/snacks/grown))
var/obj/item/reagent_containers/food/snacks/grown/grown_edible = T
data = grown_edible.tastes
data = grown_edible.tastes.Copy()
T.reagents.add_reagent(reagent_id, amount, data)
return 1
T.reagents.add_reagent(rid, amount, data)
/// Setters procs ///
+1 -1
View File
@@ -27,7 +27,7 @@
var/drink_name = "Glass of ..what?"
var/drink_desc = "You can't really tell what this is."
var/taste_mult = 1 //how easy it is to taste - the more the easier
var/taste_description = "bitterness" //life's bitter by default. Cool points for using a span class for when you're tasting <span class='userdanger'>LIQUID FUCKING DEATH</span>
var/taste_description = "metaphorical salt"
/datum/reagent/Destroy()
. = ..()
@@ -1,7 +1,6 @@
/datum/reagent/consumable/drink/cold
name = "Cold drink"
adj_temp_cool = 5
taste_description = null
/datum/reagent/consumable/drink/cold/tonic
name = "Tonic Water"
@@ -25,7 +25,6 @@
reagent_state = SOLID
nutriment_factor = 15 * REAGENTS_METABOLISM
color = "#664330" // rgb: 102, 67, 48
taste_description = null
/datum/reagent/consumable/nutriment/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -389,7 +388,7 @@
description = "Heated beyond usefulness, this enzyme is now worthless."
reagent_state = LIQUID
color = "#282314" // rgb: 54, 94, 48
taste_description = null
taste_description = "sweetness"
/datum/reagent/consumable/dry_ramen
name = "Dry Ramen"
@@ -38,7 +38,6 @@
description = "A colorless, odorless gas."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
taste_description = null
taste_mult = 0
/datum/reagent/nitrogen
@@ -47,7 +46,6 @@
description = "A colorless, odorless, tasteless gas."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
taste_description = null
taste_mult = 0
/datum/reagent/hydrogen
@@ -56,7 +54,6 @@
description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
taste_description = null
taste_mult = 0
/datum/reagent/potassium
@@ -197,7 +194,7 @@
description = "A secondary amine, useful as a plant nutrient and as building block for other compounds."
reagent_state = LIQUID
color = "#322D00"
taste_description = null
taste_description = "iron"
/datum/reagent/oil
name = "Oil"
@@ -252,7 +249,7 @@
description = "A red-brown liquid element."
reagent_state = LIQUID
color = "#4E3A3A"
taste_description = null
taste_description = "chemicals"
/datum/reagent/phenol
name = "Phenol"
@@ -260,7 +257,7 @@
description = "Also known as carbolic acid, this is a useful building block in organic chemistry."
reagent_state = LIQUID
color = "#525050"
taste_description = null
taste_description = "acid"
/datum/reagent/ash
name = "Ash"
@@ -225,7 +225,7 @@
color = "#FF0000"
metabolization_rate = 4
process_flags = ORGANIC | SYNTHETIC
taste_description = null
taste_mult = 0
/datum/reagent/clf3/on_mob_life(mob/living/M)
if(M.on_fire)
@@ -219,7 +219,7 @@
description = "A silvery-white metallic chemical element in the actinide series, weakly radioactive."
reagent_state = SOLID
color = "#B8B8C0" // rgb: 184, 184, 192
taste_description = null
taste_mult = 0
/datum/reagent/uranium/on_mob_life(mob/living/M)
M.apply_effect(2, IRRADIATE, negate_armor = 1)
@@ -365,7 +365,7 @@
metabolization_rate = 0.1
penetrates_skin = TRUE
can_synth = FALSE
taste_description = null
taste_mult = 0
/datum/reagent/polonium/on_mob_life(mob/living/M)
M.apply_effect(8, IRRADIATE, negate_armor = 1)
@@ -379,7 +379,7 @@
color = "#E7C4C4"
metabolization_rate = 0.2
overdose_threshold = 40
taste_description = null
taste_mult = 0
/datum/reagent/histamine/reaction_mob(mob/living/M, method=TOUCH, volume) //dumping histamine on someone is VERY mean.
if(iscarbon(M))
@@ -652,7 +652,7 @@
reagent_state = LIQUID
color = "#7F10C0"
can_synth = FALSE
taste_description = null
taste_mult = 0
/datum/reagent/initropidril/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -684,7 +684,6 @@
reagent_state = LIQUID
color = "#1E4664"
metabolization_rate = 0.2
taste_description = null
taste_mult = 0
/datum/reagent/pancuronium/on_mob_life(mob/living/M)
@@ -720,7 +719,7 @@
color = "#5F8BE1"
metabolization_rate = 0.7
can_synth = FALSE
taste_description = null
taste_mult = 0
/datum/reagent/sodium_thiopental/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -750,7 +749,7 @@
metabolization_rate = 0.8
penetrates_skin = TRUE
can_synth = FALSE
taste_description = null
taste_mult = 0
/datum/reagent/ketamine/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -802,7 +801,7 @@
description = "A toxin produced by certain mushrooms. Very deadly."
reagent_state = LIQUID
color = "#D9D9D9"
taste_description = null
taste_mult = 0
/datum/reagent/amanitin/on_mob_delete(mob/living/M)
M.adjustToxLoss(current_cycle*rand(2,4))
@@ -907,7 +906,7 @@
metabolization_rate = 0.1
penetrates_skin = TRUE
overdose_threshold = 25
taste_description = null
taste_mult = 0
/datum/reagent/sarin/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
@@ -13,22 +13,22 @@
description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen."
reagent_state = LIQUID
color = "#0064C8" // rgb: 0, 100, 200
taste_description = "water"
var/cooling_temperature = 2
process_flags = ORGANIC | SYNTHETIC
drink_icon = "glass_clear"
drink_name = "Glass of Water"
drink_desc = "The father of all refreshments."
taste_description = null
var/water_temperature = 283.15 // As reagents don't have a temperature value, we'll just use 10 celsius.
/datum/reagent/water/reaction_mob(mob/living/M, method = TOUCH, volume)
M.water_act(volume, water_temperature, src, method)
/datum/reagent/water/reaction_turf(turf/simulated/T, volume)
T.water_act(volume, water_temperature, src)
T.water_act(volume, water_temperature, src)
/datum/reagent/water/reaction_obj(obj/O, volume)
O.water_act(volume, water_temperature, src)
O.water_act(volume, water_temperature, src)
/datum/reagent/lube
name = "Space Lube"
@@ -261,7 +261,7 @@
drink_icon = "glass_clear"
drink_name = "Glass of Water"
drink_desc = "The father of all refreshments."
taste_description = null
taste_description = "water"
/datum/reagent/holywater/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE