Avorion Script API Documentation

ReadOnlyPlan

function ReadOnlyPlan(var id)

Parameters

id The id of the entity, must be an index of an existing entity or nil for the entity in the current script context

Returns

A new instance of ReadOnlyPlan

property bool accumulatingHealth[read-only]
property Box boundingBox[read-only]
property Sphere boundingSphere[read-only]
property vec3 centerOfMass[read-only]
property bool collisionDamage[read-only]
property bool convex[read-only]
property double durability[read-only]
property Entity entity[read-only]
property uuid entityId[read-only]
property double mass[read-only]
property int numBlocks[read-only]
property double processingPower[read-only]
property float radius[read-only]
property BlockPlanBlock root[read-only]
property var rootIndex[read-only]
property bool singleBlockDestructionEnabled[read-only]
property int size[read-only]
property float volume[read-only]

function bool empty()

function bool exists(int index)

function BlockPlan get()

Returns the plan of the entity. This copies the entire plan, keep that in mind when using plans with large block counts.

Returns

A copy of the plan of the entity

function BlockPlanBlock getBlock(int index)

function int... getBlockIndices()

function int... getBlocksByType(int index)

function double getMoneyValue()

function BlockPlanBlock getNthBlock(int n)

function var getNthIndex(int n)

function int getNumBlocks(int blockIndex)

function int... getRemoved(int index)

function double... getResourceValue()

function BlockStatistics getStats()

function double getUndamagedMoneyValue()

function double... getUndamagedResourceValue()

Overview
Home Functions Search
Search:

This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.

Work in Progress. Documentation of Avorion Version: 2.5.7 c8e4beec84f7