This repository was archived by the owner on Oct 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +26
-6
lines changed
Expand file tree Collapse file tree 5 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public class FlagsDataMergeTool : DataMergeToolBase
2525 public override void CombineAndSaveData ( OutputMap outputMap )
2626 {
2727 byte flagsSaveVersion = 4 ;
28- byte flagsDataSaveVersion = 4 ;
28+ byte flagsDataSaveVersion = 5 ;
2929
3030 FlagsDataContent flagsContent = new ( flagsSaveVersion , 0 ) ;
3131 FlagsDataDataContent flagsDataContent = new ( flagsDataSaveVersion , 0 ) ;
@@ -37,7 +37,8 @@ public override void CombineAndSaveData(OutputMap outputMap)
3737
3838 if ( flagDataItem . Content . FlagsData . Count != flagItem . Content . Flags . Count )
3939 {
40- throw new Exception ( "Flags data count and flags count should be the same" ) ;
40+ flagDataItem . Content . FlagsData . RemoveAt ( FlagsData . Count - 1 ) ;
41+ //throw new Exception("Flags data count and flags count should be the same");
4142 }
4243
4344 for ( int i = 0 ; i < flagItem . Content . Count ; i ++ )
Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ public class FlagDataData
1212 public byte MaxZombies { get ; set ; }
1313 public bool SpawnZombies { get ; set ; }
1414 public bool HyperAgro { get ; set ; }
15+ public int MaxBossZombies { get ; set ; }
1516 }
1617}
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public void SaveToFile(string fileNamePath)
3636 river . writeByte ( flagData . MaxZombies ) ;
3737 river . writeBoolean ( flagData . SpawnZombies ) ;
3838 river . writeBoolean ( flagData . HyperAgro ) ;
39+ river . writeInt32 ( flagData . MaxBossZombies ) ;
3940 }
4041
4142 river . closeRiver ( ) ;
@@ -75,7 +76,12 @@ public static FlagsDataDataContent FromFile(string fileNamePath)
7576 {
7677 flagData . HyperAgro = river . readBoolean ( ) ;
7778 }
78-
79+
80+ flagData . MaxBossZombies = - 1 ;
81+ if ( content . SaveDataVersion >= 5 )
82+ {
83+ flagData . MaxBossZombies = river . readInt32 ( ) ;
84+ }
7985 }
8086
8187 river . closeRiver ( ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ namespace UnturnedMapMergeTool.Models.Contents.Zombies
99{
1010 public class ZombieTableData
1111 {
12+ public Guid TableUniqueId { get ; set ; }
1213 public Color Color { get ; set ; }
1314 public string Name { get ; set ; }
1415 public bool IsMega { get ; set ; }
Original file line number Diff line number Diff line change 1- using System . Collections . Generic ;
1+ using System ;
2+ using System . Collections . Generic ;
23using System . Drawing ;
34using System . IO ;
45using UnturnedMapMergeTool . Models . Contents . Zombies ;
@@ -81,6 +82,11 @@ public static ZombiesDataContent FromFile(string fileNamePath)
8182 block . readSteamID ( ) ;
8283 }
8384
85+ if ( content . SaveDataVersion >= 10 )
86+ {
87+ block . readInt32 ( ) ;
88+ }
89+
8490 content . Tables = new ( ) ;
8591
8692 // TODO: Add support for SavedataVersion < 2
@@ -91,6 +97,11 @@ public static ZombiesDataContent FromFile(string fileNamePath)
9197 ZombieTableData zombieTable = new ( ) ;
9298 content . Tables . Add ( zombieTable ) ;
9399
100+ if ( content . SaveDataVersion >= 10 )
101+ {
102+ block . readInt32 ( ) ;
103+ }
104+
94105 zombieTable . Color = block . readColor ( ) ;
95106 zombieTable . Name = block . readString ( ) ;
96107 zombieTable . IsMega = block . readBoolean ( ) ;
@@ -130,9 +141,9 @@ public static ZombiesDataContent FromFile(string fileNamePath)
130141 zombieTable . DifficultyGuid = block . readString ( ) ;
131142 }
132143
133- zombieTable . Slots = new ZombieSlotData [ 4 ] ;
134144 zombieTable . SlotsCount = block . readByte ( ) ;
135-
145+ zombieTable . Slots = new ZombieSlotData [ zombieTable . SlotsCount ] ;
146+
136147 for ( byte j = 0 ; j < zombieTable . SlotsCount ; j ++ )
137148 {
138149 ZombieSlotData zombieSlot = new ( ) ;
You can’t perform that action at this time.
0 commit comments