|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
− | =Sandbox.ModAPI.Ingame.IMyTerminalBlock=
| + | #REDIRECT [[API:Sandbox.ModAPI.Ingame.IMyTerminalBlock]] |
− | This is a base class for all blocks that show up in the terminal.
| |
− | | |
− | ==Namespace==
| |
− | [[Sandbox.ModAPI.Ingame]] | |
− | ==Assembly==
| |
− | [[Sandbox.Common]] (Sandbox.Common.dll)
| |
− | ==Syntax==
| |
− | <syntaxhighlight lang="csharp">
| |
− | public interface IMyTerminalBlock : IMyCubeBlock, IMyEntity
| |
− | </syntaxhighlight>
| |
− | ==Methods==
| |
− | ===GetActions===
| |
− | <syntaxhighlight lang="csharp">
| |
− | void GetActions(List<ITerminalAction> resultList, Func<ITerminalAction, bool> collect = null)
| |
− | </syntaxhighlight>
| |
− | This returns an ITerminalAction list containing a list of all valid actions for the block.
| |
− | | |
− | ===GetActionWithName===
| |
− | <syntaxhighlight lang="csharp">
| |
− | ITerminalAction GetActionWithName(string name)
| |
− | </syntaxhighlight>
| |
− | This searches the block for an associated action corresponding to the specified name.
| |
− | | |
− | ===HasLocalPlayerAccess===
| |
− | <syntaxhighlight lang="csharp">
| |
− | bool HasLocalPlayerAccess()
| |
− | </syntaxhighlight>
| |
− | | |
− | ===HasPlayerAccess===
| |
− | <syntaxhighlight lang="csharp">
| |
− | bool HasPlayerAccess(long playerId)
| |
− | </syntaxhighlight>
| |
− | | |
− | ===RequestShowOnHUD===
| |
− | <syntaxhighlight lang="csharp">
| |
− | void RequestShowOnHUD(bool enable)
| |
− | </syntaxhighlight>
| |
− | Enables or disables the ShowOnHUD option. If an antenna is present, the block will transmit its name and location to users in range of the antenna.
| |
− | | |
− | ===SearchActionsOfName===
| |
− | <syntaxhighlight lang="csharp">
| |
− | void SearchActionsOfName(string name, List<ITerminalAction> resultList, Func<ITerminalAction, bool> collect = null)
| |
− | </syntaxhighlight>
| |
− | Search for all actions that start with the specified name. For instance, if you search for OnOff, you will get a list of actions returned including "OnOff_On" and "OnOff_Off"
| |
− | | |
− | ===SetCustomName===
| |
− | <syntaxhighlight lang="csharp">
| |
− | void SetCustomName(string text)
| |
− | void SetCustomName(StringBuilder text)
| |
− | </syntaxhighlight>
| |
− | This sets the name of the block. This is the same as changing the block's name in the terminal.
| |
− | | |
− | ==Properties==
| |
− | ===CustomName===
| |
− | <syntaxhighlight lang="csharp">
| |
− | string CustomName {get;}
| |
− | </syntaxhighlight>
| |
− | The name of the block as shown in the terminal list.
| |
− | | |
− | ===CustomNameWithFaction===
| |
− | <syntaxhighlight lang="csharp">
| |
− | string CustomNameWithFaction {get;}
| |
− | </syntaxhighlight>
| |
− | | |
− | ===DetailedInfo===
| |
− | <syntaxhighlight lang="csharp">
| |
− | string DetailedInfo {get;}
| |
− | </syntaxhighlight>
| |
− | | |
− | ===ShowOnHUD===
| |
− | <syntaxhighlight lang="csharp">
| |
− | Bool ShowOnHUD {get;}
| |
− | </syntaxhighlight>
| |
− | Returns whether or not ShowOnHUD is active.
| |
− | | |
− | [[Cateogry: API]]
| |