PC-Logix / LanteaCraft

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

LC2-19: In ComputerCraft, calling closeIris() closes then reopens the iris #416

Closed HydrantHunter closed 8 years ago

HydrantHunter commented 8 years ago

Submission checklist

Install an iris in the stargate, then start the Lua console and wrap the gate, then call e.g. gate.closeIris()

System information

AfterLifeLochie commented 8 years ago

This is because thinkServerIris overrides the state of the Iris.

What happens if you apply a redstone signal to the Stargate, then use openIris() method?

HydrantHunter commented 8 years ago

Applying a redstone signal to anything other than the base has no effect. Applying a redstone signal to the StargateBase closes the iris immediately. Calling openIris() while the redstone signal is applied causes the iris to open then close again.

AfterLifeLochie commented 8 years ago

Okay, so thinkServerIris is definitely overstamping the state.

lieven121 commented 8 years ago

also the iris doesn't work unless I open the stargate gui once is this related to this or is this a other problem? update: (this is also only visual so this is more the issue I reported)

AfterLifeLochie commented 8 years ago

I don't quite understand, but it sounds like a separate issue.

lieven121 commented 8 years ago

yeah I was confused I am now thinking it has something to do with #417 srr for the "false" comment

AfterLifeLochie commented 8 years ago

This should now be fixed through 1236e85720ba0d42d1bc3688c7ae1a27f60f7153.

If you close the iris using redstone or computer, it will only re-open if you deactivate whatever activated it first (ie, if you used stargate.closeIris(), it won't open (even on redstone change) until you call stargate.openIris()).

HydrantHunter commented 8 years ago

I like the activation/deactivation priority concept - thank you!

AfterLifeLochie commented 8 years ago

This is really only a temporary work around since the Logic system doesn't allow you to pick what input(s) you want the gate to observe (it's always been on the other tab).

At some stage I'll allow you to select exactly what inputs trigger what actions, but for now the IOControlBaton workaround seems to make the functionality more regular and at least usable.