Page 1 of 1

Synchronous Input

PostPosted: 27 Feb 2013, 21:50
by Max mtg
There are two ways how forge gets user's choice of some cards or players:
* GuiChoose
* Input (sometimes InputSelectMany*)

First option returns control to caller only when choice is made - a good synchronous method. The latter one sets input and immediatelly returns, so that the remainder of ability code is executed from inside input's "done" method. That's an asynchronous call I cannot move to PlayerController class (to make that ability/effect indifferent to player type).
see forge.card.cardfactory.CardFactoryArtifacts.buildCard(...).AbilityScrollRack.resolve() for example.

Do you know how to make that Input-based requests synchronous?