Skip to content

Commit

Permalink
fixed shop yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
elluminance committed Jan 19, 2024
1 parent 182d217 commit bdb73f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ jobs:
- name: Install dependencies
run: sudo apt update; sudo apt install zip npm

- name: Compile
run: npm install; npm run make-ccmod
- name: Get NPM dependencies
run: npm install

- name: Build mod
run: npm run make-ccmod

- name: Get version
id: get_version
Expand Down
2 changes: 1 addition & 1 deletion ccmod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "el-tweaks",
"version": "0.7.1",
"version": "0.7.2",

"title": "EL's Tweaks",
"description": "A coremod full of useful functionality for modders, as well as many tweaks for players.",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "el-tweaks",
"displayName": "EL's Tweaks",
"version": "0.7.1",
"version": "0.7.2",
"description": "A coremod full of useful functionality for modders, as well as many tweaks for players.",

"plugin": "./dist/plugin.js",
Expand Down
2 changes: 1 addition & 1 deletion src/prestart/game/shop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ sc.ShopListMenu.inject({
c = sc.stats.getMap("items", itemID as string)
maxVal = (button.data as any).maxOwn = b[k].maxOwn!;
} else maxVal = 99;
(moneyLeft < itemCost && !sc.menu.getItemQuantity(itemID, itemCost) || c >= Math.min(maxVal, maxOwn ?? 99)) && button.setActive(false);
(moneyLeft < itemCost && !sc.menu.getItemQuantity(itemID, itemCost) || c >= Math.min(maxVal ?? 99, maxOwn ?? 99)) && button.setActive(false);
this.list.addButton(button)
}
}
Expand Down

0 comments on commit bdb73f3

Please sign in to comment.