Skip to content

Commit 717e912

Browse files
committed
AP Stuff.
1 parent d51cd57 commit 717e912

File tree

6 files changed

+26
-4
lines changed

6 files changed

+26
-4
lines changed

source/archipelago/APCategoryState.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ class APCategoryState extends states.CategoryState {
3838

3939
states.ExitState.addExitCallback(function() {
4040
if (AP != null){
41+
APGameState.instance?.updateSaveData();
4142
trace("Properly disconnecting from server before exiting...");
4243
AP.disconnect_socket();}
44+
AP = null;
4345
});
4446
}
4547

source/archipelago/APItem.hx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ class ConditionHelper {
2222
return item.condition.checkFn(item);
2323
}
2424

25+
public static inline function Special():Condition {
26+
return ConditionHelper.create(function(item:APItem):Bool {
27+
if (Std.is(FlxG.state, states.FreeplayState)) {
28+
return true; // Acts like Everywhere in Freeplay
29+
} else if (Std.is(FlxG.state, states.PlayState)) {
30+
return PlayState().checkFn(item);
31+
}
32+
return false; // Default to false for other states
33+
}, ConditionType.Everywhere);
34+
}
35+
2536
public static inline function Everywhere():Condition {
2637
return ConditionHelper.create(function(item:APItem):Bool { return true; }, ConditionType.Everywhere);
2738
}
@@ -164,7 +175,7 @@ class APItem {
164175
}, 100);
165176
}, false, false);
166177
case "Fake Transition":
167-
return new APItem(name, ConditionHelper.Everywhere(), function() TransitionState.fakeTransition({transitionType:"transparent close"}), true, false);
178+
return new APItem(name, ConditionHelper.Special(), function() TransitionState.fakeTransition({transitionType:"transparent close"}), true, false);
168179
case "Ticket":
169180
return new APItem(name, ConditionHelper.Everywhere(), function() {popup("You got a ticket!");
170181
archipelago.APInfo.ticketCount++;

source/archipelago/APPlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ class APPlayState extends PlayState {
10871087
});
10881088
};
10891089

1090-
FlxTween.num(playbackRate, 0, 0.5, {
1090+
FlxTween.num(playbackRate, 0.0000000000000000001, 0.5, {
10911091
onComplete: function(e) {
10921092
FlxG.sound.play(Paths.sound('streamervschat/$selectedSound'), 1, false, null, true, function() {
10931093
FlxTween.num(playbackRate, 0, 0.5, {

source/backend/MusicBeatState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class MusicBeatState extends FlxState
4848

4949
super.create();
5050

51-
// backend.window.CppAPI.setWindowOppacity(0);
51+
// if (backend.window.CppAPI.getWindowOpacity()!=1)
5252
FlxTween.num(0, 1, 0.5, {
5353
ease: FlxEase.sineInOut,
5454
onComplete: function(tween:FlxTween)

source/backend/window/CppAPI.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ class CppAPI
3030
setWindowOppacity(a);
3131
}
3232

33+
public static inline function getWindowOpacity():Float
34+
{
35+
return getWindowOpacity();
36+
}
37+
3338
public static function _setWindowLayered()
3439
{
3540
WindowsData._setWindowLayered();

source/yutautil/save/MixSaveWrapper.hx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ class MixSaveWrapper {
166166
}
167167

168168
public function toString():String {
169-
return mixSave.content.toString();
169+
return 'MixSaveWrapper(\n' +
170+
' filePath: "' + filePath + '",\n' +
171+
' fancyFormat: ' + Std.string(fancyFormat) + ',\n' +
172+
' content: ' + mixSave.content.toString() + '\n' +
173+
')';
170174
}
171175
public function toMap():Map<String, Dynamic> {
172176
return mixSave.content;

0 commit comments

Comments
 (0)