Interface IMyProjector
Describes projector block (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyProjector : IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyProjector, IMyFunctionalBlock, IMyTerminalBlock, IMyCubeBlock, IMyEntity, IMyTextSurfaceProvider, IMyTextSurfaceProvider
Properties
ProjectedGrid
Gets currently projected grid. Will return null if there is no active projection.
Declaration
IMyCubeGrid ProjectedGrid { get; }
Property Value
| Type | Description |
|---|---|
| IMyCubeGrid |
Methods
Build(IMySlimBlock, Int64, Int64, Boolean, Int64)
Adds the first component to construction stockpile and creates the block. This doesn't remove materials from inventory on its own.
Declaration
void Build(IMySlimBlock cubeBlock, long owner, long builder, bool requestInstant, long builtBy = 0L)
Parameters
| Type | Name | Description |
|---|---|---|
| IMySlimBlock | cubeBlock | |
| System.Int64 | owner | Identity id who will own this block |
| System.Int64 | builder | Entity id of the building entity |
| System.Boolean | requestInstant | |
| System.Int64 | builtBy | Identity for whom it is built |
CanBuild(IMySlimBlock, Boolean)
Checks if it's possible to build this block.
Declaration
BuildCheckResult CanBuild(IMySlimBlock projectedBlock, bool checkHavokIntersections)
Parameters
| Type | Name | Description |
|---|---|---|
| IMySlimBlock | projectedBlock | Block to test |
| System.Boolean | checkHavokIntersections | true if you want checks for intersections |
Returns
| Type | Description |
|---|---|
| BuildCheckResult |
LoadBlueprint(String)
Loads blueprint
Declaration
bool LoadBlueprint(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | path | Path to blueprint file |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successfully loaded |
LoadRandomBlueprint(String)
Load random blueprint from game content Data/Blueprints (not player blueprints)
Declaration
bool LoadRandomBlueprint(string searchPattern)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | searchPattern | Used as search pattern in System.IO.Directory.GetFiles(System.String,System.String). The search string to match against the names of files in path. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if successfully loaded |
SetProjectedGrid(MyObjectBuilder_CubeGrid)
Allows you to set the currently projected grid
Declaration
void SetProjectedGrid(MyObjectBuilder_CubeGrid grid)
Parameters
| Type | Name | Description |
|---|---|---|
| MyObjectBuilder_CubeGrid | grid | New grid projection |