Skip to content

Commit

Permalink
add: energy drink (#4585)
Browse files Browse the repository at this point in the history
* energy drink

Респрайт кофе но без передоза и зависимостей

* tweak

Правки по просьбе меланхолика

* part 2

Изменения согласно ТЗ

* tweak to second part

Цифры приведены к значениям ТЗ. Убран кусок кода использовавшийся потому что могу

* just like coffe

to do: merge conflict

* tweak by rerik
  • Loading branch information
WolfLox authored Mar 12, 2024
1 parent b5d7074 commit beb9709
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 10 deletions.
40 changes: 30 additions & 10 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,13 @@

item_slot = TRUE
vend_delay = 34
products = list(/obj/item/reagent_containers/food/drinks/coffee = 25,/obj/item/reagent_containers/food/drinks/tea = 25,/obj/item/reagent_containers/food/drinks/h_chocolate = 25,
/obj/item/reagent_containers/food/drinks/chocolate = 10, /obj/item/reagent_containers/food/drinks/chicken_soup = 10,/obj/item/reagent_containers/food/drinks/weightloss = 10,
/obj/item/reagent_containers/food/drinks/mug = 15)
products = list(/obj/item/reagent_containers/food/drinks/coffee = 25,
/obj/item/reagent_containers/food/drinks/tea = 25,
/obj/item/reagent_containers/food/drinks/h_chocolate = 25,
/obj/item/reagent_containers/food/drinks/chocolate = 10,
/obj/item/reagent_containers/food/drinks/chicken_soup = 10,
/obj/item/reagent_containers/food/drinks/weightloss = 10,
/obj/item/reagent_containers/food/drinks/mug = 15)
contraband = list(/obj/item/reagent_containers/food/drinks/ice = 10)
premium = list(/obj/item/reagent_containers/food/drinks/mug/novelty = 5)
prices = list(/obj/item/reagent_containers/food/drinks/coffee = 25, /obj/item/reagent_containers/food/drinks/tea = 25, /obj/item/reagent_containers/food/drinks/h_chocolate = 25, /obj/item/reagent_containers/food/drinks/chocolate = 25,
Expand Down Expand Up @@ -1149,14 +1153,30 @@

slogan_list = list("Роб+аст с+офтдринкс: крепче, чем тулбоксом по голове!")
ads_list = list("Освежает!","Надеюсь, вас одолела жажда!","Продано больше миллиона бутылок!","Хотите пить? Почему бы не взять колы?","Пожалуйста, купите напиток","Выпьем!","Лучшие напитки во всём космосе")
products = list(/obj/item/reagent_containers/food/drinks/cans/cola = 10,/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind = 10,
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 10,/obj/item/reagent_containers/food/drinks/cans/starkist = 10,
/obj/item/reagent_containers/food/drinks/cans/space_up = 10,/obj/item/reagent_containers/food/drinks/cans/grape_juice = 10)
products = list(
/obj/item/reagent_containers/food/drinks/cans/cola = 10,
/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind = 10,
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 10,
/obj/item/reagent_containers/food/drinks/cans/starkist = 10,
/obj/item/reagent_containers/food/drinks/cans/space_up = 10,
/obj/item/reagent_containers/food/drinks/cans/grape_juice = 10,
/obj/item/reagent_containers/food/drinks/cans/energy = 10,
/obj/item/reagent_containers/food/drinks/cans/energy/trop = 10,
/obj/item/reagent_containers/food/drinks/cans/energy/milk = 10,
/obj/item/reagent_containers/food/drinks/cans/energy/grey = 10)
contraband = list(/obj/item/reagent_containers/food/drinks/cans/thirteenloko = 5, /obj/item/reagent_containers/food/drinks/zaza = 1)
prices = list(/obj/item/reagent_containers/food/drinks/cans/cola = 20,/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind = 20,
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 20,/obj/item/reagent_containers/food/drinks/cans/starkist = 20,
/obj/item/reagent_containers/food/drinks/cans/space_up = 20,/obj/item/reagent_containers/food/drinks/cans/grape_juice = 20,
/obj/item/reagent_containers/food/drinks/zaza = 200)
prices = list(
/obj/item/reagent_containers/food/drinks/cans/cola = 20,
/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind = 20,
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 20,
/obj/item/reagent_containers/food/drinks/cans/starkist = 20,
/obj/item/reagent_containers/food/drinks/cans/space_up = 20,
/obj/item/reagent_containers/food/drinks/cans/grape_juice = 20,
/obj/item/reagent_containers/food/drinks/cans/energy = 40,
/obj/item/reagent_containers/food/drinks/cans/energy/trop = 40,
/obj/item/reagent_containers/food/drinks/cans/energy/milk = 40,
/obj/item/reagent_containers/food/drinks/cans/energy/grey = 40,
/obj/item/reagent_containers/food/drinks/zaza = 200)
refill_canister = /obj/item/vending_refill/cola

/obj/machinery/vending/cola/free
Expand Down
28 changes: 28 additions & 0 deletions code/modules/food_and_drinks/drinks/drinks/cans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,34 @@
icon_state = "cola"
list_reagents = list("cola" = 30)

/obj/item/reagent_containers/food/drinks/cans/energy
name = "heart attack"
desc = "The heart will say: - My stop."
icon_state = "heart_attack"
item_state = "heart_attack"
list_reagents = list("energetik" = 30)

/obj/item/reagent_containers/food/drinks/cans/energy/trop
name = "tropical spasm"
desc = "Get a taste of hunting down USSP soldiers."
icon_state = "tropical_spasm"
item_state = "tropical_spasm"
list_reagents = list("trop_eng" = 30)

/obj/item/reagent_containers/food/drinks/cans/energy/milk
name = "milk flow"
desc = "For pro gamers."
icon_state = "milk_flow"
item_state = "milk_flow"
list_reagents = list("milk_eng" = 30)

/obj/item/reagent_containers/food/drinks/cans/energy/grey
name = "GreyPower"
desc = "Your hands will burn from GreyPower."
icon_state = "GreyPower"
item_state = "GreyPower"
list_reagents = list("grey_eng" = 30)

/obj/item/reagent_containers/food/drinks/cans/beer
name = "space beer"
desc = "Contains only water, malt and hops."
Expand Down
60 changes: 60 additions & 0 deletions code/modules/reagents/chemistry/reagents/drink_cold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,66 @@
drink_desc = "A glass of refreshing Space Cola"
taste_description = "cola"

/datum/reagent/consumable/drink/cold/energy
name = "Energy Drink"
id = "energetik"
description = "A refreshing beverage."
reagent_state = LIQUID
color = "#a9c725"
adj_drowsy = -6 SECONDS
adj_sleepy = -4 SECONDS
adj_dizzy = -10 SECONDS
heart_rate_increase = 1
minor_addiction = TRUE
overdose_threshold = 45
addiction_chance = 1
addiction_threshold = 200
drink_icon = "lemonglass"
drink_name = "Glass of Classic Energy Drink"
drink_desc = "A glass of of invigorating energy drink"
taste_description = "tutti frutti"

/datum/reagent/consumable/drink/cold/energy/New()
addict_supertype = /datum/reagent/consumable/drink/cold/energy

/datum/reagent/consumable/drink/cold/energy/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.adjustStaminaLoss(-1, FALSE)
if(M.reagents.get_reagent_amount("coffee") > 0)
if(prob(0.5))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.undergoing_cardiac_arrest())
H.set_heartattack(TRUE)
if(locate(/datum/reagent/consumable/drink/cold/energy) in (M.reagents.reagent_list - src))
if(prob(0.5))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.undergoing_cardiac_arrest())
H.set_heartattack(TRUE)
return ..() | update_flags

/datum/reagent/consumable/drink/cold/energy/overdose_process(mob/living/M, severity)
if(volume > 45)
M.Jitter(10 SECONDS)
return list(0, STATUS_UPDATE_NONE)

/datum/reagent/consumable/drink/cold/energy/trop
name = "Tropickal Energy"
id = "trop_eng"
taste_description = "mango and coconut"

/datum/reagent/consumable/drink/cold/energy/milk
name = "Milk Energy"
id = "milk_eng"
taste_description = "milk and taurin"

/datum/reagent/consumable/drink/cold/energy/grey
name = "GreyPower Energy"
id = "grey_eng"
color = "#9dc2d1"
taste_description = "robust"

/datum/reagent/consumable/drink/cold/nuka_cola
name = "Nuka Cola"
id = "nuka_cola"
Expand Down
Binary file modified icons/mob/inhands/items_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/items_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/drinks.dmi
Binary file not shown.

0 comments on commit beb9709

Please sign in to comment.