Beispiel #1
0
        public bool saveToFile(String file)
        {
            try {
                WriteBuffer wb = new WriteBuffer();
                wb.writeString("version", defaultEncoding);
                wb.writeInt(1);

                wb.writeString(this.inpuPath, defaultEncoding);
                wb.writeString(this.outputPath, defaultEncoding);

                wb.writeArray(this.langauges, defaultEncoding);
                wb.writeArray(this.encodings, defaultEncoding);

                wb.writeArrayArray(this.strings, this.encodings);

                wb.writeInt(this.useCondition);

                wb.writeInt(this.lastKnownMapping.Length);
                wb.writeArray(this.lastKnownMapping);

                wb.writeString(this.originalEncoding, defaultEncoding);
                wb.writeArray(this.originalStrings, this.originalEncoding);

                wb.writeBool(this.repack);

                File.WriteAllBytes(file, wb.ToArray());
                return(true);
            } catch (Exception) {
                return(false);
            }
        }
Beispiel #2
0
        public bool saveToFile(String file)
        {
            try {
                WriteBuffer wb = new WriteBuffer();
                wb.writeString(this.inpuPath);
                wb.writeString(this.outputPath);
                wb.writeBool(this.enableVisor);
                wb.writeBool(this.enableBarrier);
                wb.writeInt(this.EMPDamage);
                wb.writeBool(this.addLeaderboard);
                wb.writeBool(this.addTouchRevive);
                wb.writeBool(this.addSancColors);
                wb.writeBool(this.useDefaultGunfireSound);
                wb.writeBool(this.useDefaultVisorSound);
                wb.writeBool(this.useDefaultBackgroundSound);
                wb.writeString(this.gunforeSoundPath == null ? "" : this.gunforeSoundPath.toStorageString());
                wb.writeString(this.visorSound == null ? "" : this.visorSound.toStorageString());
                wb.writeString(this.backgroundSound == null ? "" : this.backgroundSound.toStorageString());
                wb.writeBool(this.addTimelock);
                wb.writeString(this.timeLockMessage);
                wb.writeString(this.timeLockRangeFrom);
                wb.writeString(this.timeLockRangeTo);

                wb.writeBool(this.adjustHPAndWeapons);
                wb.writeBool(this.muteUnits);
                wb.writeData(this.preferredSettings);
                wb.writeArray(this.ignoreArmors);

                wb.writeString(this.mapName);
                wb.writeString(this.mapDescription);
                wb.writeString(this.mapObjectives);
                wb.writeBool(this.useObjectives);

                File.WriteAllBytes(file, wb.ToArray());
                return(true);
            } catch (Exception) {
                return(false);
            }
        }