C# Class Economy.scripts.Support

Show file Open project: jpcsupplies/Economy_mod Class Usage Examples

Public Methods

Method Description
FindLookAtEntity ( VRage.Game.ModAPI.Interfaces.IMyControllableEntity controlledEntity, bool findShips, bool findCubes, bool findPlayers, bool findAsteroids, bool findPlanets, bool findReplicable, bool ignoreProjection ) : IMyEntity
FindLookAtEntity ( VRage.Game.ModAPI.Interfaces.IMyControllableEntity controlledEntity, bool ignoreOccupiedGrid, bool ignoreProjection, IMyEntity &lookEntity, double &lookDistance, Vector3D &hitPoint, bool findShips, bool findCubes, bool findPlayers, bool findAsteroids, bool findPlanets, bool findReplicable ) : void
FindPhysicalParts ( string itemName, MyObjectBuilder_Base &objectBuilder, MyDefinitionBase>.Dictionary &options ) : bool

Find the physical object of the specified name or partial name.

FindRotorBase ( long entityId, IMyCubeGrid parent = null ) : IMyCubeBlock
InventoryAdd ( IMyInventory inventory, VRage.MyFixedPoint amount, MyDefinitionId definitionId ) : bool
InventoryDrop ( IMyEntity entity, VRage.MyFixedPoint amount, MyDefinitionId definitionId ) : void
ProducedType ( MyDefinitionId definitionId ) : MyObjectBuilder_Base
RangeCheck ( IMyPlayer player1, IMyPlayer player2 ) : bool

check the seller is in range of a valid trade region or player

Private Methods

Method Description
BuildComponentLists ( ) : void

Builds a list of the in game components and their localized names for searching so that subsequent calls to FindPhysicalParts(...) don't have to build a lists every time.

Method Details

FindLookAtEntity() public static method

public static FindLookAtEntity ( VRage.Game.ModAPI.Interfaces.IMyControllableEntity controlledEntity, bool findShips, bool findCubes, bool findPlayers, bool findAsteroids, bool findPlanets, bool findReplicable, bool ignoreProjection ) : IMyEntity
controlledEntity VRage.Game.ModAPI.Interfaces.IMyControllableEntity
findShips bool
findCubes bool
findPlayers bool
findAsteroids bool
findPlanets bool
findReplicable bool
ignoreProjection bool
return IMyEntity

FindLookAtEntity() public static method

public static FindLookAtEntity ( VRage.Game.ModAPI.Interfaces.IMyControllableEntity controlledEntity, bool ignoreOccupiedGrid, bool ignoreProjection, IMyEntity &lookEntity, double &lookDistance, Vector3D &hitPoint, bool findShips, bool findCubes, bool findPlayers, bool findAsteroids, bool findPlanets, bool findReplicable ) : void
controlledEntity VRage.Game.ModAPI.Interfaces.IMyControllableEntity
ignoreOccupiedGrid bool
ignoreProjection bool
lookEntity IMyEntity
lookDistance double
hitPoint Vector3D
findShips bool
findCubes bool
findPlayers bool
findAsteroids bool
findPlanets bool
findReplicable bool
return void

FindPhysicalParts() public static method

Find the physical object of the specified name or partial name.
public static FindPhysicalParts ( string itemName, MyObjectBuilder_Base &objectBuilder, MyDefinitionBase>.Dictionary &options ) : bool
itemName string The name of the physical object to find.
objectBuilder MyObjectBuilder_Base The object builder of the physical object, ready for use.
options MyDefinitionBase>.Dictionary Returns a list of potential matches if there was more than one of the same or partial name.
return bool

FindRotorBase() public static method

public static FindRotorBase ( long entityId, IMyCubeGrid parent = null ) : IMyCubeBlock
entityId long
parent IMyCubeGrid
return IMyCubeBlock

InventoryAdd() public static method

public static InventoryAdd ( IMyInventory inventory, VRage.MyFixedPoint amount, MyDefinitionId definitionId ) : bool
inventory IMyInventory
amount VRage.MyFixedPoint
definitionId MyDefinitionId
return bool

InventoryDrop() public static method

public static InventoryDrop ( IMyEntity entity, VRage.MyFixedPoint amount, MyDefinitionId definitionId ) : void
entity IMyEntity
amount VRage.MyFixedPoint
definitionId MyDefinitionId
return void

ProducedType() public static method

public static ProducedType ( MyDefinitionId definitionId ) : MyObjectBuilder_Base
definitionId MyDefinitionId
return MyObjectBuilder_Base

RangeCheck() public static method

check the seller is in range of a valid trade region or player
public static RangeCheck ( IMyPlayer player1, IMyPlayer player2 ) : bool
player1 IMyPlayer
player2 IMyPlayer
return bool