This commit is contained in:
Yoshman29
2022-12-24 00:25:34 +01:00
parent f7e58db98e
commit b6564abfd5
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -125,6 +125,7 @@
<haxedef name="VIDEO_CUTSCENES" if="VIDEO_CUTSCENES" />
<haxedef name="UPDATE_CHECKING" if="UPDATE_CHECKING" />
<haxeflag name="--macro" value="funkin.macros.StdDeprecationsRemover.init()" />
<!-- _______________________________ Libraries ______________________________ -->
@@ -150,7 +151,6 @@
<section if="COMPILE_ALL_CLASSES">
<haxeflag name="-dce" value="no" />
<haxeflag name="--macro" value="funkin.macros.ScriptsMacro.addAdditionalClasses()" />
<haxeflag name="--macro" value="funkin.macros.StdDeprecationsRemover.init()" />
</section>
<haxeflag name="--macro" value="exclude('funkin.updating')" unless="UPDATE_CHECKING"/>
<haxeflag name="--macro" value="exclude('funkin.multitasking')" unless="ALLOW_MULTITASKING"/>
+1 -1
View File
@@ -1 +1 @@
1730
1731
@@ -8,12 +8,14 @@ import haxe.macro.Compiler;
/**
* Removes all deprecations errors related to `Std.is`
* Written by Yoshman29 to keep you sane.
* Feel free to use this macro on your mod without forgetting this line in Project.xml:
* Feel free to use this macro on your mod.
*
* Line to add in project.xml:
* `<haxeflag name="--macro" value="funkin.macros.StdDeprecationsRemover.init()" />`
*/
class StdDeprecationsRemover {
public static function init() {
Compiler.addGlobalMetadata('Std', '@:build(hscript.UsingHandler.build())');
Compiler.addGlobalMetadata('Std', '@:build(funkin.macros.StdDeprecationsRemover.build())');
}
public static function build():Array<Field> {