mirror of
https://github.com/ethanrusz/scouter.git
synced 2025-04-21 06:16:33 -04:00
Compare commits
No commits in common. "main" and "1.1.0" have entirely different histories.
3 changed files with 13 additions and 44 deletions
|
@ -4,6 +4,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-registry:
|
update-registry:
|
||||||
|
@ -26,4 +28,6 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: git.beans.team/em/scouter:latest
|
tags: |
|
||||||
|
git.beans.team/em/scouter:latest
|
||||||
|
git.beans.team/em/scouter:${{ github.sha }}
|
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 }}
|
|
19
app.py
19
app.py
|
@ -25,23 +25,16 @@ 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(remaining_power: int, 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 remaining_power: The remaining power in the current location.
|
||||||
:return: A list of all creatures that may still spawn or None.
|
:return: A list of all creatures that may still spawn.
|
||||||
"""
|
"""
|
||||||
if remaining_power == 0:
|
return sorted(
|
||||||
return None
|
|
||||||
|
|
||||||
spawnable = sorted(
|
|
||||||
[creature.name for creature in creatures if creature.power <= remaining_power]
|
[creature.name for creature in creatures if creature.power <= remaining_power]
|
||||||
)
|
)
|
||||||
if spawnable != []:
|
|
||||||
return spawnable
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -141,7 +134,7 @@ def main():
|
||||||
st.write(find_spawnlist(run.outside_power, outside_creatures))
|
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:
|
||||||
|
@ -180,7 +173,7 @@ def main():
|
||||||
st.write(find_spawnlist(run.inside_power, inside_creatures))
|
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