Pathfinder  v3.0
The definitive Hacknet programmable modding system
Pathfinder.Util.Utility Class Reference

Classes

class  Array
 Type specific Array Utilities More...
 

Static Public Member Functions

static string ConvertToValidXmlAttributeName (string input)
 Converts the input to a valid xml attribute name. More...
 
static string GetCleanId (this string id)
 
static string GetCleanId (this IMod mod)
 
static string GetId (string inputId, bool ignorePeriod=false, bool ignoreValidXml=false, bool throwFindingPeriod=false)
 Retrieves an identifier for the input. More...
 
static Computer GetCurrentComputer (OS os=null)
 Gets the current Computer the OS is active in. More...
 
static int GenerateRandomIPSection (Random rand=null)
 
static string GenerateRandomIP (Random rand=null)
 
static void HaltThread (int ms, bool ignoreDebugGoFast=false)
 
static T GetFirstAttribute< T > (this MethodInfo info, bool inherit=false)
 
static T GetFirstAttribute< T > (this Type type, bool inherit=false)
 

Static Public Attributes

static int HaltOffset = 0
 
static string ActiveModId => Pathfinder.CurrentMod?.GetCleanId() ?? "Pathfinder"
 Gets the active mod's identifier. More...
 
static OS ClientOS => OS.currentInstance
 Gets the current client OS. More...
 
static Computer ClientComputer => ClientOS.thisComputer
 Gets the current client's Computer. More...
 
static NetworkMap ClientNetworkMap => ClientOS?.netMap
 Gets the current client's NetworkMap for the current client OS. More...
 
static Computer CurrentComputer => GetCurrentComputer(null)
 Gets the current Computer the client is connected to. More...
 

Member Function Documentation

◆ ConvertToValidXmlAttributeName()

static string Pathfinder.Util.Utility.ConvertToValidXmlAttributeName ( string  input)
static
Returns
A valid xml attribute name.
Parameters
inputInput to convert.

◆ GenerateRandomIP()

static string Pathfinder.Util.Utility.GenerateRandomIP ( Random  rand = null)
static

◆ GenerateRandomIPSection()

static int Pathfinder.Util.Utility.GenerateRandomIPSection ( Random  rand = null)
static

◆ GetCleanId() [1/2]

static string Pathfinder.Util.Utility.GetCleanId ( this string  id)
static

◆ GetCleanId() [2/2]

static string Pathfinder.Util.Utility.GetCleanId ( this IMod  mod)
static

◆ GetCurrentComputer()

static Computer Pathfinder.Util.Utility.GetCurrentComputer ( OS  os = null)
static
Returns
The currently active Computer.
Parameters
osThe OS to get the current Computer, or equal to ClientOS if null.

◆ GetFirstAttribute< T >() [1/2]

static T Pathfinder.Util.Utility.GetFirstAttribute< T > ( this MethodInfo  info,
bool  inherit = false 
)
static
Type Constraints
T :System.Attribute 

◆ GetFirstAttribute< T >() [2/2]

static T Pathfinder.Util.Utility.GetFirstAttribute< T > ( this Type  type,
bool  inherit = false 
)
static
Type Constraints
T :System.Attribute 

◆ GetId()

static string Pathfinder.Util.Utility.GetId ( string  inputId,
bool  ignorePeriod = false,
bool  ignoreValidXml = false,
bool  throwFindingPeriod = false 
)
static
Returns
The resulting identifier.
Parameters
inputIdInput identifier.
ignorePeriodIf set to true ignore period.
ignoreValidXmlIf set to true ignore valid xml.

◆ HaltThread()

static void Pathfinder.Util.Utility.HaltThread ( int  ms,
bool  ignoreDebugGoFast = false 
)
static

Member Data Documentation

◆ ActiveModId

string Pathfinder.Util.Utility.ActiveModId => Pathfinder.CurrentMod?.GetCleanId() ?? "Pathfinder"
static

The active mod identifier or Pathfinder if there is no active mod.

◆ ClientComputer

Computer Pathfinder.Util.Utility.ClientComputer => ClientOS.thisComputer
static
Returns
The client's Current Computer.

◆ ClientNetworkMap

NetworkMap Pathfinder.Util.Utility.ClientNetworkMap => ClientOS?.netMap
static
Returns
The client's current Network Map.

◆ ClientOS

OS Pathfinder.Util.Utility.ClientOS => OS.currentInstance
static
Returns
The client's current OS.

◆ CurrentComputer

Computer Pathfinder.Util.Utility.CurrentComputer => GetCurrentComputer(null)
static

The current Computer.

◆ HaltOffset

int Pathfinder.Util.Utility.HaltOffset = 0
static

The documentation for this class was generated from the following file: