Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- getMaterialCustomShaderFilename
- getMaterialCustomShaderVariation
- getMaterialDiffuseMapFilename
- getMaterialDiffuseMapHasAlpha
- getMaterialEmissiveMapFilename
- getMaterialEmissiveMapHasAlpha
- getMaterialGlossMapFilename
- getMaterialHasRefractionMap
- getMaterialIsAlphaBlended
- getMaterialIsAlphaTested
- getMaterialNormalMapFilename
- getMaterialNormalMapFormat
- getMaterialReflectionMapScaling
- setMaterialCustomMapFromFile
- setMaterialCustomShaderVariation
- setMaterialDiffuseMapFromFile
- setMaterialGlossMapFromFile
- setMaterialNormalMapFromFile
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
ProductionPointOutputModeEvent
DescriptionEvent for production point output mode changesParent
EventFunctions
emptyNew
DescriptionCreate instance of Event classDefinition
emptyNew()Return Values
table | self | instance of class event |
13 | function ProductionPointOutputModeEvent.emptyNew() |
14 | local self = Event.new(ProductionPointOutputModeEvent_mt) |
15 | return self |
16 | end |
new
DescriptionCreate new instance of eventDefinition
new()Code
20 | function ProductionPointOutputModeEvent.new(productionPoint, outputFillTypeId, outputMode) |
21 | local self = ProductionPointOutputModeEvent.emptyNew() |
22 | self.productionPoint = productionPoint |
23 | self.outputFillTypeId = outputFillTypeId |
24 | self.outputMode = outputMode |
25 | return self |
26 | end |
readStream
DescriptionCalled on client side on joinDefinition
readStream()Code
30 | function ProductionPointOutputModeEvent:readStream(streamId, connection) |
31 | self.productionPoint = NetworkUtil.readNodeObject(streamId) |
32 | self.outputFillTypeId = streamReadUIntN(streamId, FillTypeManager.SEND_NUM_BITS) |
33 | self.outputMode = streamReadUIntN(streamId, ProductionPoint.OUTPUT_MODE_NUM_BITS) |
34 | self:run(connection) |
35 | end |
run
DescriptionRun action on receiving sideDefinition
run()Code
47 | function ProductionPointOutputModeEvent:run(connection) |
48 | if not connection:getIsServer() then |
49 | g_server:broadcastEvent(self, false, connection) |
50 | end |
51 | |
52 | if self.productionPoint ~= nil then |
53 | self.productionPoint:setOutputDistributionMode(self.outputFillTypeId, self.outputMode, true) |
54 | end |
55 | end |
sendEvent
DescriptionBroadcast event from server to all clients, if called on client call function on server and broadcast it to all clientsDefinition
sendEvent()Code
59 | function ProductionPointOutputModeEvent.sendEvent(productionPoint, outputFillTypeId, outputMode, noEventSend) |
60 | if noEventSend == nil or noEventSend == false then |
61 | if g_server ~= nil then |
62 | g_server:broadcastEvent(ProductionPointOutputModeEvent.new(productionPoint, outputFillTypeId, outputMode)) |
63 | else |
64 | g_client:getServerConnection():sendEvent(ProductionPointOutputModeEvent.new(productionPoint, outputFillTypeId, outputMode)) |
65 | end |
66 | end |
67 | end |
writeStream
DescriptionCalled on server side on joinDefinition
writeStream()Code
39 | function ProductionPointOutputModeEvent:writeStream(streamId, connection) |
40 | NetworkUtil.writeNodeObject(streamId, self.productionPoint) |
41 | streamWriteUIntN(streamId, self.outputFillTypeId, FillTypeManager.SEND_NUM_BITS) |
42 | streamWriteUIntN(streamId, self.outputMode, ProductionPoint.OUTPUT_MODE_NUM_BITS) |
43 | end |