1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-02-11 18:39:21 +00:00

Fix trash achievement not counting all inputs

This commit is contained in:
Sense101 2022-01-24 16:07:02 +00:00
parent a00c3c6ef3
commit b9e09dfb3b

View File

@ -423,7 +423,14 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
* @param {ProcessorImplementationPayload} payload * @param {ProcessorImplementationPayload} payload
*/ */
process_TRASH(payload) { process_TRASH(payload) {
payload.entity.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.trash1000, 1); // Hardcoded - 4 inputs
for (let i = 0; i < 4; ++i) {
const item = /** @type {ShapeItem} */ (payload.items.get(i));
if (!item) {
continue;
}
payload.entity.root.signals.achievementCheck.dispatch(ACHIEVEMENTS.trash1000, 1);
}
} }
/** /**
@ -547,7 +554,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
const hubComponent = payload.entity.components.Hub; const hubComponent = payload.entity.components.Hub;
assert(hubComponent, "Hub item processor has no hub component"); assert(hubComponent, "Hub item processor has no hub component");
// Hardcoded // Hardcoded - 16 inputs
for (let i = 0; i < 16; ++i) { for (let i = 0; i < 16; ++i) {
const item = /** @type {ShapeItem} */ (payload.items.get(i)); const item = /** @type {ShapeItem} */ (payload.items.get(i));
if (!item) { if (!item) {