Skip to content

Commit

Permalink
scripts lol
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Mar 10, 2024
1 parent 428c88b commit 9c18149
Show file tree
Hide file tree
Showing 11 changed files with 123 additions and 39 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib install hxvlc
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
haxelib install dox
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/Vortex2Oblivion/FNF-Modcharting-Tools
haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib git openfl https://github.com/openfl/openfl
haxelib install HxWebView
haxelib install dox
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/Vortex2Oblivion/FNF-Modcharting-Tools
haxelib install flixel-screenshot-plugin
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
haxelib git hxNoise https://github.com/whuop/hxNoise
haxelib install hxvlc
haxelib install openfl
haxelib install dox
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/Vortex2Oblivion/FNF-Modcharting-Tools
Expand Down Expand Up @@ -191,15 +191,12 @@ jobs:
haxelib install away3d
haxelib install flixel-ui
haxelib install flixel-addons
haxelib install systools
haxelib install dox
haxelib git linc_luajit https://github.com/Leather128/linc_luajit.git
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib install HxWebView
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib install hxvlc
haxelib git hxNoise https://github.com/whuop/hxNoise
haxelib git openfl https://github.com/openfl/openfl
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/Vortex2Oblivion/FNF-Modcharting-Tools
Expand Down
1 change: 0 additions & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
<haxelib name="away3d" if="THREE_D_ALLOWED" />
<haxelib name="hxvlc" if="VIDEOS_ALLOWED" />
<haxelib name="HxWebView" if="windows" unless="linux || mac" />
<haxelib name="dox"/>
<haxelib name="hxNoise"/>
<haxelib name="systools" if="sys" />
<haxelib name="fnf-modcharting-tools" url="https://github.com/EdwhakKB/FNF-Modcharting-Tools" />
Expand Down
17 changes: 15 additions & 2 deletions build/install_libraries.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
@echo off
echo installing
haxelib update
haxelib install flixel
haxelib install flixel-addons
haxelib install flixel-ui
haxelib install hscript
haxelib install polymod 1.7.0
haxelib install lime
haxelib install openfl
haxelib install HxWebView
haxelib install hxvlc
haxelib install flixel-screenshot-plugin
haxelib install hxcpp-debug-server
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
haxelib git linc_luajit https://github.com/Leather128/linc_luajit.git
haxelib git fnf-modcharting-tools https://github.com/TheZoroForce240/FNF-Modcharting-Tools
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/Vortex2Oblivion/FNF-Modcharting-Tools
haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate
echo done
20 changes: 17 additions & 3 deletions build/install_libraries.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
@echo off
echo installing
haxelib update
haxelib install flixel
haxelib install flixel-addons
haxelib install flixel-ui
haxelib install hscript
haxelib install polymod 1.7.0
haxelib install lime
haxelib install openfl
haxelib install HxWebView
haxelib install hxvlc
haxelib install flixel-screenshot-plugin
haxelib install hxcpp-debug-server
haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc
haxelib git linc_luajit https://github.com/Leather128/linc_luajit.git
haxelib git linc_luajit https://github.com/Leather128/linc_luajit.git
haxelib git fnf-modcharting-tools https://github.com/TheZoroForce240/FNF-Modcharting-Tools
haxelib git hscript-improved https://github.com/FNF-CNE-Devs/hscript-improved
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
haxelib git scriptless-polymod https://github.com/swordcube/scriptless-polymod
haxelib git flixelTextureAtlas https://github.com/Smokey555/Flixel-TextureAtlas.git
haxelib git fnf-modcharting-tools https://github.com/Vortex2Oblivion/FNF-Modcharting-Tools
haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate
echo done
3 changes: 3 additions & 0 deletions build/setup flixel.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
haxelib run lime setup flixel
haxelib run lime setup
haxelib run openfl setup
3 changes: 3 additions & 0 deletions build/setup flixel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
haxelib run lime setup flixel
haxelib run lime setup
haxelib run openfl setup
1 change: 1 addition & 0 deletions source/states/OptionsMenu.hx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class OptionsMenu extends MusicBeatState {
new BoolOption("Skip Results", "skipResultsScreen", 15),
new BoolOption("Show Score", "showScore", 16),
new BoolOption("Dinnerbone Mode", "dinnerbone", 17),
new GameSubstateOption("Import Old Scores", 18, substates.ImportHighscoresSubstate)
],
"Optimizations" => [
new PageOption("Back", 0, "Graphics"),
Expand Down
5 changes: 3 additions & 2 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3341,6 +3341,7 @@ class PlayState extends MusicBeatState {
trace('WENT BACK TO FREEPLAY??');
switchedStates = true;


if (vocals != null && vocals.active)
vocals.stop();
if (FlxG.sound.music != null && FlxG.sound.music.active)
Expand All @@ -3349,7 +3350,7 @@ class PlayState extends MusicBeatState {
SONG.keyCount = ogKeyCount;
SONG.playerKeyCount = ogPlayerKeyCount;

FlxG.switchState(new FreeplayState());
FlxG.switchState(() -> new FreeplayState());
} else {
trace('WENT BACK TO REPLAY SELECTOR??');
switchedStates = true;
Expand All @@ -3362,7 +3363,7 @@ class PlayState extends MusicBeatState {
SONG.keyCount = ogKeyCount;
SONG.playerKeyCount = ogPlayerKeyCount;

FlxG.switchState(new ReplaySelectorState());
FlxG.switchState(() -> new ReplaySelectorState());
}

playingReplay = false;
Expand Down
29 changes: 5 additions & 24 deletions source/toolbox/ToolboxPlaceholder.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,17 @@ import states.MainMenuState;
import states.MusicBeatState;
import states.PlayState;
import utilities.Options;
import utilities.CoolUtil;
import substates.UISkinSelect;
import substates.ControlMenuSubstate;
import modding.CharacterCreationState;
import utilities.MusicUtilities;
import ui.Option;
import ui.Checkbox;
import flixel.group.FlxGroup;
import toolbox.ChartingState;
import toolbox.StageMakingState;
import flixel.sound.FlxSound;
import toolbox.CharacterCreator;
import utilities.Controls.Control;
import flash.text.TextField;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.addons.display.FlxGridOverlay;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.input.keyboard.FlxKey;
import flixel.math.FlxMath;
import flixel.text.FlxText;
import flixel.util.FlxColor;
import lime.utils.Assets;
import ui.Alphabet;
import game.Song;
import toolbox.StageMakingState;
import game.Highscore;
import openfl.utils.Assets as OpenFLAssets;
import toolbox.util.NewModState;

class ToolboxPlaceholder extends states.MusicBeatState {
var curSelected:Int = 0;
Expand All @@ -41,19 +24,17 @@ class ToolboxPlaceholder extends states.MusicBeatState {

public var pages:Map<String, Array<Dynamic>> = [
"Categories" => [
new ToolboxPageOption("Tools", 0, "Tools",),
#if windows
new ToolboxPageOption("Documentation", 1, "Documentation")
#end
new GameStateOption("New Mod", 0, new NewModState()),
new ToolboxPageOption("Tools", 1, "Tools",),
new ToolboxPageOption("Documentation", 2, "Documentation")
],
"Tools" => [
new GameStateOption("Charter", 0, new ChartingState()),
new CharacterCreatorOption("Character Creator", 1, new CharacterCreator("dad", "stage")),
new GameStateOption("Stage Editor", 2, new StageMakingState("stage")),
#if MODCHARTING_TOOLS
new GameStateOption("Modchart Editor", 3, new modcharting.ModchartEditorState()),
new GameStateOption("Modchart Editor", 3, new modcharting.ModchartEditorState())
#end
new GameSubstateOption("Import Old Scores", 4, substates.ImportHighscoresSubstate)
],
"Documentation" => [
new WebViewOption("Wiki", 0, "Wiki", "https://github.com/Leather128/LeatherEngine/wiki"),
Expand Down
68 changes: 68 additions & 0 deletions source/toolbox/util/NewModState.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package toolbox.util;

import flixel.addons.ui.FlxUI;
import flixel.addons.ui.FlxUITabMenu;
import flixel.text.FlxText;
import openfl.utils.Assets;
import flixel.FlxSprite;
import flixel.FlxG;
#if discord_rpc
import utilities.Discord.DiscordClient;
#end
import states.MusicBeatState;
import flixel.addons.ui.FlxUIInputText;


class NewModState extends MusicBeatState{

var bg:FlxSprite;

var modNameText:FlxText;
var modName:FlxUIInputText;

var UI_box:FlxUITabMenu;

override function create(){
super.create();
#if discord_rpc
DiscordClient.changePresence("Creating A New Mod", null, null, true);
#end
bg = new FlxSprite();
if(Options.getData("menuBGs")){
bg.loadGraphic(Paths.image(Assets.exists('ui skins/${Options.getData("uiSkin")}/backgrounds/menuCharter') ? 'ui skins/${Options.getData("uiSkin")}/backgrounds/menuCharter' : 'ui skins/default/backgrounds/menuCharter'));
bg.screenCenter();
add(bg);
}

UI_box = new FlxUITabMenu(null, [{name: "New Mod", label: 'New Mod'},], true);

UI_box.resize(640, 480);
UI_box.screenCenter();
add(UI_box);

var tab_Group_mod = new FlxUI(null, UI_box);
tab_Group_mod.name = "New Mod";

UI_box.addGroup(tab_Group_mod);
UI_box.scrollFactor.set();

modName = new FlxUIInputText(400, 250);
modName.size = 16;
add(modName);

modNameText = new FlxText();
modNameText.x = modName.x;
modNameText.y = modName.y - 30;
modNameText.alignment = FlxTextAlign.CENTER;
modNameText.size = 16;
modNameText.text = "Mod Name";
add(modNameText);

}
override function update(elapsed:Float){
super.update(elapsed);
if(FlxG.keys.anyJustPressed([ESCAPE])){
FlxG.switchState(() -> new ToolboxPlaceholder());
}
}
}
6 changes: 5 additions & 1 deletion source/ui/Option.hx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,11 @@ class DisplayFontOption extends StringSaveOption {
w.destroy();
});
w.run();
});
});
#else
if (FlxG.keys.justPressed.ENTER && Alphabet_Text.targetY == 0) {
CoolUtil.openURL(Url);
}
#end
}
}

0 comments on commit 9c18149

Please sign in to comment.