Misc

class Recipe: Prototype

Crafting-recipe prototype used by machines and crafting UIs

ticks: integer

Craft time in engine ticks

default_locked: boolean

If true, the recipe starts hidden until research unlocks it.

locked: boolean

Currently locked if true

productivity: integer

Percentage bonus (e.g. 20 = +20 %)

input: RecipeInventory

Read/write container of required items

output: RecipeInventory

Read/write container of produced items

tier: integer

Recipe tier used for speed scaling: every tier above the machine tier halves speed; every tier below doubles it.

start_tier: integer

Machine-unlock tier (same for all its recipes); lets you compute the recipe’s level relative to that minimum.

staticmethod reg(name: string): Recipe

Register a new Recipe static object

Parameters:

name (string) – The name of the object

staticmethod find(name: string): Recipe

Searching for Recipe in db

Parameters:

name (string) – The name of the object

staticmethod get_class(): Class

Return Recipe class object

staticmethod cast(object: Object): Recipe

Trying to cast Object into Recipe

Parameters:

object (Object) – to cast

class StaticTip: Prototype
staticmethod reg(name: string): StaticTip

Register a new StaticTip static object

Parameters:

name (string) – The name of the object

staticmethod find(name: string): StaticTip

Searching for StaticTip in db

Parameters:

name (string) – The name of the object

staticmethod get_class(): Class

Return StaticTip class object

staticmethod cast(object: Object): StaticTip

Trying to cast Object into StaticTip

Parameters:

object (Object) – to cast

class StaticProp: StaticObject
project_to_terrain_power: number

undocumented

additive_elevation: number

undocumented

cull_begin: number

undocumented

cull_end: number

undocumented

maximum_height: number

undocumented

minimum_height: number

undocumented

floating: boolean

undocumented

is_big: boolean

undocumented

mesh: StaticMesh

undocumented

no_collision: boolean

undocumented

is_emitting: boolean

undocumented

on_spawn: function

undocumented

break_chance: integer

Break chance in percents

class PropListData: Struct

Structure that stores several StaticProp records (prop variations) with shared spawn chance

weight: integer

Spawn weight

props: StaticProp[]

List of prop assets (prop variations)

class StaticPropList: Prototype

Prototype asset that owns several PropListData records

data: PropListData[]

undocumented

staticmethod reg(name: string): StaticPropList

Register a new StaticPropList static object

Parameters:

name (string) – The name of the object

staticmethod find(name: string): StaticPropList

Searching for StaticPropList in db

Parameters:

name (string) – The name of the object

staticmethod get_class(): Class

Return StaticPropList class object

staticmethod cast(object: Object): StaticPropList

Trying to cast Object into StaticPropList

Parameters:

object (Object) – to cast

class WorldGenerator: Prototype
staticmethod reg(name: string): WorldGenerator

Register a new WorldGenerator static object

Parameters:

name (string) – The name of the object

staticmethod find(name: string): WorldGenerator

Searching for WorldGenerator in db

Parameters:

name (string) – The name of the object

staticmethod get_class(): Class

Return WorldGenerator class object

staticmethod cast(object: Object): WorldGenerator

Trying to cast Object into WorldGenerator

Parameters:

object (Object) – to cast

class Kto

Localization key table object

staticmethod new(key: string, table: string): Loc

Create new Kto object

get(self: Kto): string

Resolve Kto to localized string

class Loc

Localization data entry

staticmethod new(key: string, table: string): Loc

Create new Loc object

staticmethod get(key: string, table: string): string

Resolve Loc object to localized string

staticmethod gui_number(value: number): string

Get number as string for GUI (3000 -> 3.0k)

class LocData

Non localized data entry

staticmethod set(key: string, table: string)

Set non localized data value by key