mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-16 11:41:50 +00:00
save acceptor inputs to remove startup time on load
This commit is contained in:
parent
6cfdca3e10
commit
21df7583f1
@ -1,7 +1,9 @@
|
|||||||
import { enumDirection, enumInvertedDirections, Vector } from "../../core/vector";
|
import { enumDirection, enumInvertedDirections, Vector } from "../../core/vector";
|
||||||
|
import { types } from "../../savegame/serialization";
|
||||||
import { BaseItem } from "../base_item";
|
import { BaseItem } from "../base_item";
|
||||||
import { Component } from "../component";
|
import { Component } from "../component";
|
||||||
import { Entity } from "../entity";
|
import { Entity } from "../entity";
|
||||||
|
import { typeItemSingleton } from "../item_resolver";
|
||||||
import { GameRoot } from "../root";
|
import { GameRoot } from "../root";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,6 +52,25 @@ export class ItemAcceptorComponent extends Component {
|
|||||||
return "ItemAcceptor";
|
return "ItemAcceptor";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getSchema() {
|
||||||
|
return {
|
||||||
|
inputs: types.array(
|
||||||
|
types.structured({
|
||||||
|
slotIndex: types.uint,
|
||||||
|
item: typeItemSingleton,
|
||||||
|
animProgress: types.ufloat,
|
||||||
|
})
|
||||||
|
),
|
||||||
|
completedInputs: types.array(
|
||||||
|
types.structured({
|
||||||
|
slotIndex: types.uint,
|
||||||
|
item: typeItemSingleton,
|
||||||
|
extraProgress: types.ufloat,
|
||||||
|
})
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {object} param0
|
* @param {object} param0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user