Skip to content

Commit

Permalink
Read Among Us memory to enable automatic muting (#1)
Browse files Browse the repository at this point in the history
The bot now reads Among Us' memory to determine which players are alive and dead and what the current state of the game is. It uses this information to determine which players should be muted, moved or able to speak at any given time.

The bot must now be updated every time the game is updated.

The bot must be run by the host of the lobby or it will fail to detect the end of meetings.

Despite these limitations, this is a much smoother experience and is much preferred by the people I've play tested it with. Thanks again to @lewis-weinberger, @HJeffery, @EdanMiles and @CrumpetsOnToast for their help.
  • Loading branch information
sam-kirby authored Apr 13, 2021
1 parent a62eadf commit 526f208
Show file tree
Hide file tree
Showing 10 changed files with 1,069 additions and 822 deletions.
140 changes: 45 additions & 95 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- name: Checkout
Expand All @@ -21,14 +21,14 @@ jobs:
components: rustfmt
profile: minimal
override: true

- name: rustfmt
run: cargo fmt --all -- --check

clippy:
name: Clippy
needs: [fmt]
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- name: Checkout
Expand Down Expand Up @@ -75,98 +75,48 @@ jobs:
release_name: Release ${{ github.sha }}
draft: true
prerelease: false

build:
name: Build for ${{ matrix.os }}
needs: [fmt, clippy, release]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout
uses: actions/checkout@v2


- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release

- name: Zip
run: |
mv ${{ github.workspace }}/target/release/taskinator ${{ github.workspace }}/taskinator-${{ runner.os }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/taskinator-${{ runner.os }}
asset_name: taskinator-${{ runner.os }}
asset_content_type: application/octet-stream

build_win:
name: Build for windows-latest
name: Build for Windows
needs: [fmt, clippy, release]
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2


- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release

- name: Zip
run: |
mv ${{ github.workspace }}/target/release/taskinator.exe ${{ github.workspace }}/taskinator-${{ runner.os }}.exe
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/taskinator-${{ runner.os }}.exe
asset_name: taskinator-${{ runner.os }}.exe
asset_content_type: application/octet-stream
- name: Checkout
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release

- name: Move
run: |
mv ${{ github.workspace }}/target/release/taskinator.exe ${{ github.workspace }}/taskinator.exe
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/taskinator.exe
asset_name: taskinator.exe
asset_content_type: application/octet-stream
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/.cargo

Config.toml
Config.toml
Loading

0 comments on commit 526f208

Please sign in to comment.