MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / read

Method read

source/game/StarWorldTiles.cpp:71–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void 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
106bool ServerTile::updateCollision(CollisionKind kind) {
107 if (collision != kind) {

Callers 1

StarWorldTiles.cppFile · 0.45

Calls 2

formatFunction · 0.50
readBytesMethod · 0.45

Tested by

no test coverage detected