use of pneumaticCraft.common.progwidgets.IVariableWidget in project PneumaticCraft by MineMaarten.
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();
}
use of pneumaticCraft.common.progwidgets.IVariableWidget in project PneumaticCraft by MineMaarten.
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;
}
Aggregations