|
Arma Reforger Script API
|
SLOT SYSTEM: More...
Protected Member Functions | |
| void | Generate () |
| Entry point to all current line's generation (and connected lines's fixes) | |
| bool | GetObjectAndPoleSourceAt (vector worldPos, out IEntitySource parentSource, out IEntitySource poleSource) |
| IEntity | GetFirstCablePoleEntityInEntityOrChildren (notnull IEntity entity) |
| void | ReconnectOtherGenerators (notnull IEntitySource generator, notnull map< IEntitySource, IEntitySource > junctions) |
| bool | ReconnectGeneratorToPole (notnull IEntitySource generatorSource, notnull IEntitySource otherLinePoleSource) |
| Reconnect a line ending to the provided pole. | |
| map< IEntitySource, IEntitySource > | GenerateJunctions () |
| Generate junctions, happening before generating poles. | |
| override bool | _WB_OnKeyChanged (BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent) |
| void | GeneratePoles () |
| Generates cable pole positions first then creates poles and cables if valid Only called by Generate() | |
| bool | GetPolesRelPosition (notnull out array< vector > polePointsRelPos, notnull out map< int, ref SCR_PowerlineGeneratorPointData > pointDataMap) |
| Generates poles relative positions for powerline generator based on anchor points, tesselated points and powerline data. | |
| void | CreatePolesAndCables (notnull array< vector > polePointsRelPos, notnull array< vector > anchorPointsRelPos, notnull map< int, ref SCR_PowerlineGeneratorPointData > pointsData) |
| Creates poles and cables between given points with optional random pitch and roll, snaps to terrain if no junction found. | |
| override void | _WB_OnParentChange (IEntitySource src, IEntitySource prevParentSrc) |
| override void | OnShapeChangedInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes) |
Protected Member Functions inherited from SCR_LineTerrainShaperGeneratorBaseEntity | |
| override void | OnShapeInitInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity) |
| override void | OnShapeTransformInternal (IEntitySource shapeEntitySrc, ShapeEntity shapeEntity, array< vector > mins, array< vector > maxes) |
| void | UpdateTerrainSimple (bool forceUpdate=false) |
| wrapper method around UpdateTerrain that sets m_ShapeEntity up | |
| void | UpdateTerrain (notnull ShapeEntity shapeEntity, bool forceUpdate, notnull array< vector > updateMins, notnull array< vector > updateMaxes) |
| void | SCR_LineTerrainShaperGeneratorBaseEntity (IEntitySource src, IEntity parent) |
Protected Member Functions inherited from SCR_LineGeneratorBaseEntity | |
| void | ResetShapeNextPointHelper () |
| override void | _WB_AfterWorldUpdate (float timeSlice) |
| override int | _WB_GetAfterWorldUpdateSpecs (IEntitySource src) |
Protected Member Functions inherited from SCR_GeneratorBaseEntity | |
| override void | OnIntersectingShapeChangedXZInternal (IEntitySource shapeEntitySrc, IEntitySource other, array< vector > mins, array< vector > maxes) |
| void | ResetGeneratorPosition (ShapeEntity shapeEntity=null) |
| void | DeleteAllChildren () |
| Delete all children without distinction, using WorldEditorAPI. | |
| void | SetSeed () |
| Color | GetColor () |
| void | ColorShape () |
| Set shape's line colour to GetColor() value. | |
| IEntitySource | GetShapeSource () |
| Get the parent shape above this generator (has to be the direct parent) | |
| void | SCR_GeneratorBaseEntity (IEntitySource src, IEntity parent) |
Static Protected Member Functions | |
| static IEntitySource | GetFirstCablePoleFromExtremity (notnull IEntitySource generatorSource, bool fromStart) |
| static array< IEntitySource > | GetCablesBetweenPoleSources (notnull IEntitySource generatorPoleSource, notnull IEntitySource otherPoleSource) |
| static IEntitySource | FindJunctionOnPosXZ (notnull IEntitySource generatorSource, vector worldPos, out bool isSameLine) |
| static array< IEntitySource > | CreatePowerLines (notnull IEntitySource generatorSource, notnull IEntitySource existingPoleSource, notnull IEntitySource addedPoleSource) |
| Creates power lines between two power poles based on their cable types, if they have compatible slots. | |
| static IEntitySource | GetPowerPoleSourceFromEntitySource (notnull IEntitySource powerPoleEntitySource) |
| Get the first power pole, either the entity or one of its direct children. | |
Static Protected Member Functions inherited from SCR_GeneratorBaseEntity | |
| static WorldEditorAPI | GetWorldEditorAPI () |
| static array< vector > | GetPoints (notnull IEntitySource shapeEntitySrc) |
| static array< vector > | GetAnchorPoints (notnull IEntitySource shapeEntitySrc, float offset=0, bool isShapeClosed=false) |
| static array< vector > | GetWorldAnchorPoints (notnull IEntitySource shapeEntitySrc) |
| static array< vector > | GetTesselatedShapePoints (notnull IEntitySource shapeEntitySrc, float offset=0, bool isShapeClosed=false) |
| static array< vector > | GetWorldTesselatedShapePoints (notnull IEntitySource shapeEntitySrc) |
Static Protected Attributes | |
| static const string | POWER_LINE_CLASS = "PowerlineEntity" |
| static const ResourceName | DEFAULT_CABLE_PREFAB = "{613763D114E7CD1C}Prefabs/WEGenerators/Powerline/Powerline.et" |
| static const int | MAX_CABLE_LENGTH = 500 |
| static ref SCR_DebugShapeManager | s_DebugShapeManager |
| static ref map< IEntitySource, ref map< IEntitySource, vector > > | s_mGeneratorAndPolesPlusParentWorldPosMap = new map<IEntitySource, ref map<IEntitySource, vector>>() |
| <generatorSource, <objectSource, objectPosition>> | |
| static const float | JUNCTION_DISTANCEXZ = 0.1 |
| static const float | JUNCTION_DISTANCEXZ_SQ = JUNCTION_DISTANCEXZ * JUNCTION_DISTANCEXZ |
| static const float | MIN_CABLE_LENGTH_SQ = 0.01 |
| static const float | MAX_CABLE_LENGTH_SQ = MAX_CABLE_LENGTH * MAX_CABLE_LENGTH |
| static const float | GENERATOR_BBOX_TOLERANCE = 5 |
| static const float | POLE_SAFEZONE_DISTANCE = 1.0 |
| static const int | DEBUG_POLE_COLOUR_POS = Color.BLUE & 0x00FFFFFF | 0x88000000 |
| static const int | DEBUG_POLE_COLOUR_ERROR = Color.RED & 0x00FFFFFF | 0x88000000 |
| static const float | DEBUG_POLE_SIZE = 1 |
| static const vector | DEBUG_POLE_POS = "0 5 0" |
| static const int | DEBUG_SLOT_COLOUR_POS = Color.DARK_GREEN & 0x00FFFFFF | 0x88000000 |
| static const int | DEBUG_SLOT_COLOUR_UNUSED = Color.ORANGE & 0x00FFFFFF | 0x88000000 |
| static const float | DEBUG_SLOT_SIZE = 0.1 |
| static const int | DEBUG_CABLE_LENGTH_COLOUR_ERROR_SPHERE = Color.RED & 0x00FFFFFF | 0xAA000000 |
| static const int | DEBUG_CABLE_LENGTH_COLOUR_ERROR_LINE = Color.RED |
| static const vector | DEBUG_CABLE_LENGTH_POS = "0 3 0" |
| static const float | DEBUG_CABLE_LENGTH_POS_MAX_DIST = DEBUG_CABLE_LENGTH_POS.Length() |
| static const float | DEBUG_CABLE_LENGTH_SIZE = 0.5 |
| static const int | DEBUG_CABLE_COLOUR_POS = Color.YELLOW & 0x00FFFFFF | 0x88000000 |
| virtual power cables | |
Static Protected Attributes inherited from SCR_LineTerrainShaperGeneratorBaseEntity | |
| static const ref array< string > | TERRAIN_UPDATE_KEYS |
| static const string | OFFSET_SHAPE_COLOUR = "1 0 1 1" |
Static Protected Attributes inherited from SCR_GeneratorBaseEntity | |
| static const int | DEFAULT_SEED = 42 |
| static const int | MIN_RANDOM_SEED = 0 |
| static const int | MAX_RANDOM_SEED = 0x7FFF |
| static const int | BASE_GENERATOR_COLOUR = Color.WHITE |
Additional Inherited Members | |
Public Member Functions inherited from SCR_LineTerrainShaperGeneratorBaseEntity | |
| override void | _WB_OnInit (inout vector mat[4], IEntitySource src) |
| override void | _WB_OnCreate (IEntitySource src) |
| override void | _WB_OnDelete (IEntitySource src) |
Public Member Functions inherited from SCR_GeneratorBaseEntity | |
| override bool | _WB_CanSelect (IEntitySource src) |
| map< int, ref ShapePointDataScriptBase > | GetFirstPointDataMap (TypeName wantedType=ShapePointDataScriptBase) |
| map< int, ref array< ref ShapePointDataScriptBase > > | GetPointDataMap (TypeName wantedType=ShapePointDataScriptBase) |
SLOT SYSTEM:
Poles have slot groups of a certain type (Low Voltage, High Voltage, Ultra High Voltage, Telephone, etc - see SCR_EPoleCableType)
|
protected |
Implements SCR_LineTerrainShaperGeneratorBaseEntity.
|
protected |
Implements SCR_LineTerrainShaperGeneratorBaseEntity.
|
protected |
Creates poles and cables between given points with optional random pitch and roll, snaps to terrain if no junction found.
| [in] | polePointsRelpos | |
| [in] | anchorPointsRelPos | |
| [in] | pointsData |
|
staticprotected |
Creates power lines between two power poles based on their cable types, if they have compatible slots.
| [in] | generatorSource | |
| [in] | existingPoleSource | pole from which to connect (the previously inserted one) |
| [in] | addedPoleSource | pole to which to connect (the newly inserted one or the junction) |
|
staticprotected |
| [in] | generatorSource | |
| [in] | worldPos | |
| [out] | isSameLine |
|
protected |
Entry point to all current line's generation (and connected lines's fixes)
|
protected |
Generate junctions, happening before generating poles.
|
protected |
Generates cable pole positions first then creates poles and cables if valid Only called by Generate()
|
staticprotected |
| [in] | generatorPoleSource | pole source from generator in which cables must be found |
| [in] | otherPoleSource | other pole source (can be from same generator or not) |
|
protected |
|
staticprotected |
| [in] | generatorSource | |
| [in] | fromStart | true to get from start, false otherwise |
|
protected |
|
protected |
Generates poles relative positions for powerline generator based on anchor points, tesselated points and powerline data.
| [in] | pointsData | |
| [out] | polePointsRelPos | pole positions |
| [out] | pointDataMap | map of <pole point index, pointData> (unrelated to position, only index) |
|
staticprotected |
Get the first power pole, either the entity or one of its direct children.
| [in] | powerPoleEntitySource | the power pole's entity source |
|
protected |
Implements SCR_LineTerrainShaperGeneratorBaseEntity.
|
protected |
Reconnect a line ending to the provided pole.
| [in] | generatorSource | the line to reconnect |
| [in] | otherLinePoleSource | the pole to which reconnect said line |
|
protected |
| [in] | generator | the generator that generated its poles |
| [in] | junctions | the junctions on its line |
|
protected |
Used by Obstacle Detector.
|
staticprotected |
virtual power cables
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
<generatorSource, <objectSource, objectPosition>>