Skip to content

Commit 3bbeafc

Browse files
committed
restarting again
i hate git
1 parent 9d96400 commit 3bbeafc

9 files changed

Lines changed: 44 additions & 19 deletions

File tree

FEATURES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ _**QOL = Quality of Life**_
7171
- Characters are located in `data/weeks/characters`.
7272
- Weeks are located in `data/weeks/weeks/`
7373
- If you need to rearrange the weeks in-game, you can use the `data/weeks/weeks.txt` file.
74-
- Editors for Charts and Characters (Stage coming soon)
74+
- Editors for Charts and Characters
7575
- Undos/Redos supported
7676
- Warning on closing unsaved work
7777
- Clean UI (for ocd freaks)
78-
- Mature Chart editor (Character editor rework soon)
78+
- Mature Chart editor
7979
- Features not found in other editors!
8080
- Every single state & substate can be modified via HScript (`data/states/StateName.hx`)
8181
- **Instances launched via `lime test windows` will automatically use assets from source.**

assets/data/config/freeplaySonglist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# THIS FILE ISN'T NECESSARY,
2+
# BUT YOU CAN USE IT TO SORT AND WHITELIST FREEPLAY SONGS
3+
14
test
25
tutorial
36

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS FILE ISN'T NECESSARY,
2+
# BUT YOU CAN USE IT TO SORT AND WHITELIST GAME MODES
3+
4+
solo
5+
opponent
6+
coop
7+
coop-switched
8+
botplay
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# THIS FILE ISN'T NECESSARY,
2-
# BUT YOU CAN USE IT TO SORT WEEKS
2+
# BUT YOU CAN USE IT TO SORT AND WHITELIST WEEKS
33

44
tutorial
55
week1

building/libs.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<git name="hxdiscord_rpc" url="https://github.com/CodenameCrew/cne-hxdiscord_rpc" skipDeps="true" />
1919
<lib name="funkin-modchart" version="1.2.4" skipDeps="true" />
2020
<lib name="hxvlc" version="1.9.3" skipDeps="true" />
21+
<git name="bin-serializer" url="https://github.com/CodenameCrew/bin-serializer" />
2122

2223
<!-- Documentation and other features -->
2324
<git name="away3d" url="https://github.com/CodenameCrew/away3d" />

project.xml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@
33
<!-- _________________________ Application Settings _________________________ -->
44
<app
55
title="Friday Night Funkin' - Codename Engine" main="funkin.backend.system.Main"
6-
file="CodenameEngine" packageName="com.yoshman29.codenameengine"
7-
package="com.yoshman29.codenameengine"
8-
version="1.0.1" company="Yoshman29" />
6+
file="CodenameEngine" packageName="com.codenamecrew.codenameengine"
7+
package="com.codenamecrew.codenameengine"
8+
version="1.0.1" company="CodenameCrew" />
99

1010
<!--
11-
CHANGE THE SAVE PATH & NAME FOR YOUR MOD HERE!
11+
CHANGE THE SAVE PATH & NAME FOR YOUR HARDCODED MOD HERE!
1212
-->
13-
<haxedef name="SAVE_PATH" value="CodenameEngine"/>
13+
<haxedef name="SAVE_PATH" value="CodenameCrew/CodenameEngine"/>
1414
<haxedef name="SAVE_NAME" value="save-default"/>
1515

16-
<haxedef name="SAVE_OPTIONS_PATH" value="CodenameEngine"/>
17-
<haxedef name="SAVE_OPTIONS_NAME" value="options"/>
18-
1916
<!--Switch Export with Unique ApplicationID and Icon-->
2017
<set name="APP_ID" value="0x0100f6c013bbc000" />
2118

@@ -131,6 +128,7 @@
131128
<haxelib name="away3d" if="THREE_D_SUPPORT" />
132129
<haxelib name="format" />
133130
<haxelib name="flxanimate" />
131+
<haxelib name="bin-serializer" />
134132
<haxelib name="nape-haxe4" if="NAPE_ENABLED"/>
135133

