Skip to content

Commit

Permalink
sm stf
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Jul 22, 2024
1 parent 0368147 commit 77c68c1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 31 deletions.
63 changes: 40 additions & 23 deletions .github/workflows/multi-platform.yml
Original file line number Diff line number Diff line change
@@ -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

6 changes: 3 additions & 3 deletions mod.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
14 changes: 9 additions & 5 deletions src/level_data.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#include "_main.hpp"
using namespace mle_leveltools;

//huh
#include <Geode/modify/PlayLayer.hpp>
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();
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 77c68c1

Please sign in to comment.