|
Barotrauma Client
|
Public Types | |
| enum | NetFlags : UInt16 { Misc = 0x1 , MapAndMissions = 0x2 , UpgradeManager = 0x4 , SubList = 0x8 , ItemsInBuyCrate = 0x10 , ItemsInSellFromSubCrate = 0x20 , PurchasedItems = 0x80 , SoldItems = 0x100 , Reputation = 0x200 , CharacterInfo = 0x800 } |
Public Types inherited from Barotrauma.CampaignMode | |
| enum | InteractionType { None , Talk , Examine , Map , Crew , Store , Upgrade , PurchaseSub , MedicalClinic , Cargo } |
| enum | TransitionType { None , LeaveLocation , ProgressToNextLocation , ReturnToPreviousLocation , ReturnToPreviousEmptyLocation , ProgressToNextEmptyLocation , End } |
Public Member Functions | |
| UInt16 | GetLastUpdateIdForFlag (NetFlags flag) |
| void | SetLastUpdateIdForFlag (NetFlags flag, UInt16 id) |
| void | IncrementLastUpdateIdForFlag (NetFlags flag) |
| void | IncrementAllLastUpdateIds () |
Public Member Functions inherited from Barotrauma.CampaignMode | |
| virtual Wallet | GetWallet (Client client=null) |
| virtual bool | TryPurchase (Client client, int price) |
| virtual int | GetBalance (Client client=null) |
| bool | CanAfford (int cost, Client client=null) |
| Location | GetCurrentDisplayLocation () |
| The location that's displayed as the "current one" in the map screen. Normally the current outpost or the location at the start of the level, but when selecting the next destination at the end of the level at an uninhabited location we use the location at the end. | |
| SubmarineInfo | GetPredefinedStartOutpost () |
| override void | Start () |
| void | InitFactions () |
| override void | AddExtraMissions (LevelData levelData) |
| void | LoadNewLevel () |
| TransitionType | GetAvailableTransition (out LevelData nextLevel, out Submarine leavingSub) |
| Which type of transition between levels is currently possible (if any) | |
| TransitionType | GetAvailableTransition () |
| override void | End (CampaignMode.TransitionType transitionType=CampaignMode.TransitionType.None) |
| void | HandleSaveAndQuit () |
| Handles updating store stock, registering event history and relocating items (i.e. things that need to be done when saving and quitting mid-round) | |
| void | UpdateStoreStock () |
| Updates store stock before saving the game. | |
| void | EndCampaign () |
| Faction | GetRandomFaction (Rand.RandSync randSync, bool allowEmpty=true) |
| Returns a random faction based on their ControlledOutpostPercentage. | |
| Faction | GetRandomSecondaryFaction (Rand.RandSync randSync, bool allowEmpty=true) |
| Returns a random faction based on their SecondaryControlledOutpostPercentage. | |
| bool | TryHireCharacter (Location location, CharacterInfo characterInfo, bool takeMoney=true, Client client=null, bool buyingNewCharacter=false) |
| int | NewCharacterCost (CharacterInfo characterInfo) |
| bool | CanAffordNewCharacter (CharacterInfo characterInfo) |
| void | AssignNPCMenuInteraction (Character character, InteractionType interactionType) |
| void | OutpostNPCAttacked (Character npc, Character attacker, AttackResult attackResult) |
| Faction | GetFaction (Identifier identifier) |
| float | GetReputation (Identifier factionIdentifier) |
| FactionAffiliation | GetFactionAffiliation (Identifier factionIdentifier) |
| void | Save (XElement element) |
| void | LogState () |
| override void | Remove () |
| int | NumberOfMissionsAtLocation (Location location) |
| void | CheckTooManyMissions (Location currentLocation, Client sender) |
| void | SwitchSubs () |
| void | SavePets (XElement parentElement=null) |
| void | LoadPets () |
| void | SaveActiveOrders (XElement parentElement=null) |
| void | LoadActiveOrders () |
Public Member Functions inherited from Barotrauma.GameMode | |
| virtual void | UpdateWhilePaused (float deltaTime) |
| GameMode (GameModePreset preset) | |
| virtual void | ShowStartMessage () |
| virtual void | AddToGUIUpdateList () |
| virtual void | Update (float deltaTime) |
Static Public Member Functions | |
| static MultiPlayerCampaign | StartNew (string mapSeed, CampaignSettings settings) |
| static MultiPlayerCampaign | LoadNew (XElement element) |
| static string | GetCharacterDataSavePath (string savePath) |
| static string | GetCharacterDataSavePath () |
| static List< SubmarineInfo > | GetCampaignSubs () |
Static Public Member Functions inherited from Barotrauma.CampaignMode | |
| static bool | BlocksInteraction (InteractionType interactionType) |
| static List< Submarine > | GetSubsToLeaveBehind (Submarine leavingSub) |
| static int | GetHullRepairCost () |
| static int | GetItemRepairCost () |
| static Faction | GetRandomFaction (IEnumerable< Faction > factions, Rand.RandSync randSync, bool secondary=false, bool allowEmpty=true) |
| static Faction | GetRandomFaction (IEnumerable< Faction > factions, Random random, bool secondary=false, bool allowEmpty=true) |
Properties | |
| UInt16 | LastSaveID [get, set] |
| byte | CampaignID [get, set] |
Properties inherited from Barotrauma.CampaignMode | |
| IReadOnlyList< Faction > | Factions [get] |
| XElement | ActiveOrdersElement [get, set] |
| bool | IsFirstRound = true [get, protected set] |
| bool | DisableEvents [get] |
| bool | TransferItemsOnSubSwitch [get, set] |
| bool | SwitchedSubsThisRound [get] |
| Map | Map [get] |
| override IEnumerable< Mission > | Missions [get] |
| Location | CurrentLocation [get] |
| LevelData | NextLevel [get, protected set] |
| virtual bool | PurchasedHullRepairs [get, set] |
| virtual bool | PurchasedLostShuttles [get, set] |
| virtual bool | PurchasedItemRepairs [get, set] |
Properties inherited from Barotrauma.GameMode | |
| CrewManager | CrewManager [get] |
| virtual IEnumerable< Mission > | Missions [get] |
| bool | IsSinglePlayer [get] |
| LocalizedString | Name [get] |
| virtual bool | Paused [get] |
| GameModePreset | Preset [get] |
Additional Inherited Members | |
Public Attributes inherited from Barotrauma.CampaignMode | |
| double | TotalPlayTime |
| int | TotalPassedLevels |
| readonly CargoManager | CargoManager |
| UpgradeManager | UpgradeManager |
| MedicalClinic | MedicalClinic |
| readonly CampaignMetadata | CampaignMetadata |
| CampaignSettings | Settings |
| readonly NamedEvent< WalletChangedEvent > | OnMoneyChanged = new NamedEvent<WalletChangedEvent>() |
| bool | CheatsEnabled |
| SubmarineInfo | PendingSubmarineSwitch |
| Wallet | Bank |
| bool | PurchasedLostShuttlesInLatestSave |
| bool | PurchasedHullRepairsInLatestSave |
| bool | PurchasedItemRepairsInLatestSave |
| bool | DivingSuitWarningShown |
| bool | ItemsRelocatedToMainSub |
Static Public Attributes inherited from Barotrauma.CampaignMode | |
| readonly record struct SaveInfo(string FilePath, Option< SerializableDateTime > SaveTime, string SubmarineName, ImmutableArray< string > EnabledContentPackageNames) const int | MaxMoney = int.MaxValue / 2 |
| const int | InitialMoney = 8500 |
| const float | HullRepairCostPerDamage = 0.1f |
| const float | ItemRepairCostPerRepairDuration = 1.0f |
| const int | ShuttleReplaceCost = 1000 |
| const int | MaxHullRepairCost = 600 |
| const int | MaxItemRepairCost = 2000 |
Static Public Attributes inherited from Barotrauma.GameMode | |
| static List< GameModePreset > | PresetList = new List<GameModePreset>() |
Protected Member Functions inherited from Barotrauma.CampaignMode | |
| CampaignMode (GameModePreset preset, CampaignSettings settings) | |
| void | LoadInitialLevel () |
| Load the first level and start the round after loading a save file. | |
| IEnumerable< CoroutineStatus > | DoLevelTransition (TransitionType transitionType, LevelData newLevel, Submarine leavingSub, bool mirror) |
| virtual void | EndCampaignProjSpecific () |
| void | KeepCharactersCloseToOutpost (float deltaTime) |
| void | LoadStats (XElement element) |
| XElement | SaveStats () |
| void | TransferItemsBetweenSubs () |
| Also serializes the current sub. | |
| void | RefreshOwnedSubmarines () |
Static Protected Member Functions inherited from Barotrauma.CampaignMode | |
| static void | LeaveUnconnectedSubs (Submarine leavingSub) |
Protected Attributes inherited from Barotrauma.CampaignMode | |
| XElement | petsElement |
| bool | wasDocked |
| Map | map |
Protected Attributes inherited from Barotrauma.GameMode | |
| DateTime | startTime |
| GameModePreset | preset |
Static Protected Attributes inherited from Barotrauma.CampaignMode | |
| const float | EndTransitionDuration = 5.0f |
Events inherited from Barotrauma.CampaignMode | |
| Action | BeforeLevelLoading |
| Automatically cleared after triggering -> no need to unregister. | |
| Action | OnSaveAndQuit |
| Triggers when saving and quitting mid-round (as in, not just transferring to a new level). Automatically cleared after triggering -> no need to unregister. | |
| enum Barotrauma.MultiPlayerCampaign.NetFlags : UInt16 |
|
static |
|
static |
|
static |
| UInt16 Barotrauma.MultiPlayerCampaign.GetLastUpdateIdForFlag | ( | NetFlags | flag | ) |
| void Barotrauma.MultiPlayerCampaign.IncrementAllLastUpdateIds | ( | ) |
| void Barotrauma.MultiPlayerCampaign.IncrementLastUpdateIdForFlag | ( | NetFlags | flag | ) |
|
static |
| void Barotrauma.MultiPlayerCampaign.SetLastUpdateIdForFlag | ( | NetFlags | flag, |
| UInt16 | id ) |
|
static |
|
getset |
|
getset |