136134
<haxelib name="hscript-improved" />

source/funkin/backend/system/Flags.hx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import lime.utils.AssetType;
1313
/**
1414
* A class that reads the `flags.ini` file, allowing to read settable Flags (customs too).
1515
*/
16-
@:build(funkin.backend.system.macros.FlagMacro.build())
16+
@:build(funkin.backend.system.macros.FlagMacro.build("onReset"))
1717
class Flags {
1818
public static var overridenFlags:Map<String, Bool> = [];
1919

@@ -157,7 +157,7 @@ class Flags {
157157
public static var DEFAULT_HUD_ZOOM_LERP:Float = 0.05;
158158

159159
public static var USE_LEGACY_ZOOM_FACTOR:Null<Bool> = null;
160-
160+
161161
// Font configuration
162162
public static var DEFAULT_FONT:String = "vcr.ttf";
163163
public static var DEFAULT_FONT_SIZE:Int = 16;
@@ -312,6 +312,11 @@ class Flags {
312312
if (SUSTAINS_AS_ONE_NOTE == null) SUSTAINS_AS_ONE_NOTE = MOD_API_VERSION >= 2;
313313
}
314314

315+
private static function onReset() {
316+
var currentModFolder = ModsFolder.currentModFolder;
317+
if (currentModFolder != null) SAVE_NAME = currentModFolder;
318+
}
319+
315320
public static function loadFromDatas(datas:Array<String>):Map<String, String> {
316321
var flags:Map<String, String> = [];
317322
for (data in datas) {

source/funkin/backend/system/macros/FlagMacro.macro.hx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class FlagMacro {
1919
return false;
2020
}
2121

22-
public static function build():Array<Field> {
22+
public static function build(resetCallback:String):Array<Field> {
2323
var fields = Context.getBuildFields();
2424

2525
var clRef = Context.getLocalClass();
@@ -248,7 +248,10 @@ class FlagMacro {
248248
access: [APublic, AStatic],
249249
kind: FFun({
250250
args: [],
251-
expr: macro $b{resetExprs},
251+
expr: macro {
252+
$b{resetExprs};
253+
$i{resetCallback}();
254+
},
252255
ret: macro: Void
253256
}),
254257
pos: Context.currentPos(),

source/funkin/menus/StoryMenuState.hx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,17 @@ class StoryWeeklist {
342342
public function new() {}
343343

344344
public function getWeeksFromSource(source:funkin.backend.assets.AssetSource, useTxt:Bool = true, loadCharactersData:Bool = true) {
345-
var path:String = Paths.txt('weeks/weeks');
346-
var weeksFound:Array<String> = useTxt && Paths.assetsTree.existsSpecific(path, "TEXT", source) ? CoolUtil.coolTextFile(path) :
347-
[for (c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
348-
345+
var weeksFound:Array<String> = null;
346+
if (useTxt) {
347+
var oldPath:String = Paths.txt('weeks/weeks');
348+
var newPath:String = Paths.txt('config/weeks');
349+
if (Paths.assetsTree.existsSpecific(newPath, "TEXT", source)) weeksFound = CoolUtil.coolTextFile(newPath);
350+
else if (Paths.assetsTree.existsSpecific(oldPath, "TEXT", source)) {
351+
Logs.warn("data/weeks/weeks.txt is deprecated and will be removed in the future. Please move the file to data/config/", DARKYELLOW, "StoryWeeklist");
352+
weeksFound = CoolUtil.coolTextFile(oldPath);
353+
}
354+
}
355+
if (weeksFound == null) weeksFound = [for (c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)];
349356
if (weeksFound.length > 0) {
350357
for (w in weeksFound) {
351358
var week = Week.loadWeek(w, loadCharactersData);

0 commit comments

Comments
 (0)