Commit graph

46 commits

Author SHA1 Message Date
jonny 369d453455 Merge remote-tracking branch 'remotes/upstream/develop' into trigger-message-refv3 2021-07-02 18:49:22 +02:00
David Négrier 5b4a72ea1f Add new "query/answer" utility functions for the scripting API
So far, the scripting API was using events to communicate between WA and the iFrame.
But often, the scripting API might actually want to "ask" WA a question and wait for an answer.

We dealt with this by using 2 unrelated events (in a mostly painful way).

This commit adds a "queryWorkadventure" utility function in the iFrame API that allows us
to send a query, and to wait for an answer. The query and answer events have a unique ID to be
sure the answer matches the correct query.

On the WA side, a new `IframeListener.registerAnswerer` method can be used to register a possible answer.
2021-07-02 16:49:22 +02:00
GRL e1611969ce Merge branch 'develop' of github.com:thecodingmachine/workadventure into jonnytest1-tiles-start-positions 2021-07-02 14:35:28 +02:00
David Négrier 1e57028e6e Renaming changeTile to setTiles 2021-06-28 14:58:49 +02:00
jonny 7f61e9addd Merge remote-tracking branch 'remotes/upstream/develop' into tiles-start-positions 2021-06-25 18:14:40 +02:00
jonny 5472d220ba added trigger message code 2021-06-23 17:32:32 +02:00
GRL 24cc340cb9 Merge branch 'metadataScriptingApi' of github.com:thecodingmachine/workadventure into metadataScriptAPIV2 2021-06-23 12:02:29 +02:00
GRL 85fe92f604 Merge branch 'menu-commands-apiref' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-06-23 09:18:20 +02:00
GRL be23db5bcf Resolve import and LoadPageEvent issue 2021-06-22 16:07:31 +02:00
GRL ca3f5c599a Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-06-22 14:00:19 +02:00
jonny ba1bcf226a menu command api 2021-06-21 18:22:31 +02:00
David Négrier 9129ceede1 Improving refactoring of API following @jonnytest1 feedback 2021-06-21 11:48:39 +02:00
jonny 238f333b81 Merge remote-tracking branch 'remotes/workadventure-main/develop' into load-page-api
# Conflicts:
#	front/src/Api/Events/IframeEvent.ts
#	front/src/Api/IframeListener.ts
#	front/src/Phaser/Game/GameScene.ts
#	front/src/iframe_api.ts
2021-06-15 15:05:49 +02:00
GRL 858a513569 correction of adding custom menu
correction of setProperty
updating CHANGELOG
updating api-reference
2021-05-28 12:13:10 +02:00
GRL 9cd3ff1d31 Merge branch 'correct-merge' into metadataScriptAPIV2 2021-05-27 10:16:00 +02:00
GRL acbe4f89a6 Merge branch 'update-game-tiles' into correct-merge 2021-05-27 09:45:25 +02:00
GRL 5565ddd3f4 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-26 17:22:37 +02:00
David Négrier 54e300443b Fixing Typing 2021-05-26 16:11:22 +02:00
GRL a5cb93541a correction from code review 2021-05-25 17:21:02 +02:00
GRL d4bc999c54 pause loading tileset on fly 2021-05-25 10:15:56 +02:00
GRL 1110f4fb7f Revert "Merge branch 'update-game-tiles' into metadataScriptingApi"
This reverts commit 796a9418d3, reversing
changes made to 3506063e65.
2021-05-21 16:24:48 +02:00
GRL 796a9418d3 Merge branch 'update-game-tiles' into metadataScriptingApi 2021-05-21 15:56:35 +02:00
GRL 3506063e65 first step on loading a tileset from a script 2021-05-20 17:09:10 +02:00
GRL 2f9cc393a7 Implementation of getTag of the current user
documentation of getTag
Adding map for test of getTag
2021-05-20 10:57:36 +02:00
GRL ce0a72c6ce Merge branch 'menu-command-api' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-05-19 09:36:11 +02:00
GRL aa78bf44ef implementation of DataLayerEvent
update GetGameState to add nickname to the returned data
update GameMap to separate phaserLayer and mapLayer
2021-05-18 15:41:16 +02:00
GRL 201fcf6afa Merge branch 'gamestate-api-read' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-05-18 15:18:35 +02:00
GRL 2ee62c9e9e Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-18 11:50:03 +02:00
GRL 3edfd5b285 GameState is now save in cache
HasPlayerMoved is send when the player is actually moving on the map every 200ms.
2021-05-18 11:33:16 +02:00
David Négrier 127a4759ac Merge branch 'develop' of github.com:thecodingmachine/workadventure into menu-command-api
# Conflicts:
#	front/src/Api/Events/IframeEvent.ts
#	front/src/Api/IframeListener.ts
#	front/src/iframe_api.ts
2021-05-18 10:16:44 +02:00
GRL 43aad4ab14 phaserLayers managed by Gamemap
Implementation of LayersFlattener
Implementation of Setting properties of a layer form script
Update show/hide layer form script
Update unit test of LayersIteratorTest
2021-05-12 14:30:12 +02:00
David Négrier 4d4f845b9e Setting "importsNotUsedAsValues": "error"
Turning the "importsNotUsedAsValues" TS config value to "error".
This will require us to use `import type` instead of `import` when we are importing a value that is only used as a type (and therefore that is dropped by the Typescript compiler).

Why this change?
This is a requirement to be able to use Svelte in the future. See https://github.com/sveltejs/svelte-preprocess/issues/206#issuecomment-663193798
2021-05-12 09:13:25 +02:00
jonny 8cef4f6e90 Merge remote-tracking branch 'remotes/workadventure-main/develop' into gamestate-api-read
# Conflicts:
#	front/src/Api/IframeListener.ts
2021-05-10 21:48:11 +02:00
jonny 8e136cebe8 added callback on playermove - gets quite delayed after walking for a few seconds 2021-05-10 21:27:17 +02:00
GRL fd931c4884 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-10 14:45:41 +02:00
David Négrier c025d1798b Renaming restorePlayerControls/disablePlayerControls
Putting "controls" in the plural form:

- restorePlayerControl => restorePlayerControls
- disablePlayerControl => disablePlayerControls
2021-05-10 12:18:06 +02:00
GRL cd2d090a8b Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-10 11:46:16 +02:00
jonny ce0c7ea3eb Merge remote-tracking branch 'remotes/workadventure-main/develop' into gamestate-api-read 2021-05-10 10:01:53 +02:00
jonny a5260c0831 Merge remote-tracking branch 'remotes/workadventure-main/develop' into load-page-api 2021-05-10 09:58:59 +02:00
jonny 4758820aa4 Merge remote-tracking branch 'remotes/workadventure-main/develop' into menu-command-api 2021-05-10 09:54:39 +02:00
jonny 91148035ec polyfill generic message event 2021-05-09 21:46:40 +02:00
jonny cf06f29ef8 fixed cherry pick conflicts 2021-05-09 21:38:11 +02:00
jonny 8da5bf9f8e typed iframe api events
# Conflicts:
#	front/src/Api/IframeListener.ts
#	front/src/iframe_api.ts
2021-05-09 21:36:48 +02:00
DESKTOP-FMM8UI0\CLV c5c8770a60 Add First Version of Tuto
PopUp
Player Control disable
Fake bubble displayed
2021-03-12 16:39:29 +01:00
David Négrier e927e0fa16 Adding ability to listen to user types chat messages using WA.onChatMessage 2021-03-06 15:26:07 +01:00
David Négrier 5178dff108 Adding strong checks on messages exchanged using generic-type-guard 2021-03-05 16:50:54 +01:00