Fix Integration Stages
This commit is contained in:
parent
c192576ab5
commit
3a93c8115c
2 changed files with 14 additions and 1 deletions
|
@ -30,6 +30,12 @@ public class IntegrationNode
|
||||||
name = n;
|
name = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return shortName.name() + ":" + state.name();
|
||||||
|
}
|
||||||
|
|
||||||
void Call(IntegrationStage stage)
|
void Call(IntegrationStage stage)
|
||||||
{
|
{
|
||||||
if ( state != IntegrationStage.FAILED )
|
if ( state != IntegrationStage.FAILED )
|
||||||
|
@ -66,12 +72,18 @@ public class IntegrationNode
|
||||||
else
|
else
|
||||||
throw new ModNotInstalled( modID );
|
throw new ModNotInstalled( modID );
|
||||||
|
|
||||||
|
state = IntegrationStage.INIT;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case INIT:
|
case INIT:
|
||||||
mod.Init();
|
mod.Init();
|
||||||
|
state = IntegrationStage.POSTINIT;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case POSTINIT:
|
case POSTINIT:
|
||||||
mod.PostInit();
|
mod.PostInit();
|
||||||
|
state = IntegrationStage.READY;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -5,5 +5,6 @@ public enum IntegrationStage
|
||||||
|
|
||||||
PREINIT, INIT, POSTINIT,
|
PREINIT, INIT, POSTINIT,
|
||||||
|
|
||||||
FAILED
|
FAILED, READY
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue