misc doc fixes

This commit is contained in:
Evil Factory
2022-05-16 13:53:39 -03:00
parent cb29c27752
commit fd6b833c98
8 changed files with 56 additions and 519 deletions

View File

@@ -701,7 +701,7 @@ namespace Barotrauma
var tempBuffer = new ReadWriteMessage();
WriteStatus(tempBuffer);
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize && GameMain.LuaCs.Networking.restrictMessageSize)
if (msgLengthBeforeStatus + tempBuffer.LengthBytes >= 255 && restrictMessageSize && GameMain.LuaCs.Networking.RestrictMessageSize)
{
msg.Write(false);
if (msgLengthBeforeStatus < 255)

View File

@@ -96,6 +96,7 @@ namespace Barotrauma
GenerateDocs(typeof(AfflictionPrefab), "AfflictionPrefab.lua", "AfflictionPrefab");
GenerateDocs(typeof(WayPoint), "WayPoint.lua", "WayPoint");
GenerateDocs(typeof(ServerSettings), "ServerSettings.lua", "Game.ServerSettings");
GenerateDocs(typeof(GameSettings), "GameSettings.lua", "Game.Settings");
}
public static void GenerateDocs(Type type, string name, string categoryName = null)

View File

@@ -218,7 +218,7 @@ namespace Barotrauma
partial class LuaCsNetworking
{
public bool restrictMessageSize = true;
public bool RestrictMessageSize = true;
public Dictionary<string, LuaCsAction> LuaCsNetReceives = new Dictionary<string, LuaCsAction>();
#if SERVER

View File

@@ -0,0 +1,8 @@
-- luacheck: ignore 111
--[[--
Barotrauma.GameSettings
]]
-- @code Game.Settings
-- @pragma nostrip
local GameSettings = {}

View File

@@ -20,6 +20,14 @@ Game.IsDedicated = true
-- @realm server
Game.ServerSettings = true
--- Server settings.
-- @realm server
Game.Settings = true
--- ChatBox.
-- @realm ChatBox
Game.ChatBox = true
--- Send chat message to every client.
-- @realm server
function Game.SendMessage(msg, messageType, sender, character) end
@@ -94,16 +102,6 @@ function Game.StartGame() end
-- @realm server
function Game.EndGame() end
--- Gets all enabled content packages.
--@treturn table Table containing ContentPackages
-- @realm shared
function Game.GetEnabledContentPackages() end
--- Gets all enabled content packages by reading directly the player xml, useful when your mod doesn't have any xml.
--@treturn table Table containing ContentPackages
-- @realm shared
function Game.GetEnabledPackagesDirectlyFromFile() end
--- Adds a new command, onExecute is called with a table of strings.
-- @realm shared
function Game.AddCommand(name, help, onExecute, getValidArgs, isCheat) end

View File

@@ -8,6 +8,14 @@ Class providing networking related tasks.
local Networking = {}
---
-- @realm server
Networking.FileSenderMaxPacketsPerUpdate = 4
---
-- @realm server
Networking.LastClientListUpdateID = 0
--- Send a post HTTP Request, callback is called with an argument result string.
-- @realm server
function Networking.RequestPostHTTP(url, callback, textData, contentType) end
@@ -37,3 +45,11 @@ function Networking.Receive(netMessageName, callback) end
-- @realm server
function Networking.ClientWriteLobby(client) end
--- Creates an entity event.
-- @realm shared
function Networking.CreateEntityEvent(entity, extraData) end
--- Updates the client permissions, call this after you i've changed the permissions of a client, so they are notified about it.
-- @realm server
function Networking.UpdateClientPermissions(client) end

View File

@@ -8,6 +8,15 @@ Barotrauma source code: [Entity.cs](https://github.com/evilfactory/Barotrauma-lu
-- @code Entity
-- @pragma nostrip
--- Remove
-- @realm shared
function Remove() end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- GetEntities
-- @realm shared
-- @treturn IReadOnlyCollection`1
@@ -33,10 +42,6 @@ function Entity.RemoveAll() end
-- @realm shared
function FreeID() end
--- Remove
-- @realm shared
function Remove() end
--- DumpIds
-- @realm shared
-- @tparam number count
@@ -48,11 +53,6 @@ function Entity.DumpIds(count, filename) end
-- @treturn Type
function GetType() end
--- ToString
-- @realm shared
-- @treturn string
function ToString() end
--- Equals
-- @realm shared
-- @tparam Object obj

View File

@@ -3,83 +3,22 @@
--[[--
Barotrauma.GameSettings
]]
-- @code Game.GameSettings
-- @code Game.Settings
-- @pragma nostrip
local GameSettings = {}
--- SelectCorePackage
--- Init
-- @realm shared
-- @tparam ContentPackage contentPackage
-- @tparam bool forceReloadAll
function SelectCorePackage(contentPackage, forceReloadAll) end
function GameSettings.Init() end
--- AutoSelectCorePackage
--- SetCurrentConfig
-- @realm shared
-- @tparam Enumerable toRemove
function AutoSelectCorePackage(toRemove) end
-- @tparam Config& newConfig
function GameSettings.SetCurrentConfig(newConfig) end
--- BackUpModOrder
--- SaveCurrentConfig
-- @realm shared
function BackUpModOrder() end
--- SwapPackages
-- @realm shared
-- @tparam ContentPackage corePackage
-- @tparam table regularPackages
function SwapPackages(corePackage, regularPackages) end
--- RestoreBackupPackages
-- @realm shared
function RestoreBackupPackages() end
--- EnableRegularPackage
-- @realm shared
-- @tparam ContentPackage contentPackage
function EnableRegularPackage(contentPackage) end
--- DisableRegularPackage
-- @realm shared
-- @tparam ContentPackage contentPackage
function DisableRegularPackage(contentPackage) end
--- SortContentPackages
-- @realm shared
-- @tparam bool refreshAll
function SortContentPackages(refreshAll) end
--- EnableContentPackageItems
-- @realm shared
-- @tparam Enumerable unorderedFiles
function EnableContentPackageItems(unorderedFiles) end
--- DisableContentPackageItems
-- @realm shared
-- @tparam Enumerable unorderedFiles
function DisableContentPackageItems(unorderedFiles) end
--- RefreshContentPackageItems
-- @realm shared
-- @tparam Enumerable files
function RefreshContentPackageItems(files) end
--- LoadPlayerConfig
-- @realm shared
function LoadPlayerConfig() end
--- SaveNewPlayerConfig
-- @realm shared
-- @treturn bool
function SaveNewPlayerConfig() end
--- ResetToDefault
-- @realm shared
function ResetToDefault() end
--- AreJobPreferencesEqual
-- @realm shared
-- @tparam table compareTo
-- @treturn bool
function AreJobPreferencesEqual(compareTo) end
function GameSettings.SaveCurrentConfig() end
--- GetType
-- @realm shared
@@ -103,437 +42,12 @@ function Equals(obj) end
function GetHashCode() end
---
-- GraphicsWidth, Field of type number
-- GameSettings.CurrentConfig, Field of type Config&
-- @realm shared
-- @number GraphicsWidth
-- @Config& GameSettings.CurrentConfig
---
-- GraphicsHeight, Field of type number
-- GameSettings.PlayerConfigPath, Field of type string
-- @realm shared
-- @number GraphicsHeight
---
-- VSyncEnabled, Field of type bool
-- @realm shared
-- @bool VSyncEnabled
---
-- TextureCompressionEnabled, Field of type bool
-- @realm shared
-- @bool TextureCompressionEnabled
---
-- EnableSplashScreen, Field of type bool
-- @realm shared
-- @bool EnableSplashScreen
---
-- ParticleLimit, Field of type number
-- @realm shared
-- @number ParticleLimit
---
-- LightMapScale, Field of type number
-- @realm shared
-- @number LightMapScale
---
-- ChromaticAberrationEnabled, Field of type bool
-- @realm shared
-- @bool ChromaticAberrationEnabled
---
-- PauseOnFocusLost, Field of type bool
-- @realm shared
-- @bool PauseOnFocusLost
---
-- MuteOnFocusLost, Field of type bool
-- @realm shared
-- @bool MuteOnFocusLost
---
-- DynamicRangeCompressionEnabled, Field of type bool
-- @realm shared
-- @bool DynamicRangeCompressionEnabled
---
-- VoipAttenuationEnabled, Field of type bool
-- @realm shared
-- @bool VoipAttenuationEnabled
---
-- UseDirectionalVoiceChat, Field of type bool
-- @realm shared
-- @bool UseDirectionalVoiceChat
---
-- DisableVoiceChatFilters, Field of type bool
-- @realm shared
-- @bool DisableVoiceChatFilters
---
-- AudioOutputDevice, Field of type string
-- @realm shared
-- @string AudioOutputDevice
---
-- VoiceSetting, Field of type VoiceMode
-- @realm shared
-- @VoiceMode VoiceSetting
---
-- VoiceCaptureDevice, Field of type string
-- @realm shared
-- @string VoiceCaptureDevice
---
-- NoiseGateThreshold, Field of type number
-- @realm shared
-- @number NoiseGateThreshold
---
-- UseLocalVoiceByDefault, Field of type bool
-- @realm shared
-- @bool UseLocalVoiceByDefault
---
-- RequireSteamAuthentication, Field of type bool
-- @realm shared
-- @bool RequireSteamAuthentication
---
-- UseSteamMatchmaking, Field of type bool
-- @realm shared
-- @bool UseSteamMatchmaking
---
-- UseDualModeSockets, Field of type bool
-- @realm shared
-- @bool UseDualModeSockets
---
-- WindowMode, Field of type WindowMode
-- @realm shared
-- @WindowMode WindowMode
---
-- JobPreferences, Field of type table
-- @realm shared
-- @table JobPreferences
---
-- TeamPreference, Field of type CharacterTeamType
-- @realm shared
-- @CharacterTeamType TeamPreference
---
-- AimAssistAmount, Field of type number
-- @realm shared
-- @number AimAssistAmount
---
-- EnableMouseLook, Field of type bool
-- @realm shared
-- @bool EnableMouseLook
---
-- EnableRadialDistortion, Field of type bool
-- @realm shared
-- @bool EnableRadialDistortion
---
-- CrewMenuOpen, Field of type bool
-- @realm shared
-- @bool CrewMenuOpen
---
-- ChatOpen, Field of type bool
-- @realm shared
-- @bool ChatOpen
---
-- CorpseDespawnDelay, Field of type number
-- @realm shared
-- @number CorpseDespawnDelay
---
-- CorpsesPerSubDespawnThreshold, Field of type number
-- @realm shared
-- @number CorpsesPerSubDespawnThreshold
---
-- UnsavedSettings, Field of type bool
-- @realm shared
-- @bool UnsavedSettings
---
-- SoundVolume, Field of type number
-- @realm shared
-- @number SoundVolume
---
-- MusicVolume, Field of type number
-- @realm shared
-- @number MusicVolume
---
-- VoiceChatVolume, Field of type number
-- @realm shared
-- @number VoiceChatVolume
---
-- VoiceChatCutoffPrevention, Field of type number
-- @realm shared
-- @number VoiceChatCutoffPrevention
---
-- MicrophoneVolume, Field of type number
-- @realm shared
-- @number MicrophoneVolume
---
-- Language, Field of type string
-- @realm shared
-- @string Language
---
-- CurrentCorePackage, Field of type ContentPackage
-- @realm shared
-- @ContentPackage CurrentCorePackage
---
-- EnabledRegularPackages, Field of type IReadOnlyList`1
-- @realm shared
-- @IReadOnlyList`1 EnabledRegularPackages
---
-- AllEnabledPackages, Field of type Enumerable
-- @realm shared
-- @Enumerable AllEnabledPackages
---
-- ContentPackageSelectionDirtyNotification, Field of type bool
-- @realm shared
-- @bool ContentPackageSelectionDirtyNotification
---
-- ContentPackageSelectionDirty, Field of type bool
-- @realm shared
-- @bool ContentPackageSelectionDirty
---
-- ServerFilterElement, Field of type XElement
-- @realm shared
-- @XElement ServerFilterElement
---
-- DisableInGameHints, Field of type bool
-- @realm shared
-- @bool DisableInGameHints
---
-- AutomaticQuickStartEnabled, Field of type bool
-- @realm shared
-- @bool AutomaticQuickStartEnabled
---
-- AutomaticCampaignLoadEnabled, Field of type bool
-- @realm shared
-- @bool AutomaticCampaignLoadEnabled
---
-- TextManagerDebugModeEnabled, Field of type bool
-- @realm shared
-- @bool TextManagerDebugModeEnabled
---
-- TestScreenEnabled, Field of type bool
-- @realm shared
-- @bool TestScreenEnabled
---
-- ModBreakerMode, Field of type bool
-- @realm shared
-- @bool ModBreakerMode
---
-- MasterServerUrl, Field of type string
-- @realm shared
-- @string MasterServerUrl
---
-- RemoteContentUrl, Field of type string
-- @realm shared
-- @string RemoteContentUrl
---
-- AutoCheckUpdates, Field of type bool
-- @realm shared
-- @bool AutoCheckUpdates
---
-- PlayerName, Field of type string
-- @realm shared
-- @string PlayerName
---
-- LosMode, Field of type LosMode
-- @realm shared
-- @LosMode LosMode
---
-- GameSettings.HUDScale, Field of type number
-- @realm shared
-- @number GameSettings.HUDScale
---
-- GameSettings.InventoryScale, Field of type number
-- @realm shared
-- @number GameSettings.InventoryScale
---
-- GameSettings.TextScale, Field of type number
-- @realm shared
-- @number GameSettings.TextScale
---
-- CompletedTutorialNames, Field of type table
-- @realm shared
-- @table CompletedTutorialNames
---
-- IgnoredHints, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 IgnoredHints
---
-- EncounteredCreatures, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 EncounteredCreatures
---
-- KilledCreatures, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 KilledCreatures
---
-- GameSettings.VerboseLogging, Field of type bool
-- @realm shared
-- @bool GameSettings.VerboseLogging
---
-- GameSettings.SaveDebugConsoleLogs, Field of type bool
-- @realm shared
-- @bool GameSettings.SaveDebugConsoleLogs
---
-- ShowLanguageSelectionPrompt, Field of type bool
-- @realm shared
-- @bool ShowLanguageSelectionPrompt
---
-- GameSettings.ShowOffensiveServerPrompt, Field of type bool
-- @realm shared
-- @bool GameSettings.ShowOffensiveServerPrompt
---
-- GameSettings.EnableSubmarineAutoSave, Field of type bool
-- @realm shared
-- @bool GameSettings.EnableSubmarineAutoSave
---
-- GameSettings.MaximumAutoSaves, Field of type number
-- @realm shared
-- @number GameSettings.MaximumAutoSaves
---
-- GameSettings.AutoSaveIntervalSeconds, Field of type number
-- @realm shared
-- @number GameSettings.AutoSaveIntervalSeconds
---
-- GameSettings.SubEditorBackgroundColor, Field of type Color
-- @realm shared
-- @Color GameSettings.SubEditorBackgroundColor
---
-- GameSettings.SubEditorMaxUndoBuffer, Field of type number
-- @realm shared
-- @number GameSettings.SubEditorMaxUndoBuffer
---
-- ShowTutorialSkipWarning, Field of type bool
-- @realm shared
-- @bool ShowTutorialSkipWarning
---
-- AudioDeviceNames, Field of type IList`1
-- @realm shared
-- @IList`1 AudioDeviceNames
---
-- CaptureDeviceNames, Field of type IList`1
-- @realm shared
-- @IList`1 CaptureDeviceNames
---
-- jobPreferences, Field of type table
-- @realm shared
-- @table jobPreferences
---
-- QuickStartSubmarineName, Field of type string
-- @realm shared
-- @string QuickStartSubmarineName
---
-- AutoUpdateWorkshopItems, Field of type bool
-- @realm shared
-- @bool AutoUpdateWorkshopItems
---
-- SuppressModFolderWatcher, Field of type bool
-- @realm shared
-- @bool SuppressModFolderWatcher
---
-- WaitingForAutoUpdate, Field of type bool
-- @realm shared
-- @bool WaitingForAutoUpdate
---
-- RecentlyEncounteredCreatures, Field of type HashSet`1
-- @realm shared
-- @HashSet`1 RecentlyEncounteredCreatures
---
-- CampaignDisclaimerShown, Field of type bool
-- @realm shared
-- @bool CampaignDisclaimerShown
---
-- EditorDisclaimerShown, Field of type bool
-- @realm shared
-- @bool EditorDisclaimerShown
---
-- GameSettings.SavePath, Field of type string
-- @realm shared
-- @string GameSettings.SavePath
---
-- GameSettings.PlayerSavePath, Field of type string
-- @realm shared
-- @string GameSettings.PlayerSavePath
---
-- GameSettings.VanillaContentPackagePath, Field of type string
-- @realm shared
-- @string GameSettings.VanillaContentPackagePath
---
-- GameSettings.MaxMicrophoneVolume, Field of type number
-- @realm shared
-- @number GameSettings.MaxMicrophoneVolume
-- @string GameSettings.PlayerConfigPath