diff --git a/aurorastation.dme b/aurorastation.dme index 30663802080..6b28dff4c93 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -3107,6 +3107,7 @@ #include "code\modules\modular_computers\file_system\programs\app_presets_equipment.dm" #include "code\modules\modular_computers\file_system\programs\app_presets_third_party.dm" #include "code\modules\modular_computers\file_system\programs\antagonist\hacked_camera.dm" +#include "code\modules\modular_computers\file_system\programs\civilian\bartending_codex.dm" #include "code\modules\modular_computers\file_system\programs\civilian\cargo_control.dm" #include "code\modules\modular_computers\file_system\programs\civilian\cargo_delivery.dm" #include "code\modules\modular_computers\file_system\programs\civilian\cargo_order.dm" diff --git a/code/controllers/subsystems/initialization/codex.dm b/code/controllers/subsystems/initialization/codex.dm index 3caeb9e5333..0393207e223 100644 --- a/code/controllers/subsystems/initialization/codex.dm +++ b/code/controllers/subsystems/initialization/codex.dm @@ -9,6 +9,7 @@ SUBSYSTEM_DEF(codex) /// List of chemistry/reagent reactions and associated data. var/list/chemistry_codex_data = list() + var/list/bartending_codex_data = list() var/list/chemistry_codex_ignored_reaction_path = list(/datum/chemical_reaction/slime) var/list/chemistry_codex_ignored_result_path = list(/singleton/reagent/drink, /singleton/reagent/alcohol) @@ -24,7 +25,7 @@ SUBSYSTEM_DEF(codex) generate_cooking_codex() generate_chemistry_codex() generate_fusion_codex() - log_subsystem_codex("SScodex: [length(cooking_codex_data)] cooking recipes; [length(chemistry_codex_data)] chemistry recipes; [length(fusion_codex_data)] fusion recipes;") + log_subsystem_codex("SScodex: [length(cooking_codex_data)] cooking recipes; [length(bartending_codex_data)] bartending recipes; [length(chemistry_codex_data)] chemistry recipes; [length(fusion_codex_data)] fusion recipes;") return SS_INIT_SUCCESS @@ -94,8 +95,6 @@ SUBSYSTEM_DEF(codex) var/datum/chemical_reaction/CR = new chem_path if(!CR.result) continue - if(chemistry_codex_ignored_result_path && is_path_in_list(CR.result, chemistry_codex_ignored_result_path)) - continue var/singleton/reagent/R = GET_SINGLETON(CR.result) var/chemistryReactionData = list(id = "[chem_path]") chemistryReactionData["result"] = list( @@ -133,7 +132,10 @@ SUBSYSTEM_DEF(codex) chemistryReactionData["temp_max"] = CR.required_temperature_max - chemistry_codex_data += list(chemistryReactionData) + if(chemistry_codex_ignored_result_path && is_path_in_list(CR.result, chemistry_codex_ignored_result_path)) + bartending_codex_data += list(chemistryReactionData) // What is bartending, but a dimunitive form of chemistry? + else + chemistry_codex_data += list(chemistryReactionData) /// Generate a list of all fusion reaction fusion_reactions, then populate the codex from that list. /datum/controller/subsystem/codex/proc/generate_fusion_codex() diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 75e0f57a957..a75b3581357 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -75,9 +75,9 @@ head = /obj/item/clothing/head/chefhat/nt shoes = /obj/item/clothing/shoes/sneakers/black - tab_pda = /obj/item/modular_computer/handheld/pda/civilian - wristbound = /obj/item/modular_computer/handheld/wristbound/preset/pda/civilian - tablet = /obj/item/modular_computer/handheld/preset/civilian + tab_pda = /obj/item/modular_computer/handheld/pda/civilian/chef + wristbound = /obj/item/modular_computer/handheld/wristbound/preset/pda/civilian/chef + tablet = /obj/item/modular_computer/handheld/preset/civilian/chef headset = /obj/item/radio/headset/headset_service bowman = /obj/item/radio/headset/headset_service/alt diff --git a/code/modules/modular_computers/computers/subtypes/preset_handheld.dm b/code/modules/modular_computers/computers/subtypes/preset_handheld.dm index 18a9411b52f..38e95f30650 100644 --- a/code/modules/modular_computers/computers/subtypes/preset_handheld.dm +++ b/code/modules/modular_computers/computers/subtypes/preset_handheld.dm @@ -20,10 +20,16 @@ /obj/item/modular_computer/handheld/preset/civilian _app_preset_type = /datum/modular_computer_app_presets/civilian +/obj/item/modular_computer/handheld/preset/civilian/bartender + _app_preset_type = /datum/modular_computer_app_presets/civilian/bartender + /obj/item/modular_computer/handheld/preset/civilian/bartender/Initialize() . = ..() card_slot.stored_item = new /obj/item/pen/fountain +/obj/item/modular_computer/handheld/preset/civilian/chef + _app_preset_type = /datum/modular_computer_app_presets/civilian/chef + /obj/item/modular_computer/handheld/preset/civilian/librarian/Initialize() . = ..() card_slot.stored_item = new /obj/item/pen/fountain diff --git a/code/modules/modular_computers/computers/subtypes/preset_pda.dm b/code/modules/modular_computers/computers/subtypes/preset_pda.dm index 8b541f96f44..667add4c92a 100644 --- a/code/modules/modular_computers/computers/subtypes/preset_pda.dm +++ b/code/modules/modular_computers/computers/subtypes/preset_pda.dm @@ -18,10 +18,16 @@ /obj/item/modular_computer/handheld/pda/civilian _app_preset_type = /datum/modular_computer_app_presets/civilian +/obj/item/modular_computer/handheld/pda/civilian/bartender + _app_preset_type = /datum/modular_computer_app_presets/civilian/bartender + /obj/item/modular_computer/handheld/pda/civilian/bartender/Initialize() . = ..() card_slot.stored_item = new /obj/item/pen/fountain +/obj/item/modular_computer/handheld/pda/civilian/chef + _app_preset_type = /datum/modular_computer_app_presets/civilian/chef + /obj/item/modular_computer/handheld/pda/civilian/librarian icon_add = "libb" diff --git a/code/modules/modular_computers/computers/subtypes/preset_wristbound.dm b/code/modules/modular_computers/computers/subtypes/preset_wristbound.dm index acf51a1a073..201c56d25df 100644 --- a/code/modules/modular_computers/computers/subtypes/preset_wristbound.dm +++ b/code/modules/modular_computers/computers/subtypes/preset_wristbound.dm @@ -115,10 +115,16 @@ /obj/item/modular_computer/handheld/wristbound/preset/pda/civilian _app_preset_type = /datum/modular_computer_app_presets/civilian +/obj/item/modular_computer/handheld/wristbound/preset/pda/civilian/bartender + _app_preset_type = /datum/modular_computer_app_presets/civilian/bartender + /obj/item/modular_computer/handheld/wristbound/preset/pda/civilian/bartender/Initialize() . = ..() card_slot.stored_item = new /obj/item/pen/fountain +/obj/item/modular_computer/handheld/wristbound/preset/pda/civilian/chef + _app_preset_type = /datum/modular_computer_app_presets/civilian/chef + /obj/item/modular_computer/handheld/wristbound/preset/pda/civilian/librarian/Initialize() . = ..() card_slot.stored_item = new /obj/item/pen/fountain diff --git a/code/modules/modular_computers/file_system/programs/app_presets_crew.dm b/code/modules/modular_computers/file_system/programs/app_presets_crew.dm index 47e3e199183..939a87a1311 100644 --- a/code/modules/modular_computers/file_system/programs/app_presets_crew.dm +++ b/code/modules/modular_computers/file_system/programs/app_presets_crew.dm @@ -204,8 +204,25 @@ /datum/modular_computer_app_presets/civilian/New() . = ..() program_list += COMPUTER_APP_PRESET_SYSTEM + COMPUTER_APP_PRESET_HORIZON_CIVILIAN - program_list += list(/datum/computer_file/program/game/arcade, /datum/computer_file/program/cooking_codex) + program_list += /datum/computer_file/program/game/arcade +/datum/modular_computer_app_presets/civilian/bartender + name = "bartender" + display_name = "Bartender" + description = "Contains programs for bartenders." + +/datum/modular_computer_app_presets/civilian/bartender/New() + . = ..() + program_list += /datum/computer_file/program/bartending_codex + +/datum/modular_computer_app_presets/civilian/chef + name = "chef" + display_name = "Chef" + description = "Contains programs for chefs." + +/datum/modular_computer_app_presets/civilian/chef/New() + . = ..() + program_list += /datum/computer_file/program/cooking_codex /datum/modular_computer_app_presets/civilian/janitor name = "janitor" diff --git a/code/modules/modular_computers/file_system/programs/civilian/bartending_codex.dm b/code/modules/modular_computers/file_system/programs/civilian/bartending_codex.dm new file mode 100644 index 00000000000..f838482826a --- /dev/null +++ b/code/modules/modular_computers/file_system/programs/civilian/bartending_codex.dm @@ -0,0 +1,25 @@ +/datum/computer_file/program/bartending_codex + filename = "barcodex" + filedesc = "Bartending Codex" + program_icon_state = "generic" + program_key_icon_state = "teal_key" + extended_desc = "Useful program to view cocktail recipes and how to make them." + size = 2 + required_access_download = null + requires_ntnet = FALSE + available_on_ntnet = TRUE + tgui_id = "ChemCodex" + +/datum/computer_file/program/bartending_codex/ui_data(mob/user) + var/list/data = list() + // Gather data for computer header + var/headerdata = get_header_data(data["_PC"]) + if(headerdata) + data["_PC"] = headerdata + . = data + + // Here goes listification + if(!data["reactions"]) + data["reactions"] = SScodex.bartending_codex_data + + return data diff --git a/html/changelogs/wezzy-bar-codex.yml b/html/changelogs/wezzy-bar-codex.yml new file mode 100644 index 00000000000..166935e2ea4 --- /dev/null +++ b/html/changelogs/wezzy-bar-codex.yml @@ -0,0 +1,59 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds the bartending codex." + - rscadd: "Only the chef starts with the cooking codex and the bartender with the bartending codex now. They still can be downloaded by anyone, though." diff --git a/tgui/packages/tgui/interfaces/ChemCodex.tsx b/tgui/packages/tgui/interfaces/ChemCodex.tsx index 666bde641f5..f0164abc24f 100644 --- a/tgui/packages/tgui/interfaces/ChemCodex.tsx +++ b/tgui/packages/tgui/interfaces/ChemCodex.tsx @@ -1,4 +1,4 @@ -import { LabeledList, NoticeBox, Section } from 'tgui-core/components'; +import { LabeledList, Section } from 'tgui-core/components'; import { useBackend, useLocalState } from '../backend'; import { NtosWindow } from '../layouts'; import { SearchBar } from './common/SearchBar'; @@ -41,7 +41,7 @@ export const ChemCodex = (props) => { buttons={ { setSearchTerm(value); @@ -62,7 +62,7 @@ export const ChemCodex = (props) => { title={`${reaction.result.name}(${reaction.result.amount}u)`} key={reaction.id} > - {reaction.result.description} +
{reaction.result.description}
{reaction.reagents.map((reagent) => ( @@ -71,44 +71,46 @@ export const ChemCodex = (props) => { ))} -
- - {reaction.catalysts.length - ? reaction.catalysts.map((catalyst) => ( - - {catalyst.amount}u - - )) - : 'No catalysts present for this recipe.'} - -
-
- - {reaction.inhibitors.length - ? reaction.inhibitors.map((inhibitor) => ( - - {inhibitor.amount}u - - )) - : 'No inhibitors present for this recipe.'} - -
-
- - - {reaction.temp_min ? reaction.temp_min : 'None.'} - - - {reaction.temp_max ? reaction.temp_max : 'None.'} - - -
+ {reaction.catalysts.length ? ( +
+ + {reaction.catalysts.map((catalyst) => ( + + {catalyst.amount}u + + ))} + +
+ ) : null} + {reaction.inhibitors.length ? ( +
+ + {reaction.inhibitors.map((inhibitor) => ( + + {inhibitor.amount}u + + ))} + +
+ ) : null} + {reaction.temp_min || reaction.temp_max ? ( +
+ + + {reaction.temp_min ? `${reaction.temp_min}K` : 'N/A'} + + + {reaction.temp_max ? `${reaction.temp_max}K` : 'N/A'} + + +
+ ) : null}
))}