Revert "Merge branch 'update-game-tiles' into metadataScriptingApi"

This reverts commit 796a9418d3, reversing
changes made to 3506063e65.
This commit is contained in:
GRL 2021-05-21 16:24:48 +02:00
parent 796a9418d3
commit 1110f4fb7f
6 changed files with 42 additions and 79 deletions

View file

@ -17,7 +17,6 @@ import type { LayerEvent } from './LayerEvent';
import type { SetPropertyEvent } from "./setPropertyEvent";
import type { TagEvent } from "./TagEvent";
import type { TilesetEvent } from "./TilesetEvent";
import type { UpdateTileEvent } from "./UpdateTileEvent";
export interface TypedMessageEvent<T> extends MessageEvent {
data: T
@ -44,8 +43,7 @@ export type IframeEventMap = {
setProperty: SetPropertyEvent
getDataLayer: undefined
getTag: undefined
tilesetEvent: TilesetEvent
updateTileEvent: UpdateTileEvent
tilsetEvent: TilesetEvent
}
export interface IframeEvent<T extends keyof IframeEventMap> {
type: T;

View file

@ -1,15 +0,0 @@
import * as tg from "generic-type-guard";
export const isUpdateTileEvent = tg.isArray(
new tg.IsInterface().withProperties({
x: tg.isNumber,
y: tg.isNumber,
tile: tg.isUnion(tg.isNumber, tg.isString),
layer: tg.isString
}).get()
);
/**
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
*/
export type UpdateTileEvent = tg.GuardedType<typeof isUpdateTileEvent>;