Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ functions;
- PlaceableSilo:getFillLevel()
- PlaceableSilo:setFillLevel(newFillLevel)
- PlaceableSilo:getHemisphereRadiusFromVolume(volume)
- PlaceableSilo:forceMovePlane()
- PlaceableSilo:setFillType(fillType)
- oldFillLevel
- ]]
- --network needed for
- -- item bought --done
- -- fill level
- -- fill type
- -- display amount
- function PlaceableSilo:readStream(streamId, connection)
- PlaceableSilo:superClass().readStream(self, streamId, connection);
- end;
- function PlaceableSilo:writeStream(streamId, connection)
- PlaceableSilo:superClass().writeStream(self, streamId, connection);
- end;
- function PlaceableSilo:readUpdateStream(streamId, timestamp, connection)
- PlaceableSilo:superClass().readUpdateStream(self, streamId, timestamp, connection);
- if connection:getIsServer() then
- self.fillLevel = streamReadFloat32(streamId);
- PlaceableSilo.forceMovePlane(self);
- if self.fillLevel <= 0 and self.isServer then
- g_currentMission.vehiclesToDelete[self] = self;
- end;
- end;
- end;
- function PlaceableSilo:writeUpdateStream(streamId, connection, dirtyMask)
- PlaceableSilo:superClass().writeUpdateStream(self, streamId, connection, dirtyMask);
- if not connection:getIsServer() then
- streamWriteFloat32(streamId, self.fillLevel);
- end;
- end;
Add Comment
Please, Sign In to add comment