Skip to content

Commit

Permalink
name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VietnamNeko committed Jan 26, 2022
1 parent e8d76b1 commit 44b04a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/gameClasses/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ var Item = IgeEntityBox2d.extend({
ige.itemUi.updateItemSlot(this, this._stats.slotIndex);
}
break;
case 'inventoryColor':
case 'inventorySlotColor':
var owner = self.getOwnerUnit();
if (ige.isClient && ige.client.selectedUnit == owner) {
owner.inventory.update();
Expand Down
4 changes: 2 additions & 2 deletions src/gameClasses/components/InventoryComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ var InventoryComponent = IgeEntity.extend({
// item.setState('unselected');
// }
// }
if (item && item._stats && item._stats.inventoryColor) {
$(`#item-${slotIndex}`).css('background-image', 'radial-gradient(rgba(0, 0, 0, 0),' + item._stats.inventoryColor + ')');
if (item && item._stats && item._stats.inventorySlotColor) {
$(`#item-${slotIndex}`).css('background-image', 'radial-gradient(rgba(0, 0, 0, 0),' + item._stats.inventorySlotColor + ')');
} else {
$(`#item-${slotIndex}`).css('background-image', 'none');
}
Expand Down
4 changes: 2 additions & 2 deletions src/gameClasses/components/script/ActionComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -1189,11 +1189,11 @@ var ActionComponent = IgeEntity.extend({
}
break;

case 'changeItemInventoryColor':
case 'changeInventorySlotColor':
var item = ige.variable.getValue(action.item, vars);
var color = ige.variable.getValue(action.string, vars);
if (item && color) {
item.streamUpdateData([{ inventoryColor: color }]);
item.streamUpdateData([{ inventorySlotColor: color }]);
}
break;

Expand Down

0 comments on commit 44b04a2

Please sign in to comment.