# HG changeset patch # User Andrew # Date 1669702589 18000 # Tue Nov 29 01:16:29 2022 -0500 # Branch great-lakes # Node ID 3a708b8ef9a4110a59b88965aa778bf0c07ca229 # Parent f23c0239fc740bc005f13616ed51a0904318cde8 Add the turn events emptier. diff --git a/src/main/java/com/ajtjp/gearCity/TurnEventsEmptier.java b/src/main/java/com/ajtjp/gearCity/TurnEventsEmptier.java new file mode 100644 --- /dev/null +++ b/src/main/java/com/ajtjp/gearCity/TurnEventsEmptier.java @@ -0,0 +1,31 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.ajtjp.gearCity; + +import java.io.File; +import java.io.FileWriter; +import java.util.Scanner; + +/** + * + * @author Andrew + */ +public class TurnEventsEmptier { + public static void main(String[] args) throws Exception{ + File file = new File("C:\\Software\\Games\\Steam\\steamapps\\common\\GearCity\\media\\Maps\\Great Lakes\\scripts\\TurnEvents.xml"); + Scanner s = new Scanner(file); + FileWriter fw = new FileWriter("C:\\Software\\Games\\Steam\\steamapps\\common\\GearCity\\media\\Maps\\Great Lakes\\scripts\\TurnEventsPruned.xml"); + while (s.hasNextLine()) { + String line = s.nextLine(); + if (!line.contains("