Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавление напитка богов (кваса) в игру #1325

Merged
merged 6 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 82 additions & 5 deletions modular_ss220/food/code/drinks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
icon = initial(icon)
return
var/datum/reagent/reagent = reagents.get_master_reagent()
if(!istype(reagent, /datum/reagent/consumable/ethanol))
if(!istype(reagent, /datum/reagent/consumable))
icon = initial(icon)
return
var/datum/reagent/consumable/ethanol/booze = reagent
icon = booze.drinking_glass_icon
else
var/datum/reagent/consumable/drink = reagent
icon = drink.drinking_glass_icon
if(!reagent.drink_icon)
icon_state = "glass_empty"

/datum/reagent/consumable/ethanol
/datum/reagent/consumable
var/drinking_glass_icon = 'icons/obj/drinks.dmi'

/obj/machinery/chem_dispenser/beer/Initialize(mapload)
Expand Down Expand Up @@ -584,3 +586,78 @@
required_reagents = list("trinary" = 1, "codelibre" = 1, "rewriter" = 1, "irishempbomb" = 1, "synthanol" = 1 )
result_amount = 5
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'

/datum/reagent/consumable/ethanol/kvass
name = "Alcoholic Kvass"
id = "alco_kvass"
description = "Алкогольный напиток, полученный путём ферментации хлеба"
color = "#775a1c"
nutriment_factor = 1 * REAGENTS_METABOLISM
alcohol_perc = 0.2
drink_icon = "alco_kvass"
drinking_glass_icon = 'modular_ss220/food/icons/drinks.dmi'
drink_name = "Стакан алкогольного кваса"
drink_desc = "Освежающий горьковато-сладкий напиток прямиком из СССП"
taste_description = "квас"

/datum/reagent/consumable/drink/kvass
name = "Kvass"
id = "kvass"
description = "Квас без алкоголя. Что отличает его от обычной газировки?"
color = "#574113"
adj_sleepy = -4 SECONDS
drink_icon = "kvass"
drinking_glass_icon = 'modular_ss220/food/icons/drinks.dmi'
drink_name = "Стакан безалкогольного кваса"
drink_desc = "Квас без алкоголя. Освежает, но по вкусу как-то... блекло?"
harmless = FALSE
taste_description = "скучный квас"

/datum/chemical_reaction/kvass
name = "Kvass"
id = "kvass"
result = "kvass"
required_reagents = list("alco_kvass" = 5, "antihol" = 1)
result_amount = 5
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'

// fermenting_barrel don't have behavior for non-plant food, so we need some proc for bread
/obj/structure/fermenting_barrel/proc/make_drink(obj/item/I, drink_id, amount)
reagents.add_reagent(drink_id, amount)
qdel(I)
playsound(src, 'sound/effects/bubbles.ogg', 50, TRUE)

/obj/structure/fermenting_barrel/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/food/snacks/sliceable/bread))
if(!user.drop_item())
to_chat(user, "<span class='warning'>[I] is stuck to your hand!</span>")
return FALSE
I.forceMove(src)
to_chat(user, "<span class='notice'>You place [I] into [src] to start the fermentation process.</span>")
addtimer(CALLBACK(src, PROC_REF(make_drink), I, "alco_kvass", 35), rand(80, 120) * speed_multiplier)
return
return ..()

/obj/item/reagent_containers/drinks/cans/kvass
name = "Квас"
desc = "Банка кваса. На этикетке написано \"Сделано в СССП\""
icon_state = "kvass_can"
icon = 'modular_ss220/food/icons/drinks.dmi'
list_reagents = list("kvass" = 50)

/obj/machinery/chem_dispenser/soda/Initialize(mapload)
dispensable_reagents += "kvass"
return ..()

/obj/item/handheld_chem_dispenser/soda/Initialize(mapload)
dispensable_reagents += "kvass"
return ..()
AyIong marked this conversation as resolved.
Show resolved Hide resolved

/obj/machinery/economy/vending/boozeomat/Initialize(mapload)
products += list(/obj/item/reagent_containers/drinks/cans/kvass = 8)
return ..()

/obj/machinery/economy/vending/cola/Initialize(mapload)
products += list(/obj/item/reagent_containers/drinks/cans/kvass = 10)
prices += list(/obj/item/reagent_containers/drinks/cans/kvass = 50)
return ..()
Binary file modified modular_ss220/food/icons/drinks.dmi
Binary file not shown.
Loading