Skip to content

Commit

Permalink
Merge pull request #104 from Artemchik542/better-kvass
Browse files Browse the repository at this point in the history
Неожиданное обновление Квааааасса
  • Loading branch information
Huz2e authored Jun 17, 2024
2 parents 46e0983 + 2a59e2c commit 8a41af4
Show file tree
Hide file tree
Showing 18 changed files with 115 additions and 116 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
// JSON text files found in the tgstation/strings folder
/// File location for brain damage traumas
#define BRAIN_DAMAGE_FILE "massmeta/traumas.json" //MASSMETA EDIT
/// File location for kvass phrases, mmmmm kvass
#define KVASS_PHRASES_FILE "massmeta/kvass.json" //MASSMETA ADDITION (kvass)
/// File location for AI ion laws
#define ION_FILE "ion_laws.json"
/// File location for pirate names
Expand Down
18 changes: 18 additions & 0 deletions code/modules/reagents/reagent_containers/cups/soda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
playsound(M,'sound/weapons/pierce.ogg', rand(10,50), TRUE)
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(M.loc)
crushed_can.icon_state = icon_state

// MASSMETA ADDITION (kvass)
if(icon_state == "kvass")
crushed_can.icon = 'massmeta/icons/items/janitor.dmi'
// EDIT END

qdel(src)
return TRUE
return ..()
Expand All @@ -85,6 +91,12 @@
if(P.damage > 0 && P.damage_type == BRUTE)
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(src.loc)
crushed_can.icon_state = icon_state

// MASSMETA ADDITION (kvass)
if(icon_state == "kvass")
crushed_can.icon = 'massmeta/icons/items/janitor.dmi'
// EDIT END

var/atom/throw_target = get_edge_target_turf(crushed_can, pick(GLOB.alldirs))
crushed_can.throw_at(throw_target, rand(1,2), 7)
qdel(src)
Expand Down Expand Up @@ -142,6 +154,12 @@
visible_message(span_danger("[src]'s impact with [hit_atom] causes it to rupture, spilling everywhere!"))
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(src.loc)
crushed_can.icon_state = icon_state

// MASSMETA ADDITION (kvass)
if(icon_state == "kvass")
crushed_can.icon = 'massmeta/icons/items/janitor.dmi'
// EDIT END

moveToNullspace()
QDEL_IN(src, 1 SECONDS) // give it a second so it can still be logged for the throw impact

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/obj/structure/closet/crate/large/soviet
name = "unusual large crate"
desc = "A deeply scratched wooden crate with eraser markings. You'll need a crowbar to get it open."
desc = "A deeply scratched wooden crate with erased markings. You'll need a crowbar to get it open."
icon = 'massmeta/icons/obj/storage/crates.dmi'
icon_state = "largecrate_soviet"
icon_state = "largecrate_soviet"
base_icon_state = "largecrate_soviet"
6 changes: 6 additions & 0 deletions massmeta/code/modules/cargo/exports/large_objects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Sell Kvaaaaaass TANK!&?

/datum/export/large/reagent_dispenser/kvass
unit_name = "kvasstank"
export_types = list(/obj/structure/reagent_dispensers/kvasstank)
contents_cost = CARGO_CRATE_VALUE
9 changes: 9 additions & 0 deletions massmeta/code/modules/cargo/packs/materials.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Kvaaaaaaaaass TANK

/datum/supply_pack/materials/kvasstank
name = "Kvass Tank Crate"
desc = "Contains a yellow barrel full of kvass."
cost = CARGO_CRATE_VALUE * 2
contains = list(/obj/structure/reagent_dispensers/kvasstank)
crate_name = "kvass tank crate"
crate_type = /obj/structure/closet/crate/large/soviet
40 changes: 0 additions & 40 deletions massmeta/code/modules/reagents/chemistry/drinks.dm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Квас - это очень полезный напиток.

/datum/reagent/consumable/kvass
name = "Kvass"
description = "Kvaaaaaaass."
color = "#351300" // rgb: 53, 19, 0
quality = DRINK_VERYGOOD
overdose_threshold = 50
taste_description = "mmmmm kvass"
ph = 6 // а точно ли 6?
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
default_container = /obj/item/reagent_containers/cup/soda_cans/kvass

