mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-11 18:39:21 +00:00
Make wired pins component optional on the storage
This commit is contained in:
parent
48adc30a87
commit
0540a010a6
@ -50,8 +50,13 @@ export class StorageSystem extends GameSystemWithFilter {
|
|||||||
let targetAlpha = storageComp.storedCount > 0 ? 1 : 0;
|
let targetAlpha = storageComp.storedCount > 0 ? 1 : 0;
|
||||||
storageComp.overlayOpacity = lerp(storageComp.overlayOpacity, targetAlpha, 0.05);
|
storageComp.overlayOpacity = lerp(storageComp.overlayOpacity, targetAlpha, 0.05);
|
||||||
|
|
||||||
|
// a wired pins component is not guaranteed, but if its there, set the value
|
||||||
|
if (pinsComp) {
|
||||||
pinsComp.slots[0].value = storageComp.storedItem;
|
pinsComp.slots[0].value = storageComp.storedItem;
|
||||||
pinsComp.slots[1].value = storageComp.getIsFull() ? BOOL_TRUE_SINGLETON : BOOL_FALSE_SINGLETON;
|
pinsComp.slots[1].value = storageComp.getIsFull()
|
||||||
|
? BOOL_TRUE_SINGLETON
|
||||||
|
: BOOL_FALSE_SINGLETON;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user