2024-02-08 22:44:47 -05:00
|
|
|
import streamlit as st
|
2024-02-26 17:56:06 -05:00
|
|
|
import database as db
|
2024-02-08 22:44:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
class Run:
|
|
|
|
def __init__(self, moon):
|
2024-02-28 17:55:22 -05:00
|
|
|
self.moon: db.Moon = moon
|
|
|
|
self.inside_power: int = moon.inside_max_power
|
|
|
|
self.outside_power: int = moon.outside_max_power
|
2024-02-08 22:44:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2024-02-14 17:23:02 -05:00
|
|
|
st.set_page_config("Lethal Company Scouter", "🛰️")
|
2024-02-08 22:44:47 -05:00
|
|
|
|
2024-02-28 16:56:44 -05:00
|
|
|
st.markdown("# :red[Lethal Company] Scouter")
|
|
|
|
st.markdown(":rainbow[What does the scouter say about this moon's power level?]")
|
|
|
|
|
2024-02-27 16:28:08 -05:00
|
|
|
moon_name = st.selectbox(
|
2024-02-14 17:23:02 -05:00
|
|
|
"Moon",
|
2024-02-27 16:28:08 -05:00
|
|
|
db.get_moon_list(),
|
2024-02-14 17:23:02 -05:00
|
|
|
placeholder="Moon! Pick a moon!",
|
|
|
|
help="Pick your current moon.",
|
|
|
|
)
|
2024-02-27 16:28:08 -05:00
|
|
|
moon_id = db.get_moon_id_by_name(moon_name)
|
|
|
|
run = Run(db.get_moon_by_id(moon_id))
|
2024-02-09 17:50:40 -05:00
|
|
|
|
2024-02-27 16:28:08 -05:00
|
|
|
st.markdown(f"## {run.moon.name} ({run.moon.tier})")
|
2024-02-09 17:50:40 -05:00
|
|
|
|
2024-02-28 16:56:44 -05:00
|
|
|
st.write(run)
|
|
|
|
st.write(run.moon)
|
2024-02-08 22:44:47 -05:00
|
|
|
|
2024-02-15 15:39:22 -05:00
|
|
|
# Begin column layout
|
|
|
|
left_column, right_column = st.columns(2)
|
|
|
|
|
|
|
|
with left_column:
|
2024-02-14 17:23:02 -05:00
|
|
|
st.markdown("### Outside")
|
2024-02-08 22:44:47 -05:00
|
|
|
|
2024-02-15 15:39:22 -05:00
|
|
|
with right_column:
|
2024-02-14 17:23:02 -05:00
|
|
|
st.markdown("### Inside")
|
2024-02-08 22:44:47 -05:00
|
|
|
|
2024-02-28 16:56:44 -05:00
|
|
|
st.markdown('## Scrap Lookup')
|
|
|
|
|
|
|
|
scrap_name = st.selectbox(
|
2024-02-28 17:41:40 -05:00
|
|
|
'Scrap',
|
2024-02-28 16:56:44 -05:00
|
|
|
db.get_scrap_list(),
|
|
|
|
placeholder='Select a scrap name!'
|
|
|
|
)
|
|
|
|
scrap_id = db.get_scrap_id_by_name(scrap_name)
|
|
|
|
scrap = db.get_scrap_by_id(scrap_id)
|
|
|
|
|
|
|
|
st.write(scrap)
|
|
|
|
|
2024-02-14 17:23:02 -05:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2024-02-08 22:44:47 -05:00
|
|
|
main()
|