From 8cf2e9d6f1313794a5b9dcfa48ad20b695f939c9 Mon Sep 17 00:00:00 2001 From: Treeways <56928485+Treeways@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:17:31 -0500 Subject: [PATCH 1/7] Fix quest reward notification auto-hiding --- src/patches/quest.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/patches/quest.ts b/src/patches/quest.ts index 7c4a112..4442269 100644 --- a/src/patches/quest.ts +++ b/src/patches/quest.ts @@ -18,6 +18,7 @@ declare global { export function patch(plugin: MwRandomizer) { let mwQuests: RawQuests = plugin.randoData?.quests; + let notifyTheseRewards: any = undefined; function getRawQuestFromQuestId(questId: string) { let mwQuest = mwQuests[questId]; @@ -32,6 +33,16 @@ export function patch(plugin: MwRandomizer) { return mwQuest; } + sc.StatusHudGui.inject({ + update() { + this.parent(); + if (notifyTheseRewards != undefined && !sc.model.isCutscene()) { + sc.multiworld.reallyCheckLocations(notifyTheseRewards); + notifyTheseRewards = undefined; + } + } + }); + sc.QuestModel.inject({ _collectRewards(quest: sc.Quest) { const previousItemAmounts: Record = {}; @@ -57,7 +68,7 @@ export function patch(plugin: MwRandomizer) { const check = getRawQuestFromQuestId(quest.id); if (check == undefined) return this.parent(quest); - sc.multiworld.reallyCheckLocations(check.mwids); + notifyTheseRewards = check.mwids; }, }); From 3752255856dd2704d662a77720333e3693a04990 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Fri, 23 Aug 2024 12:09:09 -0600 Subject: [PATCH 2/7] bump version --- ccmod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccmod.json b/ccmod.json index fde26db..21a64d9 100644 --- a/ccmod.json +++ b/ccmod.json @@ -1,6 +1,6 @@ { "id": "mw-rando", - "version": "0.6.0-pre.5", + "version": "0.6.0", "title": "Multiworld randomizer", "description": "Client for CrossCode Archipelago Integration", "repository": "https://github.com/CodeTriangle/CCMultiworldRandomizer", From 30a3ab09aebd41b520bd09bdab3cbb879ca6e5d6 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Sat, 24 Aug 2024 01:24:29 -0600 Subject: [PATCH 3/7] add vermillion shops --- data/in/shops.json | 38 ++++++++++++++++ data/out/data.json | 98 ++++++++++++++++++++++++++++++++++++++++- data/out/items.json | 20 ++++++++- data/out/locations.json | 18 +++++++- 4 files changed, 171 insertions(+), 3 deletions(-) diff --git a/data/in/shops.json b/data/in/shops.json index 6278e81..fd7c878 100644 --- a/data/in/shops.json +++ b/data/in/shops.json @@ -554,6 +554,44 @@ "Willis Waldmahl", "Pumpkin Spice Cof." ] + }, + "Vermillion Weapons": { + "location": { + "shop": "aridWeapons" + }, + "region": { + "linear": "22", + "open": "open18" + }, + "slots": [ + "Steel Goggles", + "Steel Edge", + "Steel Mail", + "Steel Boots", + "Silver Goggles", + "Silver Edge", + "Silver Mail", + "Silver Boots" + ] + }, + "Vermillion Items": { + "location": { + "shop": "aridItems" + }, + "region": { + "linear": "22", + "open": "open18" + }, + "slots": [ + "Sandwich", + "Hi-Sandwich", + "Green Leaf Tea", + "Just Water", + "Spicy Bun", + "Fruit Drink", + "Rice Cracker", + "Veggie Sticks" + ] } } } diff --git a/data/out/data.json b/data/out/data.json index c4373a4..a666916 100644 --- a/data/out/data.json +++ b/data/out/data.json @@ -4075,6 +4075,26 @@ "496": 3235824767, "551": 3235824768, "637": 3235824769 + }, + "aridWeapons": { + "204": 3235824770, + "205": 3235824771, + "206": 3235824772, + "207": 3235824773, + "264": 3235824774, + "266": 3235824775, + "268": 3235824776, + "270": 3235824777 + }, + "aridItems": { + "1": 3235824778, + "27": 3235824779, + "2": 3235824780, + "366": 3235824781, + "64": 3235824782, + "70": 3235824783, + "73": 3235824784, + "67": 3235824785 } } }, @@ -4160,7 +4180,9 @@ "rhombusWeapons1": 3235924450, "rhombusItems1": 3235924459, "rhombusCurios": 3235924475, - "rhombusBacker": 3235924478 + "rhombusBacker": 3235924478, + "aridWeapons": 3235924491, + "aridItems": 3235924500 }, "byShopAndId": { "rookieHarborItems": { @@ -4389,6 +4411,26 @@ "496": 3235924488, "551": 3235924489, "637": 3235924490 + }, + "aridWeapons": { + "204": 3235924492, + "205": 3235924493, + "206": 3235924494, + "207": 3235924495, + "264": 3235924496, + "266": 3235924497, + "268": 3235924498, + "270": 3235924499 + }, + "aridItems": { + "1": 3235924501, + "27": 3235924502, + "2": 3235924503, + "366": 3235924504, + "64": 3235924505, + "70": 3235924506, + "73": 3235924507, + "67": 3235924508 } } } @@ -5207,6 +5249,60 @@ "3235924490": { "en_US": "Unlocks the slot selling \\c[3]Pumpkin Spice Cof.\\c[0] in \\c[3]Chef Backer Goods\\c[0]." }, + "3235924491": { + "en_US": "Unlocks \\c[3]all item slots\\c[0] in the shop \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924492": { + "en_US": "Unlocks the slot selling \\c[3]Steel Goggles\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924493": { + "en_US": "Unlocks the slot selling \\c[3]Steel Edge\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924494": { + "en_US": "Unlocks the slot selling \\c[3]Steel Mail\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924495": { + "en_US": "Unlocks the slot selling \\c[3]Steel Boots\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924496": { + "en_US": "Unlocks the slot selling \\c[3]Silver Goggles\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924497": { + "en_US": "Unlocks the slot selling \\c[3]Silver Edge\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924498": { + "en_US": "Unlocks the slot selling \\c[3]Silver Mail\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924499": { + "en_US": "Unlocks the slot selling \\c[3]Silver Boots\\c[0] in \\c[3]Vermillion Equipment\\c[0]." + }, + "3235924500": { + "en_US": "Unlocks \\c[3]all item slots\\c[0] in the shop \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924501": { + "en_US": "Unlocks the slot selling \\c[3]Sandwich\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924502": { + "en_US": "Unlocks the slot selling \\c[3]Hi-Sandwich\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924503": { + "en_US": "Unlocks the slot selling \\c[3]Green Leaf Tea\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924504": { + "en_US": "Unlocks the slot selling \\c[3]Just Water\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924505": { + "en_US": "Unlocks the slot selling \\c[3]Spicy Bun\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924506": { + "en_US": "Unlocks the slot selling \\c[3]Fruit Drink\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924507": { + "en_US": "Unlocks the slot selling \\c[3]Rice Cracker\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, + "3235924508": { + "en_US": "Unlocks the slot selling \\c[3]Veggie Sticks\\c[0] in \\c[3]Vermillion Consumables\\c[0]." + }, "3235824050": { "en_US": "Unlocks the next dungeon or overworld area in story order." }, diff --git a/data/out/items.json b/data/out/items.json index 57e5f39..995e068 100644 --- a/data/out/items.json +++ b/data/out/items.json @@ -264,5 +264,23 @@ "Slot Unlock: Mooncake (Rhombus Backer Items)": 3235924487, "Slot Unlock: Guacamole Toast (Rhombus Backer Items)": 3235924488, "Slot Unlock: Willis Waldmahl (Rhombus Backer Items)": 3235924489, - "Slot Unlock: Pumpkin Spice Cof. (Rhombus Backer Items)": 3235924490 + "Slot Unlock: Pumpkin Spice Cof. (Rhombus Backer Items)": 3235924490, + "Shop Unlock: Vermillion Weapons": 3235924491, + "Slot Unlock: Steel Goggles (Vermillion Weapons)": 3235924492, + "Slot Unlock: Steel Edge (Vermillion Weapons)": 3235924493, + "Slot Unlock: Steel Mail (Vermillion Weapons)": 3235924494, + "Slot Unlock: Steel Boots (Vermillion Weapons)": 3235924495, + "Slot Unlock: Silver Goggles (Vermillion Weapons)": 3235924496, + "Slot Unlock: Silver Edge (Vermillion Weapons)": 3235924497, + "Slot Unlock: Silver Mail (Vermillion Weapons)": 3235924498, + "Slot Unlock: Silver Boots (Vermillion Weapons)": 3235924499, + "Shop Unlock: Vermillion Items": 3235924500, + "Slot Unlock: Sandwich (Vermillion Items)": 3235924501, + "Slot Unlock: Hi-Sandwich (Vermillion Items)": 3235924502, + "Slot Unlock: Green Leaf Tea (Vermillion Items)": 3235924503, + "Slot Unlock: Just Water (Vermillion Items)": 3235924504, + "Slot Unlock: Spicy Bun (Vermillion Items)": 3235924505, + "Slot Unlock: Fruit Drink (Vermillion Items)": 3235924506, + "Slot Unlock: Rice Cracker (Vermillion Items)": 3235924507, + "Slot Unlock: Veggie Sticks (Vermillion Items)": 3235924508 } \ No newline at end of file diff --git a/data/out/locations.json b/data/out/locations.json index fc780ba..60e480e 100644 --- a/data/out/locations.json +++ b/data/out/locations.json @@ -767,5 +767,21 @@ "Shop Slot: Mooncake (Rhombus Backer Items)": 3235824766, "Shop Slot: Guacamole Toast (Rhombus Backer Items)": 3235824767, "Shop Slot: Willis Waldmahl (Rhombus Backer Items)": 3235824768, - "Shop Slot: Pumpkin Spice Cof. (Rhombus Backer Items)": 3235824769 + "Shop Slot: Pumpkin Spice Cof. (Rhombus Backer Items)": 3235824769, + "Shop Slot: Steel Goggles (Vermillion Weapons)": 3235824770, + "Shop Slot: Steel Edge (Vermillion Weapons)": 3235824771, + "Shop Slot: Steel Mail (Vermillion Weapons)": 3235824772, + "Shop Slot: Steel Boots (Vermillion Weapons)": 3235824773, + "Shop Slot: Silver Goggles (Vermillion Weapons)": 3235824774, + "Shop Slot: Silver Edge (Vermillion Weapons)": 3235824775, + "Shop Slot: Silver Mail (Vermillion Weapons)": 3235824776, + "Shop Slot: Silver Boots (Vermillion Weapons)": 3235824777, + "Shop Slot: Sandwich (Vermillion Items)": 3235824778, + "Shop Slot: Hi-Sandwich (Vermillion Items)": 3235824779, + "Shop Slot: Green Leaf Tea (Vermillion Items)": 3235824780, + "Shop Slot: Just Water (Vermillion Items)": 3235824781, + "Shop Slot: Spicy Bun (Vermillion Items)": 3235824782, + "Shop Slot: Fruit Drink (Vermillion Items)": 3235824783, + "Shop Slot: Rice Cracker (Vermillion Items)": 3235824784, + "Shop Slot: Veggie Sticks (Vermillion Items)": 3235824785 } \ No newline at end of file From 735dd1099744540ee5f6a1d2fd99e7485c4ab9f8 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Thu, 29 Aug 2024 14:20:04 -0600 Subject: [PATCH 4/7] logic changes 29 Aug Mostly taken from --- data/in/quests-qr.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/in/quests-qr.json b/data/in/quests-qr.json index c12ff1b..eb985c7 100644 --- a/data/in/quests-qr.json +++ b/data/in/quests-qr.json @@ -97,7 +97,7 @@ "open": "open3" }, "condition": [ - [ "quest", "Kidding Around" ] + [ "quest", "The Goatfather" ] ], "reward": [ [ "item", "Vanilla Ice Cream", 2 ] @@ -878,6 +878,7 @@ "condition": [ [ "item", "Purple Bolt Shade", 1 ], [ "item", "Azure Drop Shade", 1 ], + [ "item", "Wave" ], [ "quest", "Lakeside Escort" ] ], "reward": [ @@ -1041,8 +1042,7 @@ "open": "open2" }, "condition": [ - [ "item", "Heat" ], - [ "item", "Cold" ], + [ "item", "Blue Ice Shade" ], [ "item", "Red Flame Shade", 1 ] ] }, @@ -1053,8 +1053,7 @@ "open": "open2" }, "condition": [ - [ "item", "Heat" ], - [ "item", "Cold" ], + [ "item", "Blue Ice Shade" ], [ "item", "Red Flame Shade", 1 ] ] @@ -1232,7 +1231,8 @@ }, "condition": [ [ "quest", "Intensive Tree Care" ], - [ "item", "Heat" ] + [ "item", "Heat" ], + [ "item", "Cold" ] ], "reward": [ [ "item", "Ginger Tom. Salad", 4 ], From e9fefb87595e0bbf1dbb4e785b5b8f33a0efb5e1 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Thu, 29 Aug 2024 14:23:17 -0600 Subject: [PATCH 5/7] add lock icon when item is needed --- assets/media/font/icons-multiworld.png | Bin 7360 -> 7794 bytes src/patches/shop.ts | 43 +++++++++++++++++++++++-- src/plugin.ts | 1 + 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/assets/media/font/icons-multiworld.png b/assets/media/font/icons-multiworld.png index 03c04d10051d7f602c45ee5acd8d608b6e02aedc..796aa017252596fe96f6bab2ac40601cdc8e60f7 100644 GIT binary patch delta 3281 zcmai$XHZky`o=dMQ81wwX`v&brc$H@3FLru1VNP0L5hlsh!H80P(v^(RUkCs067$q z5EV_doZ;`Ed8lTC?W;@b2IHJkQ#*yU;tvSsUUg0MOUf zhZ*Xk4D}5Z^w>MXP*;z_&4DI>Lf57NfFm*3($c}k(o!MvYD7SAm_GpA%8w(PV0#=y zlg>H6f{5`MiAKG4D9}nFp+0De7F$$`c}DBTe3pj=W1YNC@l4!LFimyklL+*d_2Mz# z;_IF2wi&UqZP(FgOxf;UjLT;YE-+#_iaq>u$0-187GY3Dd;GSJM2M^7R}{De647r+ zL)+N)+>D!5>KbZ84ebzEtI`g~#kn{kQTL_F?b^+a8-iu>Swy88t?J&@-bGb0?7{2k zSBuC&l}9{`a#-FebZ9j`P``0}GWaI5XPTU5w< zoPb*VM~VLLk~}|d#JlxGF*0QG>HzFQffYP&88C7Z!ljH_+3E zQ4)F5h4f)CI9d;(uZKpVb&(W#UMUU~1|ZKNOmh$!8@3gX*H7|81?$ZrzY2 z5X#TJOqn#N{1VnX#xDs-a}Jo~AETf})CdC7HW+i4Thr?W1P9Soss7GDY_)Sbf>)cr z0$);cpVw1KDfm^9pPz-{=;Ll;ifVAmmE7QQAiMHff~sbvlu`5OaLDh)&cQU(-e(DC z$JF;;tEV_z{l+C0e>vr>4O20FfN6SZg4x0JXNBvGd|?^%yxZO|8Io-)V#O3OV+qzA z7W^+RL?&vmBWH>ibjVr|W^~ro1x3%m-Hvg6J6OmKHjYVpNpTN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jc z2f1hhZ2rAg%l<9LnJ!K$7i1o^T8GMTvo7Wq+`yO|0e0Aim~dqi9B8Dl0}PcS=hHDHf8$Px7j+p zU1!{lw^IFnjS>g?CU-pmt1ruLiXtA)F6i>UU&R6J@8^}yZM}CGUFc>T0qnNA8gd1W zfnpnP&cOio_^>n>-Waj|V<1atLwM)Y&+*&?&qhIG*mRtr$CHFjQ=cX$hS(Z!v{ZwQ8}Vt6Oz43%S&)gU+HrXKAVr-PvzkGo+46qoi!b%YWGujF2$)xl9qKNlRBn5y-Y2HB{@u zzTBBbJ2B1Ho?xw9!HviTr6JA=rz;_ozOdg6zVm5p#0_3S<>FSXmOU*k#{rzPxd2<( z(uZifYtL`?j}-klg^ZJOfYPz8N$CBViBLDFlU6<^U2m#c529UNdo~G8(}Pr<$k$#n z7YK57_t4rSL!vZ>xXm~Eq4!Zc6=O=c=bZ<(kE5KagAt|a$6tcfZ$JWYXwX~#~La$kPQ;~U_W&$La? znzzvX8lHrPG7=SN-o~;H`REJ`ny%;8N^#RViVqu?r$MOQN_Q&V>yesaLamviR9V^y zmdX97gwOOd|5}XKEXzoQ4%O*Vhptkc8?+p4m38`WU)FEjabC01 zJ*)ozU{Mf;5N*ywVlbRdC82M~*rN~UZzqmSWr4R>{N53DGxI$?`L=sY{wF*K3-2Iu z1>-1j2ejIn9I!;??*8z-w4TjavTgO4xlQ3OrWQxu{`jFL-$8^By46ZIevGPohM|y3 zA$6#iHakM<^kt9e&Q3*eUlncm+ZN|RWy{e8wsHINf96=iH(wXhV#l{AYWnV69G35! z&$8u*f)t1k^bNnx&!{UV;pJ{H=58&Gx5s+iV-Be2WXFM7#qZRmEQUf) { + let button = rawButton as unknown as sc.ShopItemButton; + if (!button.active) { + button.showLockedMessage(); + } + }); + }, + scrapBuyList(shopItems) { this.parent(shopItems); const shopID = sc.menu.shopID; @@ -142,6 +157,11 @@ export function patch(plugin: MwRandomizer) { button.textChild.hook.pos.x = 5; button.addChildGui(button.textChild); + gui.lockedGui = new sc.TextGui("\\i[ap-locked]"); + gui.lockedGui.hook.align.x = ig.GUI_ALIGN.X_RIGHT; + gui.lockedGui.setPos(28, 1); + gui.addChildGui(gui.lockedGui); + const worldGui = new sc.TextGui(itemInfo.player, { "font": sc.fontsystem.tinyFont }); worldGui.hook.pos.x = 22; worldGui.hook.pos.y = button.hook.size.y; @@ -194,7 +214,7 @@ export function patch(plugin: MwRandomizer) { } } - if (gui.active && gui.itemId != undefined) { + if (gui.itemId != undefined) { let unlockItem: number | null = null; if (sc.multiworld.options.shopReceiveMode == "itemType") { unlockItem = sc.randoData.shops.unlocks.byId[gui.itemId]; @@ -204,8 +224,14 @@ export function patch(plugin: MwRandomizer) { unlockItem = sc.randoData.shops.unlocks.byShopAndId[shopID][gui.itemId]; } + gui.unlockItem = unlockItem; + if (unlockItem != null) { - gui.setActive(sc.multiworld.receivedItemMap[unlockItem] != undefined); + let hasUnlockItem = sc.multiworld.receivedItemMap[unlockItem] != undefined; + if (hasUnlockItem) { + gui.lockedGui.setText(""); + } + gui.setActive(gui.active && hasUnlockItem); } } } @@ -222,6 +248,11 @@ export function patch(plugin: MwRandomizer) { return this.parent(direction); } + if (!gui.active) { + gui.showLockedMessage(); + return; + } + const quantity = sc.menu.getItemQuantity(gui.itemId, gui.price); if ((quantity == 0 && direction == 1) || (quantity == 1 && direction == -1)) { this.playSound(direction, true); @@ -250,6 +281,14 @@ export function patch(plugin: MwRandomizer) { if (this.worldGui != undefined && this.slot != undefined) { this.worldGui.setText(this.slot); } + }, + + showLockedMessage() { + if (this.unlockItem != null && sc.multiworld.receivedItemMap[this.unlockItem] == undefined) { + let itemName = sc.multiworld.gamepackage.item_id_to_name[this.unlockItem]; + sc.menu.setInfoText(`Collect \\c[3]${itemName}\\c[0] to unlock this slot.`); + sc.menu.setBuffText(""); + } } }); } diff --git a/src/plugin.ts b/src/plugin.ts index 8947aa7..81642bb 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -126,6 +126,7 @@ export default class MwRandomizer { "ap-item-filler": [index, 4], "ap-item-useful": [index, 5], "ap-item-prog": [index, 6], + "ap-locked": [index, 7], }); sc.CrossCode.inject({ From 137a06c8e3a8809d2876dcb4c9c329a02f6fe8d8 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Thu, 29 Aug 2024 14:28:45 -0600 Subject: [PATCH 6/7] update package metadata --- ccmod.json | 2 +- package-lock.json | 30 +++++++----------------------- package.json | 4 ++-- 3 files changed, 10 insertions(+), 26 deletions(-) diff --git a/ccmod.json b/ccmod.json index 21a64d9..c1c8b66 100644 --- a/ccmod.json +++ b/ccmod.json @@ -1,6 +1,6 @@ { "id": "mw-rando", - "version": "0.6.0", + "version": "0.6.1", "title": "Multiworld randomizer", "description": "Client for CrossCode Archipelago Integration", "repository": "https://github.com/CodeTriangle/CCMultiworldRandomizer", diff --git a/package-lock.json b/package-lock.json index d75f4f3..db90e0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,8 +15,8 @@ "devDependencies": { "@types/node": "^20.4.9", "esbuild": "^0.18.15", - "nax-ccuilib": "conorlawton/nax-ccuilib", - "nax-module-cache": "github:conorlawton/nax-module-cache", + "nax-ccuilib": "naxane/nax-ccuilib", + "nax-module-cache": "github:naxane/nax-module-cache", "nodemon": "^3.0.1", "typescript": "^5.1.6", "ultimate-crosscode-typedefs": "github:krypciak/ultimate-crosscode-typedefs" @@ -3279,30 +3279,14 @@ "license": "MIT" }, "node_modules/nax-ccuilib": { - "version": "1.2.4", - "resolved": "git+ssh://git@github.com/conorlawton/nax-ccuilib.git#27d04077163f304e2c80ed269d7dae929e9e91f3", + "version": "1.2.9", + "resolved": "git+ssh://git@github.com/naxane/nax-ccuilib.git#e7e55791be5eeab7d5e927680cfc0b19698276a6", "dev": true }, "node_modules/nax-module-cache": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/conorlawton/nax-module-cache.git#ad208ceb06e11c82542f7c289ca26ba7ef44e6e3", - "dev": true, - "dependencies": { - "typescript": "^4.9.5" - } - }, - "node_modules/nax-module-cache/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } + "version": "1.0.2", + "resolved": "git+ssh://git@github.com/naxane/nax-module-cache.git#6a89cf7b8cef9b9806358fcc2766b5a3c7a1437c", + "dev": true }, "node_modules/neo-async": { "version": "2.6.2", diff --git a/package.json b/package.json index ee3e44a..01e4cf1 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "devDependencies": { "@types/node": "^20.4.9", "esbuild": "^0.18.15", - "nax-ccuilib": "conorlawton/nax-ccuilib", - "nax-module-cache": "github:conorlawton/nax-module-cache", + "nax-ccuilib": "naxane/nax-ccuilib", + "nax-module-cache": "github:naxane/nax-module-cache", "nodemon": "^3.0.1", "typescript": "^5.1.6", "ultimate-crosscode-typedefs": "github:krypciak/ultimate-crosscode-typedefs" From 9c1266c81c9c26b311e63071e1517fb50146cb80 Mon Sep 17 00:00:00 2001 From: Treeways <56928485+Treeways@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:39:03 -0500 Subject: [PATCH 7/7] Revert old fix for quest reward notification auto-hiding This reverts commit 8cf2e9d6f1313794a5b9dcfa48ad20b695f939c9. --- src/patches/quest.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/patches/quest.ts b/src/patches/quest.ts index 4442269..7c4a112 100644 --- a/src/patches/quest.ts +++ b/src/patches/quest.ts @@ -18,7 +18,6 @@ declare global { export function patch(plugin: MwRandomizer) { let mwQuests: RawQuests = plugin.randoData?.quests; - let notifyTheseRewards: any = undefined; function getRawQuestFromQuestId(questId: string) { let mwQuest = mwQuests[questId]; @@ -33,16 +32,6 @@ export function patch(plugin: MwRandomizer) { return mwQuest; } - sc.StatusHudGui.inject({ - update() { - this.parent(); - if (notifyTheseRewards != undefined && !sc.model.isCutscene()) { - sc.multiworld.reallyCheckLocations(notifyTheseRewards); - notifyTheseRewards = undefined; - } - } - }); - sc.QuestModel.inject({ _collectRewards(quest: sc.Quest) { const previousItemAmounts: Record = {}; @@ -68,7 +57,7 @@ export function patch(plugin: MwRandomizer) { const check = getRawQuestFromQuestId(quest.id); if (check == undefined) return this.parent(quest); - notifyTheseRewards = check.mwids; + sc.multiworld.reallyCheckLocations(check.mwids); }, });