Example #1
0
  public void signRemoveInput(Sign sign, Map map, int flux) {

    ArrayList<Integer> newInputs = new ArrayList<Integer>();

    Iterator<Integer> it = sign.getInputsSignals().iterator();

    while (it.hasNext()) {
      int i = it.next();
      if (i == flux) continue;
      else newInputs.add(i);
    }

    sign.setInputsSignals(newInputs);

    this.editor.buildSign(sign, map);

    try {
      map.writeSigns();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    this.signInfo(sign, map);
  }
Example #2
0
  public void signAddInput(Sign sign, Map map, int flux) {
    sign.getInputsSignals().add(flux);
    this.editor.buildSign(sign, map);

    try {
      map.writeSigns();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    this.signInfo(sign, map);
  }