Script Dokumentation LS 2015 - AITractorRotateRightEvent (Patch 1.3)
scripts/vehicles/specializations/AITractorRotateRightEvent.lua
Copyright (c) 2008-2015 GIANTS Software GmbH, Confidential, All Rights Reserved.
This document is to be published solely by ls-mods.de
1 | -- Copyright (C) GIANTS Software GmbH, Confidential, All Rights Reserved. |
2 | |
3 | AITractorRotateRightEvent = {}; |
4 | AITractorRotateRightEvent_mt = Class(AITractorRotateRightEvent, Event); |
5 | |
6 | InitStaticEventClass(AITractorRotateRightEvent, "AITractorRotateRightEvent", EventIds.EVENT_AITRACTOR_ROTATE_RIGHT); |
7 | |
8 | function AITractorRotateRightEvent:emptyNew() |
9 | local self = Event:new(AITractorRotateRightEvent_mt); |
10 | return self; |
11 | end; |
12 | |
13 | function AITractorRotateRightEvent:new(object) |
14 | local self = AITractorRotateRightEvent:emptyNew() |
15 | self.object = object; |
16 | return self; |
17 | end; |
18 | |
19 | function AITractorRotateRightEvent:readStream(streamId, connection) |
20 | local id = streamReadInt32(streamId); |
21 | self.object = networkGetObject(id); |
22 | self:run(connection); |
23 | end; |
24 | |
25 | function AITractorRotateRightEvent:writeStream(streamId, connection) |
26 | streamWriteInt32(streamId, networkGetObjectId(self.object)); |
27 | end; |
28 | |
29 | function AITractorRotateRightEvent:run(connection) |
30 | AITractor.aiRotateRight(self.object); |
31 | end;
|
Copyright (c) 2008-2015 GIANTS Software GmbH, Confidential, All Rights Reserved.
This document is to be published solely by ls-mods.de