| 115 | } |
| 116 | |
| 117 | ByteArray PlantDrop::netStore(NetCompatibilityRules) { |
| 118 | DataStreamBuffer ds; |
| 119 | ds << m_time; |
| 120 | ds << m_master; |
| 121 | ds << m_description; |
| 122 | ds << m_boundingBox; |
| 123 | ds << m_collisionRect; |
| 124 | ds << m_rotationRate; |
| 125 | ds.writeContainer(m_pieces, |
| 126 | [](DataStream& ds, PlantDropPiece const& piece) { |
| 127 | ds.write(piece.image); |
| 128 | ds.write(piece.offset[0]); |
| 129 | ds.write(piece.offset[1]); |
| 130 | ds.write(piece.flip); |
| 131 | ds.write(piece.kind); |
| 132 | }); |
| 133 | ds << m_stemConfig; |
| 134 | ds << m_foliageConfig; |
| 135 | ds << m_saplingConfig; |
| 136 | |
| 137 | return ds.data(); |
| 138 | } |
| 139 | |
| 140 | EntityType PlantDrop::entityType() const { |
| 141 | return EntityType::PlantDrop; |
nothing calls this directly
no test coverage detected