/datum/reagent/consumable/kvass/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired)
. = ..()
affected_mob.adjust_dizzy(-1 SECONDS * REM * seconds_per_tick)
affected_mob.adjust_drowsiness(-2 SECONDS * REM * seconds_per_tick)
var/need_mob_update
need_mob_update = affected_mob.adjustToxLoss(-0.5, updating_health = FALSE, required_biotype = affected_biotype)
need_mob_update += affected_mob.adjustOrganLoss(ORGAN_SLOT_LIVER, -0.5 * REM * seconds_per_tick, required_organ_flag = ORGAN_ORGANIC)
for(var/datum/reagent/toxin/R in affected_mob.reagents.reagent_list)
affected_mob.reagents.remove_reagent(R.type, 2.5 * REM * seconds_per_tick) // а не имба?
if(need_mob_update)
return UPDATE_MOB_HEALTH

/datum/reagent/consumable/kvass/overdose_process(mob/living/affected_mob, seconds_per_tick, times_fired)
. = ..()
affected_mob.set_jitter_if_lower(5 SECONDS * REM * seconds_per_tick)
if(SPT_PROB(7.5, seconds_per_tick))
affected_mob.say(pick_list_replacements(KVASS_PHRASES_FILE, "kvass_phrases"), forced = /datum/reagent/consumable/kvass)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Kvaaaaaaaaaass

/datum/glass_style/drinking_glass/kvass
required_drink_type = /datum/reagent/consumable/kvass
name = "glass of Kvass"
desc = "A glass of Kvaaaaaaass."
icon = 'massmeta/icons/drinks/drinks.dmi'
icon_state = "kvass"
71 changes: 0 additions & 71 deletions massmeta/code/modules/reagents/containers/cups.dm

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/obj/item/reagent_containers/cup/soda_cans/kvass
name = "Kvass"
desc = "Kvaaaaaaaass."
icon = 'massmeta/icons/drinks/soda.dmi'
icon_state = "kvass"
list_reagents = list(/datum/reagent/consumable/kvass = 30)
drink_type = GRAIN

// TODO: нужно будет потом добавить иконки "в руках"
10 changes: 10 additions & 0 deletions massmeta/code/modules/reagents/reagent_dispenser.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Kvaaaaaass!!!

/obj/structure/reagent_dispensers/kvasstank
name = "kvass tank"
desc = "Yellow barrel full of divine liquid."
icon = 'massmeta/icons/drinks/chemical_tanks.dmi'
icon_state = "kvass"
reagent_id = /datum/reagent/consumable/kvass
openable = TRUE
climbable = TRUE
Binary file modified massmeta/icons/drinks/chemical_tanks.dmi
Binary file not shown.
Binary file modified massmeta/icons/drinks/drinks.dmi
Binary file not shown.
Binary file modified massmeta/icons/drinks/soda.dmi
Binary file not shown.
Binary file modified massmeta/icons/items/janitor.dmi
Binary file not shown.
Binary file modified massmeta/icons/obj/storage/crates.dmi
Binary file not shown.
12 changes: 9 additions & 3 deletions massmeta/includes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include "code\__HELPERS\names.dm"
#include "interface\interface.dm"
#include "code\modules\clothing\clothing.dm"
#include "code\modules\reagents\chemistry\drinks.dm"
#include "code\modules\reagents\containers\cups.dm"
#include "code\modules\surgery\organs\tongue.dm"
#include "code\modules\surgery\bodyparts\head.dm"
#include "code\modules\clothing\suits\chaplainsuits.dm"
Expand Down Expand Up @@ -92,4 +90,12 @@
#include "code\modules\clothing\under\accessories\badges.dm"
#include "code\modules\clothing\shoes\sneakers.dm"
#include "code\modules\client\preferences\pride_pin.dm"
#include "code\datums\quirks\neutral_quirks\pride_pin.dm"
#include "code\datums\quirks\neutral_quirks\pride_pin.dm"

//kvass
#include "code\modules\cargo\exports\large_objects.dm"
#include "code\modules\cargo\packs\materials.dm"
#include "code\modules\reagents\chemistry\reagents\drinks\drink_reagents.dm"
#include "code\modules\reagents\chemistry\reagents\drinks\glass_styles\sodas.dm"
#include "code\modules\reagents\reagent_containers\cups\soda.dm"
#include "code\modules\reagents\reagent_dispenser.dm"
11 changes: 11 additions & 0 deletions strings/massmeta/kvass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"kvass_phrases": [
"Квааааасс!!!",
"Обожаю Квасс!",
"Мой Любимый Напиток!",
"ММммммм Квасс!!",
"Обожаю я пить квасс",
"Вятский сас",
"КВАСС!!!"
]
}

0 comments on commit 8a41af4

Please sign in to comment.