Space Engineers
Classes | Public Types | Public Member Functions | Static Public Member Functions | Properties | Events | List of all members
Sandbox.Game.Multiplayer.MyFactionCollection Class Reference
Inheritance diagram for Sandbox.Game.Multiplayer.MyFactionCollection:
VRage.Game.ModAPI.IMyFactionCollection

Public Types

enum  MyFactionPeaceRequestState { MyFactionPeaceRequestState.None, MyFactionPeaceRequestState.Pending, MyFactionPeaceRequestState.Sent }
 
enum  MyFactionStateChange {
  MyFactionStateChange.RemoveFaction, MyFactionStateChange.SendPeaceRequest, MyFactionStateChange.CancelPeaceRequest, MyFactionStateChange.AcceptPeace,
  MyFactionStateChange.DeclareWar, MyFactionStateChange.FactionMemberSendJoin, MyFactionStateChange.FactionMemberCancelJoin, MyFactionStateChange.FactionMemberAcceptJoin,
  MyFactionStateChange.FactionMemberKick, MyFactionStateChange.FactionMemberPromote, MyFactionStateChange.FactionMemberDemote, MyFactionStateChange.FactionMemberLeave
}
 

Public Member Functions

bool Contains (long factionId)
 Checks if faction exists. More...
 
bool FactionTagExists (string tag, IMyFaction doNotCheck=null)
 
bool FactionNameExists (string name, IMyFaction doNotCheck=null)
 
IMyFaction TryGetFactionById (long factionId)
 
MyFaction TryGetOrCreateFactionByTag (string tag)
 
void CreateDefaultFactions ()
 Creates adds default factions to the faction collection. More...
 
MyFaction TryGetFactionByTag (string tag, IMyFaction doNotCheck=null)
 
IMyFaction TryGetPlayerFaction (long playerId)
 
MyFaction GetPlayerFaction (long playerId)
 
void AddPlayerToFaction (long playerId, long factionId)
 
void KickPlayerFromFaction (long playerId)
 
MyRelationsBetweenFactions GetRelationBetweenFactions (long factionId1, long factionId2)
 Use this for quick check of relation between two factions. More...
 
bool AreFactionsEnemies (long factionId1, long factionId2)
 
MyFactionPeaceRequestState GetRequestState (long myFactionId, long foreignFactionId)
 
bool IsPeaceRequestStateSent (long myFactionId, long foreignFactionId)
 
bool IsPeaceRequestStatePending (long myFactionId, long foreignFactionId)
 
void ChangeAutoAccept (long factionId, long playerId, bool autoAcceptMember, bool autoAcceptPeace)
 
void EditFaction (long factionId, string tag, string name, string desc, string privateInfo)
 
void CreateFaction (long founderId, string tag, string name, string desc, string privateInfo)
 
MyObjectBuilder_FactionCollection GetObjectBuilder ()
 
void Init (MyObjectBuilder_FactionCollection builder)
 
IEnumerator< KeyValuePair< long, MyFaction > > GetEnumerator ()
 

Static Public Member Functions

static void CreateFactionByDefinition (string tag)
 
static void RemoveFaction (long factionId)
 
static void SendPeaceRequest (long fromFactionId, long toFactionId)
 
static void CancelPeaceRequest (long fromFactionId, long toFactionId)
 
static void AcceptPeace (long fromFactionId, long toFactionId)
 
static void DeclareWar (long fromFactionId, long toFactionId)
 
static void SendJoinRequest (long factionId, long playerId)
 
static void CancelJoinRequest (long factionId, long playerId)
 
static void AcceptJoin (long factionId, long playerId)
 
static void KickMember (long factionId, long playerId)
 
static void PromoteMember (long factionId, long playerId)
 
static void DemoteMember (long factionId, long playerId)
 
static void MemberLeaves (long factionId, long playerId)
 

Properties

MyFaction this[long factionId] [get]
 

Events

Action< MyFactionStateChange, long, long, long, long > FactionStateChanged
 
Action< long, bool, bool > FactionAutoAcceptChanged
 
Action< long > FactionEdited
 
Action< long > FactionCreated
 
- Events inherited from VRage.Game.ModAPI.IMyFactionCollection
Action< long, bool, bool > FactionAutoAcceptChanged
 
Action< long > FactionEdited
 
Action< long > FactionCreated
 

Detailed Description

Definition at line 27 of file MyFactionCollection.cs.

Member Enumeration Documentation

Enumerator
None 
Pending 
Sent 

Definition at line 29 of file MyFactionCollection.cs.

Enumerator
RemoveFaction 
SendPeaceRequest 
CancelPeaceRequest 
AcceptPeace 
DeclareWar 
FactionMemberSendJoin 
FactionMemberCancelJoin 
FactionMemberAcceptJoin 
FactionMemberKick 
FactionMemberPromote 
FactionMemberDemote 
FactionMemberLeave 

Definition at line 36 of file MyFactionCollection.cs.

Member Function Documentation

