Barotrauma Client Doc
Barotrauma.CrewManagement Class Reference

Public Member Functions

 CrewManagement (CampaignUI campaignUI, GUIComponent parentComponent)
 
void RefreshPermissions ()
 
void UpdateHireables ()
 
void SetHireables (Location location, List< CharacterInfo > availableHires)
 
void UpdateCrew ()
 
bool ValidateHires (List< CharacterInfo > hires, bool createNetworkEvent=false)
 
bool RenameCharacter (CharacterInfo characterInfo, string newName)
 
void Update ()
 
void SetPendingHires (List< int > characterInfos, Location location)
 
void SendCrewState (bool updatePending,(CharacterInfo info, string newName) renameCharacter=default, CharacterInfo firedCharacter=null, bool validateHires=false)
 Notify the server of crew changes More...
 

Detailed Description

Definition at line 11 of file CrewManagement.cs.

Constructor & Destructor Documentation

◆ CrewManagement()

Barotrauma.CrewManagement.CrewManagement ( CampaignUI  campaignUI,
GUIComponent  parentComponent 
)

Definition at line 43 of file CrewManagement.cs.

Member Function Documentation

◆ RefreshPermissions()

void Barotrauma.CrewManagement.RefreshPermissions ( )

Definition at line 58 of file CrewManagement.cs.

◆ RenameCharacter()

bool Barotrauma.CrewManagement.RenameCharacter ( CharacterInfo  characterInfo,
string  newName 
)

Definition at line 806 of file CrewManagement.cs.

◆ SendCrewState()

void Barotrauma.CrewManagement.SendCrewState ( bool  updatePending,
(CharacterInfo info, string newName)  renameCharacter = default,
CharacterInfo  firedCharacter = null,
bool  validateHires = false 
)

Notify the server of crew changes

Parameters
updatePendingWhen set to true will tell the server to update the pending hires
renameCharacterWhen not null tell the server to rename this character. Item1 is the character to rename, Item2 is the new name, Item3 indicates whether the renamed character is already a part of the crew.
firedCharacterWhen not null tell the server to fire this character
validateHiresWhen set to true will tell the server to validate pending hires

Definition at line 971 of file CrewManagement.cs.

◆ SetHireables()

void Barotrauma.CrewManagement.SetHireables ( Location  location,
List< CharacterInfo availableHires 
)

Definition at line 279 of file CrewManagement.cs.

◆ SetPendingHires()

void Barotrauma.CrewManagement.SetPendingHires ( List< int >  characterInfos,
Location  location 
)

Definition at line 941 of file CrewManagement.cs.

◆ Update()

void Barotrauma.CrewManagement.Update ( )

Definition at line 856 of file CrewManagement.cs.

◆ UpdateCrew()

void Barotrauma.CrewManagement.UpdateCrew ( )

Definition at line 292 of file CrewManagement.cs.

◆ UpdateHireables()

void Barotrauma.CrewManagement.UpdateHireables ( )

Definition at line 250 of file CrewManagement.cs.

◆ ValidateHires()

bool Barotrauma.CrewManagement.ValidateHires ( List< CharacterInfo hires,
bool  createNetworkEvent = false 
)

Definition at line 706 of file CrewManagement.cs.