Skip to content

Commit e6da7cc

Browse files
committed
eep.
1 parent f35fe8e commit e6da7cc

File tree

6 files changed

+28
-12
lines changed

6 files changed

+28
-12
lines changed

source/backend/modules/FunkinSound.hx renamed to source/backend/modules/FunkinMusic.hx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package backend.modules;
22

3-
package backend.modules;
4-
53
import flixel.system.FlxSound;
4+
import backend.FunkinSound;
65

7-
class FunkinSound extends SoundLayer {
6+
class FunkinMusic extends SoundLayer {
87
public var bpm:Float;
98
public var sections:Array<{start:Float, end:Float}>;
109
public var currentSectionIndex:Int;
@@ -22,7 +21,7 @@ class FunkinSound extends SoundLayer {
2221
var totalDuration:Float = this.sound.length; // Get total duration of the sound in seconds
2322

2423
// Create sections based on the calculated start and end times
25-
for (i in 0...Int(totalDuration / sectionDuration)) {
24+
for (i in 0...Std.int(totalDuration / sectionDuration)) {
2625
var start:Float = i * sectionDuration;
2726
var end:Float = (i + 1) * sectionDuration;
2827
this.sections.push({start: start, end: end});
@@ -33,8 +32,8 @@ class FunkinSound extends SoundLayer {
3332
this.sections.push({start: start, end: end});
3433
}
3534

36-
public function play():Void {
37-
this.sound.play();
35+
public override function play():Void {
36+
super.play();
3837
this.sound.onComplete = this.onSoundComplete;
3938
}
4039

source/backend/modules/SoundLayer.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package backend.modules;
22

33
import flixel.system.FlxSound;
4+
import backend.FunkinSound;
45

56
// Represents a single sound layer
67
class SoundLayer {
7-
public var sound:FlxSound;
8+
public var sound:FunkinSound;
89
public var id:String;
910

1011
public function new(id:String, soundPath:String) {

source/psychlua/IntegratedScript.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class IntegratedLuaScript {
4141
file.close();
4242

4343
// Run the script through FunkinLua
44-
new FunkinLua(tempFilePath);
44+
new FunkinLua(tempFilePath).call("onCreate", []);
4545
// trace("Internal Lua script loaded successfully: " + name);
4646

4747
// Delete the temporary file
@@ -106,7 +106,7 @@ class IntegratedHScript {
106106
file.writeString(scriptText);
107107
file.close();
108108

109-
new HScript(null, tempFilePath);
109+
new HScript(null, tempFilePath).call("onCreate", []);
110110
// trace("Internal HScript loaded successfully: " + name);
111111

112112
// Delete the temporary file

source/states/FirstCheckState.hx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package states;
22

3+
import yutautil.AprilFools;
34
import archipelago.APEntryState;
45
import yutautil.modules.SyncUtils;
56
import flixel.input.keyboard.FlxKey;
@@ -81,6 +82,16 @@ class FirstCheckState extends MusicBeatState
8182
// combinedText.y = 200;
8283
// add(combinedText);
8384

85+
if (AprilFools.allowAF)
86+
{
87+
var aprilFoolsText = new FlxText(0, 0, FlxG.width, "April Fools!");
88+
aprilFoolsText.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, LEFT);
89+
add(aprilFoolsText);
90+
}
91+
else {
92+
ClientPrefs.data.aprilFools = true;
93+
}
94+
8495
if (!relaunch)
8596
{
8697
updateRibbon = new FlxSprite(0, FlxG.height - 75).makeGraphic(FlxG.width, 75, 0x88FFFFFF, true);

source/states/TitleState.hx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ class TitleState extends MusicBeatState
144144
#if TITLE_SCREEN_EASTER_EGG easterEggData(); #end
145145

146146
logoBl = new FlxSprite(logoPosition.x, logoPosition.y);
147-
logoBl.frames = Paths.getSparrowAtlas('logoBumpin');
147+
try {
148+
logoBl.frames = Paths.getSparrowAtlas('logoBumpin');
149+
} catch (e:haxe.Exception) {
150+
trace('[ERROR] Failed to load logoBumpin atlas: ' + e.details());
151+
logoBl.frames = null;
152+
}
148153
if (logoBl.frames == null) {
149154
logoBl.frames = Paths.getSparrowAtlas('bump');
150155
usingDefaultLogo = true;

source/yutautil/AprilFools.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import yutautil.ExtendedDate;
77
class AprilFools {
88
private var _allowAF:Bool = false;
99

10-
public var allowAF(get, never):Bool;
10+
public static var allowAF(get, never):Bool;
1111

12-
private function get_allowAF():Bool {
12+
private static function get_allowAF():Bool {
1313
return ClientPrefs.data.aprilFools && ExtendedDate.global().isAprilFools();
1414
}
1515
}

0 commit comments

Comments
 (0)