static void Sandbox.Game.Multiplayer.MyFactionCollection.AcceptJoin ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 397 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.AcceptPeace ( long  fromFactionId,
long  toFactionId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 377 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.AddPlayerToFaction ( long  playerId,
long  factionId 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 296 of file MyFactionCollection.cs.

bool Sandbox.Game.Multiplayer.MyFactionCollection.AreFactionsEnemies ( long  factionId1,
long  factionId2 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 333 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.CancelJoinRequest ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 392 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.CancelPeaceRequest ( long  fromFactionId,
long  toFactionId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 372 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.ChangeAutoAccept ( long  factionId,
long  playerId,
bool  autoAcceptMember,
bool  autoAcceptPeace 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 681 of file MyFactionCollection.cs.

bool Sandbox.Game.Multiplayer.MyFactionCollection.Contains ( long  factionId)
inline

Checks if faction exists.

Parameters
factionIdFaction id.
Returns
If true, faction exists.

Definition at line 134 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.CreateDefaultFactions ( )
inline

Creates adds default factions to the faction collection.

Definition at line 214 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.CreateFaction ( long  founderId,
string  tag,
string  name,
string  desc,
string  privateInfo 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 759 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.CreateFactionByDefinition ( string  tag)
inlinestatic

Definition at line 188 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.DeclareWar ( long  fromFactionId,
long  toFactionId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 382 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.DemoteMember ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 412 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.EditFaction ( long  factionId,
string  tag,
string  name,
string  desc,
string  privateInfo 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 715 of file MyFactionCollection.cs.

bool Sandbox.Game.Multiplayer.MyFactionCollection.FactionNameExists ( string  name,
IMyFaction  doNotCheck = null 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 144 of file MyFactionCollection.cs.

bool Sandbox.Game.Multiplayer.MyFactionCollection.FactionTagExists ( string  tag,
IMyFaction  doNotCheck = null 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 139 of file MyFactionCollection.cs.

IEnumerator<KeyValuePair<long, MyFaction> > Sandbox.Game.Multiplayer.MyFactionCollection.GetEnumerator ( )
inline

Definition at line 1057 of file MyFactionCollection.cs.

MyObjectBuilder_FactionCollection Sandbox.Game.Multiplayer.MyFactionCollection.GetObjectBuilder ( )
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 990 of file MyFactionCollection.cs.

MyFaction Sandbox.Game.Multiplayer.MyFactionCollection.GetPlayerFaction ( long  playerId)
inline

Definition at line 288 of file MyFactionCollection.cs.

MyRelationsBetweenFactions Sandbox.Game.Multiplayer.MyFactionCollection.GetRelationBetweenFactions ( long  factionId1,
long  factionId2 
)
inline

Use this for quick check of relation between two factions.

Parameters
factionId1First faction id
factionId2Second faction id
Returns
Enum that describes the relation between given factions

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 320 of file MyFactionCollection.cs.

MyFactionPeaceRequestState Sandbox.Game.Multiplayer.MyFactionCollection.GetRequestState ( long  myFactionId,
long  foreignFactionId 
)
inline

Definition at line 338 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.Init ( MyObjectBuilder_FactionCollection  builder)
inline

Definition at line 1026 of file MyFactionCollection.cs.

bool Sandbox.Game.Multiplayer.MyFactionCollection.IsPeaceRequestStatePending ( long  myFactionId,
long  foreignFactionId 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 354 of file MyFactionCollection.cs.

bool Sandbox.Game.Multiplayer.MyFactionCollection.IsPeaceRequestStateSent ( long  myFactionId,
long  foreignFactionId 
)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 349 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.KickMember ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 402 of file MyFactionCollection.cs.

void Sandbox.Game.Multiplayer.MyFactionCollection.KickPlayerFromFaction ( long  playerId)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 309 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.MemberLeaves ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 417 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.PromoteMember ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 407 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.RemoveFaction ( long  factionId)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 362 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.SendJoinRequest ( long  factionId,
long  playerId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 387 of file MyFactionCollection.cs.

static void Sandbox.Game.Multiplayer.MyFactionCollection.SendPeaceRequest ( long  fromFactionId,
long  toFactionId 
)
inlinestatic

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 367 of file MyFactionCollection.cs.

IMyFaction Sandbox.Game.Multiplayer.MyFactionCollection.TryGetFactionById ( long  factionId)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 159 of file MyFactionCollection.cs.

MyFaction Sandbox.Game.Multiplayer.MyFactionCollection.TryGetFactionByTag ( string  tag,
IMyFaction  doNotCheck = null 
)
inline

Definition at line 247 of file MyFactionCollection.cs.

MyFaction Sandbox.Game.Multiplayer.MyFactionCollection.TryGetOrCreateFactionByTag ( string  tag)
inline

Definition at line 167 of file MyFactionCollection.cs.

IMyFaction Sandbox.Game.Multiplayer.MyFactionCollection.TryGetPlayerFaction ( long  playerId)
inline

Implements VRage.Game.ModAPI.IMyFactionCollection.

Definition at line 280 of file MyFactionCollection.cs.

Property Documentation

MyFaction Sandbox.Game.Multiplayer.MyFactionCollection.this[long factionId]
get

Definition at line 1053 of file MyFactionCollection.cs.

Event Documentation

Action<long, bool, bool> Sandbox.Game.Multiplayer.MyFactionCollection.FactionAutoAcceptChanged

Definition at line 679 of file MyFactionCollection.cs.

Action<long> Sandbox.Game.Multiplayer.MyFactionCollection.FactionCreated

Definition at line 757 of file MyFactionCollection.cs.

Action<long> Sandbox.Game.Multiplayer.MyFactionCollection.FactionEdited

Definition at line 713 of file MyFactionCollection.cs.

Action<MyFactionStateChange, long, long, long, long> Sandbox.Game.Multiplayer.MyFactionCollection.FactionStateChanged

Definition at line 360 of file MyFactionCollection.cs.


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