Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ValidateWorld()

void Terraria.GameContent.Creative.CreativePowerManager.ValidateWorld ( BinaryReader reader,
int versionGameWasLastSavedOn )
inline

Definition at line 152 of file CreativePowerManager.cs.

153 {
154 while (reader.ReadBoolean())
155 {
156 ushort key = reader.ReadUInt16();
157 if (_powersById.TryGetValue(key, out var value) && value is IPersistentPerWorldContent persistentPerWorldContent)
158 {
160 continue;
161 }
162 break;
163 }
164 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
virtual bool ReadBoolean()
virtual ushort ReadUInt16()
Dictionary< ushort, ICreativePower > _powersById

References Terraria.GameContent.Creative.CreativePowerManager._powersById, System.IO.BinaryReader.ReadBoolean(), System.IO.BinaryReader.ReadUInt16(), and System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue().