WrapperDeleteOldBaleEvent = {};
WrapperDeleteOldBaleEvent_mt = Class(WrapperDeleteOldBaleEvent, Event);
InitEventClass(WrapperDeleteOldBaleEvent, "WrapperDeleteOldBaleEvent");

function WrapperDeleteOldBaleEvent:emptyNew()
    local self = Event:new(WrapperDeleteOldBaleEvent_mt);
    self.className = "WrapperDeleteOldBaleEvent";
    return self;
end;

function WrapperDeleteOldBaleEvent:new(vehicle)
    local self = WrapperDeleteOldBaleEvent:emptyNew();
	self.vehicle = vehicle;
    return self;
end;

function WrapperDeleteOldBaleEvent:writeStream(streamId, connection)
	streamWriteInt32(streamId, networkGetObjectId(self.vehicle));
end;

function WrapperDeleteOldBaleEvent:readStream(streamId, connection)
	self.vehicle = networkGetObject(streamReadInt32(streamId));
	self:run(connection);
end;

function WrapperDeleteOldBaleEvent:run(connection)
	self.vehicle:wrapperDeleteOldBale();
end;