From 3bbeafcc3eb0839386040cf32969970152f484a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=8D=9A=7ENex?=
<87421482+NexIsDumb@users.noreply.github.com>
Date: Wed, 21 Jan 2026 17:09:15 +0100
Subject: [PATCH] restarting again
i hate git
---
FEATURES.md | 4 ++--
assets/data/config/freeplaySonglist.txt | 3 +++
assets/data/config/gamemodesList.txt | 8 ++++++++
assets/data/{weeks => config}/weeks.txt | 2 +-
building/libs.xml | 1 +
project.xml | 14 ++++++--------
source/funkin/backend/system/Flags.hx | 9 +++++++--
.../backend/system/macros/FlagMacro.macro.hx | 7 +++++--
source/funkin/menus/StoryMenuState.hx | 15 +++++++++++----
9 files changed, 44 insertions(+), 19 deletions(-)
create mode 100644 assets/data/config/gamemodesList.txt
rename assets/data/{weeks => config}/weeks.txt (62%)
diff --git a/FEATURES.md b/FEATURES.md
index 97a28fc1..b10d935e 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -71,11 +71,11 @@ _**QOL = Quality of Life**_
- Characters are located in `data/weeks/characters`.
- Weeks are located in `data/weeks/weeks/`
- If you need to rearrange the weeks in-game, you can use the `data/weeks/weeks.txt` file.
- - Editors for Charts and Characters (Stage coming soon)
+ - Editors for Charts and Characters
- Undos/Redos supported
- Warning on closing unsaved work
- Clean UI (for ocd freaks)
- - Mature Chart editor (Character editor rework soon)
+ - Mature Chart editor
- Features not found in other editors!
- Every single state & substate can be modified via HScript (`data/states/StateName.hx`)
- **Instances launched via `lime test windows` will automatically use assets from source.**
diff --git a/assets/data/config/freeplaySonglist.txt b/assets/data/config/freeplaySonglist.txt
index 269b679f..885c7476 100644
--- a/assets/data/config/freeplaySonglist.txt
+++ b/assets/data/config/freeplaySonglist.txt
@@ -1,3 +1,6 @@
+# THIS FILE ISN'T NECESSARY,
+# BUT YOU CAN USE IT TO SORT AND WHITELIST FREEPLAY SONGS
+
test
tutorial
diff --git a/assets/data/config/gamemodesList.txt b/assets/data/config/gamemodesList.txt
new file mode 100644
index 00000000..f8ab0f40
--- /dev/null
+++ b/assets/data/config/gamemodesList.txt
@@ -0,0 +1,8 @@
+# THIS FILE ISN'T NECESSARY,
+# BUT YOU CAN USE IT TO SORT AND WHITELIST GAME MODES
+
+solo
+opponent
+coop
+coop-switched
+botplay
\ No newline at end of file
diff --git a/assets/data/weeks/weeks.txt b/assets/data/config/weeks.txt
similarity index 62%
rename from assets/data/weeks/weeks.txt
rename to assets/data/config/weeks.txt
index d5b81933..7726b4b9 100644
--- a/assets/data/weeks/weeks.txt
+++ b/assets/data/config/weeks.txt
@@ -1,5 +1,5 @@
# THIS FILE ISN'T NECESSARY,
-# BUT YOU CAN USE IT TO SORT WEEKS
+# BUT YOU CAN USE IT TO SORT AND WHITELIST WEEKS
tutorial
week1
diff --git a/building/libs.xml b/building/libs.xml
index 139cbaf8..b528012c 100644
--- a/building/libs.xml
+++ b/building/libs.xml
@@ -18,6 +18,7 @@
+
diff --git a/project.xml b/project.xml
index 86036f0d..28c91975 100644
--- a/project.xml
+++ b/project.xml
@@ -3,19 +3,16 @@
+ file="CodenameEngine" packageName="com.codenamecrew.codenameengine"
+ package="com.codenamecrew.codenameengine"
+ version="1.0.1" company="CodenameCrew" />
-
+
-
-
-
@@ -131,6 +128,7 @@
+
diff --git a/source/funkin/backend/system/Flags.hx b/source/funkin/backend/system/Flags.hx
index 0eb17d06..d17fa9a1 100644
--- a/source/funkin/backend/system/Flags.hx
+++ b/source/funkin/backend/system/Flags.hx
@@ -13,7 +13,7 @@ import lime.utils.AssetType;
/**
* A class that reads the `flags.ini` file, allowing to read settable Flags (customs too).
*/
-@:build(funkin.backend.system.macros.FlagMacro.build())
+@:build(funkin.backend.system.macros.FlagMacro.build("onReset"))
class Flags {
public static var overridenFlags:Map = [];
@@ -157,7 +157,7 @@ class Flags {
public static var DEFAULT_HUD_ZOOM_LERP:Float = 0.05;
public static var USE_LEGACY_ZOOM_FACTOR:Null = null;
-
+
// Font configuration
public static var DEFAULT_FONT:String = "vcr.ttf";
public static var DEFAULT_FONT_SIZE:Int = 16;
@@ -312,6 +312,11 @@ class Flags {
if (SUSTAINS_AS_ONE_NOTE == null) SUSTAINS_AS_ONE_NOTE = MOD_API_VERSION >= 2;
}
+ private static function onReset() {
+ var currentModFolder = ModsFolder.currentModFolder;
+ if (currentModFolder != null) SAVE_NAME = currentModFolder;
+ }
+
public static function loadFromDatas(datas:Array):Map {
var flags:Map = [];
for (data in datas) {
diff --git a/source/funkin/backend/system/macros/FlagMacro.macro.hx b/source/funkin/backend/system/macros/FlagMacro.macro.hx
index 74d00339..12c0b6d1 100644
--- a/source/funkin/backend/system/macros/FlagMacro.macro.hx
+++ b/source/funkin/backend/system/macros/FlagMacro.macro.hx
@@ -19,7 +19,7 @@ class FlagMacro {
return false;
}
- public static function build():Array {
+ public static function build(resetCallback:String):Array {
var fields = Context.getBuildFields();
var clRef = Context.getLocalClass();
@@ -248,7 +248,10 @@ class FlagMacro {
access: [APublic, AStatic],
kind: FFun({
args: [],
- expr: macro $b{resetExprs},
+ expr: macro {
+ $b{resetExprs};
+ $i{resetCallback}();
+ },
ret: macro: Void
}),
pos: Context.currentPos(),
diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx
index 1a4c9de3..c7c214f3 100644
--- a/source/funkin/menus/StoryMenuState.hx
+++ b/source/funkin/menus/StoryMenuState.hx
@@ -342,10 +342,17 @@ class StoryWeeklist {
public function new() {}
public function getWeeksFromSource(source:funkin.backend.assets.AssetSource, useTxt:Bool = true, loadCharactersData:Bool = true) {
- var path:String = Paths.txt('weeks/weeks');
- var weeksFound:Array = useTxt && Paths.assetsTree.existsSpecific(path, "TEXT", source) ? CoolUtil.coolTextFile(path) :
- [for (c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
-
+ var weeksFound:Array = null;
+ if (useTxt) {
+ var oldPath:String = Paths.txt('weeks/weeks');
+ var newPath:String = Paths.txt('config/weeks');
+ if (Paths.assetsTree.existsSpecific(newPath, "TEXT", source)) weeksFound = CoolUtil.coolTextFile(newPath);
+ else if (Paths.assetsTree.existsSpecific(oldPath, "TEXT", source)) {
+ Logs.warn("data/weeks/weeks.txt is deprecated and will be removed in the future. Please move the file to data/config/", DARKYELLOW, "StoryWeeklist");
+ weeksFound = CoolUtil.coolTextFile(oldPath);
+ }
+ }
+ if (weeksFound == null) weeksFound = [for (c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
if (weeksFound.length > 0) {
for (w in weeksFound) {
var week = Week.loadWeek(w, loadCharactersData);