1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fixed order

This commit is contained in:
DJ1TJOO 2022-02-05 22:54:35 +01:00
parent 67b4e0be8b
commit 976318fcc5

View File

@ -60,15 +60,15 @@ export class StorageComponent extends Component {
const itemType = item.getItemType(); const itemType = item.getItemType();
if (MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType]) {
return MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType].apply(this, [item]);
}
if (itemType !== this.storedItem.getItemType()) { if (itemType !== this.storedItem.getItemType()) {
// Check type matches // Check type matches
return false; return false;
} }
if (MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType]) {
return MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType].apply(this, [item]);
}
if (itemType === "color") { if (itemType === "color") {
return /** @type {ColorItem} */ (this.storedItem).color === /** @type {ColorItem} */ (item).color; return /** @type {ColorItem} */ (this.storedItem).color === /** @type {ColorItem} */ (item).color;
} }