| 69 | } |
| 70 | |
| 71 | void ServerTile::read(DataStream& ds, VersionNumber serializationVersion) { |
| 72 | if (serializationVersion < 416 || serializationVersion > CurrentSerializationVersion) |
| 73 | throw StarException::format("Cannot read ServerTile - serialization version {} incompatible with current version {}\n", serializationVersion, CurrentSerializationVersion); |
| 74 | |
| 75 | ds.read(foreground); |
| 76 | ds.read(foregroundHueShift); |
| 77 | ds.read(foregroundColorVariant); |
| 78 | ds.read(foregroundMod); |
| 79 | ds.read(foregroundModHueShift); |
| 80 | ds.read(background); |
| 81 | ds.read(backgroundHueShift); |
| 82 | ds.read(backgroundColorVariant); |
| 83 | ds.read(backgroundMod); |
| 84 | ds.read(backgroundModHueShift); |
| 85 | ds.read(liquid.liquid); |
| 86 | ds.read(liquid.level); |
| 87 | ds.read(liquid.pressure); |
| 88 | ds.read(liquid.source); |
| 89 | ds.read(collision); |
| 90 | ds.read(dungeonId); |
| 91 | ds.read(blockBiomeIndex); |
| 92 | ds.read(environmentBiomeIndex); |
| 93 | if (serializationVersion < 417) |
| 94 | biomeTransition = false; |
| 95 | else |
| 96 | ds.read(biomeTransition); |
| 97 | if (serializationVersion < 418) { |
| 98 | ds.readBytes(1); |
| 99 | rootSource = {}; |
| 100 | } else { |
| 101 | ds.read(rootSource); |
| 102 | } |
| 103 | collisionCacheDirty = true; |
| 104 | } |
| 105 | |
| 106 | bool ServerTile::updateCollision(CollisionKind kind) { |
| 107 | if (collision != kind) { |
no test coverage detected