PC-Logix / LanteaCraft

A Stargate-themed mod for Minecraft
http://lanteacraft.com
Other
43 stars 21 forks source link

LC2-22: Request true/false return for CC iris calls #448

Closed HydrantHunter closed 8 years ago

HydrantHunter commented 8 years ago

Submission checklist

Expected behavior

Calling openIris() or closeIris() returns true or false depending on whether the action is started

Actual behavior

Calling openIris() or closeIris() returns nothing, making it difficult to determine if the action is taking place or not.

Steps to reproduce

In the CC Lua console wrap a stargate (with iris installed) and open or close the iris

System information

AfterLifeLochie commented 8 years ago

Just hook the events that are passed to the system? There should be four of them in total, representing each state transition.

This happens because Stargates are entirely asynchronous; it isn't possible for us to tell immediately if a Stargate action will complete. This also allows multiple players, command sources and systems to interact with a Stargate simultaneously, unlike previous versions.

HydrantHunter commented 8 years ago

Ahh, OK - I can work with it - thanks for the clarification :)