A space platform.
LuaForceunknownfalseThe force of this space platform.
stringstringfalseThe name of this space platform.
uint32unknownfalseThe unique index of this space platform.
LuaSpaceLocationPrototypeLuaSpaceLocationPrototypetrueThe space location this space platform is stopped at or nil.
Write operation requires a valid space location and will cancel pending item requests.
LuaSpaceLocationPrototypeunknowntrueThe space location this space platform previously went through or stopped at.
LuaSpaceConnectionPrototypeLuaSpaceConnectionPrototypetrueThe space connection this space platform is traveling through or nil.
Write operation requires a valid space connection and it sets the distance to 0.5.
doubledoubletrueThe point on space connection this platform is at or nil.
It is represented as a number in range [0, 1], with 0 being LuaSpaceConnectionPrototype::from and 1 being LuaSpaceConnectionPrototype::to.
defines.space_platform_stateunknownfalseThe current state of this space platform.
booleanbooleanfalseWhen true, the platform has paused thrust and does not advance its schedule.
ItemIDAndQualityIDPairunknowntrueThe starter pack used to create this space platform.
LuaSurfaceunknownfalseThe surface that belongs to this platform (if it has been created yet).
LuaEntityunknowntrueThe hub on this platform. nil if the platform has not had the starter pack applied or hub was destroyed but the platform not yet deleted.
If the hub is destroyed the platform will be deleted at the end of the tick but is otherwise valid to use until that point.
PlatformSchedulePlatformScheduletrueThis platform's current schedule, if any. Set to nil to clear.
The schedule can't be changed by modifying the returned table. Instead, changes must be made by assigning a new table to this attribute.
doubledoublefalseuint32unknownfalseIf this platform is scheduled for deletion.
Returns how many ticks are left before the platform will be deleted. 0 if not scheduled for deletion.
WeightunknownfalseThe total weight of the platform.
Array<{ damage: float, position: TilePosition }>unknownfalseThe damaged tiles on this platform.
Array<EjectedItem>unknownfalseAll items that have been thrown overboard.
booleanbooleanfalseIf this platform is hidden from the remote view surface list.
booleanunknownfalseIs this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
stringunknownfalseThe class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
LuaSpacePlatform.destroy(ticks?: uint32)
spacePlatform.destroy()
takes_table: falsetable_optional: falseSchedules this space platform for deletion.
ticks?: uint32 — The number of ticks from now when this platform will be deleted.LuaSpacePlatform.cancel_deletion()
spacePlatform.cancel_deletion()
takes_table: falsetable_optional: falseCancels deletion of this space platform if it was scheduled for deletion.
LuaSpacePlatform.apply_starter_pack() -> LuaEntity?
spacePlatform.apply_starter_pack()
takes_table: falsetable_optional: falseApplies the starter pack for this platform if it hasn't already been applied.
LuaEntity? — The platform hub.LuaSpacePlatform.damage_tile{ position: TilePosition, damage: float, cause?: LuaEntity }
spacePlatform.damage_tile{ position=position, damage=damage }
takes_table: truetable_optional: trueDamages the given tile if it exists, the chunk is generated, and it is a platform foundation tile.
position: TilePositiondamage: floatcause?: LuaEntityLuaSpacePlatform.repair_tile(position: TilePosition, amount?: float)
spacePlatform.repair_tile(position, amount)
takes_table: falsetable_optional: falseRepairs the given tile if it's damaged.
position: TilePositionamount?: floatLuaSpacePlatform.destroy_asteroid_chunks{ area?: BoundingBox, position?: MapPosition, name?: AsteroidChunkID | Array<AsteroidChunkID>, limit?: uint32, invert?: boolean } -> uint32
spacePlatform.destroy_asteroid_chunks{ area=area }
takes_table: truetable_optional: falseDestroys all asteroid chunks from the given area. If no area and no position are given, then the entire surface is searched.
area?: BoundingBoxposition?: MapPositionname?: AsteroidChunkID | Array<AsteroidChunkID>limit?: uint32invert?: boolean — If the filters should be inverted.uint32 — The number of destroyed chunks.LuaSpacePlatform.create_asteroid_chunks(asteroid_chunks: Array<AsteroidChunk>)
spacePlatform.create_asteroid_chunks(asteroid_chunks)
takes_table: falsetable_optional: falseCreates the given asteroid chunks on this platform.
asteroid_chunks: Array<AsteroidChunk>LuaSpacePlatform.find_asteroid_chunks_filtered{ area?: BoundingBox, position?: MapPosition, name?: AsteroidChunkID | Array<AsteroidChunkID>, limit?: uint32, invert?: boolean } -> Array<AsteroidChunk>
spacePlatform.find_asteroid_chunks_filtered{ area=area }
takes_table: truetable_optional: falseFind asteroid chunks of a given name in a given area.
If no filters are given, returns all asteroid chunks in the search area. If multiple filters are specified, returns only asteroid chunks matching every given filter. If no area and no position are given, the entire surface is searched.
area?: BoundingBoxposition?: MapPositionname?: AsteroidChunkID | Array<AsteroidChunkID>limit?: uint32invert?: boolean — If the filters should be inverted.Array<AsteroidChunk>LuaSpacePlatform.can_leave_current_location() -> boolean
spacePlatform.can_leave_current_location()
takes_table: falsetable_optional: falseReturns true when the space platform isn't waiting on any delivery from the planet.
booleanLuaSpacePlatform.get_schedule() -> LuaSchedule
spacePlatform.get_schedule()
takes_table: falsetable_optional: falseLuaScheduleLuaSpacePlatform.eject_item(item: ItemStackIdentification, position: MapPosition, movement: Vector)
spacePlatform.eject_item(item, position, movement)
takes_table: falsetable_optional: falseEjects an item into space on this space platform.
If a LuaItemStack is provided, the actual item is ejected and removed from the source.
item: ItemStackIdentificationposition: MapPositionmovement: Vector — When inserters drop items into space, the InserterPrototype::insert_position rotated to the inserter direction is used.LuaSpacePlatform.clear_ejected_items()
spacePlatform.clear_ejected_items()
takes_table: falsetable_optional: falseRemoves all ejected items from this space platform.