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
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
PlaceableDeletedNodes
DescriptionSpecialization for placeablesFunctions
onLoadFinished
DescriptionCalled on loadingDefinition
onLoadFinished(table savegame)Arguments
table | savegame | savegame |
39 | function PlaceableDeletedNodes:onLoadFinished(savegame) |
40 | |
41 | if self.xmlFile ~= nil then |
42 | local nodes = {} |
43 | self.xmlFile:iterate("placeable.deletedNodes.deletedNode", function(_, key) |
44 | local node = self.xmlFile:getValue(key .. "#node", nil, self.components, self.i3dMappings) |
45 | table.insert(nodes, node) |
46 | end) |
47 | |
48 | -- loop over node again and delete them to avoid conflicts with index pathes |
49 | for _, node in ipairs(nodes) do |
50 | delete(node) |
51 | end |
52 | end |
53 | end |
prerequisitesPresent
DescriptionChecks if all prerequisite specializations are loadedDefinition
prerequisitesPresent(table specializations)Arguments
table | specializations | specializations |
boolean | hasPrerequisite | true if all prerequisite specializations are loaded |
18 | function PlaceableDeletedNodes.prerequisitesPresent(specializations) |
19 | return true |
20 | end |
registerEventListeners
DescriptionDefinitionregisterEventListeners()Code
24 | function PlaceableDeletedNodes.registerEventListeners(placeableType) |
25 | SpecializationUtil.registerEventListener(placeableType, "onLoadFinished", PlaceableDeletedNodes) |
26 | end |
registerXMLPaths
DescriptionDefinitionregisterXMLPaths()Code
30 | function PlaceableDeletedNodes.registerXMLPaths(schema, basePath) |
31 | schema:setXMLSpecializationType("DeletedNodes") |
32 | schema:register(XMLValueType.NODE_INDEX, basePath .. ".deletedNodes.deletedNode(?)#node", "The node that should be deleted") |
33 | schema:setXMLSpecializationType() |
34 | end |