From 18155b3ebedd24fba5c3cbf109063f64f882d8a6 Mon Sep 17 00:00:00 2001 From: fluxionary <25628292+fluxionary@users.noreply.github.com> Date: Wed, 25 Jan 2023 23:25:46 -0800 Subject: some more updates (#9) * add proper settings (untested) * more constants -> settings * normalize whitespace between code files * refactor globalsteps in order to simplify logic * minor refactoring * rename file * use mod_storage for persistent data; optimize context initialization * refactoring (moving files around) * rewrite penalty * add settings; document; allow changing while game is running * add command to update settings * update init after splitting commands into files * fix bugs; add debugging tools; too much for one commit... * fix whitelist conversion * add adjustable blinky plant to timer overrides * add some more mesecons nodes with repeating timers * resolve luacheck warnings * tweak hud * Update documentation; parameterize more things; refactor some logic for readability * update lag even when mesecons isn't active * update lag even when mesecons isn't active * tweak default settings * move hud so it doesn't interfere w/ areas * tweak default settings * put the HUD in a place which doesn't conflict w/ areas mod * ensure that actions have a valid position to avoid a crash * stylua * make sure we don't update the wrong HUD * spaces not tabs Co-authored-by: AliasAlreadyTaken --- .github/workflows/luacheck.yml | 17 ----------------- .github/workflows/pre-commit.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/luacheck.yml create mode 100644 .github/workflows/pre-commit.yml (limited to '.github') diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml deleted file mode 100644 index 1d24ecc..0000000 --- a/.github/workflows/luacheck.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: luacheck - -on: [pull_request, push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: apt - run: sudo apt-get install -y luarocks - - name: luacheck install - run: luarocks install --local luacheck - - name: luacheck run - run: $HOME/.luarocks/bin/luacheck ./ diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..37221d7 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,31 @@ +name: pre-commit +on: [push, pull_request, workflow_dispatch] + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@master + + - name: install luarocks + run: sudo apt-get install -y luarocks + + - name: add luarocks path + run: echo "$HOME/.luarocks/bin" >> $GITHUB_PATH + + - name: luacheck install + run: luarocks install --local luacheck + + - name: install cargo + run: sudo apt-get install -y cargo + + - name: install stylua + run: cargo install stylua + + - name: Install pre-commit + run: pip3 install pre-commit + + - name: Run pre-commit + run: pre-commit run --all-files -- cgit v1.2.3