Revert "Merge branch 'update-game-tiles' into metadataScriptingApi"
This reverts commit428625e61b
, reversing changes made toa3165a0540
.
This commit is contained in:
parent
428625e61b
commit
a7b09e91ba
@ -1,15 +0,0 @@
|
|||||||
import * as tg from "generic-type-guard";
|
|
||||||
|
|
||||||
|
|
||||||
export const isChangeTileEvent = tg.isArray(
|
|
||||||
new tg.IsInterface().withProperties({
|
|
||||||
x: tg.isNumber,
|
|
||||||
y: tg.isNumber,
|
|
||||||
tile: tg.isUnion(tg.isNumber, tg.isString),
|
|
||||||
layer: tg.isUnion(tg.isNumber, 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 ChangeTileEvent = tg.GuardedType<typeof isChangeTileEvent>;
|
|
@ -21,8 +21,6 @@ import { isMenuItemRegisterEvent } from './Events/MenuItemRegisterEvent';
|
|||||||
import type { MenuItemClickedEvent } from './Events/MenuItemClickedEvent';
|
import type { MenuItemClickedEvent } from './Events/MenuItemClickedEvent';
|
||||||
import type { TagEvent } from "./Events/TagEvent";
|
import type { TagEvent } from "./Events/TagEvent";
|
||||||
import { isTilesetEvent, TilesetEvent } from "./Events/TilesetEvent";
|
import { isTilesetEvent, TilesetEvent } from "./Events/TilesetEvent";
|
||||||
import { isLoadPageEvent } from './Events/LoadPageEvent';
|
|
||||||
import { isChangeTileEvent, ChangeTileEvent } from './Events/ChangeTileEvent';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,9 +86,6 @@ class IframeListener {
|
|||||||
private readonly _tilesetLoaderStream: Subject<TilesetEvent> = new Subject();
|
private readonly _tilesetLoaderStream: Subject<TilesetEvent> = new Subject();
|
||||||
public readonly tilesetLoaderStream = this._tilesetLoaderStream.asObservable();
|
public readonly tilesetLoaderStream = this._tilesetLoaderStream.asObservable();
|
||||||
|
|
||||||
private readonly _updateTileEvent: Subject<ChangeTileEvent> = new Subject();
|
|
||||||
public readonly updateTileEvent = this._updateTileEvent.asObservable();
|
|
||||||
|
|
||||||
private readonly iframes = new Set<HTMLIFrameElement>();
|
private readonly iframes = new Set<HTMLIFrameElement>();
|
||||||
private readonly scripts = new Map<string, HTMLIFrameElement>();
|
private readonly scripts = new Map<string, HTMLIFrameElement>();
|
||||||
private sendPlayerMove: boolean = false;
|
private sendPlayerMove: boolean = false;
|
||||||
@ -163,10 +158,6 @@ class IframeListener {
|
|||||||
this._tagListStream.next();
|
this._tagListStream.next();
|
||||||
} else if (payload.type == "tilsetEvent" && isTilesetEvent(payload.data)) {
|
} else if (payload.type == "tilsetEvent" && isTilesetEvent(payload.data)) {
|
||||||
this._tilesetLoaderStream.next(payload.data);
|
this._tilesetLoaderStream.next(payload.data);
|
||||||
} else if (payload.type === 'loadPage' && isLoadPageEvent(payload.data)) {
|
|
||||||
this._loadPageStream.next(payload.data.url);
|
|
||||||
} else if (payload.type == "updateTile" && isChangeTileEvent(payload.data)) {
|
|
||||||
this._updateTileEvent.next(payload.data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user