mirror of
https://github.com/ethanrusz/scouter.git
synced 2025-04-20 22:06:34 -04:00
Compare commits
No commits in common. "main" and "1.0.0" have entirely different histories.
3 changed files with 11 additions and 80 deletions
29
.github/workflows/build-latest.yml
vendored
29
.github/workflows/build-latest.yml
vendored
|
@ -1,29 +0,0 @@
|
||||||
name: Build and Push to git.beans.team
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-registry:
|
|
||||||
name: Update Registry Image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Login to git.beans.team
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.beans.team
|
|
||||||
username: em
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and Push Image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: git.beans.team/em/scouter:latest
|
|
28
.github/workflows/build-release.yml
vendored
28
.github/workflows/build-release.yml
vendored
|
@ -1,28 +0,0 @@
|
||||||
name: Build and Push Releases
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [ published ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-registry:
|
|
||||||
name: Update Registry Image
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Login to git.beans.team
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.beans.team
|
|
||||||
username: em
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and Push Image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: git.beans.team/em/scouter:${{ github.event.release.tag_name }}
|
|
34
app.py
34
app.py
|
@ -25,23 +25,13 @@ class Run:
|
||||||
self.outside_power = moon.outside_max_power
|
self.outside_power = moon.outside_max_power
|
||||||
|
|
||||||
|
|
||||||
def find_spawnlist(remaining_power: int, creatures: list[Creature]) -> list[str] | None:
|
def find_spawnlist(run: Run, creatures: list[Creature]) -> list[str]:
|
||||||
"""
|
"""
|
||||||
Given a run, return all possible spawns for location.
|
Given a run, return all possible spwns for location.
|
||||||
|
|
||||||
:param remaining_power: The remaining power in the current location.
|
:param run: The current run object.
|
||||||
:return: A list of all creatures that may still spawn or None.
|
:return: A list of all creatures that could still spawn.
|
||||||
"""
|
"""
|
||||||
if remaining_power == 0:
|
|
||||||
return None
|
|
||||||
|
|
||||||
spawnable = sorted(
|
|
||||||
[creature.name for creature in creatures if creature.power <= remaining_power]
|
|
||||||
)
|
|
||||||
if spawnable != []:
|
|
||||||
return spawnable
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -84,7 +74,7 @@ def main():
|
||||||
Creature("Spore Lizard", None, 1, 2, None),
|
Creature("Spore Lizard", None, 1, 2, None),
|
||||||
Creature("Thumper", None, 2, 4, 4),
|
Creature("Thumper", None, 2, 4, 4),
|
||||||
# Hybrid
|
# Hybrid
|
||||||
Creature("Inside Ghost Girl", None, 2, 1, None),
|
Creature("Inside Ghost Girl ", None, 2, 1, None),
|
||||||
Creature("Inside Masked", None, 1, 10, 4),
|
Creature("Inside Masked", None, 1, 10, 4),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -107,6 +97,7 @@ def main():
|
||||||
|
|
||||||
with left_column:
|
with left_column:
|
||||||
st.markdown("### Outside")
|
st.markdown("### Outside")
|
||||||
|
st.info(f"Maximum power: {run.moon.outside_max_power}")
|
||||||
|
|
||||||
with st.form("outside"):
|
with st.form("outside"):
|
||||||
for creature in outside_creatures:
|
for creature in outside_creatures:
|
||||||
|
@ -135,17 +126,16 @@ def main():
|
||||||
|
|
||||||
outside_submit = st.form_submit_button("Calculate")
|
outside_submit = st.form_submit_button("Calculate")
|
||||||
if outside_submit:
|
if outside_submit:
|
||||||
st.info(f"Maximum power: {run.moon.outside_max_power}")
|
|
||||||
if run.outside_power >= 0:
|
if run.outside_power >= 0:
|
||||||
st.warning(f"🌳 Outside power remaining: {run.outside_power}")
|
st.toast(f"🌳 Outside power remaining: {run.outside_power}")
|
||||||
st.write(find_spawnlist(run.outside_power, outside_creatures))
|
|
||||||
else:
|
else:
|
||||||
st.error(
|
st.error(
|
||||||
f"Power level exceeds maximum possible for {run.moon.name}."
|
f"Power level exceedes maximum possible for {run.moon.name}."
|
||||||
)
|
)
|
||||||
|
|
||||||
with right_column:
|
with right_column:
|
||||||
st.markdown("### Inside")
|
st.markdown("### Inside")
|
||||||
|
st.info(f"Maximum power: {run.moon.inside_max_power}")
|
||||||
|
|
||||||
with st.form("inside"):
|
with st.form("inside"):
|
||||||
for creature in inside_creatures:
|
for creature in inside_creatures:
|
||||||
|
@ -174,13 +164,11 @@ def main():
|
||||||
|
|
||||||
inside_submit = st.form_submit_button("Calculate")
|
inside_submit = st.form_submit_button("Calculate")
|
||||||
if inside_submit:
|
if inside_submit:
|
||||||
st.info(f"Maximum power: {run.moon.inside_max_power}")
|
|
||||||
if run.inside_power >= 0:
|
if run.inside_power >= 0:
|
||||||
st.warning(f"🏭 Inside power remaining: {run.inside_power}")
|
st.toast(f"🏭 Inside power remaining: {run.inside_power}")
|
||||||
st.write(find_spawnlist(run.inside_power, inside_creatures))
|
|
||||||
else:
|
else:
|
||||||
st.error(
|
st.error(
|
||||||
f"Power level exceeds maximum possible for {run.moon.name}."
|
f"Power level exceedes maximum possible for {run.moon.name}."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue