Skip to content

Commit bd63386

Browse files
committed
High Quality Bullshit
1 parent e8be925 commit bd63386

35 files changed

+6229
-277
lines changed

source/Main.hx

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ class Main extends Sprite
420420
DiscordClient.prepare();
421421
#end
422422

423+
// Clean up any leftover High Quality Trap temp files from previous sessions
424+
#if ARCHIPELAGO_ALLOWED
425+
archipelago.HighQualityTrapManager.onEngineExit();
426+
#end
427+
423428
"Trace will now respect the 'Disable Haxe Traces' setting in the options menu, except for when using 'HxTrace.log()' via Yutautil.".log();
424429

425430
Lib.current.loaderInfo.addEventListener(NativeProcessExitEvent.EXIT, onClosing); // help-
@@ -1282,7 +1287,7 @@ class CommandPrompt
12821287
{
12831288
var arg = args[0].toLowerCase();
12841289
var sizeEnum = switch (arg) {
1285-
case "bytes": yutautil.CollectionUtils.Size.Bytes;
1290+
case "bytes": yutautil.CollectionUtils.Size.B;
12861291
case "kb": yutautil.CollectionUtils.Size.KB;
12871292
case "mb": yutautil.CollectionUtils.Size.MB;
12881293
case "auto": yutautil.CollectionUtils.Size.Auto;
@@ -1851,6 +1856,86 @@ class CommandPrompt
18511856
}
18521857
}
18531858

1859+
case "testTrap":
1860+
#if ARCHIPELAGO_ALLOWED
1861+
// Check if we're in a valid state for testing (not AP mode, not PlayState)
1862+
if (archipelago.APEntryState.inArchipelagoMode) {
1863+
print("Error: Cannot test High Quality Trap while in Archipelago mode.");
1864+
return;
1865+
}
1866+
1867+
if (Std.isOfType(FlxG.state, states.PlayState)) {
1868+
print("Error: Cannot test High Quality Trap while in PlayState.");
1869+
return;
1870+
}
1871+
1872+
if (args.length == 0) {
1873+
print("High Quality Trap Testing Commands:");
1874+
print(" testTrap start - Download SiivaGunner repo and enter testing mode");
1875+
print(" testTrap exit - Exit testing mode and return to normal engine");
1876+
print(" testTrap status - Show current trap status");
1877+
return;
1878+
}
1879+
1880+
switch (args[0].toLowerCase()) {
1881+
case "start":
1882+
print("Starting High Quality Trap testing mode...");
1883+
1884+
// Enter testing mode with state restrictions first
1885+
backend.MusicBeatState.enterTrapTestingMode();
1886+
1887+
backend.GitHubAPI.setAuthToken("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");
1888+
1889+
// Initialize the trap manager (but don't activate yet - let waiting state handle it)
1890+
archipelago.HighQualityTrapManager.initialize();
1891+
1892+
// Switch to waiting state which will handle the download
1893+
FlxG.switchState(new states.HighQualityTrapWaitingState());
1894+
1895+
print("High Quality Trap testing mode activated!");
1896+
print("Downloading repository... Please wait and do not press any keys.");
1897+
print("The testing interface will appear once download is complete.");
1898+
print("Use 'testTrap exit' to leave testing mode when done.");
1899+
1900+
case "exit":
1901+
if (!backend.MusicBeatState.isTrapTestingMode()) {
1902+
print("Error: Not currently in High Quality Trap testing mode.");
1903+
return;
1904+
}
1905+
1906+
print("Exiting High Quality Trap testing mode...");
1907+
1908+
// Deactivate trap and cleanup
1909+
archipelago.HighQualityTrapManager.deactivateTrap();
1910+
1911+
// Exit testing mode
1912+
backend.MusicBeatState.exitTrapTestingMode();
1913+
1914+
// Return to main menu
1915+
FlxG.switchState(new states.MainMenuState());
1916+
print("High Quality Trap testing mode exited. Returned to normal engine.");
1917+
1918+
case "status":
1919+
print(archipelago.HighQualityTrapManager.getStatusInfo());
1920+
if (backend.MusicBeatState.isTrapTestingMode()) {
1921+
print("Testing Mode: ACTIVE");
1922+
print("Allowed States: HighQualityTrapWaitingState, HighQualityTrapTestState, PlayState");
1923+
if (archipelago.HighQualityTrapManager.needsWaitingState()) {
1924+
print("Status: Downloading repository...");
1925+
} else {
1926+
print("Status: Ready for testing");
1927+
}
1928+
} else {
1929+
print("Testing Mode: INACTIVE");
1930+
}
1931+
1932+
default:
1933+
print("Unknown testTrap command. Use 'testTrap' for help.");
1934+
}
1935+
#else
1936+
print("Error: High Quality Trap testing requires ARCHIPELAGO_ALLOWED compilation flag.");
1937+
#end
1938+
18541939
default:
18551940
if (args.length == 2 && args[1] == '=')
18561941
{

0 commit comments

Comments
 (0)