diff --git a/site.py b/site.py index 5bad8d6..4f6e3d0 100644 --- a/site.py +++ b/site.py @@ -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) diff --git a/update_db.py b/update_db.py index dd05a2a..d1fc31d 100644 --- a/update_db.py +++ b/update_db.py @@ -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]]