Skip to content

Commit aa584da

Browse files
committed
Fix stuff.
1 parent fd3814b commit aa584da

File tree

4 files changed

+53
-21
lines changed

4 files changed

+53
-21
lines changed

setup/windows.bat

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,27 @@ haxelib git systools https://github.com/haya3218/systools
3838
haxelib run lime rebuild systools windows
3939
echo Finished!
4040
pause
41+
42+
REM Ask user if they want to ensure the exact required versions
43+
set /p ensure_versions="Do you want to ensure the exact required library versions? (y/n): "
44+
if /i "%ensure_versions%"=="y" (
45+
haxelib set lime 8.2.2
46+
haxelib set openfl 9.4.1
47+
haxelib set flixel 5.6.2
48+
haxelib set flixel-addons 3.3.2
49+
haxelib set flixel-tools 1.5.1
50+
haxelib set hscript-iris 1.1.3
51+
haxelib set tjson 1.4.0
52+
haxelib set hxdiscord_rpc 1.3.0
53+
haxelib set hxvlc 2.0.1
54+
haxelib set helder.set 0.3.1
55+
haxelib set yaml 2.0.1
56+
haxelib set hxWebSockets 1.4.0
57+
haxelib set haxe-concurrent 5.1.3
58+
haxelib set actuate 1.9.0
59+
haxelib set flixel-ui 2.6.1
60+
haxelib set hscript 2.5.0
61+
haxelib set noisehx 0.0.1
62+
REM Add more haxelib set commands here if you add more versioned libraries above
63+
echo All required library versions have been set.
64+
)

source/archipelago/TrapLinkFunctions.hx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TrapLinkFunctions {
1616

1717
var curDirec:Int = 3;
1818

19-
if (random) curDirec = FlxG.random.int(0, 3);
19+
if (random || direction == null) curDirec = FlxG.random.int(0, 3);
2020
if (direction != null) curDirec = direction;
2121

2222
switch(curDirec) {
@@ -71,7 +71,7 @@ class TrapLinkFunctions {
7171
grpNotes = [];
7272

7373
var colArray = ['purple', 'blue', 'green', 'red'];
74-
74+
@:privateAccess
7575
for (i in 0...randArray.length) {
7676
var cool:StrumNote = new StrumNote(0, 0, randArray[i], 0);
7777
if (!PlayState.isPixelStage) cool.animation.addByPrefix('color', colArray[cool.noteData] + '0', 24, true);
@@ -97,7 +97,7 @@ class TrapLinkFunctions {
9797
j.angle = FlxG.random.float(-num / 2, num / 2);
9898
}
9999
});
100-
100+
@:privateAccess
101101
for (j in 0...grpNotes.length) {
102102
var strum = grpNotes[j];
103103
strum.playAnim('confirm', true);
@@ -109,7 +109,7 @@ class TrapLinkFunctions {
109109

110110
position = -1;
111111
didcoolthing = false;
112-
FlxG.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
112+
FlxG.stage.addEventListener(KeyboardEvent.KEY_DOWN, TrapLinkFunctions.onKeyPress);
113113
}
114114

115115
public static function getKeyFromEvent(key:FlxKey):Int
@@ -124,7 +124,7 @@ class TrapLinkFunctions {
124124

125125
static var position = -1;
126126
static var didcoolthing:Bool = false;
127-
function onKeyPress(k:KeyboardEvent) {
127+
static function onKeyPress(k:KeyboardEvent) {
128128
var eventKey:FlxKey = k.keyCode;
129129
var key:Int = getKeyFromEvent(eventKey);
130130
if (APPlayState.instance.health > 0.05) {
@@ -171,7 +171,7 @@ class TrapLinkFunctions {
171171
}
172172
}
173173

174-
function removeListener() {
174+
static function removeListener() {
175175
FlxG.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
176176
}
177177

@@ -183,7 +183,7 @@ class TrapLinkFunctions {
183183
var realTimer = timer;
184184
var unownState = new UnownSubState(realTimer, word);
185185
unownState.win = wonUnown;
186-
unownState.lose = APPlayState.instance.killhimtodeath;
186+
unownState.lose = APPlayState.instance.die;
187187
unownState.cameras = [APPlayState.instance.camHUD];
188188
FlxG.autoPause = false;
189189
FlxG.state.openSubState(unownState);

source/archipelago/substates/UnownSubState.hx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ class UnownSubState extends MusicBeatSubstate
9292

9393
var lines:FlxTypedGroup<FlxSprite>;
9494
var unowns:FlxTypedSpriteGroup<FlxSprite>;
95-
public var win:Void->Void = null;
96-
public var lose:Void->Void = null;
95+
public var win:haxe.Constraints.Function = null;
96+
public var lose:haxe.Constraints.Function = null;
97+
public var winArgs:OneOrMore<Dynamic> = null;
98+
public var loseArgs:OneOrMore<Dynamic> = null;
9799
var timer:Int = 20;
98100
var timerTxt:FlxText;
99101
public function new(theTimer:Int = 15, word:String = '')
@@ -179,7 +181,10 @@ class UnownSubState extends MusicBeatSubstate
179181
position++;
180182
if (position >= realWord.length) {
181183
close();
182-
win();
184+
if (winArgs != null)
185+
Reflect.callMethod(null, win, cast winArgs);
186+
else
187+
win();
183188
FlxG.sound.play(Paths.sound('traplink/CORRECT'));
184189
}
185190
}
@@ -227,7 +232,10 @@ class UnownSubState extends MusicBeatSubstate
227232
timer--;
228233
else {
229234
close();
230-
lose();
235+
if (loseArgs != null)
236+
Reflect.callMethod(null, lose, cast loseArgs);
237+
else
238+
lose();
231239

232240
}
233241
timerTxt.text = Std.string(timer);

source/states/PlayState.hx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4320,16 +4320,16 @@ class PlayState extends MusicBeatState
43204320
doDeathCheck(true);
43214321
}
43224322

4323-
// the void varient of the function above with trueKill set to true
4324-
public function killhimtodeath():Void
4325-
{
4326-
bfkilledcheck = true;
4327-
health = 0;
4328-
lives = 0;
4329-
else lives -= 1;
4330-
noteMissPress(3, opponentmode ? dadField : playerField); // just to make sure you actually die
4331-
doDeathCheck(true);
4332-
}
4323+
// // the void varient of the function above with trueKill set to true
4324+
// public function killhimtodeath():Void
4325+
// {
4326+
// bfkilledcheck = true;
4327+
// health = 0;
4328+
// lives = 0;
4329+
// else lives -= 1;
4330+
// noteMissPress(3, opponentmode ? dadField : playerField); // just to make sure you actually die
4331+
// doDeathCheck(true);
4332+
// }
43334333

43344334
function updateVisPos() { //Literaly so it doesn't look weird in the update function
43354335
try {

0 commit comments

Comments
 (0)