mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Adds Bartending Codex & Chem Codex touch-up (#22860)
Title Also touches up the Chem Codex, by having catalysts, inhibitors and temperature show up only if used by the reaction. This should reduce a lot of dead space and info. <img width="844" height="1033" alt="image" src="https://github.com/user-attachments/assets/bb78c2a3-e9e4-4b95-9a86-64f2d14c8d8e" />
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -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."
|
||||
@@ -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={
|
||||
<SearchBar
|
||||
autoFocus
|
||||
placeholder="Search by name"
|
||||
placeholder="Search"
|
||||
query={searchTerm}
|
||||
onSearch={(value) => {
|
||||
setSearchTerm(value);
|
||||
@@ -62,7 +62,7 @@ export const ChemCodex = (props) => {
|
||||
title={`${reaction.result.name}(${reaction.result.amount}u)`}
|
||||
key={reaction.id}
|
||||
>
|
||||
<NoticeBox>{reaction.result.description}</NoticeBox>
|
||||
<Section>{reaction.result.description}</Section>
|
||||
<Section title="Required Reagents">
|
||||
<LabeledList>
|
||||
{reaction.reagents.map((reagent) => (
|
||||
@@ -71,44 +71,46 @@ export const ChemCodex = (props) => {
|
||||
</LabeledList.Item>
|
||||
))}
|
||||
</LabeledList>
|
||||
<Section title="Catalysts">
|
||||
<LabeledList>
|
||||
{reaction.catalysts.length
|
||||
? reaction.catalysts.map((catalyst) => (
|
||||
<LabeledList.Item
|
||||
label={catalyst.name}
|
||||
key={catalyst.name}
|
||||
>
|
||||
{catalyst.amount}u
|
||||
</LabeledList.Item>
|
||||
))
|
||||
: 'No catalysts present for this recipe.'}
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Inhibitors">
|
||||
<LabeledList>
|
||||
{reaction.inhibitors.length
|
||||
? reaction.inhibitors.map((inhibitor) => (
|
||||
<LabeledList.Item
|
||||
label={inhibitor.name}
|
||||
key={inhibitor.name}
|
||||
>
|
||||
{inhibitor.amount}u
|
||||
</LabeledList.Item>
|
||||
))
|
||||
: 'No inhibitors present for this recipe.'}
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Other">
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Minimum Required Temperature">
|
||||
{reaction.temp_min ? reaction.temp_min : 'None.'}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Maximum Required Temperature">
|
||||
{reaction.temp_max ? reaction.temp_max : 'None.'}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
{reaction.catalysts.length ? (
|
||||
<Section title="Catalysts">
|
||||
<LabeledList>
|
||||
{reaction.catalysts.map((catalyst) => (
|
||||
<LabeledList.Item
|
||||
label={catalyst.name}
|
||||
key={catalyst.name}
|
||||
>
|
||||
{catalyst.amount}u
|
||||
</LabeledList.Item>
|
||||
))}
|
||||
</LabeledList>
|
||||
</Section>
|
||||
) : null}
|
||||
{reaction.inhibitors.length ? (
|
||||
<Section title="Inhibitors">
|
||||
<LabeledList>
|
||||
{reaction.inhibitors.map((inhibitor) => (
|
||||
<LabeledList.Item
|
||||
label={inhibitor.name}
|
||||
key={inhibitor.name}
|
||||
>
|
||||
{inhibitor.amount}u
|
||||
</LabeledList.Item>
|
||||
))}
|
||||
</LabeledList>
|
||||
</Section>
|
||||
) : null}
|
||||
{reaction.temp_min || reaction.temp_max ? (
|
||||
<Section title="Temperature">
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Minimum">
|
||||
{reaction.temp_min ? `${reaction.temp_min}K` : 'N/A'}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Maximum">
|
||||
{reaction.temp_max ? `${reaction.temp_max}K` : 'N/A'}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
) : null}
|
||||
</Section>
|
||||
</Section>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user