public void signAddOutput(Sign sign, Map map, int flux, boolean fluxValue) { sign.getOutputSignals().add(new OutputSignal(flux, fluxValue)); this.editor.buildSign(sign, map); try { map.writeSigns(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } this.signInfo(sign, map); }
public void signRemoveOutput(Sign sign, Map map, int flux, boolean fluxValue) { ArrayList<OutputSignal> newOutputs = new ArrayList<OutputSignal>(); for (OutputSignal os : sign.getOutputSignals()) { if (os.getSignal() == flux && os.isOn() == fluxValue) continue; newOutputs.add(os); } sign.setOutputSignals(newOutputs); this.editor.buildSign(sign, map); try { map.writeSigns(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } this.signInfo(sign, map); }