Skip to content

Commit

Permalink
Fixed arena coin shop sometimes giving free items.
Browse files Browse the repository at this point in the history
  • Loading branch information
elluminance committed Jan 19, 2024
1 parent 967f2cb commit 182d217
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ jobs:
run: sudo apt update; sudo apt install zip npm

- name: Compile
run: npm install; npm run build

- name: Create archive
run: zip -q -r els-tweaks.ccmod assets dist ccmod.json package.json
run: npm install; 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.0",
"version": "0.7.1",

"title": "EL's Tweaks",
"description": "A coremod full of useful functionality for modders, as well as many tweaks for players.",
Expand Down
4 changes: 2 additions & 2 deletions 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.0",
"version": "0.7.1",
"description": "A coremod full of useful functionality for modders, as well as many tweaks for players.",

"plugin": "./dist/plugin.js",
Expand All @@ -15,6 +15,6 @@
"scripts": {
"build": "tsc --build",
"watch": "tsc --watch",
"make-ccmod": "tsc -b && zip -qr el-tweaks.ccmod ccmod.json package.json dist assets"
"make-ccmod": "tsc -b && zip -qr els-tweaks.ccmod ccmod.json package.json dist assets"
}
}
2 changes: 1 addition & 1 deletion src/prestart/game/shop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ sc.ShopListMenu.inject({
itemEquipLevel = 0;
item.type === sc.ITEMS_TYPES.EQUIP && (itemEquipLevel = item.level || 1);

itemCost = Math.floor(b[k].price || (item.cost / (sc.menu.shopSellMode ? 2 : 1)));
itemCost = Math.floor(b[k].price || ((sc.menu.shopCoinMode ? item.coins! : item.cost) / (sc.menu.shopSellMode ? 2 : 1)));
itemQuantity = sc.menu.getItemQuantity(itemID, itemCost);
itemName = "\\i[" + (item.icon + sc.inventory.getRaritySuffix(item.rarity || 0) || "item-default") + "]" + ig.LangLabel.getText(item.name);
itemDesc = ig.LangLabel.getText(item.description);
Expand Down

0 comments on commit 182d217

Please sign in to comment.