1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-20 00:46:34 +00:00

add outside_training_mode to uploaded artifacts

This commit is contained in:
jugeeya 2021-01-22 19:21:17 +00:00
parent d24a94835e
commit 7b0daca018
3 changed files with 14 additions and 2 deletions

View file

@ -35,6 +35,13 @@ jobs:
with: with:
name: plugin name: plugin
path: target/aarch64-skyline-switch/release/libtraining_modpack.nro path: target/aarch64-skyline-switch/release/libtraining_modpack.nro
- name: Build outside_training_mode NRO
run: xargo build --release --features outside_training_mode
- name: Upload plugin (outside training mode) artifact
uses: actions/upload-artifact@v2
with:
name: plugin_outside_training_mode
path: target/aarch64-skyline-switch/release/libtraining_modpack.nro
upload: upload:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:

View file

@ -29,3 +29,5 @@ plugin-dependencies = [
{ name = "libparam_hook.nro", url = "https://github.com/ultimate-research/params-hook-plugin/releases/download/v0.1.1/libparam_hook.nro" }, { name = "libparam_hook.nro", url = "https://github.com/ultimate-research/params-hook-plugin/releases/download/v0.1.1/libparam_hook.nro" },
] ]
[features]
outside_training_mode = []

View file

@ -39,12 +39,15 @@ pub static mut MENU: &consts::TrainingModpackMenu = unsafe { &mut MENU_STRUCT };
pub static mut FIGHTER_MANAGER_ADDR: usize = 0; pub static mut FIGHTER_MANAGER_ADDR: usize = 0;
pub static mut STAGE_MANAGER_ADDR: usize = 0; pub static mut STAGE_MANAGER_ADDR: usize = 0;
#[cfg(not(feature = "outside_training_mode"))]
extern "C" { extern "C" {
#[link_name = "\u{1}_ZN3app9smashball16is_training_modeEv"] #[link_name = "\u{1}_ZN3app9smashball16is_training_modeEv"]
pub fn is_training_mode() -> bool; pub fn is_training_mode() -> bool;
}
//#[link_name = "\u{1}_ZN3app7utility8get_kindEPKNS_26BattleObjectModuleAccessorE"] #[cfg(feature = "outside_training_mode")]
//pub fn get_kind(module_accessor: &mut app::BattleObjectModuleAccessor) -> i32; pub fn is_training_mode() -> bool {
return true;
} }
pub fn get_category(module_accessor: &mut app::BattleObjectModuleAccessor) -> i32 { pub fn get_category(module_accessor: &mut app::BattleObjectModuleAccessor) -> i32 {