![]() |
GearBlocks
The GearBlocks Lua scripting API
|
A construction is made up of one or more parts assembled together. More...
Public Member Functions | |
bool | IsSelectableBy (byte playerID) |
Is the construction selectable by a player? | |
bool | IsBuildableBy (byte playerID) |
Is the construction buildable by a player? | |
BoundsProxy | CalcWorldBounds (bool activeStageOnly=false) |
Calculate the world space bounds of the construction. | |
void | AddPartsToCatalogue (IDictionary< ulong, ushort > partCatalogue) |
Add the construction's part(s) to a catalogue. | |
bool | IsSelectableBy (byte playerID) |
Is the construction selectable by a player? | |
bool | IsBuildableBy (byte playerID) |
Is the construction buildable by a player? | |
IPart | GetPart (ushort idx) |
Get a part from the construction. | |
void | SetActiveStage (ushort stageIdx) |
Sets the construction's active stage. | |
BoundsProxy | CalcWorldBounds (bool activeStageOnly=false) |
Calculate the world space bounds of the construction. | |
Vector3Proxy | CalcWorldCentreOfMass () |
Calculate the centre of mass of the construction in world space. | |
void | AddPartsToCatalogue (IDictionary< ulong, ushort > partCatalogue) |
Add the construction's part(s) to a catalogue. | |
Properties | |
ushort | NumComposites [get] |
Number of composites in the construction. | |
ushort | NumParts [get] |
Number of parts in the construction. | |
bool | IsAtomic [get] |
Is the construction atomic? | |
byte | CharacterPlayerID [get, set] |
The construction's character player ID. | |
byte | BuilderPlayerID = NetworkConnect.nullPlayerID [get, set] |
The construction's builder player ID. | |
bool | IsPlayerCharacter [get] |
Is the construction a player character? | |
bool | IsFrozen = false [get] |
Is the construction frozen? | |
bool | IsInvulnerable = false [get, set] |
Is the construction invulnerable? | |
ushort | ActiveStageIdx = 0xffff [get] |
The construction's active stage index. | |
List< PartDescriptor > | Parts = new() [get] |
The construction's part(s). | |
![]() | |
ushort | ID [get] |
The construction's scene ID. | |
ushort | NumComposites [get] |
Number of composites in the construction. | |
ushort | NumParts [get] |
Number of parts in the construction. | |
bool | IsAtomic [get] |
Is the construction atomic? | |
IEnumerable< IPart > | Parts [get] |
The construction's part(s). | |
TextureProxy | PreviewImage [get] |
The construction's preview image. | |
byte | CharacterPlayerID [get] |
The construction's character player ID. | |
byte | BuilderPlayerID [get] |
The construction's builder player ID. | |
bool | IsPlayerCharacter [get] |
Is the construction a player character? | |
bool | IsFrozen [get] |
Is the construction frozen? | |
bool | IsInvulnerable [get] |
Is the construction invulnerable? | |
float | Mass [get] |
The construction's mass. | |
ushort | MaxStageIdx [get] |
The construction's maximum stage index. | |
ushort | ActiveStageIdx [get] |
The construction's active stage index. | |
A construction is made up of one or more parts assembled together.
Available in Lua via the "Constructions" global, for example:
bool SmashHammer.GearBlocks.Construction.Construction.IsSelectableBy | ( | byte | playerID | ) |
Is the construction selectable by a player?
playerID | The ID of the player. |
true
if this construction is selectable; otherwise, false
.Implements SmashHammer.GearBlocks.Construction.IConstruction.
bool SmashHammer.GearBlocks.Construction.Construction.IsBuildableBy | ( | byte | playerID | ) |
Is the construction buildable by a player?
playerID | The ID of the player. |
true
if this construction is buildable; otherwise, false
.Implements SmashHammer.GearBlocks.Construction.IConstruction.
BoundsProxy SmashHammer.GearBlocks.Construction.Construction.CalcWorldBounds | ( | bool | activeStageOnly = false | ) |
Calculate the world space bounds of the construction.
activeStageOnly | Set to true to encapsulate the parts in the construction's active stage only, or false for the whole construction. |
Implements SmashHammer.GearBlocks.Construction.IConstruction.
void SmashHammer.GearBlocks.Construction.Construction.AddPartsToCatalogue | ( | IDictionary< ulong, ushort > | partCatalogue | ) |
Add the construction's part(s) to a catalogue.
partCatalogue | A catalogue of parts to fill from this construction. |
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
Number of composites in the construction.
The number of composites this construction has.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
Number of parts in the construction.
The number of parts this construction has.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
Is the construction atomic?
true
if this has only one part; otherwise, false
.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
getset |
The construction's character player ID.
The ID of the player for which this construction is the player character, if applicable. Otherwise null (0xff).
Also see IsPlayerCharacter.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
getset |
The construction's builder player ID.
The ID of the player that froze this construction, if currently frozen. Otherwise null (0xff).
Also see IsFrozen.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
Is the construction a player character?
true
if this construction a player character; otherwise, false
.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
Is the construction frozen?
true
if this construction is frozen; otherwise, false
.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
getset |
Is the construction invulnerable?
true
if this construction invulnerable to damage; otherwise, false
.
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
The construction's active stage index.
The index of the construction's active kit building stage (determines which parts are active).
Implements SmashHammer.GearBlocks.Construction.IConstruction.
|
get |
The construction's part(s).
A list of this construction's parts.
Implements SmashHammer.GearBlocks.Construction.IConstruction.