LuaDocs/SceneObject

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
(SceneObject - Automatically generated by LuaBot)
(SceneObject - Automatically generated by LuaBot)
 
Line 32: Line 32:
==Functions==
==Functions==
 +
===GetGoldValue===
 +
DOES THE SAME THING AS GetGoldValue, USED ONLY TO PRESERVE LUA COMPATIBILITY
 +
 +
 +
===GetGoldValue===
===GetGoldValue===
Gets the cost to purchase this item, in oz's of gold.
Gets the cost to purchase this item, in oz's of gold.
Line 39: Line 44:
* If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
* If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
* How much to multiply the value if this happens to be a foreign Tech.
* How much to multiply the value if this happens to be a foreign Tech.
 +
* How much to multiply the value if this happens to be a native Tech.
'''Return value:'''
'''Return value:'''
Line 56: Line 62:
The cost, described in a friendly to read string: "100oz", or "Free"
The cost, described in a friendly to read string: "100oz", or "Free"
 +
 +
 +
===GetTotalValue===
 +
DOES THE SAME THING AS GetTotalValue, USED ONLY TO PRESERVE LUA COMPATIBILITY
 +

Latest revision as of 20:17, 2 April 2015

Contents

Parent: Entity

Abstract Class. The base class shared by Both TerrainObject:s and MovableObject:s, ie anything that can be places in a scene.

Go back to Class Index


Properties

ClassName

The class name of this SceneObject.A string with the friendly-formatted type name of this object.

Pos

The absolute position of this SceneObject.A Vector describing the current absolute position in pixels.

HFlipped

Returns whether this is being drawn flipped horizontally (around the vertical axis), or not.Whether flipped or not.

RotAngle

The current rotational angle of of this, in radians.The rotational angle of this, in radians.

Team

Gets which team this belongs to.The currently assigned team number.

PlacedByPlayer

Gets which player placed this object in the scene, if any.The player responsible for placing this is in the scene, if any.

IsBuyable

Read-only property. Shows whether this should appear in teh buy menus at all.Buyable or not.


Functions

GetGoldValue

DOES THE SAME THING AS GetGoldValue, USED ONLY TO PRESERVE LUA COMPATIBILITY


GetGoldValue

Gets the cost to purchase this item, in oz's of gold.

Arguments:

  • If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
  • How much to multiply the value if this happens to be a foreign Tech.
  • How much to multiply the value if this happens to be a native Tech.

Return value:

The cost, in oz of gold.


GetGoldValueString

Gets a descriptive string describing the cost to purchase this item, in oz's of gold.

Arguments:

  • If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
  • How much to multiply the value if this happens to be a foreign Tech.

Return value:

The cost, described in a friendly to read string: "100oz", or "Free"


GetTotalValue

DOES THE SAME THING AS GetTotalValue, USED ONLY TO PRESERVE LUA COMPATIBILITY


GetTotalValue

Gets the total liquidation value of this, including everything inside.

Arguments:

  • If this is supposed to be adjusted for a specific Tech's subjective value, then pass in the native DataModule ID of that tech. 0 means no Tech is specified and the base value is returned.
  • How much to multiply the value if this happens to be a foreign Tech.

Return value:

The current value of this and all contained assets.


IsOnScenePoint

Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.

Arguments:

  • The point in absolute scene coordinates.

Return value:

Whether this' graphical rep overlaps the scene point.


Go back to Class Index

Personal tools