mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Switch to custom canvas based map renderer
This commit is contained in:
1 parent
063e622721
commit
3bf7a84de4
5 files changed
+795
-10
No files matched your search
@@ -43,6 +43,45 @@ export class TileDataEvent {
|
||||
}
|
||||
}
|
||||
|
||||
export class ChunkUpdateEvent {
|
||||
declare ["constructor"]: typeof ChunkUpdateEvent;
|
||||
static type = "event" as const;
|
||||
static src = "controller" as const;
|
||||
static dst = "control" as const;
|
||||
static plugin = "minimap" as const;
|
||||
static permission = "minimap.view";
|
||||
|
||||
constructor(
|
||||
public instanceId: number,
|
||||
public surface: string,
|
||||
public force: string,
|
||||
public chunkX: number,
|
||||
public chunkY: number,
|
||||
public imageData: string, // base64 encoded ImageData
|
||||
) {
|
||||
}
|
||||
|
||||
static jsonSchema = Type.Object({
|
||||
"instanceId": Type.Number(),
|
||||
"surface": Type.String(),
|
||||
"force": Type.String(),
|
||||
"chunkX": Type.Number(),
|
||||
"chunkY": Type.Number(),
|
||||
"imageData": Type.String(),
|
||||
});
|
||||
|
||||
static fromJSON(json: Static<typeof ChunkUpdateEvent.jsonSchema>) {
|
||||
return new this(
|
||||
json.instanceId,
|
||||
json.surface,
|
||||
json.force,
|
||||
json.chunkX,
|
||||
json.chunkY,
|
||||
json.imageData,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class GetInstanceBoundsRequest {
|
||||
declare ["constructor"]: typeof GetInstanceBoundsRequest;
|
||||
static type = "request" as const;
|
||||
|
||||
Reference in new issue
Block a user