Добавлена ботаника

main
none 9 months ago
parent 7d06879e2a
commit 9dc97d93a9

@ -16,16 +16,13 @@ def list_form(ll):
formatted = []
imgs = {'medicine': '💊',
'chemicals': '🧪'}
'chemicals': '🧪',
'botany': '🪴'}
for i in ll:
if type(i) == int:
formatted.append(i)
#print(db[i][1])
elif db[i][1] in imgs:
# formatted.append({"label": html.Span(f"{imgs[db[i][1]]} {i}", style={'background-color': 'rgb(27, 29, 30)', 'color': 'rgb(0,0,0)'}),
# 'value': f"{imgs[db[i][1]]} {i}"})
# formatted.append(html.P(f"{imgs[db[i][1]]} {i}", style={'background-color': 'rgb(27, 29, 30)', 'color': 'rgb(0,0,0)'}))
formatted.append(imgs[db[i][1]] + ' ' + i)
else:
formatted.append(i)

@ -37,6 +37,7 @@ BIOLOGY_LOCALISATION_URL = "https://github.com/SerbiaStrong-220/space-station-14
# ботаника
BOTANY_R = "https://github.com/SerbiaStrong-220/space-station-14/raw/master/Resources/Prototypes/Reagents/botany.yml"
BOTANY = "https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Prototypes/Recipes/Reactions/botany.yml"
BOTANY_LOCALISATION_URL = "https://github.com/SerbiaStrong-220/space-station-14/raw/master/Resources/Locale/ru-RU/reagents/meta/botany.ftl"
# все съедобное и питьевое
@ -80,7 +81,7 @@ class Reagent:
# Добавляем количество в итоге
react_res = self.__product
for i in react_res:
if i.lower() == self.__name.replace('reagent-name-','',1).replace('-','',1):
if i.lower() == self.__name.replace('reagent-name-','',1).replace('-',''):
result.append(react_res[i])
# Добавляем категорию
@ -176,6 +177,7 @@ load_reagents(FOOD_R_EX, 'food_ex')
load_recipes(MEDICINE, 'medicine')
load_recipes(CHEMICALS, 'chemicals')
load_recipes(BOTANY, 'botany')
# TODO: Включать ли токсины без крафта? (некоторые имеют крафт)
reagents = [Reagent(init_data=content[item]) for item in content if "reactants" in content[item]]

Loading…
Cancel
Save