public void writeSystem( OutputStream out, SystemState system ) throws IOException {
		writeInt( out, system.getCapacity() );
		if ( system.getCapacity() > 0 ) {
			writeInt( out, system.getPower() );
			writeInt( out, system.getDamagedBars() );
			writeInt( out, system.getIonizedBars() );

			if ( system.getDeionizationTicks() == Integer.MIN_VALUE )
				writeInt( out, -2147483648 );
			else
				writeInt( out, system.getDeionizationTicks() );

			writeInt( out, system.getRepairProgress() );
			writeInt( out, system.getDamageProgress() );
		}
	}