Skip to content

Commit 6e53276

Browse files
committed
e
1 parent 279e8e2 commit 6e53276

File tree

6 files changed

+38
-4
lines changed

6 files changed

+38
-4
lines changed

Project.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@
143143

144144
<!--Mixtape stuff needed-->
145145
<haxelib name="openfl" /> <!-- Game engine backend -->
146-
<haxelib name="openflCamera" />
147-
<haxelib name="openflMicrophone" />
146+
<!-- <haxelib name="openflCamera" />
147+
<haxelib name="openflMicrophone" /> -->
148148
<haxelib name="haxeui-core" /> <!-- UI framework -->
149149
<haxelib name="haxeui-flixel" /> <!-- Integrate HaxeUI with Flixel -->
150150
<haxelib name="flixel-text-input" /> <!-- Improved text field rendering for HaxeUI -->

setup/windows.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ haxelib install actuate 1.9.0
2020
haxelib install flixel-ui 2.6.1
2121
haxelib install hscript 2.5.0
2222
haxelib install noisehx 0.0.1
23+
haxelib install deflatex
2324
haxelib install haxeui-core 1.7.0
2425
haxelib install haxeui-flixel 1.7.0
2526
haxelib install funkin-modchart 1.2.3

source/archipelago/APInfo.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ typedef APSlotDataType = {
2323
selectedSongs: Array<String>,
2424
songData: Map<String, SongDetailData>,
2525
?custom_weeks: Dynamic, // Custom weeks data from HScript processing
26-
?song_modifications: Dynamic // Song additions/exclusions data
26+
?song_modifications: Dynamic, // Song additions/exclusions data
27+
?unoColorsUsed:{name:String, color:String} // Uno mod colors used in the slot
2728
}
2829

2930
abstract APSlotData(APSlotDataType) from APSlotDataType to APSlotDataType {

source/archipelago/APItem.hx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ class APItem {
141141
public static var pendingDamage:Float = 0.0; // Damage that will be applied when conditions are met
142142
public static var extraItemInventory:Array<CustomModItem> = [];
143143

144+
public static var unoColorsUnlocked:Array<{name:String, color:String}> = [];
145+
144146
private var toSync:Bool = true;
145147
public var triggered:Bool = false;
146148

@@ -440,6 +442,17 @@ class APItem {
440442
case "UNO Color Filler":
441443
return new APItem(name, ConditionHelper.Everywhere(), function() {
442444
popup('You got an UNO color!', "You got an UNO Color Filler!");
445+
// Get a random color from APInfo's SlotData that isn't already unlocked.
446+
var availableColors = APInfo.slotData.unoColorsUsed.filter(function(c) {
447+
return !unoColorsUnlocked.exists(function(uc) { return uc.name == c.name; });
448+
});
449+
if (availableColors.length > 0) {
450+
var color = FlxG.random.choice(availableColors);
451+
unoColorsUnlocked.push(color);
452+
popup('You got the color ${color.name}!', "You got an UNO Color!");
453+
} else {
454+
popup('You already have all available colors!', "UNO Color Filler");
455+
}
443456

444457
}, true, true);
445458

source/archipelago/traps/games/APUnoTrapState.hx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,25 @@ class APUnoTrapState extends UnoTestState {
6161
trace("Added 4 Pong-UNO cards to AP trap deck!");
6262
}
6363

64+
// Get any custom UNO colors from AP slot data
65+
var unoColors = APItem.unoColorsUnlocked;
66+
67+
var unoColorsWithInt = [for (colorInfo in unoColors) {
68+
var colorInt = FlxColor.fromString(colorInfo.color);
69+
{name: colorInfo.name, color: colorInt};
70+
}];
71+
var usableColors:Array<UnoColor> = [];
72+
73+
74+
usableColors = (UnoCard.UnoColor.createCustomColorsFromObjects(unoColorsWithInt));
75+
76+
// If none unlocked, use gray.
77+
if (usableColors.length == 0) {
78+
usableColors = [UnoColor.CUSTOM(FlxColor.GRAY, "Gray")];
79+
}
80+
6481
// Create UNO game with custom cards
65-
unoGame = new UnoGame(null, true, customCards.length > 0 ? customCards : null);
82+
unoGame = new UnoGame(usableColors, false, customCards.length > 0 ? customCards : null);
6683

6784
// Randomize UNO rules for the trap
6885
randomizeUnoRules();

source/managers/FreeplayManager.hx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class FreeplayManager {
101101
}
102102
#else
103103
return switch (instance != null && instance.isType(FreeplayManager, true)) {
104+
105+
eaww
104106
case true:
105107
trace("Using existing FreeplayManager instance.");
106108
if (ensureLoaded) instance.reloadFreeplay(true);

0 commit comments

Comments
 (0)