moved utils (update your scripts!!!!)
This commit is contained in:
@@ -167,6 +167,5 @@
|
||||
<haxedef name="HXCPP_CHECK_POINTER" if="release" />
|
||||
<haxedef name="HXCPP_STACK_LINE" if="release" />
|
||||
<haxedef name="HXCPP_DEBUG_LINK" if="release" />
|
||||
<haxedef name="HXCPP_GC_BIG_BLOCKS" />
|
||||
<haxedef name="hscriptPos" /> <!-- for logging -->
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2001
|
||||
2003
|
||||
@@ -7,7 +7,7 @@ import flixel.FlxObject;
|
||||
import flixel.FlxCamera;
|
||||
import flixel.FlxG;
|
||||
|
||||
using funkin.system.XMLUtil;
|
||||
using funkin.utils.XMLUtil;
|
||||
|
||||
class CharacterEditor extends WindowContent {
|
||||
public function new(curCharacter:String) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import flixel.graphics.frames.FlxFrame;
|
||||
import flixel.math.FlxPoint;
|
||||
import funkin.interfaces.IBeatReceiver;
|
||||
import funkin.interfaces.IOffsetCompatible;
|
||||
import funkin.system.XMLUtil;
|
||||
import funkin.utils.XMLUtil;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
|
||||
@@ -2,7 +2,6 @@ package funkin.game;
|
||||
|
||||
import flixel.FlxG;
|
||||
import flixel.FlxState;
|
||||
import funkin.system.XMLUtil;
|
||||
import flixel.FlxSprite;
|
||||
import openfl.utils.Assets;
|
||||
import haxe.xml.Access;
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
import funkin.system.Paths;
|
||||
import funkin.system.MusicBeatState;
|
||||
import funkin.system.MusicBeatSubstate;
|
||||
import funkin.system.CoolUtil;
|
||||
import funkin.system.MusicBeatGroup;
|
||||
import funkin.system.FunkinSprite;
|
||||
import funkin.utils.*;
|
||||
import funkin.system.Logs;
|
||||
import funkin.game.PlayState;
|
||||
|
||||
import funkin.scripting.EventManager;
|
||||
|
||||
using StringTools;
|
||||
using funkin.system.CoolUtil;
|
||||
using funkin.utils.CoolUtil;
|
||||
#end
|
||||
|
||||
@@ -3,7 +3,6 @@ package funkin.menus;
|
||||
import funkin.scripting.events.*;
|
||||
import flixel.util.FlxTimer;
|
||||
import flixel.math.FlxPoint;
|
||||
import funkin.system.XMLUtil;
|
||||
import flixel.graphics.frames.FlxFramesCollection;
|
||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||
import funkin.game.Highscore;
|
||||
|
||||
@@ -2,7 +2,7 @@ package funkin.menus;
|
||||
|
||||
import funkin.github.GitHub;
|
||||
import funkin.system.MusicBeatGroup;
|
||||
import funkin.system.XMLUtil;
|
||||
import funkin.utils.XMLUtil;
|
||||
import flixel.util.typeLimit.OneOfThree;
|
||||
import flixel.util.typeLimit.OneOfTwo;
|
||||
import flixel.FlxG;
|
||||
|
||||
@@ -74,12 +74,15 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
||||
"Options" => funkin.options.Options,
|
||||
"Paths" => funkin.system.Paths,
|
||||
"Conductor" => funkin.system.Conductor,
|
||||
"CoolUtil" => funkin.system.CoolUtil,
|
||||
"XMLUtil" => funkin.system.XMLUtil,
|
||||
"FunkinShader" => funkin.shaders.FunkinShader,
|
||||
"CustomShader" => funkin.shaders.CustomShader,
|
||||
"FunkinText" => funkin.ui.FunkinText,
|
||||
"Alphabet" => funkin.ui.Alphabet,
|
||||
"CoolUtil" => funkin.utils.CoolUtil,
|
||||
"IniUtil" => funkin.utils.IniUtil,
|
||||
"XMLUtil" => funkin.utils.XMLUtil,
|
||||
"ZipUtil" => funkin.utils.ZipUtil,
|
||||
"MarkdownUtil" => funkin.utils.MarkdownUtil,
|
||||
];
|
||||
}
|
||||
public static function getDefaultPreprocessors():Map<String, Dynamic> {
|
||||
|
||||
@@ -3,7 +3,7 @@ package funkin.updating;
|
||||
import openfl.Lib;
|
||||
import sys.io.Process;
|
||||
import haxe.zip.Reader;
|
||||
import funkin.system.ZipUtils;
|
||||
import funkin.utils.ZipUtil;
|
||||
import haxe.io.Path;
|
||||
import openfl.utils.ByteArray;
|
||||
import sys.io.File;
|
||||
@@ -63,10 +63,10 @@ class AsyncUpdater {
|
||||
progress.curFile = k+1;
|
||||
progress.curFileName = e;
|
||||
trace('extracting file ${path}');
|
||||
var reader = ZipUtils.openZip(path);
|
||||
var reader = ZipUtil.openZip(path);
|
||||
|
||||
progress.curZipProgress = new ZipProgress();
|
||||
ZipUtils.uncompressZip(reader, './', null, progress.curZipProgress);
|
||||
ZipUtil.uncompressZip(reader, './', null, progress.curZipProgress);
|
||||
// FileSystem.deleteFile(path);
|
||||
}
|
||||
if (executableReplaced = FileSystem.exists('$path$executableName')) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package funkin.updating;
|
||||
|
||||
import funkin.system.MarkdownUtil;
|
||||
import funkin.utils.MarkdownUtil;
|
||||
import funkin.menus.MainMenuState;
|
||||
import flixel.math.FlxPoint;
|
||||
import flixel.math.FlxMath;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package funkin.system;
|
||||
package funkin.utils;
|
||||
|
||||
import funkin.system.Song;
|
||||
import funkin.system.Conductor;
|
||||
import flixel.system.FlxSoundGroup;
|
||||
import animateatlas.AtlasFrameMaker;
|
||||
import haxe.Json;
|
||||
@@ -164,7 +166,7 @@ class CoolUtil
|
||||
|
||||
var infoPath = '${Path.withoutExtension(path)}.ini';
|
||||
if (Assets.exists(infoPath)) {
|
||||
var musicInfo = IniUtils.parseAsset(infoPath, [
|
||||
var musicInfo = IniUtil.parseAsset(infoPath, [
|
||||
"BPM" => null
|
||||
]);
|
||||
var parsedBPM:Null<Float> = Std.parseFloat(musicInfo["BPM"]);
|
||||
@@ -1,11 +1,11 @@
|
||||
package funkin.system;
|
||||
package funkin.utils;
|
||||
|
||||
import openfl.utils.Assets;
|
||||
|
||||
/**
|
||||
* DOESNT SUPPORT CATEGORIES YET!!
|
||||
*/
|
||||
class IniUtils {
|
||||
class IniUtil {
|
||||
public static inline function parseAsset(assetPath:String, ?defaultVariables:Map<String, String>)
|
||||
return parseString(Assets.getText(assetPath), defaultVariables);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package funkin.system;
|
||||
package funkin.utils;
|
||||
|
||||
import flixel.util.FlxColor;
|
||||
import flixel.text.FlxText;
|
||||
@@ -1,4 +1,4 @@
|
||||
package funkin.system;
|
||||
package funkin.utils;
|
||||
|
||||
#if ALLOW_MULTITHREADING
|
||||
class ThreadUtil {
|
||||
@@ -1,5 +1,7 @@
|
||||
package funkin.system;
|
||||
package funkin.utils;
|
||||
|
||||
import funkin.system.FunkinSprite;
|
||||
import funkin.system.ErrorCode;
|
||||
import funkin.system.FunkinSprite.XMLAnimType;
|
||||
import flixel.math.FlxMath;
|
||||
import funkin.interfaces.IBeatReceiver;
|
||||
@@ -1,4 +1,4 @@
|
||||
package funkin.system;
|
||||
package funkin.utils;
|
||||
|
||||
#if (!macro && sys)
|
||||
import openfl.display.BitmapData;
|
||||
@@ -22,7 +22,7 @@ using StringTools;
|
||||
// import ZipUtils; ZipUtils.uncompressZip(ZipUtils.openZip("E:\\Desktop\\test\\termination lua.ycemod"), "E:\\Desktop\\test\\uncompressed\\");
|
||||
// import ZipUtils; var e = ZipUtils.createZipFile("gjnsdghs.ycemod"); ZipUtils.writeFolderToZip(e, "./mods/Friday Night Funkin'/", "Friday Night Funkin'/"); e.flush(); e.close();
|
||||
|
||||
class ZipUtils {
|
||||
class ZipUtil {
|
||||
public static var bannedNames:Array<String> = [".git", ".gitignore", ".github", ".vscode", ".gitattributes", "readme.txt"];
|
||||
|
||||
/**
|
||||
Reference in New Issue
Block a user