From 77c68c16549a01b5cb60701aa696e3fb323dba36 Mon Sep 17 00:00:00 2001 From: user666 Date: Mon, 22 Jul 2024 10:33:12 +0400 Subject: [PATCH] sm stf --- .github/workflows/multi-platform.yml | 63 ++++++++++++++++++---------- mod.json | 6 +-- src/level_data.cpp | 14 ++++--- 3 files changed, 52 insertions(+), 31 deletions(-) diff --git a/.github/workflows/multi-platform.yml b/.github/workflows/multi-platform.yml index 70a67bb..be5c649 100644 --- a/.github/workflows/multi-platform.yml +++ b/.github/workflows/multi-platform.yml @@ -1,62 +1,79 @@ name: Build Geode Mod + permissions: contents: write + on: workflow_dispatch: push: branches: - - "**" + - '**' + jobs: + build: + continue-on-error: true # continue even if build failed for some platform strategy: + fail-fast: false matrix: config: - name: Windows os: windows-latest - - - name: Android32 - os: ubuntu-latest - target: Android32 + + - name: macOS + os: macos-latest - name: Android64 os: ubuntu-latest target: Android64 + - name: Android32 + os: ubuntu-latest + target: Android32 + name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} - steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + - name: Build the mod uses: geode-sdk/build-geode-mod@main with: - combine: true target: ${{ matrix.config.target }} - - package: - name: Package and release builds + combine: true + + upload: + name: Combine and upload builds runs-on: ubuntu-latest needs: ['build'] steps: - - uses: geode-sdk/build-geode-mod/combine@main - with: - delete-artifacts: false + + - name: "Combine builds" + uses: geode-sdk/build-geode-mod/combine@main id: build - - uses: actions/upload-artifact@v4 + + - name: "Upload artifact" + uses: actions/upload-artifact@v4 with: name: Build Output - path: ${{ steps.build.outputs.build-output }} - - name: Set up Git repository + path: ${{ steps.build.outputs.build-output }} + + - name: "Set up Git repository" uses: actions/checkout@v2 - - name: Get mod properties + + - name: "Get mod properties" id: json_properties uses: ActionsTools/read-json-action@main with: file_path: "mod.json" - - uses: softprops/action-gh-release@v2 - name: "Release" + + - name: "Release" + uses: ncipollo/release-action@v1 with: - tag_name: "${{steps.json_properties.outputs.version}}" - files: "${{steps.build.outputs.build-output}}/*" - + body: "${{ steps.changelog.outputs.changelog}}" + tag: "${{steps.json_properties.outputs.version}}" + artifacts: "${{steps.build.outputs.build-output}}/*" + artifactErrorsFailBuild: true + allowUpdates: false + \ No newline at end of file diff --git a/mod.json b/mod.json index 5d7b3bd..a4e063c 100644 --- a/mod.json +++ b/mod.json @@ -1,10 +1,10 @@ { - "geode": "3.2.0", + "geode": "3.3.0", "gd": { "win": "2.206", - "android": "*" + "android": "2.206" }, - "version": "v7.0.0-beta.12", + "version": "v7.0.0-beta.13", "id": "user95401.mainlevelseditor", "name": "Main Levels Editor", "developer": "user95401", diff --git a/src/level_data.cpp b/src/level_data.cpp index 60e48ea..df1672f 100644 --- a/src/level_data.cpp +++ b/src/level_data.cpp @@ -1,14 +1,18 @@ #include "_main.hpp" using namespace mle_leveltools; + //huh #include class $modify(PlayLayer) { $override bool init(GJGameLevel * level, bool useReplay, bool dontCreateObjects) { auto levelType = level->m_levelType; - level->m_levelType = GJLevelType::Saved; //temp "Load Failed" bypass - auto rtn = PlayLayer::init(level, useReplay, dontCreateObjects); - level->m_levelType = levelType; - return rtn; + if (levelType == GJLevelType::Local) { + level->m_levelType = GJLevelType::Saved; //temp "Load Failed" bypass + auto rtn = PlayLayer::init(level, useReplay, dontCreateObjects); + level->m_levelType = levelType; + return rtn; + }; + return PlayLayer::init(level, useReplay, dontCreateObjects); } $override void resetLevel() { PlayLayer::resetLevel(); @@ -70,7 +74,7 @@ class $modify(LevelTools) { updateLevelByJson(level); return level; }; - $override static bool /*NOT_NOW___*/verifyLevelIntegrity(int p0, int p1) { + $override static bool NOT_NOW___verifyLevelIntegrity(std::string p0, int p1) { //hooking error lol return 1; }