From 45a373cdfa3bc11b0491e9da858044a095fed35e Mon Sep 17 00:00:00 2001 From: Mosley <93835010+MosleyTheMalO@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:09:56 -0500 Subject: [PATCH] Bubber CI checks (#1830) ## About The Pull Request Adds support for bubber-related code for the CI checks ## Why It's Good For The Game Helps ensure code sanity. ## Proof Of Testing CI checks --------- Co-authored-by: BongaTheProto <93835010+BongaTheProto@users.noreply.github.com> Co-authored-by: Swift Co-authored-by: The Sharkening <95130227+StrangeWeirdKitten@users.noreply.github.com> Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Co-authored-by: Kyle Spier-Swenson Co-authored-by: thegrb93 Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com> Co-authored-by: projectkepler-RU <99981766+projectkepler-ru@users.noreply.github.com> Co-authored-by: Bubberbot <151680451+Bubberbot@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: Shadow-Quill <44811257+Shadow-Quill@users.noreply.github.com> Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> Co-authored-by: snailomi <148835423+snailomi@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Lutowski <136726218+Lutowski@users.noreply.github.com> Co-authored-by: nevimer <77420409+nevimer@users.noreply.github.com> --- .github/workflows/ci_suite.yml | 2 ++ .../{traits.dm => traits/declarations.dm} | 0 .../code/datums/materials/basemats.dm | 7 ---- .../tools/ci/zubbers_check_grep.sh | 12 +++++++ tgstation.dme | 2 +- tools/ezdb/ezdb/paths.py | 3 ++ tools/ezdb/steps/install_initial_schema.py | 6 +++- .../schemas/modular_zubbers.json | 7 ++++ tools/trait_validity/check.py | 36 +++++++++++++++++++ 9 files changed, 66 insertions(+), 9 deletions(-) rename code/__DEFINES/~~bubber_defines/{traits.dm => traits/declarations.dm} (100%) delete mode 100644 modular_zubbers/code/datums/materials/basemats.dm create mode 100644 modular_zubbers/tools/ci/zubbers_check_grep.sh create mode 100644 tools/ticked_file_enforcement/schemas/modular_zubbers.json diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index 216111097fe..444f551de61 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -74,12 +74,14 @@ jobs: run: | bash tools/ci/check_grep.sh bash skyrat/tools/skyrat_check_grep.sh # SKYRAT EDIT ADDITION - checking modular_skyrat code + bash modular_zubbers/tools/ci/zubbers_check_grep.sh # BUBBER EDIT ADDITION - checking modular_zubbers code - name: Ticked File Enforcement if: steps.linter-setup.conclusion == 'success' && !cancelled() run: | tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/tgstation_dme.json tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/unit_tests.json tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/modular_skyrat.json # SKYRAT EDIT ADDITION - modular tick enforcement + tools/bootstrap/python tools/ticked_file_enforcement/ticked_file_enforcement.py < tools/ticked_file_enforcement/schemas/modular_zubbers.json # BUBBER EDIT ADDITION - modular tick enforcement - name: Check Define Sanity if: steps.linter-setup.conclusion == 'success' && !cancelled() run: tools/bootstrap/python -m define_sanity.check diff --git a/code/__DEFINES/~~bubber_defines/traits.dm b/code/__DEFINES/~~bubber_defines/traits/declarations.dm similarity index 100% rename from code/__DEFINES/~~bubber_defines/traits.dm rename to code/__DEFINES/~~bubber_defines/traits/declarations.dm diff --git a/modular_zubbers/code/datums/materials/basemats.dm b/modular_zubbers/code/datums/materials/basemats.dm deleted file mode 100644 index 68373603d10..00000000000 --- a/modular_zubbers/code/datums/materials/basemats.dm +++ /dev/null @@ -1,7 +0,0 @@ -/datum/material/silver/on_applied(atom/source, amount, material_flags) - . = ..() - source.AddElement(/datum/element/bane, mob_biotypes = MOB_VAMPIRIC, damage_multiplier = 0.5) - -/datum/material/silver/on_removed(atom/source, amount, material_flags) - . = ..() - source.RemoveElement(/datum/element/bane) diff --git a/modular_zubbers/tools/ci/zubbers_check_grep.sh b/modular_zubbers/tools/ci/zubbers_check_grep.sh new file mode 100644 index 00000000000..0c2f0a3d297 --- /dev/null +++ b/modular_zubbers/tools/ci/zubbers_check_grep.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +#ANSI Escape Codes for colors to increase contrast of errors +RED="\033[0;31m" +GREEN="\033[0;32m" +BLUE="\033[0;34m" +NC="\033[0m" # No Color + +echo -e "${BLUE}Re-running grep checks, but looking in modular_zubbers...${NC}" + +# Run the linters again, but modular zubbers code. +sed "s|code/\*\*/\*\.dm|modular_zubbers/\*\*/\*\.dm|g"