better events and funkinSave categorization
This commit is contained in:
@@ -8,7 +8,7 @@ import flixel.math.FlxRect;
|
|||||||
import flixel.system.FlxAssets.FlxGraphicAsset;
|
import flixel.system.FlxAssets.FlxGraphicAsset;
|
||||||
import flixel.util.typeLimit.OneOfTwo;
|
import flixel.util.typeLimit.OneOfTwo;
|
||||||
import flxanimate.animate.FlxAnim.FlxSymbolAnimation;
|
import flxanimate.animate.FlxAnim.FlxSymbolAnimation;
|
||||||
import funkin.backend.scripting.events.PlayAnimContext;
|
import funkin.backend.scripting.events.sprite.PlayAnimContext;
|
||||||
import funkin.backend.system.interfaces.IBeatReceiver;
|
import funkin.backend.system.interfaces.IBeatReceiver;
|
||||||
import funkin.backend.system.interfaces.IOffsetCompatible;
|
import funkin.backend.system.interfaces.IOffsetCompatible;
|
||||||
import funkin.backend.utils.XMLUtil.AnimData;
|
import funkin.backend.utils.XMLUtil.AnimData;
|
||||||
|
|||||||
@@ -19,38 +19,38 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
|||||||
public static function getDefaultVariables(?script:Script):Map<String, Dynamic> {
|
public static function getDefaultVariables(?script:Script):Map<String, Dynamic> {
|
||||||
return [
|
return [
|
||||||
// Haxe related stuff
|
// Haxe related stuff
|
||||||
"Std" => Std,
|
"Std" => Std,
|
||||||
"Math" => Math,
|
"Math" => Math,
|
||||||
"Reflect" => Reflect,
|
"Reflect" => Reflect,
|
||||||
"StringTools" => StringTools,
|
"StringTools" => StringTools,
|
||||||
"Json" => haxe.Json,
|
"Json" => haxe.Json,
|
||||||
|
|
||||||
// OpenFL & Lime related stuff
|
// OpenFL & Lime related stuff
|
||||||
"Assets" => openfl.utils.Assets,
|
"Assets" => openfl.utils.Assets,
|
||||||
"Application" => lime.app.Application,
|
"Application" => lime.app.Application,
|
||||||
"Main" => funkin.backend.system.Main,
|
"Main" => funkin.backend.system.Main,
|
||||||
"window" => lime.app.Application.current.window,
|
"window" => lime.app.Application.current.window,
|
||||||
|
|
||||||
// Flixel related stuff
|
// Flixel related stuff
|
||||||
"FlxG" => flixel.FlxG,
|
"state" => flixel.FlxG.state,
|
||||||
"FlxSprite" => flixel.FlxSprite,
|
"FlxG" => flixel.FlxG,
|
||||||
"FlxBasic" => flixel.FlxBasic,
|
"FlxSprite" => flixel.FlxSprite,
|
||||||
"FlxCamera" => flixel.FlxCamera,
|
"FlxBasic" => flixel.FlxBasic,
|
||||||
"state" => flixel.FlxG.state,
|
"FlxCamera" => flixel.FlxCamera,
|
||||||
"FlxEase" => flixel.tweens.FlxEase,
|
"FlxEase" => flixel.tweens.FlxEase,
|
||||||
"FlxTween" => flixel.tweens.FlxTween,
|
"FlxTween" => flixel.tweens.FlxTween,
|
||||||
"FlxSound" => flixel.sound.FlxSound,
|
"FlxSound" => flixel.sound.FlxSound,
|
||||||
"FlxAssets" => flixel.system.FlxAssets,
|
"FlxAssets" => flixel.system.FlxAssets,
|
||||||
"FlxMath" => flixel.math.FlxMath,
|
"FlxMath" => flixel.math.FlxMath,
|
||||||
"FlxGroup" => flixel.group.FlxGroup,
|
"FlxGroup" => flixel.group.FlxGroup,
|
||||||
"FlxTypedGroup" => flixel.group.FlxGroup.FlxTypedGroup,
|
"FlxTypedGroup" => flixel.group.FlxGroup.FlxTypedGroup,
|
||||||
"FlxSpriteGroup" => flixel.group.FlxSpriteGroup,
|
"FlxSpriteGroup" => flixel.group.FlxSpriteGroup,
|
||||||
"FlxTypeText" => flixel.addons.text.FlxTypeText,
|
"FlxTypeText" => flixel.addons.text.FlxTypeText,
|
||||||
"FlxText" => flixel.text.FlxText,
|
"FlxText" => flixel.text.FlxText,
|
||||||
"FlxTimer" => flixel.util.FlxTimer,
|
"FlxTimer" => flixel.util.FlxTimer,
|
||||||
"FlxPoint" => CoolUtil.getMacroAbstractClass("flixel.math.FlxPoint"),
|
"FlxPoint" => CoolUtil.getMacroAbstractClass("flixel.math.FlxPoint"),
|
||||||
"FlxAxes" => CoolUtil.getMacroAbstractClass("flixel.util.FlxAxes"),
|
"FlxAxes" => CoolUtil.getMacroAbstractClass("flixel.util.FlxAxes"),
|
||||||
"FlxColor" => CoolUtil.getMacroAbstractClass("flixel.util.FlxColor"),
|
"FlxColor" => CoolUtil.getMacroAbstractClass("flixel.util.FlxColor"),
|
||||||
|
|
||||||
// Engine related stuff
|
// Engine related stuff
|
||||||
"engine" => {
|
"engine" => {
|
||||||
@@ -59,38 +59,38 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
|||||||
build: 2675, // 2675 being the last build num before it was removed
|
build: 2675, // 2675 being the last build num before it was removed
|
||||||
name: "Codename Engine"
|
name: "Codename Engine"
|
||||||
},
|
},
|
||||||
"ModState" => funkin.backend.scripting.ModState,
|
"ModState" => funkin.backend.scripting.ModState,
|
||||||
"ModSubState" => funkin.backend.scripting.ModSubState,
|
"ModSubState" => funkin.backend.scripting.ModSubState,
|
||||||
"PlayState" => funkin.game.PlayState,
|
"PlayState" => funkin.game.PlayState,
|
||||||
"GameOverSubstate" => funkin.game.GameOverSubstate,
|
"GameOverSubstate" => funkin.game.GameOverSubstate,
|
||||||
"HealthIcon" => funkin.game.HealthIcon,
|
"HealthIcon" => funkin.game.HealthIcon,
|
||||||
"HudCamera" => funkin.game.HudCamera,
|
"HudCamera" => funkin.game.HudCamera,
|
||||||
"Note" => funkin.game.Note,
|
"Note" => funkin.game.Note,
|
||||||
"Strum" => funkin.game.Strum,
|
"Strum" => funkin.game.Strum,
|
||||||
"StrumLine" => funkin.game.StrumLine,
|
"StrumLine" => funkin.game.StrumLine,
|
||||||
"Character" => funkin.game.Character,
|
"Character" => funkin.game.Character,
|
||||||
"Boyfriend" => funkin.game.Character, // for compatibility
|
"Boyfriend" => funkin.game.Character, // for compatibility
|
||||||
"PauseSubstate" => funkin.menus.PauseSubState,
|
"PauseSubstate" => funkin.menus.PauseSubState,
|
||||||
"FreeplayState" => funkin.menus.FreeplayState,
|
"FreeplayState" => funkin.menus.FreeplayState,
|
||||||
"MainMenuState" => funkin.menus.MainMenuState,
|
"MainMenuState" => funkin.menus.MainMenuState,
|
||||||
"PauseSubState" => funkin.menus.PauseSubState,
|
"PauseSubState" => funkin.menus.PauseSubState,
|
||||||
"StoryMenuState" => funkin.menus.StoryMenuState,
|
"StoryMenuState" => funkin.menus.StoryMenuState,
|
||||||
"TitleState" => funkin.menus.TitleState,
|
"TitleState" => funkin.menus.TitleState,
|
||||||
"Options" => funkin.options.Options,
|
"Options" => funkin.options.Options,
|
||||||
"Paths" => funkin.backend.assets.Paths,
|
"Paths" => funkin.backend.assets.Paths,
|
||||||
"Conductor" => funkin.backend.system.Conductor,
|
"Conductor" => funkin.backend.system.Conductor,
|
||||||
"FunkinShader" => funkin.backend.shaders.FunkinShader,
|
"FunkinShader" => funkin.backend.shaders.FunkinShader,
|
||||||
"CustomShader" => funkin.backend.shaders.CustomShader,
|
"CustomShader" => funkin.backend.shaders.CustomShader,
|
||||||
"FunkinText" => funkin.backend.FunkinText,
|
"FunkinText" => funkin.backend.FunkinText,
|
||||||
"FlxAnimate" => funkin.backend.FlxAnimate,
|
"FlxAnimate" => funkin.backend.FlxAnimate,
|
||||||
"FunkinSprite" => funkin.backend.FunkinSprite,
|
"FunkinSprite" => funkin.backend.FunkinSprite,
|
||||||
"Alphabet" => funkin.menus.ui.Alphabet,
|
"Alphabet" => funkin.menus.ui.Alphabet,
|
||||||
|
|
||||||
"CoolUtil" => funkin.backend.utils.CoolUtil,
|
"CoolUtil" => funkin.backend.utils.CoolUtil,
|
||||||
"IniUtil" => funkin.backend.utils.IniUtil,
|
"IniUtil" => funkin.backend.utils.IniUtil,
|
||||||
"XMLUtil" => funkin.backend.utils.XMLUtil,
|
"XMLUtil" => funkin.backend.utils.XMLUtil,
|
||||||
#if sys "ZipUtil" => funkin.backend.utils.ZipUtil, #end
|
#if sys "ZipUtil" => funkin.backend.utils.ZipUtil, #end
|
||||||
"MarkdownUtil" => funkin.backend.utils.MarkdownUtil,
|
"MarkdownUtil" => funkin.backend.utils.MarkdownUtil,
|
||||||
"EngineUtil" => funkin.backend.utils.EngineUtil,
|
"EngineUtil" => funkin.backend.utils.EngineUtil,
|
||||||
"MemoryUtil" => funkin.backend.utils.MemoryUtil,
|
"MemoryUtil" => funkin.backend.utils.MemoryUtil,
|
||||||
"BitmapUtil" => funkin.backend.utils.BitmapUtil,
|
"BitmapUtil" => funkin.backend.utils.BitmapUtil,
|
||||||
@@ -98,14 +98,47 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used internally to keep backwards compatability with old scripts.
|
* Used internally to keep backwards compatibility with old scripts.
|
||||||
* This gets set on `hscript.Interp.importRedirects`,
|
* This gets set on `hscript.Interp.importRedirects`,
|
||||||
* if you wanna modify it, please edit `hscript.Interp.importRedirects` directly.
|
* if you wanna modify it, please edit `hscript.Interp.importRedirects` directly.
|
||||||
**/
|
**/
|
||||||
public static function getDefaultImportRedirects():Map<String, String> {
|
public static function getDefaultImportRedirects():Map<String, String> {
|
||||||
return [
|
var redirects:Map<String, String> = [
|
||||||
"Meow" => "funkin.backend.utils.CoolUtil",
|
"funkin.savedata.FunkinSave" => "funkin.backend.utils.FunkinSave"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
final events = "funkin.backend.scripting.events.";
|
||||||
|
redirects[events + "CharacterNodeEvent"] = events + "character.CharacterNodeEvent";
|
||||||
|
redirects[events + "CharacterXMLEvent"] = events + "character.CharacterXMLEvent";
|
||||||
|
redirects[events + "DanceEvent"] = events + "character.DanceEvent";
|
||||||
|
redirects[events + "DirectionAnimEvent"] = events + "character.DirectionAnimEvent";
|
||||||
|
redirects[events + "DiscordPresenceUpdateEvent"] = events + "discord.DiscordPresenceUpdateEvent";
|
||||||
|
redirects[events + "GameOverCreationEvent"] = events + "gameover.GameOverCreationEvent";
|
||||||
|
redirects[events + "CamMoveEvent"] = events + "gameplay.CamMoveEvent";
|
||||||
|
redirects[events + "CountdownEvent"] = events + "gameplay.CountdownEvent";
|
||||||
|
redirects[events + "EventGameEvent"] = events + "gameplay.EventGameEvent";
|
||||||
|
redirects[events + "GameOverEvent"] = events + "gameplay.GameOverEvent";
|
||||||
|
redirects[events + "RatingUpdateEvent"] = events + "gameplay.RatingUpdateEvent";
|
||||||
|
redirects[events + "HealthIconChangeEvent"] = events + "healthicon.HealthIconChangeEvent";
|
||||||
|
redirects[events + "FreeplayAlphaUpdateEvent"] = events + "menu.freeplay.FreeplayAlphaUpdateEvent";
|
||||||
|
redirects[events + "FreeplaySongSelectEvent"] = events + "menu.freeplay.FreeplaySongSelectEvent";
|
||||||
|
redirects[events + "MenuChangeEvent"] = events + "menu.MenuChangeEvent";
|
||||||
|
redirects[events + "PauseCreationEvent"] = events + "menu.pause.PauseCreationEvent";
|
||||||
|
redirects[events + "WeekSelectEvent"] = events + "menu.storymenu.WeekSelectEvent";
|
||||||
|
redirects[events + "InputSystemEvent"] = events + "note.InputSystemEvent";
|
||||||
|
redirects[events + "NoteCreationEvent"] = events + "note.NoteCreationEvent";
|
||||||
|
redirects[events + "NoteHitEvent"] = events + "note.NoteHitEvent";
|
||||||
|
redirects[events + "NoteMissEvent"] = events + "note.NoteMissEvent";
|
||||||
|
redirects[events + "NoteUpdateEvent"] = events + "note.NoteUpdateEvent";
|
||||||
|
redirects[events + "SimpleNoteEvent"] = events + "note.SimpleNoteEvent";
|
||||||
|
redirects[events + "StrumCreationEvent"] = events + "note.StrumCreationEvent";
|
||||||
|
redirects[events + "SplashShowEvent"] = events + "splash.SplashShowEvent";
|
||||||
|
redirects[events + "PlayAnimContext"] = events + "sprite.PlayAnimContext";
|
||||||
|
redirects[events + "PlayAnimEvent"] = events + "sprite.PlayAnimEvent";
|
||||||
|
redirects[events + "StageNodeEvent"] = events + "stage.StageNodeEvent";
|
||||||
|
redirects[events + "StageXMLEvent"] = events + "stage.StageXMLEvent";
|
||||||
|
|
||||||
|
return redirects;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getDefaultPreprocessors():Map<String, Dynamic> {
|
public static function getDefaultPreprocessors():Map<String, Dynamic> {
|
||||||
|
|||||||
@@ -5,9 +5,4 @@ final class AmountEvent extends CancellableEvent {
|
|||||||
* Amount
|
* Amount
|
||||||
*/
|
*/
|
||||||
public var amount:Null<Int>;
|
public var amount:Null<Int>;
|
||||||
|
|
||||||
/**
|
|
||||||
* Shows whether or not psych users complained about this class
|
|
||||||
*/
|
|
||||||
public var psychUsersComplained:Bool = true;
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events;
|
||||||
|
|
||||||
final class DrawEvent extends CancellableEvent {
|
final class DrawEvent extends CancellableEvent {
|
||||||
|
// temp empty for now - Nex
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
## NOTE
|
||||||
|
Keep in mind that a certain criteria was used to place events in their corresponding folders which is simply what the events themselves are mostly related to.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
- `GameOverEvent` inside of the `gameplay` folder instead of the `gameover` folder since it gets called in the `PlayState` class (that owns the `gameplay` folder) instead of the `GameOverSubstate` class itself;
|
||||||
|
- `NoteHitEvent` gets indeed called by the `PlayState` class but it's also used in the `StrumLine` (For those who didn't really know, Strumlines are the Input Notes) class and since the event's name itself starts with the word `Note` it was more accurate to place it in the `note` folder instead of the `gameplay` folder that `PlayState` owns.
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.character;
|
||||||
|
|
||||||
import funkin.game.Character;
|
import funkin.game.Character;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.character;
|
||||||
|
|
||||||
import funkin.game.Character;
|
import funkin.game.Character;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
@@ -7,7 +7,7 @@ final class CharacterXMLEvent extends CancellableEvent {
|
|||||||
/**
|
/**
|
||||||
* The character instance
|
* The character instance
|
||||||
*/
|
*/
|
||||||
public var character:Character;
|
public var character:Character;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The xml
|
* The xml
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.character;
|
||||||
|
|
||||||
final class DanceEvent extends CancellableEvent {
|
final class DanceEvent extends CancellableEvent {
|
||||||
public var danced:Bool;
|
public var danced:Bool;
|
||||||
+3
-1
@@ -1,4 +1,6 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.character;
|
||||||
|
|
||||||
|
import funkin.backend.scripting.events.sprite.PlayAnimContext;
|
||||||
|
|
||||||
final class DirectionAnimEvent extends CancellableEvent {
|
final class DirectionAnimEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.discord;
|
||||||
|
|
||||||
final class DiscordPresenceUpdateEvent extends CancellableEvent {
|
final class DiscordPresenceUpdateEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.gameover;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CANCEL this event to prevent default behaviour!
|
* CANCEL this event to prevent default behaviour!
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.gameplay;
|
||||||
|
|
||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import funkin.game.StrumLine;
|
import funkin.game.StrumLine;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.gameplay;
|
||||||
|
|
||||||
import flixel.sound.FlxSound;
|
import flixel.sound.FlxSound;
|
||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.gameplay;
|
||||||
|
|
||||||
import funkin.backend.chart.ChartData;
|
import funkin.backend.chart.ChartData;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.gameplay;
|
||||||
|
|
||||||
import funkin.game.Character;
|
import funkin.game.Character;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.gameplay;
|
||||||
|
|
||||||
final class RatingUpdateEvent extends CancellableEvent {
|
final class RatingUpdateEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.healthicon;
|
||||||
|
|
||||||
final class HealthIconChangeEvent extends CancellableEvent {
|
final class HealthIconChangeEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.menu;
|
||||||
|
|
||||||
final class MenuChangeEvent extends CancellableEvent {
|
final class MenuChangeEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.menu.freeplay;
|
||||||
|
|
||||||
final class FreeplayAlphaUpdateEvent extends CancellableEvent {
|
final class FreeplayAlphaUpdateEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.menu.freeplay;
|
||||||
|
|
||||||
final class FreeplaySongSelectEvent extends CancellableEvent {
|
final class FreeplaySongSelectEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.menu.pause;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CANCEL this event to prevent default behaviour!
|
* CANCEL this event to prevent default behaviour!
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.menu.storymenu;
|
||||||
|
|
||||||
import funkin.menus.StoryMenuState.WeekData;
|
import funkin.menus.StoryMenuState.WeekData;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.StrumLine;
|
import funkin.game.StrumLine;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.Note;
|
import funkin.game.Note;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.Character;
|
import funkin.game.Character;
|
||||||
import funkin.game.Note;
|
import funkin.game.Note;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.Character;
|
import funkin.game.Character;
|
||||||
import funkin.game.Note;
|
import funkin.game.Note;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.Note;
|
import funkin.game.Note;
|
||||||
import funkin.game.Strum;
|
import funkin.game.Strum;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.Note;
|
import funkin.game.Note;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.note;
|
||||||
|
|
||||||
import funkin.game.Strum;
|
import funkin.game.Strum;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events.soundTray;
|
package funkin.backend.scripting.events.soundtray;
|
||||||
|
|
||||||
final class SoundTrayShowEvent extends CancellableEvent
|
final class SoundTrayShowEvent extends CancellableEvent
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events.soundTray;
|
package funkin.backend.scripting.events.soundtray;
|
||||||
|
|
||||||
final class SoundTrayTextEvent extends CancellableEvent
|
final class SoundTrayTextEvent extends CancellableEvent
|
||||||
{
|
{
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.splash;
|
||||||
|
|
||||||
import funkin.game.SplashGroup;
|
import funkin.game.SplashGroup;
|
||||||
import funkin.game.Strum;
|
import funkin.game.Strum;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.sprite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Contains all contexts possible for `PlayAnimEvent`.
|
Contains all contexts possible for `PlayAnimEvent`.
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.sprite;
|
||||||
|
|
||||||
final class PlayAnimEvent extends CancellableEvent {
|
final class PlayAnimEvent extends CancellableEvent {
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.stage;
|
||||||
|
|
||||||
import funkin.game.Stage;
|
import funkin.game.Stage;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package funkin.backend.scripting.events;
|
package funkin.backend.scripting.events.stage;
|
||||||
|
|
||||||
import funkin.game.Stage;
|
import funkin.game.Stage;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
@@ -142,7 +142,7 @@ class Main extends Sprite
|
|||||||
Assets.registerLibrary('default', lib);
|
Assets.registerLibrary('default', lib);
|
||||||
|
|
||||||
funkin.options.PlayerSettings.init();
|
funkin.options.PlayerSettings.init();
|
||||||
funkin.savedata.FunkinSave.init();
|
funkin.backend.utils.FunkinSave.init();
|
||||||
Options.load();
|
Options.load();
|
||||||
|
|
||||||
FlxG.fixedTimestep = false;
|
FlxG.fixedTimestep = false;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class GitHub {
|
|||||||
* @param onError Error Callback
|
* @param onError Error Callback
|
||||||
* @return Members List
|
* @return Members List
|
||||||
*/
|
*/
|
||||||
public static function getOrganizationMembers(org:String, ?onError:Exception->Void):Array<GitHubContributor> {
|
public static function getOrganizationMembers(org:String, ?onError:Exception->Void):Array<GitHubContributor> {
|
||||||
#if GITHUB_API
|
#if GITHUB_API
|
||||||
try {
|
try {
|
||||||
var data = Json.parse(HttpUtil.requestText('https://api.github.com/orgs/$org/members'));
|
var data = Json.parse(HttpUtil.requestText('https://api.github.com/orgs/$org/members'));
|
||||||
@@ -106,7 +106,7 @@ class GitHub {
|
|||||||
* @param onError Error Callback
|
* @param onError Error Callback
|
||||||
* @return User/Organization
|
* @return User/Organization
|
||||||
*/
|
*/
|
||||||
public static function getUser(user:String, ?onError:Exception->Void):GitHubUser {
|
public static function getUser(user:String, ?onError:Exception->Void):GitHubUser {
|
||||||
#if GITHUB_API
|
#if GITHUB_API
|
||||||
try {
|
try {
|
||||||
var url = 'https://api.github.com/users/$user';
|
var url = 'https://api.github.com/users/$user';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import flixel.sound.FlxSound;
|
|||||||
import flixel.util.typeLimit.OneOfTwo;
|
import flixel.util.typeLimit.OneOfTwo;
|
||||||
import funkin.backend.scripting.*; // lazy
|
import funkin.backend.scripting.*; // lazy
|
||||||
import funkin.backend.scripting.events.CancellableEvent;
|
import funkin.backend.scripting.events.CancellableEvent;
|
||||||
import funkin.backend.scripting.events.DiscordPresenceUpdateEvent;
|
import funkin.backend.scripting.events.discord.*;
|
||||||
import funkin.backend.system.macros.Utils;
|
import funkin.backend.system.macros.Utils;
|
||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package funkin.savedata;
|
package funkin.backend.utils;
|
||||||
|
|
||||||
import flixel.util.FlxSave;
|
import flixel.util.FlxSave;
|
||||||
import lime.app.Application;
|
import lime.app.Application;
|
||||||
@@ -9,13 +9,9 @@ import funkin.backend.FunkinSprite;
|
|||||||
import funkin.backend.scripting.DummyScript;
|
import funkin.backend.scripting.DummyScript;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.ScriptPack;
|
import funkin.backend.scripting.ScriptPack;
|
||||||
import funkin.backend.scripting.events.CharacterNodeEvent;
|
|
||||||
import funkin.backend.scripting.events.CharacterXMLEvent;
|
|
||||||
import funkin.backend.scripting.events.DanceEvent;
|
|
||||||
import funkin.backend.scripting.events.CancellableEvent;
|
import funkin.backend.scripting.events.CancellableEvent;
|
||||||
import funkin.backend.scripting.events.DirectionAnimEvent;
|
import funkin.backend.scripting.events.character.*;
|
||||||
import funkin.backend.scripting.events.PlayAnimContext;
|
import funkin.backend.scripting.events.sprite.*;
|
||||||
import funkin.backend.scripting.events.PlayAnimEvent;
|
|
||||||
import funkin.backend.scripting.events.PointEvent;
|
import funkin.backend.scripting.events.PointEvent;
|
||||||
import funkin.backend.scripting.events.DrawEvent;
|
import funkin.backend.scripting.events.DrawEvent;
|
||||||
import funkin.backend.system.Conductor;
|
import funkin.backend.system.Conductor;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import flixel.util.FlxColor;
|
|||||||
import flixel.util.FlxTimer;
|
import flixel.util.FlxTimer;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.events.CancellableEvent;
|
import funkin.backend.scripting.events.CancellableEvent;
|
||||||
import funkin.backend.scripting.events.GameOverCreationEvent;
|
import funkin.backend.scripting.events.gameover.*;
|
||||||
import funkin.backend.system.Conductor;
|
import funkin.backend.system.Conductor;
|
||||||
import funkin.editors.charter.Charter;
|
import funkin.editors.charter.Charter;
|
||||||
import funkin.menus.FreeplayState;
|
import funkin.menus.FreeplayState;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class HealthIcon extends FlxSprite
|
|||||||
/**
|
/**
|
||||||
* current animation state
|
* current animation state
|
||||||
*/
|
*/
|
||||||
public var curAnimState:Int = -1;
|
public var curAnimState:Int = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for HScript who can't make maps
|
* Helper for HScript who can't make maps
|
||||||
@@ -95,7 +95,7 @@ class HealthIcon extends FlxSprite
|
|||||||
i = icon;
|
i = icon;
|
||||||
}
|
}
|
||||||
if (i >= 0 && curAnimState != i) {
|
if (i >= 0 && curAnimState != i) {
|
||||||
var event = EventManager.get(funkin.backend.scripting.events.HealthIconChangeEvent).recycle(i, this);
|
var event = EventManager.get(funkin.backend.scripting.events.healthicon.HealthIconChangeEvent).recycle(i, this);
|
||||||
funkin.backend.scripting.GlobalScript.event("onHealthIconAnimChange", event);
|
funkin.backend.scripting.GlobalScript.event("onHealthIconAnimChange", event);
|
||||||
if (!event.cancelled)
|
if (!event.cancelled)
|
||||||
animation.curAnim.curFrame = event.amount;
|
animation.curAnim.curFrame = event.amount;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package funkin.game;
|
|||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import flixel.math.FlxRect;
|
import flixel.math.FlxRect;
|
||||||
import funkin.backend.chart.ChartData;
|
import funkin.backend.chart.ChartData;
|
||||||
import funkin.backend.scripting.events.*;
|
import funkin.backend.scripting.events.note.NoteCreationEvent;
|
||||||
import funkin.backend.system.Conductor;
|
import funkin.backend.system.Conductor;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import funkin.backend.chart.EventsData;
|
|||||||
import funkin.backend.scripting.DummyScript;
|
import funkin.backend.scripting.DummyScript;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.ScriptPack;
|
import funkin.backend.scripting.ScriptPack;
|
||||||
|
import funkin.backend.scripting.events.gameplay.*;
|
||||||
|
import funkin.backend.scripting.events.note.*;
|
||||||
import funkin.backend.scripting.events.*;
|
import funkin.backend.scripting.events.*;
|
||||||
import funkin.backend.system.Conductor;
|
import funkin.backend.system.Conductor;
|
||||||
import funkin.backend.system.RotatingSpriteGroup;
|
import funkin.backend.system.RotatingSpriteGroup;
|
||||||
@@ -28,7 +30,7 @@ import funkin.game.SplashHandler;
|
|||||||
import funkin.game.cutscenes.*;
|
import funkin.game.cutscenes.*;
|
||||||
import funkin.menus.*;
|
import funkin.menus.*;
|
||||||
import funkin.menus.StoryMenuState.WeekData;
|
import funkin.menus.StoryMenuState.WeekData;
|
||||||
import funkin.savedata.FunkinSave;
|
import funkin.backend.utils.FunkinSave;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
@@ -1397,8 +1399,7 @@ class PlayState extends MusicBeatState
|
|||||||
public var scrollSpeedTween:FlxTween = null;
|
public var scrollSpeedTween:FlxTween = null;
|
||||||
|
|
||||||
public function executeEvent(event:ChartEvent) @:privateAccess {
|
public function executeEvent(event:ChartEvent) @:privateAccess {
|
||||||
if (event == null) return;
|
if (event == null || event.params == null) return;
|
||||||
if (event.params == null) return;
|
|
||||||
|
|
||||||
var e = EventManager.get(EventGameEvent).recycle(event);
|
var e = EventManager.get(EventGameEvent).recycle(event);
|
||||||
gameAndCharsEvent("onEvent", e);
|
gameAndCharsEvent("onEvent", e);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package funkin.game;
|
package funkin.game;
|
||||||
|
|
||||||
import funkin.backend.scripting.events.SplashShowEvent;
|
import funkin.backend.scripting.events.splash.*;
|
||||||
|
|
||||||
class SplashHandler extends FlxTypedGroup<FunkinSprite> {
|
class SplashHandler extends FlxTypedGroup<FunkinSprite> {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ import funkin.backend.utils.XMLUtil.XMLImportedScriptInfo;
|
|||||||
import funkin.backend.system.interfaces.IBeatReceiver;
|
import funkin.backend.system.interfaces.IBeatReceiver;
|
||||||
import funkin.backend.scripting.DummyScript;
|
import funkin.backend.scripting.DummyScript;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.events.StageNodeEvent;
|
import funkin.backend.scripting.events.stage.*;
|
||||||
import funkin.backend.scripting.events.StageXMLEvent;
|
|
||||||
import funkin.backend.system.interfaces.IBeatReceiver;
|
import funkin.backend.system.interfaces.IBeatReceiver;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import flixel.sound.FlxSound;
|
|||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
import flixel.util.FlxSignal.FlxTypedSignal;
|
import flixel.util.FlxSignal.FlxTypedSignal;
|
||||||
import funkin.backend.chart.ChartData;
|
import funkin.backend.chart.ChartData;
|
||||||
import funkin.backend.scripting.events.*;
|
import funkin.backend.scripting.events.note.*;
|
||||||
import funkin.backend.system.Conductor;
|
import funkin.backend.system.Conductor;
|
||||||
import funkin.backend.system.Controls;
|
import funkin.backend.system.Controls;
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ package funkin.game.cutscenes.dialogue;
|
|||||||
import flixel.addons.text.FlxTypeText;
|
import flixel.addons.text.FlxTypeText;
|
||||||
import flixel.sound.FlxSound;
|
import flixel.sound.FlxSound;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.events.PlayAnimContext;
|
import funkin.backend.scripting.events.sprite.*;
|
||||||
import funkin.backend.scripting.events.PlayAnimEvent;
|
|
||||||
import funkin.backend.scripting.events.dialogue.*;
|
import funkin.backend.scripting.events.dialogue.*;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ package funkin.game.cutscenes.dialogue;
|
|||||||
|
|
||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.events.PlayAnimContext;
|
import funkin.backend.scripting.events.sprite.*;
|
||||||
import funkin.backend.scripting.events.PlayAnimEvent;
|
|
||||||
import funkin.backend.scripting.events.dialogue.*;
|
import funkin.backend.scripting.events.dialogue.*;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import flixel.text.FlxText;
|
|||||||
import flixel.util.FlxColor;
|
import flixel.util.FlxColor;
|
||||||
import funkin.backend.chart.Chart;
|
import funkin.backend.chart.Chart;
|
||||||
import funkin.backend.chart.ChartData.ChartMetaData;
|
import funkin.backend.chart.ChartData.ChartMetaData;
|
||||||
import funkin.backend.scripting.events.*;
|
import funkin.backend.scripting.events.menu.MenuChangeEvent;
|
||||||
|
import funkin.backend.scripting.events.menu.freeplay.*;
|
||||||
import funkin.game.HealthIcon;
|
import funkin.game.HealthIcon;
|
||||||
import funkin.savedata.FunkinSave;
|
import funkin.backend.utils.FunkinSave;
|
||||||
|
|
||||||
using StringTools;
|
using StringTools;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import flixel.FlxState;
|
|||||||
import flixel.effects.FlxFlicker;
|
import flixel.effects.FlxFlicker;
|
||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
import funkin.backend.FunkinText;
|
import funkin.backend.FunkinText;
|
||||||
import funkin.backend.scripting.events.*;
|
import funkin.backend.scripting.events.menu.MenuChangeEvent;
|
||||||
|
import funkin.backend.scripting.events.NameEvent;
|
||||||
import funkin.menus.credits.CreditsMain;
|
import funkin.menus.credits.CreditsMain;
|
||||||
import funkin.options.OptionsMenu;
|
import funkin.options.OptionsMenu;
|
||||||
import lime.app.Application;
|
import lime.app.Application;
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import flixel.text.FlxText;
|
|||||||
import flixel.tweens.FlxTween;
|
import flixel.tweens.FlxTween;
|
||||||
import flixel.util.FlxColor;
|
import flixel.util.FlxColor;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import funkin.backend.scripting.events.MenuChangeEvent;
|
import funkin.backend.scripting.events.menu.MenuChangeEvent;
|
||||||
|
import funkin.backend.scripting.events.menu.pause.*;
|
||||||
import funkin.backend.scripting.events.NameEvent;
|
import funkin.backend.scripting.events.NameEvent;
|
||||||
import funkin.backend.scripting.events.PauseCreationEvent;
|
|
||||||
import funkin.backend.system.Conductor;
|
import funkin.backend.system.Conductor;
|
||||||
import funkin.backend.utils.FunkinParentDisabler;
|
import funkin.backend.utils.FunkinParentDisabler;
|
||||||
import funkin.editors.charter.Charter;
|
import funkin.editors.charter.Charter;
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import flixel.tweens.FlxTween;
|
|||||||
import flixel.util.FlxColor;
|
import flixel.util.FlxColor;
|
||||||
import flixel.util.FlxTimer;
|
import flixel.util.FlxTimer;
|
||||||
import funkin.backend.FunkinText;
|
import funkin.backend.FunkinText;
|
||||||
import funkin.backend.scripting.events.*;
|
import funkin.backend.scripting.events.menu.MenuChangeEvent;
|
||||||
import funkin.savedata.FunkinSave;
|
import funkin.backend.scripting.events.menu.storymenu.*;
|
||||||
|
import funkin.backend.scripting.events.CancellableEvent;
|
||||||
|
import funkin.backend.utils.FunkinSave;
|
||||||
import haxe.io.Path;
|
import haxe.io.Path;
|
||||||
import haxe.xml.Access;
|
import haxe.xml.Access;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package funkin.menus.ui;
|
package funkin.menus.ui;
|
||||||
|
|
||||||
import funkin.backend.scripting.events.CancellableEvent;
|
import funkin.backend.scripting.events.CancellableEvent;
|
||||||
import funkin.backend.scripting.events.soundTray.*;
|
import funkin.backend.scripting.events.soundtray.*;
|
||||||
import funkin.backend.scripting.Script;
|
import funkin.backend.scripting.Script;
|
||||||
import flixel.system.ui.FlxSoundTray;
|
import flixel.system.ui.FlxSoundTray;
|
||||||
import openfl.text.TextFormat;
|
import openfl.text.TextFormat;
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ class Config {
|
|||||||
];
|
];
|
||||||
|
|
||||||
public static final DISALLOW_ABSTRACT_AND_ENUM = [
|
public static final DISALLOW_ABSTRACT_AND_ENUM = [
|
||||||
"funkin.backend.scripting.events.PlayAnimContext", // Error: expected member name or ';' after declaration specifiers, Due to define macro from math.h
|
"funkin.backend.scripting.events.sprite.PlayAnimContext", // Error: expected member name or ';' after declaration specifiers, Due to define macro from math.h
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user