mirror of
https://github.com/ethanrusz/scouter.git
synced 2024-11-24 04:27:46 -05:00
65 lines
1.5 KiB
Python
65 lines
1.5 KiB
Python
import streamlit as st
|
|
import database as db
|
|
|
|
|
|
class Creature:
|
|
def __init__(self, name, nickname, power, max_spawns, hits_to_kill):
|
|
self.name = name
|
|
self.nickname = nickname
|
|
self.power = power
|
|
self.max_spawns = max_spawns
|
|
self.hits_to_kill = hits_to_kill
|
|
|
|
|
|
class Run:
|
|
def __init__(self, moon):
|
|
self.moon = moon
|
|
self.inside_power = moon.inside_max_power
|
|
self.outside_power = moon.outside_max_power
|
|
|
|
|
|
def main():
|
|
st.set_page_config("Lethal Company Scouter", "🛰️")
|
|
|
|
st.markdown("# :red[Lethal Company] Scouter")
|
|
st.markdown(":rainbow[What does the scouter say about this moon's power level?]")
|
|
|
|
moon_name = st.selectbox(
|
|
"Moon",
|
|
db.get_moon_list(),
|
|
placeholder="Moon! Pick a moon!",
|
|
help="Pick your current moon.",
|
|
)
|
|
moon_id = db.get_moon_id_by_name(moon_name)
|
|
run = Run(db.get_moon_by_id(moon_id))
|
|
|
|
st.markdown(f"## {run.moon.name} ({run.moon.tier})")
|
|
|
|
st.write(run)
|
|
st.write(run.moon)
|
|
|
|
# Begin column layout
|
|
left_column, right_column = st.columns(2)
|
|
|
|
with left_column:
|
|
st.markdown("### Outside")
|
|
|
|
with right_column:
|
|
st.markdown("### Inside")
|
|
|
|
st.markdown('## Scrap Lookup')
|
|
|
|
scrap_name = st.selectbox(
|
|
'Scrap Name',
|
|
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)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|