From cc401bfb8f885c819d1ac7ac8c39880c234bf126 Mon Sep 17 00:00:00 2001
From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com>
Date: Wed, 2 Nov 2022 17:49:30 +0100
Subject: [PATCH] update
---
assets/data/weeks.xml | 70 +--
source/funkin/menus/StoryMenuState.hx | 522 ++--------------------
source/funkin/menus/StoryMenuState_old.hx | 475 ++++++++++++++++++++
source/funkin/ui/FunkinText.hx | 12 +-
4 files changed, 546 insertions(+), 533 deletions(-)
create mode 100644 source/funkin/menus/StoryMenuState_old.hx
diff --git a/assets/data/weeks.xml b/assets/data/weeks.xml
index 3012a986..468de93b 100644
--- a/assets/data/weeks.xml
+++ b/assets/data/weeks.xml
@@ -7,84 +7,56 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
+
-
-
+
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx
index 85d0f5a1..68945542 100644
--- a/source/funkin/menus/StoryMenuState.hx
+++ b/source/funkin/menus/StoryMenuState.hx
@@ -1,499 +1,63 @@
package funkin.menus;
-#if desktop
-import funkin.system.Discord.DiscordClient;
-#end
import flixel.FlxG;
-import flixel.FlxSprite;
-import flixel.addons.transition.FlxTransitionableState;
-import flixel.graphics.frames.FlxAtlasFrames;
-import flixel.group.FlxGroup.FlxTypedGroup;
-import flixel.group.FlxGroup;
-import flixel.math.FlxMath;
-import flixel.text.FlxText;
-import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
-import flixel.util.FlxTimer;
-import lime.net.curl.CURLCode;
-import funkin.system.Song;
-import funkin.game.Highscore;
-import flixel.group.FlxSpriteGroup;
+import funkin.ui.FunkinText;
+import haxe.xml.Access;
+import flixel.FlxSprite;
+import flixel.text.FlxText;
-using StringTools;
+class StoryMenuState extends MusicBeatState {
+ public var weekData:Array = [];
-class StoryMenuState extends MusicBeatState
-{
- var scoreText:FlxText;
+ public var characters:Map = [];
- var weekData:Array = [
- ['Tutorial'],
- ['Bopeebo', 'Fresh', 'Dadbattle'],
- ['Spookeez', 'South', "Monster"],
- ['Pico', 'Philly', "Blammed"],
- ['Satin-Panties', "High", "Milf"],
- ['Cocoa', 'Eggnog', 'Winter-Horrorland'],
- ['Senpai', 'Roses', 'Thorns']
- ];
- var curDifficulty:Int = 1;
+ public var scoreText:FlxText;
+ public var tracklist:FlxText;
+ public var weekTitle:FlxText;
- public static var weekUnlocked:Array = [true, true, true, true, true, true, true];
+ public var curDifficulty:Int = 0;
+ public var curWeek:Int = 0;
- var weekCharacters:Array = [
- ['dad', 'bf', 'gf'],
- ['dad', 'bf', 'gf'],
- ['spooky', 'bf', 'gf'],
- ['pico', 'bf', 'gf'],
- ['mom', 'bf', 'gf'],
- ['parents-christmas', 'bf', 'gf'],
- ['senpai', 'bf', 'gf']
- ];
+ public var difficultySprites:Map = [];
+ public var weekBG:FlxSprite;
+ public var leftArrow:FlxSprite;
+ public var rightArrow:FlxSprite;
- var weekNames:Array = [
- "",
- "Daddy Dearest",
- "Spooky Month",
- "PICO",
- "MOMMY MUST MURDER",
- "RED SNOW",
- "hating simulator ft. moawling"
- ];
- var txtWeekTitle:FlxText;
+ public override function create() {
+ super.create();
+ loadXML();
+
+ persistentUpdate = persistentDraw = true;
- var curWeek:Int = 0;
+ scoreText = new FunkinText(10, 10, 0, "SCORE: -", 36);
+ scoreText.setFormat(Paths.font("vcr.ttf"), 32);
- var txtTracklist:FlxText;
+ weekTitle = new FlxText(10, 10, FlxG.width - 20, "", 32);
+ weekTitle.setFormat(Paths.font("vcr.ttf"), 32, FlxColor.WHITE, RIGHT);
+ weekTitle.alpha = 0.7;
- var grpWeekText:FlxTypedGroup