Search in sources :

Example 1 with IVariableWidget

use of me.desht.pneumaticcraft.common.progwidgets.IVariableWidget in project pnc-repressurized by TeamPneumatic.

the class DroneAIManager method setWidgets.

public void setWidgets(List<IProgWidget> progWidgets) {
    this.progWidgets = progWidgets;
    for (IProgWidget widget : progWidgets) {
        if (widget instanceof IVariableWidget) {
            ((IVariableWidget) widget).setAIManager(this);
        }
    }
    gotoFirstWidget();
}
Also used : IVariableWidget(me.desht.pneumaticcraft.common.progwidgets.IVariableWidget) IProgWidget(me.desht.pneumaticcraft.common.progwidgets.IProgWidget)

Example 2 with IVariableWidget

use of me.desht.pneumaticcraft.common.progwidgets.IVariableWidget in project pnc-repressurized by TeamPneumatic.

the class TileEntityProgrammer method getAllVariables.

/**
 * Returns a set with all variables that are used in the program.
 *
 * @return
 */
public Set<String> getAllVariables() {
    Set<String> variables = new HashSet<String>();
    for (IProgWidget widget : progWidgets) {
        if (widget instanceof IVariableWidget)
            ((IVariableWidget) widget).addVariables(variables);
    }
    variables.remove("");
    return variables;
}
Also used : IVariableWidget(me.desht.pneumaticcraft.common.progwidgets.IVariableWidget) IProgWidget(me.desht.pneumaticcraft.common.progwidgets.IProgWidget)

Aggregations

IProgWidget (me.desht.pneumaticcraft.common.progwidgets.IProgWidget)2 IVariableWidget (me.desht.pneumaticcraft.common.progwidgets.IVariableWidget)2