src/doge/patcher/FilePatcher.java
public static void writeAllPatchesInOneMod(RandomAccessFile fh,
            HashMap<String, Function> listOfNewFunctions, Modification mod)
            throws IOException {
        boolean fileAndNewModMatched = FileVerifier
                .isFileAndNewModMatched(fh, listOfNewFunctions, mod);
        boolean fileAndOldModMatched = FileVerifier
                .isFileAndOldModMatched(fh, listOfNewFunctions, mod);

        if (fileAndNewModMatched || fileAndOldModMatched) {
            if (fileAndNewModMatched) {
                System.out.println("Already modded: " + mod.getModName());
            }
            ArrayList<Patch> patches = mod.getPatches();
            for (Patch patch : patches) {
                FilePatcher.writePatch(fh, listOfNewFunctions, patch);
            }
        } else {
            FileVerifier.printModMismatch(mod);
        }
    }
/**
     * Enable a modification
     *
     * @param fh RandomAccessFile for better performance
     * @param listOfNewFunctions can be gotten from a DumpParser
     * @param mod a modification
     */
Enable a modification
@param fh RandomAccessFile for better performance
@param listOfNewFunctions can be gotten from a DumpParser
@param mod a modification
Enable a modification @param fh RandomAccessFile for better performance @param listOfNewFunctions can be gotten from a DumpParser @param mod a modification
public static void writeAllPatchesInOneMod(RandomAccessFile fh,
            HashMap<String, Function> listOfNewFunctions, Modification mod)
            throws IOException {
        boolean fileAndNewModMatched = FileVerifier
                .isFileAndNewModMatched(fh, listOfNewFunctions, mod);
        boolean fileAndOldModMatched = FileVerifier
                .isFileAndOldModMatched(fh, listOfNewFunctions, mod);
        if (fileAndNewModMatched || fileAndOldModMatched) {
            if (fileAndNewModMatched) {
                System.out.println("Already modded: " + mod.getModName());
            }
            ArrayList<Patch> patches = mod.getPatches();
            for (Patch patch : patches) {
                FilePatcher.writePatch(fh, listOfNewFunctions, patch);
            }
        } else {
            FileVerifier.printModMismatch(mod);
        }
    }
public static void writeAllPatchesInOneMod ( RandomAccessFile fh , HashMap < String , Function > listOfNewFunctions , Modification mod ) throws IOException { boolean fileAndNewModMatched = FileVerifier . isFileAndNewModMatched ( fh , listOfNewFunctions , mod ) ; boolean fileAndOldModMatched = FileVerifier . isFileAndOldModMatched ( fh , listOfNewFunctions , mod ) ; if ( fileAndNewModMatched || fileAndOldModMatched ) { if ( fileAndNewModMatched ) { System . out . println ( "Already modded: " + mod . getModName ( ) ) ; } ArrayList < Patch > patches = mod . getPatches ( ) ; for ( Patch patch : patches ) { FilePatcher . writePatch ( fh , listOfNewFunctions , patch ) ; } } else { FileVerifier . printModMismatch ( mod ) ; } }
Enable a modification
 @param fh RandomAccessFile for better performance
 @param listOfNewFunctions can be gotten from a DumpParser
 @param mod a modification
Enable a modification @param fh RandomAccessFile for better performance @param listOfNewFunctions can be gotten from a DumpParser @param mod a modification