Skip to content

Commit

Permalink
minor code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tostito committed Oct 27, 2014
1 parent 61a5e09 commit cc4a49d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SE_NoBeacon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
ForEach($node in $nodes){
$beaconcount = $node.SelectNodes("CubeBlocks/MyObjectBuilder_CubeBlock[@xsi:type='MyObjectBuilder_Beacon']", $ns).count
IF($beaconcount -eq 0){
$ignoretotal = 0
$rotorcount = $node.SelectNodes("CubeBlocks/MyObjectBuilder_CubeBlock[@xsi:type='MyObjectBuilder_MotorRotor']", $ns).count
$pistoncount = $node.SelectNodes("CubeBlocks/MyObjectBuilder_CubeBlock[@xsi:type='MyObjectBuilder_PistonTop']", $ns).count
$wheelcount = $node.SelectNodes("CubeBlocks/MyObjectBuilder_CubeBlock[@xsi:type='MyObjectBuilder_Wheel']", $ns).count
$advrotorcount = $node.SelectNodes("CubeBlocks/MyObjectBuilder_CubeBlock[@xsi:type='MyObjectBuilder_MotorAdvancedRotor']", $ns).count
$ignoretotal = $rotorcount + $pistoncount + $wheelcount + $advrotorcount
$ignoretotal = $ignoretotal + $rotorcount + $pistoncount + $wheelcount + $advrotorcount
IF($ignoretotal -eq 0){
$node.ParentNode.RemoveChild($node)
}
Expand Down

0 comments on commit cc4a49d

Please sign in to comment.