mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Move IpcPlayerData out of inventory_sync/instance.ts
Remove circular dependency between inventory_sync/message.ts and inventory_sync/instance.ts by moving the IpcPlayerData type from message.ts to instance.ts. This solves a problem with the web build checking types in instance.ts that it dosen't use.
This commit is contained in:
1 parent
7bbb44d4e6
commit
96210373f3
4 files changed
+22
-24
No files matched your search
@@ -1,8 +1,25 @@
|
||||
import type { IpcPlayerData } from "./instance";
|
||||
|
||||
import { Type, Static } from "@sinclair/typebox";
|
||||
import { StringEnum } from "@clusterio/lib";
|
||||
|
||||
// .\module\serialize.lua:serialize.serialize_player()
|
||||
export type IpcPlayerData = {
|
||||
generation: number,
|
||||
controller: string,
|
||||
name: string,
|
||||
color: number[],
|
||||
chat_color: number[],
|
||||
tag: string,
|
||||
force: string,
|
||||
cheat_mode: boolean,
|
||||
flashlight: boolean,
|
||||
ticks_to_respawn?: number,
|
||||
character?: any,
|
||||
inventories?: any,
|
||||
hotbar?: string[],
|
||||
personal_logistic_slots?: {name:string, min:number, max:number}[],
|
||||
crafting_queue?: any,
|
||||
}
|
||||
|
||||
const jsonPlayerData = Type.Object({
|
||||
generation: Type.Number(),
|
||||
name: Type.String(),
|
||||
|
||||
Reference in new issue
Block a user