mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-04-17 18:35:03 +00:00
Merge remote-tracking branch 'origin/master' into feature/scripted-stages
This commit is contained in:
commit
2cfeffb791
|
@ -1,6 +1,6 @@
|
||||||
package modding;
|
package modding;
|
||||||
|
|
||||||
#if desktop
|
#if polymod
|
||||||
import polymod.Polymod.ModMetadata;
|
import polymod.Polymod.ModMetadata;
|
||||||
import polymod.Polymod;
|
import polymod.Polymod;
|
||||||
import polymod.backends.OpenFLBackend;
|
import polymod.backends.OpenFLBackend;
|
||||||
|
@ -29,7 +29,7 @@ class PolymodHandler
|
||||||
*/
|
*/
|
||||||
public static function loadAllMods()
|
public static function loadAllMods()
|
||||||
{
|
{
|
||||||
#if cpp
|
#if polymod
|
||||||
trace("Initializing Polymod (using all mods)...");
|
trace("Initializing Polymod (using all mods)...");
|
||||||
loadModsById(getAllModIds());
|
loadModsById(getAllModIds());
|
||||||
#else
|
#else
|
||||||
|
@ -43,7 +43,7 @@ class PolymodHandler
|
||||||
public static function loadNoMods()
|
public static function loadNoMods()
|
||||||
{
|
{
|
||||||
// We still need to configure the debug print calls etc.
|
// We still need to configure the debug print calls etc.
|
||||||
#if cpp
|
#if polymod
|
||||||
trace("Initializing Polymod (using no mods)...");
|
trace("Initializing Polymod (using no mods)...");
|
||||||
loadModsById([]);
|
loadModsById([]);
|
||||||
#else
|
#else
|
||||||
|
@ -53,7 +53,7 @@ class PolymodHandler
|
||||||
|
|
||||||
public static function loadModsById(ids:Array<String>)
|
public static function loadModsById(ids:Array<String>)
|
||||||
{
|
{
|
||||||
#if cpp
|
#if polymod
|
||||||
if (ids.length == 0)
|
if (ids.length == 0)
|
||||||
{
|
{
|
||||||
trace('You attempted to load zero mods.');
|
trace('You attempted to load zero mods.');
|
||||||
|
@ -135,7 +135,7 @@ class PolymodHandler
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
#if cpp
|
#if polymod
|
||||||
static function buildParseRules():polymod.format.ParseRules
|
static function buildParseRules():polymod.format.ParseRules
|
||||||
{
|
{
|
||||||
var output = polymod.format.ParseRules.getDefault();
|
var output = polymod.format.ParseRules.getDefault();
|
||||||
|
@ -186,15 +186,15 @@ class PolymodHandler
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
public static function getAllMods():Array<#if cpp ModMetadata #else Dynamic #end> // this is shitty conditional but ModMetadata isn't imported on HTML5! And I'm too lazy to actually do it properly!
|
public static function getAllMods()
|
||||||
{
|
{
|
||||||
#if cpp
|
#if polymod
|
||||||
trace('Scanning the mods folder...');
|
trace('Scanning the mods folder...');
|
||||||
var modMetadata = Polymod.scan(MOD_FOLDER);
|
var modMetadata = Polymod.scan(MOD_FOLDER);
|
||||||
trace('Found ${modMetadata.length} mods when scanning.');
|
trace('Found ${modMetadata.length} mods when scanning.');
|
||||||
return modMetadata;
|
return modMetadata;
|
||||||
#else
|
#else
|
||||||
return [];
|
return new Array<Dynamic>();
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue