init project ep
This commit is contained in:
15
LocalMods/LuaCsForBarotrauma/Config/SettingsShared.xml
Normal file
15
LocalMods/LuaCsForBarotrauma/Config/SettingsShared.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Configuration>
|
||||
<Settings>
|
||||
<Setting Name="HideUserNamesInLogs" Type="bool" Value="true"/>
|
||||
<Setting Name="CsRunPolicy" Type="listString" Value="Prompt" AllowChangesWhileExecuting="false">
|
||||
<Values>
|
||||
<Value Value="Disabled"/>
|
||||
<Value Value="Prompt"/>
|
||||
<Value Value="Enabled"/>
|
||||
</Values>
|
||||
</Setting>
|
||||
<Setting Name="UseCaching" Type="bool" Value="true" AllowChangesWhileExecuting="false"/>
|
||||
<Setting Name="IsCsEnabledForSession" Type="bool" AllowChangesWhileExecuting="false" ShowInMenus="false" Value="false"/>
|
||||
</Settings>
|
||||
</Configuration>
|
||||
81
LocalMods/LuaCsForBarotrauma/Lua/CompatibilityLib.lua
Normal file
81
LocalMods/LuaCsForBarotrauma/Lua/CompatibilityLib.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
-- Contains things to be removed later, they exist only for compatibility reasons.
|
||||
|
||||
local compatibilityLib = {}
|
||||
|
||||
-- local networking = LuaUserData.RegisterType("Barotrauma.LuaCsNetworking")
|
||||
|
||||
-- LuaUserData.AddMethod(networking, "RequestGetHTTP", Networking.HttpGet)
|
||||
|
||||
-- LuaUserData.AddMethod(networking, "RequestPostHTTP", Networking.HttpPost)
|
||||
|
||||
compatibilityLib.CreateVector2 = Vector2.__new
|
||||
compatibilityLib.CreateVector3 = Vector3.__new
|
||||
compatibilityLib.CreateVector4 = Vector4.__new
|
||||
|
||||
local luaRandom = {}
|
||||
|
||||
luaRandom.Range = function (min, max)
|
||||
return math.random(min, max - 1)
|
||||
end
|
||||
|
||||
luaRandom.RangeFloat = function (min, max)
|
||||
return math.random() + math.random(min, max)
|
||||
end
|
||||
|
||||
compatibilityLib["Random"] = luaRandom
|
||||
|
||||
local luaPlayer = {}
|
||||
|
||||
luaPlayer.GetAllCharacters = function ()
|
||||
return Character.CharacterList
|
||||
end
|
||||
|
||||
luaPlayer.GetAllClients = function ()
|
||||
return Client.ClientList
|
||||
end
|
||||
|
||||
luaPlayer.SetClientCharacter = function (client, character)
|
||||
client.SetClientCharacter(character)
|
||||
end
|
||||
|
||||
luaPlayer.SetCharacterTeam = function (character, team)
|
||||
character.TeamID = team
|
||||
end
|
||||
|
||||
luaPlayer.SetClientTeam = function (client, team)
|
||||
client.TeamID = team
|
||||
end
|
||||
|
||||
luaPlayer.Kick = function (client, reason)
|
||||
client.Kick(reason)
|
||||
end
|
||||
|
||||
luaPlayer.Ban = function (client, reason, range, seconds)
|
||||
client.Ban(reason, range, seconds)
|
||||
end
|
||||
|
||||
luaPlayer.UnbanPlayer = function (player, endpoint)
|
||||
Client.Unban(player, endpoint)
|
||||
end
|
||||
|
||||
luaPlayer.SetSpectatorPos = function ()
|
||||
|
||||
end
|
||||
|
||||
luaPlayer.SetRadioRange = function (character, range)
|
||||
if (character.Inventory == nil) then return end
|
||||
|
||||
for item in character.Inventory.AllItems do
|
||||
if item ~= nil and item.Prefab.Identifier == "headset" then
|
||||
item.GetComponentString("WifiComponent").Range = range;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
luaPlayer.CheckPermission = function (client, permissions)
|
||||
return client.CheckPermission(permissions)
|
||||
end
|
||||
|
||||
compatibilityLib["Player"] = luaPlayer
|
||||
|
||||
return compatibilityLib
|
||||
68
LocalMods/LuaCsForBarotrauma/Lua/DefaultHook.lua
Normal file
68
LocalMods/LuaCsForBarotrauma/Lua/DefaultHook.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
Hook.Patch("Barotrauma.Item", "TryInteract",
|
||||
{
|
||||
"Barotrauma.Character",
|
||||
"System.Boolean",
|
||||
"System.Boolean",
|
||||
"System.Boolean"
|
||||
},
|
||||
function(instance, p)
|
||||
if Hook.Call("item.interact", instance, p["user"], p["ignoreRequiredItems"], p["forceSelectKey"], p["forceUseKey"]) == true then
|
||||
p.PreventExecution = true
|
||||
return false
|
||||
end
|
||||
end, Hook.HookMethodType.Before)
|
||||
|
||||
Hook.Patch("Barotrauma.Item", "ApplyTreatment",
|
||||
{
|
||||
"Barotrauma.Character",
|
||||
"Barotrauma.Character",
|
||||
"Barotrauma.Limb"
|
||||
},
|
||||
function(instance, p)
|
||||
if Hook.Call("item.applyTreatment", instance, p["user"], p["character"], p["targetLimb"]) then
|
||||
p.PreventExecution = true
|
||||
return false
|
||||
end
|
||||
end, Hook.HookMethodType.Before)
|
||||
|
||||
Hook.Patch("Barotrauma.Item", "Combine",
|
||||
{
|
||||
"Barotrauma.Item",
|
||||
"Barotrauma.Character"
|
||||
},
|
||||
function(instance, p)
|
||||
if Hook.Call("item.combine", instance, p["item"], p["user"]) == true then
|
||||
p.PreventExecution = true
|
||||
return false
|
||||
end
|
||||
end, Hook.HookMethodType.Before)
|
||||
|
||||
Hook.Patch("Barotrauma.Item", "Drop",
|
||||
function(instance, p)
|
||||
if Hook.Call("item.drop", instance, p["dropper"]) == true then
|
||||
p.PreventExecution = true
|
||||
return false
|
||||
end
|
||||
end, Hook.HookMethodType.Before)
|
||||
|
||||
Hook.Patch("Barotrauma.Item", "Equip",
|
||||
{
|
||||
"Barotrauma.Character"
|
||||
},
|
||||
function(instance, p)
|
||||
if Hook.Call("item.equip", instance, p["character"]) == true then
|
||||
p.PreventExecution = true
|
||||
return false
|
||||
end
|
||||
end, Hook.HookMethodType.Before)
|
||||
|
||||
Hook.Patch("Barotrauma.Item", "Unequip",
|
||||
{
|
||||
"Barotrauma.Character"
|
||||
},
|
||||
function(instance, p)
|
||||
if Hook.Call("item.unequip", instance, p["character"]) == true then
|
||||
p.PreventExecution = true
|
||||
return false
|
||||
end
|
||||
end, Hook.HookMethodType.Before)
|
||||
90
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/LibClient.lua
Normal file
90
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/LibClient.lua
Normal file
@@ -0,0 +1,90 @@
|
||||
local defaultLib = {}
|
||||
|
||||
local CreateStatic = LuaUserData.CreateStatic
|
||||
local CreateEnum = LuaUserData.CreateEnumTable
|
||||
local AddCallMetaTable = LuaUserData.AddCallMetaTable
|
||||
|
||||
local localizedStrings = {
|
||||
"LocalizedString", "LimitLString", "WrappedLString", "AddedPunctuationLString", "CapitalizeLString", "ConcatLString", "FallbackLString", "FormattedLString", "InputTypeLString", "JoinLString", "LowerLString", "RawLString", "ReplaceLString", "ServerMsgLString", "SplitLString", "TagLString", "TrimLString", "UpperLString", "StripRichTagsLString",
|
||||
}
|
||||
|
||||
for key, value in pairs(localizedStrings) do
|
||||
defaultLib[value] = CreateStatic("Barotrauma." .. value, true)
|
||||
end
|
||||
|
||||
local sounds = {}
|
||||
sounds.LowpassFilter = CreateStatic("Barotrauma.Sounds.LowpassFilter")
|
||||
sounds.HighpassFilter = CreateStatic("Barotrauma.Sounds.HighpassFilter")
|
||||
sounds.BandpassFilter = CreateStatic("Barotrauma.Sounds.BandpassFilter")
|
||||
sounds.NotchFilter = CreateStatic("Barotrauma.Sounds.NotchFilter")
|
||||
sounds.LowShelfFilter = CreateStatic("Barotrauma.Sounds.LowShelfFilter")
|
||||
sounds.HighShelfFilter = CreateStatic("Barotrauma.Sounds.HighShelfFilter")
|
||||
sounds.PeakFilter = CreateStatic("Barotrauma.Sounds.PeakFilter")
|
||||
defaultLib["Sounds"] = sounds
|
||||
|
||||
defaultLib["SpriteEffects"] = CreateStatic("Microsoft.Xna.Framework.Graphics.SpriteEffects")
|
||||
|
||||
defaultLib["SoundPlayer"] = CreateStatic("Barotrauma.SoundPlayer")
|
||||
defaultLib["SoundPrefab"] = CreateStatic("Barotrauma.SoundPrefab", true)
|
||||
defaultLib["BackgroundMusic"] = CreateStatic("Barotrauma.BackgroundMusic", true)
|
||||
defaultLib["GUISound"] = CreateStatic("Barotrauma.GUISound", true)
|
||||
defaultLib["DamageSound"] = CreateStatic("Barotrauma.DamageSound", true)
|
||||
defaultLib["WaterRenderer"] = CreateStatic("Barotrauma.WaterRenderer", true)
|
||||
|
||||
defaultLib["TextureLoader"] = CreateStatic("Barotrauma.TextureLoader")
|
||||
defaultLib["Sprite"] = CreateStatic("Barotrauma.Sprite", true)
|
||||
defaultLib["PlayerInput"] = CreateStatic("Barotrauma.PlayerInput", true)
|
||||
|
||||
defaultLib["Keys"] = CreateStatic("Microsoft.Xna.Framework.Input.Keys", true)
|
||||
|
||||
defaultLib["GUI"] = {
|
||||
GUI = CreateStatic("Barotrauma.GUI", true),
|
||||
Style = CreateStatic("Barotrauma.GUIStyle", true),
|
||||
Component = CreateStatic("Barotrauma.GUIComponent"),
|
||||
RectTransform = CreateStatic("Barotrauma.RectTransform", true),
|
||||
LayoutGroup = CreateStatic("Barotrauma.GUILayoutGroup", true),
|
||||
Button = CreateStatic("Barotrauma.GUIButton", true),
|
||||
TextBox = CreateStatic("Barotrauma.GUITextBox", true),
|
||||
Canvas = CreateStatic("Barotrauma.GUICanvas", true),
|
||||
Frame = CreateStatic("Barotrauma.GUIFrame", true),
|
||||
TextBlock = CreateStatic("Barotrauma.GUITextBlock", true),
|
||||
TickBox = CreateStatic("Barotrauma.GUITickBox", true),
|
||||
Image = CreateStatic("Barotrauma.GUIImage", true),
|
||||
ListBox = CreateStatic("Barotrauma.GUIListBox", true),
|
||||
ScrollBar = CreateStatic("Barotrauma.GUIScrollBar", true),
|
||||
DropDown = CreateStatic("Barotrauma.GUIDropDown", true),
|
||||
NumberInput = CreateStatic("Barotrauma.GUINumberInput", true),
|
||||
MessageBox = CreateStatic("Barotrauma.GUIMessageBox", true),
|
||||
ColorPicker = CreateStatic("Barotrauma.GUIColorPicker", true),
|
||||
ProgressBar = CreateStatic("Barotrauma.GUIProgressBar", true),
|
||||
CustomComponent = CreateStatic("Barotrauma.GUICustomComponent", true),
|
||||
ScissorComponent = CreateStatic("Barotrauma.GUIScissorComponent", true),
|
||||
VideoPlayer = CreateStatic("Barotrauma.VideoPlayer", true),
|
||||
Graph = CreateStatic("Barotrauma.Graph", true),
|
||||
SerializableEntityEditor = CreateStatic("Barotrauma.SerializableEntityEditor", true),
|
||||
SlideshowPlayer = CreateStatic("Barotrauma.SlideshowPlayer", true),
|
||||
CreditsPlayer = CreateStatic("Barotrauma.CreditsPlayer", true),
|
||||
DragHandle = CreateStatic("Barotrauma.GUIDragHandle", true),
|
||||
ContextMenu = CreateStatic("Barotrauma.GUIContextMenu", true),
|
||||
ContextMenuOption = CreateStatic("Barotrauma.ContextMenuOption", true),
|
||||
|
||||
Screen = CreateStatic("Barotrauma.Screen"),
|
||||
|
||||
Anchor = CreateStatic("Barotrauma.Anchor"),
|
||||
Alignment = CreateStatic("Barotrauma.Alignment"),
|
||||
Pivot = CreateStatic("Barotrauma.Pivot"),
|
||||
SoundType = CreateEnum("Barotrauma.GUISoundType"),
|
||||
CursorState = CreateEnum("Barotrauma.CursorState"),
|
||||
|
||||
GUIStyle = CreateStatic("Barotrauma.GUIStyle", true),
|
||||
}
|
||||
|
||||
local guiFallback = defaultLib["GUI"].GUI
|
||||
|
||||
setmetatable(defaultLib["GUI"], {
|
||||
__index = function(_, key)
|
||||
return guiFallback[key]
|
||||
end
|
||||
})
|
||||
|
||||
return defaultLib
|
||||
14
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/LibServer.lua
Normal file
14
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/LibServer.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local defaultLib = {}
|
||||
|
||||
local CreateStatic = LuaUserData.CreateStatic
|
||||
local CreateEnum = LuaUserData.CreateEnumTable
|
||||
|
||||
local localizedStrings = {
|
||||
"LocalizedString", "AddedPunctuationLString", "CapitalizeLString", "ConcatLString", "FallbackLString", "FormattedLString", "InputTypeLString", "JoinLString", "LowerLString", "RawLString", "ReplaceLString", "ServerMsgLString", "SplitLString", "TagLString", "TrimLString", "UpperLString", "StripRichTagsLString",
|
||||
}
|
||||
|
||||
for key, value in pairs(localizedStrings) do
|
||||
defaultLib[value] = CreateStatic("Barotrauma." .. value, true)
|
||||
end
|
||||
|
||||
return defaultLib
|
||||
195
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/LibShared.lua
Normal file
195
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/LibShared.lua
Normal file
@@ -0,0 +1,195 @@
|
||||
local defaultLib = {}
|
||||
|
||||
local AddCallMetaTable = LuaUserData.AddCallMetaTable
|
||||
local CreateStatic = LuaUserData.CreateStatic
|
||||
local CreateEnum = LuaUserData.CreateEnumTable
|
||||
|
||||
defaultLib["SByte"] = CreateStatic("Barotrauma.LuaSByte", true)
|
||||
defaultLib["Byte"] = CreateStatic("Barotrauma.LuaByte", true)
|
||||
defaultLib["Int16"] = CreateStatic("Barotrauma.LuaInt16", true)
|
||||
defaultLib["UInt16"] = CreateStatic("Barotrauma.LuaUInt16", true)
|
||||
defaultLib["Int32"] = CreateStatic("Barotrauma.LuaInt32", true)
|
||||
defaultLib["UInt32"] = CreateStatic("Barotrauma.LuaUInt32", true)
|
||||
defaultLib["Int64"] = CreateStatic("Barotrauma.LuaInt64", true)
|
||||
defaultLib["UInt64"] = CreateStatic("Barotrauma.LuaUInt64", true)
|
||||
defaultLib["Single"] = CreateStatic("Barotrauma.LuaSingle", true)
|
||||
defaultLib["Double"] = CreateStatic("Barotrauma.LuaDouble", true)
|
||||
|
||||
-- Backward compatibility
|
||||
defaultLib["Float"] = CreateStatic("Barotrauma.LuaSingle", true)
|
||||
defaultLib["Short"] = CreateStatic("Barotrauma.LuaInt16", true)
|
||||
defaultLib["UShort"] = CreateStatic("Barotrauma.LuaUInt16", true)
|
||||
|
||||
defaultLib["SpawnType"] = CreateEnum("Barotrauma.SpawnType")
|
||||
defaultLib["ChatMessageType"] = CreateEnum("Barotrauma.Networking.ChatMessageType")
|
||||
defaultLib["ServerLog_MessageType"] = CreateEnum("Barotrauma.Networking.ServerLog+MessageType")
|
||||
defaultLib["ServerLogMessageType"] = CreateEnum("Barotrauma.Networking.ServerLog+MessageType")
|
||||
defaultLib["PositionType"] = CreateEnum("Barotrauma.Level+PositionType")
|
||||
defaultLib["InvSlotType"] = CreateEnum("Barotrauma.InvSlotType")
|
||||
defaultLib["LimbType"] = CreateEnum("Barotrauma.LimbType")
|
||||
defaultLib["ActionType"] = CreateEnum("Barotrauma.ActionType")
|
||||
defaultLib["AbilityEffectType"] = CreateEnum("Barotrauma.AbilityEffectType")
|
||||
defaultLib["StatTypes"] = CreateEnum("Barotrauma.StatTypes")
|
||||
defaultLib["AbilityFlags"] = CreateEnum("Barotrauma.AbilityFlags")
|
||||
defaultLib["DeliveryMethod"] = CreateEnum("Barotrauma.Networking.DeliveryMethod")
|
||||
defaultLib["ClientPacketHeader"] = CreateEnum("Barotrauma.Networking.ClientPacketHeader")
|
||||
defaultLib["ServerPacketHeader"] = CreateEnum("Barotrauma.Networking.ServerPacketHeader")
|
||||
defaultLib["RandSync"] = CreateEnum("Barotrauma.Rand+RandSync")
|
||||
defaultLib["DisconnectReason"] = CreateEnum("Barotrauma.Networking.DisconnectReason")
|
||||
defaultLib["CombatMode"] = CreateEnum("Barotrauma.AIObjectiveCombat+CombatMode")
|
||||
defaultLib["CauseOfDeathType"] = CreateEnum("Barotrauma.CauseOfDeathType")
|
||||
defaultLib["CharacterTeamType"] = CreateEnum("Barotrauma.CharacterTeamType")
|
||||
defaultLib["ClientPermissions"] = CreateEnum("Barotrauma.Networking.ClientPermissions")
|
||||
defaultLib["OrderCategory"] = CreateEnum("Barotrauma.OrderCategory")
|
||||
defaultLib["WearableType"] = CreateEnum("Barotrauma.WearableType")
|
||||
defaultLib["NumberType"] = CreateEnum("Barotrauma.NumberType")
|
||||
defaultLib["ChatMode"] = CreateEnum("Barotrauma.ChatMode")
|
||||
defaultLib["CharacterType"] = CreateEnum("Barotrauma.CharacterType")
|
||||
defaultLib["VoteType"] = CreateEnum("Barotrauma.Networking.VoteType")
|
||||
defaultLib["CanEnterSubmarine"] = CreateEnum("Barotrauma.CanEnterSubmarine")
|
||||
defaultLib["InputType"] = CreateStatic("Barotrauma.InputType")
|
||||
|
||||
defaultLib["EventPrefab"] = CreateStatic("Barotrauma.EventPrefab", true)
|
||||
defaultLib["TraitorEventPrefab"] = CreateStatic("Barotrauma.TraitorEventPrefab", true)
|
||||
defaultLib["TraitorEvent"] = CreateStatic("Barotrauma.TraitorEvent", true)
|
||||
defaultLib["EventSet"] = CreateStatic("Barotrauma.EventSet", true)
|
||||
defaultLib["EventManagerSettings"] = CreateStatic("Barotrauma.EventManagerSettings", true)
|
||||
|
||||
defaultLib["NetConfig"] = CreateStatic("Barotrauma.Networking.NetConfig")
|
||||
defaultLib["NetworkConnection"] = CreateStatic("Barotrauma.Networking.NetworkConnection")
|
||||
defaultLib["Inventory"] = CreateStatic("Barotrauma.Inventory", true)
|
||||
defaultLib["CharacterInventory"] = CreateStatic("Barotrauma.CharacterInventory", true)
|
||||
defaultLib["ItemInventory"] = CreateStatic("Barotrauma.ItemInventory", true)
|
||||
defaultLib["ContentPackageManager"] = CreateStatic("Barotrauma.ContentPackageManager")
|
||||
defaultLib["GameSettings"] = CreateStatic("Barotrauma.GameSettings")
|
||||
defaultLib["RichString"] = CreateStatic("Barotrauma.RichString", true)
|
||||
defaultLib["Identifier"] = CreateStatic("Barotrauma.Identifier", true)
|
||||
defaultLib["LanguageIdentifier"] = CreateStatic("Barotrauma.LanguageIdentifier", true)
|
||||
defaultLib["ContentPackage"] = CreateStatic("Barotrauma.ContentPackage", true)
|
||||
defaultLib["WayPoint"] = CreateStatic("Barotrauma.WayPoint", true)
|
||||
defaultLib["Submarine"] = CreateStatic("Barotrauma.Submarine", true)
|
||||
defaultLib["Client"] = CreateStatic("Barotrauma.Networking.Client", true)
|
||||
defaultLib["Character"] = CreateStatic("Barotrauma.Character")
|
||||
defaultLib["CharacterHealth"] = CreateStatic("Barotrauma.CharacterHealth", true)
|
||||
defaultLib["CharacterPrefab"] = CreateStatic("Barotrauma.CharacterPrefab", true)
|
||||
defaultLib["CharacterInfo"] = CreateStatic("Barotrauma.CharacterInfo", true)
|
||||
AddCallMetaTable(defaultLib["CharacterInfo"].HeadPreset)
|
||||
AddCallMetaTable(defaultLib["CharacterInfo"].HeadInfo)
|
||||
defaultLib["CharacterInfoPrefab"] = CreateStatic("Barotrauma.CharacterInfoPrefab")
|
||||
defaultLib["Item"] = CreateStatic("Barotrauma.Item", true)
|
||||
AddCallMetaTable(defaultLib["Item"].ChangePropertyEventData)
|
||||
defaultLib["MapEntityPrefab"] = CreateStatic("Barotrauma.MapEntityPrefab")
|
||||
defaultLib["ItemPrefab"] = CreateStatic("Barotrauma.ItemPrefab", true)
|
||||
defaultLib["TalentTree"] = CreateStatic("Barotrauma.TalentTree", true)
|
||||
defaultLib["TalentPrefab"] = CreateStatic("Barotrauma.TalentPrefab", true)
|
||||
defaultLib["FactionPrefab"] = CreateStatic("Barotrauma.FactionPrefab", true)
|
||||
defaultLib["MissionPrefab"] = CreateStatic("Barotrauma.MissionPrefab", true)
|
||||
defaultLib["Mission"] = CreateStatic("Barotrauma.Mission", true)
|
||||
defaultLib["Level"] = CreateStatic("Barotrauma.Level")
|
||||
defaultLib["LevelGenerationParams"] = CreateStatic("Barotrauma.LevelGenerationParams", true)
|
||||
defaultLib["OutpostGenerationParams"] = CreateStatic("Barotrauma.OutpostGenerationParams", true)
|
||||
defaultLib["RuinGenerationParams"] = CreateStatic("Barotrauma.RuinGeneration.RuinGenerationParams", true)
|
||||
defaultLib["Job"] = CreateStatic("Barotrauma.Job", true)
|
||||
defaultLib["JobPrefab"] = CreateStatic("Barotrauma.JobPrefab", true)
|
||||
defaultLib["JobVariant"] = CreateStatic("Barotrauma.JobVariant", true)
|
||||
defaultLib["AfflictionPrefab"] = CreateStatic("Barotrauma.AfflictionPrefab", true)
|
||||
defaultLib["SkillSettings"] = CreateStatic("Barotrauma.SkillSettings", true)
|
||||
defaultLib["ChatMessage"] = CreateStatic("Barotrauma.Networking.ChatMessage")
|
||||
defaultLib["Structure"] = CreateStatic("Barotrauma.Structure", true)
|
||||
defaultLib["Hull"] = CreateStatic("Barotrauma.Hull", true)
|
||||
defaultLib["Gap"] = CreateStatic("Barotrauma.Gap", true)
|
||||
defaultLib["Signal"] = CreateStatic("Barotrauma.Items.Components.Signal", true)
|
||||
defaultLib["SubmarineInfo"] = CreateStatic("Barotrauma.SubmarineInfo", true)
|
||||
defaultLib["Entity"] = CreateStatic("Barotrauma.Entity", true)
|
||||
defaultLib["MapEntity"] = CreateStatic("Barotrauma.MapEntity", true)
|
||||
defaultLib["Physics"] = CreateStatic("Barotrauma.Physics")
|
||||
defaultLib["FireSource"] = CreateStatic("Barotrauma.FireSource", true)
|
||||
defaultLib["TextManager"] = CreateStatic("Barotrauma.TextManager")
|
||||
defaultLib["NetEntityEvent"] = CreateStatic("Barotrauma.Networking.NetEntityEvent")
|
||||
defaultLib["Screen"] = CreateStatic("Barotrauma.Screen")
|
||||
defaultLib["AttackResult"] = CreateStatic("Barotrauma.AttackResult", true)
|
||||
defaultLib["TempClient"] = CreateStatic("Barotrauma.Networking.TempClient", true)
|
||||
defaultLib["DecalManager"] = CreateStatic("Barotrauma.DecalManager", true)
|
||||
defaultLib["AutoItemPlacer"] = CreateStatic("Barotrauma.AutoItemPlacer")
|
||||
defaultLib["PropertyConditional"] = CreateStatic("Barotrauma.PropertyConditional", true)
|
||||
defaultLib["StatusEffect"] = CreateStatic("Barotrauma.StatusEffect", true)
|
||||
defaultLib["OutpostGenerator"] = CreateStatic("Barotrauma.OutpostGenerator")
|
||||
defaultLib["DamageModifier"] = CreateStatic("Barotrauma.DamageModifier", true)
|
||||
defaultLib["TraitorManager"] = CreateStatic("Barotrauma.TraitorManager", true)
|
||||
AddCallMetaTable(defaultLib["TraitorManager"].TraitorResults)
|
||||
|
||||
defaultLib["Md5Hash"] = CreateStatic("Barotrauma.Md5Hash", true)
|
||||
defaultLib["ContentXElement"] = CreateStatic("Barotrauma.ContentXElement", true)
|
||||
defaultLib["ContentPath"] = CreateStatic("Barotrauma.ContentPath", true)
|
||||
defaultLib["XElement"] = CreateStatic("System.Xml.Linq.XElement", true)
|
||||
defaultLib["XName"] = CreateStatic("System.Xml.Linq.XName", true)
|
||||
defaultLib["XAttribute"] = CreateStatic("System.Xml.Linq.XAttribute", true)
|
||||
defaultLib["XContainer"] = CreateStatic("System.Xml.Linq.XContainer", true)
|
||||
defaultLib["XDocument"] = CreateStatic("System.Xml.Linq.XDocument", true)
|
||||
defaultLib["XNode"] = CreateStatic("System.Xml.Linq.XNode", true)
|
||||
defaultLib["SoundsFile"] = CreateStatic("Barotrauma.SoundsFile", true)
|
||||
|
||||
defaultLib["Voting"] = CreateStatic("Barotrauma.Voting")
|
||||
defaultLib["TimeSpan"] = CreateStatic("System.TimeSpan")
|
||||
defaultLib["IPAddress"] = CreateStatic("System.Net.IPAddress")
|
||||
defaultLib["ContentPackageId"] = CreateStatic("Barotrauma.ContentPackageId")
|
||||
defaultLib["Address"] = CreateStatic("Barotrauma.Networking.Address")
|
||||
defaultLib["AccountId"] = CreateStatic("Barotrauma.Networking.AccountId")
|
||||
defaultLib["Endpoint"] = CreateStatic("Barotrauma.Networking.Endpoint")
|
||||
|
||||
defaultLib["Explosion"] = CreateStatic("Barotrauma.Explosion", true)
|
||||
|
||||
defaultLib["ConvertUnits"] = CreateStatic("FarseerPhysics.ConvertUnits")
|
||||
defaultLib["ToolBox"] = CreateStatic("Barotrauma.ToolBox")
|
||||
|
||||
defaultLib["AIObjective"] = CreateStatic("Barotrauma.AIObjective", true)
|
||||
defaultLib["AIObjectiveChargeBatteries"] = CreateStatic("Barotrauma.AIObjectiveChargeBatteries", true)
|
||||
defaultLib["AIObjectiveCleanupItem"] = CreateStatic("Barotrauma.AIObjectiveCleanupItem", true)
|
||||
defaultLib["AIObjectiveCleanupItems"] = CreateStatic("Barotrauma.AIObjectiveCleanupItems", true)
|
||||
defaultLib["AIObjectiveCombat"] = CreateStatic("Barotrauma.AIObjectiveCombat", true)
|
||||
defaultLib["AIObjectiveContainItem"] = CreateStatic("Barotrauma.AIObjectiveContainItem", true)
|
||||
defaultLib["AIObjectiveDeconstructItem"] = CreateStatic("Barotrauma.AIObjectiveDeconstructItem", true)
|
||||
defaultLib["AIObjectiveDeconstructItems"] = CreateStatic("Barotrauma.AIObjectiveDeconstructItems", true)
|
||||
defaultLib["AIObjectiveEscapeHandcuffs"] = CreateStatic("Barotrauma.AIObjectiveEscapeHandcuffs", true)
|
||||
defaultLib["AIObjectiveExtinguishFire"] = CreateStatic("Barotrauma.AIObjectiveExtinguishFire", true)
|
||||
defaultLib["AIObjectiveExtinguishFires"] = CreateStatic("Barotrauma.AIObjectiveExtinguishFires", true)
|
||||
defaultLib["AIObjectiveFightIntruders"] = CreateStatic("Barotrauma.AIObjectiveFightIntruders", true)
|
||||
defaultLib["AIObjectiveFindDivingGear"] = CreateStatic("Barotrauma.AIObjectiveFindDivingGear", true)
|
||||
defaultLib["AIObjectiveFindSafety"] = CreateStatic("Barotrauma.AIObjectiveFindSafety", true)
|
||||
defaultLib["AIObjectiveFixLeak"] = CreateStatic("Barotrauma.AIObjectiveFixLeak", true)
|
||||
defaultLib["AIObjectiveFixLeaks"] = CreateStatic("Barotrauma.AIObjectiveFixLeaks", true)
|
||||
defaultLib["AIObjectiveGetItem"] = CreateStatic("Barotrauma.AIObjectiveGetItem", true)
|
||||
defaultLib["AIObjectiveGoTo"] = CreateStatic("Barotrauma.AIObjectiveGoTo", true)
|
||||
defaultLib["AIObjectiveIdle"] = CreateStatic("Barotrauma.AIObjectiveIdle", true)
|
||||
defaultLib["AIObjectiveOperateItem"] = CreateStatic("Barotrauma.AIObjectiveOperateItem", true)
|
||||
defaultLib["AIObjectiveOperateItem"] = CreateStatic("Barotrauma.AIObjectiveOperateItem", true)
|
||||
defaultLib["AIObjectivePumpWater"] = CreateStatic("Barotrauma.AIObjectivePumpWater", true)
|
||||
defaultLib["AIObjectiveRepairItem"] = CreateStatic("Barotrauma.AIObjectiveRepairItem", true)
|
||||
defaultLib["AIObjectiveRepairItems"] = CreateStatic("Barotrauma.AIObjectiveRepairItems", true)
|
||||
defaultLib["AIObjectiveRescue"] = CreateStatic("Barotrauma.AIObjectiveRescue", true)
|
||||
defaultLib["AIObjectiveRescueAll"] = CreateStatic("Barotrauma.AIObjectiveRescueAll", true)
|
||||
defaultLib["AIObjectiveReturn"] = CreateStatic("Barotrauma.AIObjectiveReturn", true)
|
||||
defaultLib["AITarget"] = CreateStatic("Barotrauma.AITarget", true)
|
||||
|
||||
defaultLib["Order"] = CreateStatic("Barotrauma.Order", true)
|
||||
defaultLib["OrderPrefab"] = CreateStatic("Barotrauma.OrderPrefab", true)
|
||||
defaultLib["OrderTarget"] = CreateStatic("Barotrauma.OrderTarget", true)
|
||||
|
||||
local componentsToReference = { "DockingPort", "Door", "GeneticMaterial", "Growable", "Holdable", "LevelResource", "ItemComponent", "ItemLabel", "LightComponent", "Controller", "Deconstructor", "Engine", "Fabricator", "OutpostTerminal", "Pump", "Reactor", "Steering", "PowerContainer", "Projectile", "Repairable", "Rope", "Scanner", "ButtonTerminal", "ConnectionPanel", "CustomInterface", "MemoryComponent", "Terminal", "WifiComponent", "Wire", "TriggerComponent", "ElectricalDischarger", "EntitySpawnerComponent", "ProducedItem", "VineTile", "GrowthSideExtension", "IdCard", "MeleeWeapon", "Pickable", "Propulsion", "RangedWeapon", "RepairTool", "Sprayer", "Throwable", "ItemContainer", "Ladder", "LimbPos", "MiniMap", "OxygenGenerator", "Sonar", "SonarTransducer", "Vent", "NameTag", "Planter", "Powered", "PowerTransfer", "Quality", "RemoteController", "AdderComponent", "AndComponent", "ArithmeticComponent", "ColorComponent", "ConcatComponent", "Connection", "DelayComponent", "DivideComponent", "EqualsComponent", "ExponentiationComponent", "FunctionComponent", "GreaterComponent", "ModuloComponent", "MotionSensor", "MultiplyComponent", "NotComponent", "OrComponent", "OscillatorComponent", "OxygenDetector", "RegExFindComponent", "RelayComponent", "SignalCheckComponent", "SmokeDetector", "StringComponent", "SubtractComponent", "TrigonometricFunctionComponent", "WaterDetector", "XorComponent", "StatusHUD", "Turret", "Wearable", "CustomInterface"
|
||||
}
|
||||
|
||||
defaultLib["Components"] = {}
|
||||
|
||||
for key, value in pairs(componentsToReference) do
|
||||
defaultLib["Components"][value] = CreateStatic("Barotrauma.Items.Components." .. value, true)
|
||||
end
|
||||
|
||||
defaultLib["Vector2"] = CreateStatic("Microsoft.Xna.Framework.Vector2", true)
|
||||
defaultLib["Vector3"] = CreateStatic("Microsoft.Xna.Framework.Vector3", true)
|
||||
defaultLib["Vector4"] = CreateStatic("Microsoft.Xna.Framework.Vector4", true)
|
||||
defaultLib["Color"] = CreateStatic("Microsoft.Xna.Framework.Color", true)
|
||||
defaultLib["Point"] = CreateStatic("Microsoft.Xna.Framework.Point", true)
|
||||
defaultLib["Rectangle"] = CreateStatic("Microsoft.Xna.Framework.Rectangle", true)
|
||||
defaultLib["Matrix"] = CreateStatic("Microsoft.Xna.Framework.Matrix", true)
|
||||
|
||||
return defaultLib
|
||||
40
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/Utils/Math.lua
Normal file
40
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/Utils/Math.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
math.lerp = function (a, b, t)
|
||||
if type(a) ~= "number" then error(string.format("bad argument #1 to 'lerp' (number expected, got %s)", type(a)), 2) end
|
||||
if type(b) ~= "number" then error(string.format("bad argument #2 to 'lerp' (number expected, got %s)", type(b)), 2) end
|
||||
if type(t) ~= "number" then error(string.format("bad argument #3 to 'lerp' (number expected, got %s)", type(t)), 2) end
|
||||
|
||||
return a * (1 - t) + b * t
|
||||
end
|
||||
|
||||
math.clamp = function (value, min, max)
|
||||
if type(value) ~= "number" then error(string.format("bad argument #1 to 'clamp' (number expected, got %s)", type(value)), 2) end
|
||||
if type(min) ~= "number" then error(string.format("bad argument #2 to 'clamp' (number expected, got %s)", type(min)), 2) end
|
||||
if type(max) ~= "number" then error(string.format("bad argument #3 to 'clamp' (number expected, got %s)", type(max)), 2) end
|
||||
|
||||
return math.max(min, math.min(max, value))
|
||||
end
|
||||
|
||||
math.round = function (value, decimals)
|
||||
if type(value) ~= "number" then error(string.format("bad argument #1 to 'round' (number expected, got %s)", type(value)), 2) end
|
||||
if type(decimals) ~= "number" then error(string.format("bad argument #2 to 'round' (number expected, got %s)", type(decimals)), 2) end
|
||||
|
||||
decimals = decimals or 0
|
||||
local mult = 10 ^ decimals
|
||||
return math.floor(value * mult + 0.5) / mult
|
||||
end
|
||||
|
||||
math.sign = function (value)
|
||||
if type(value) ~= "number" then error(string.format("bad argument #1 to 'sign' (number expected, got %s)", type(value)), 2) end
|
||||
|
||||
return value >= 0 and 1 or -1
|
||||
end
|
||||
|
||||
math.remap = function (value, inMin, inMax, outMin, outMax)
|
||||
if type(value) ~= "number" then error(string.format("bad argument #1 to 'remap' (number expected, got %s)", type(value)), 2) end
|
||||
if type(inMin) ~= "number" then error(string.format("bad argument #2 to 'remap' (number expected, got %s)", type(inMin)), 2) end
|
||||
if type(inMax) ~= "number" then error(string.format("bad argument #3 to 'remap' (number expected, got %s)", type(inMax)), 2) end
|
||||
if type(outMin) ~= "number" then error(string.format("bad argument #4 to 'remap' (number expected, got %s)", type(outMin)), 2) end
|
||||
if type(outMax) ~= "number" then error(string.format("bad argument #5 to 'remap' (number expected, got %s)", type(outMax)), 2) end
|
||||
|
||||
return outMin + (outMax - outMin) * ((value - inMin) / (inMax - inMin))
|
||||
end
|
||||
@@ -0,0 +1,28 @@
|
||||
if true then return end
|
||||
|
||||
local descriptor = LuaUserData.RegisterType("Barotrauma.LuaCsSteam")
|
||||
|
||||
LuaUserData.AddMethod(descriptor, "GetWorkshopCollection", function (id, callback)
|
||||
id = tostring(id)
|
||||
|
||||
Networking.RequestPostHTTP("https://api.steampowered.com/ISteamRemoteStorage/GetCollectionDetails/v1/", function (result)
|
||||
local data = json.parse(result)
|
||||
|
||||
if data.response.collectiondetails[1].children == nil then
|
||||
callback()
|
||||
return
|
||||
end
|
||||
|
||||
local workshopItems = {}
|
||||
|
||||
for key, value in pairs(data.response.collectiondetails[1].children) do
|
||||
table.insert(workshopItems, value.publishedfileid)
|
||||
end
|
||||
|
||||
if callback then
|
||||
callback(workshopItems)
|
||||
end
|
||||
end,
|
||||
"collectioncount=1&publishedfileids[0]=" .. id,
|
||||
"application/x-www-form-urlencoded")
|
||||
end)
|
||||
13
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/Utils/String.lua
Normal file
13
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/Utils/String.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
string.startsWith = function(str, start)
|
||||
if type(str) ~= "string" then error(string.format("bad argument #1 to 'startsWith' (string expected, got %s)", type(str)), 2) end
|
||||
if type(start) ~= "string" then error(string.format("bad argument #2 to 'startsWith' (string expected, got %s)", type(start)), 2) end
|
||||
|
||||
return string.sub(str, 1, string.len(start)) == start
|
||||
end
|
||||
|
||||
string.endsWith = function(str, ending)
|
||||
if type(str) ~= "string" then error(string.format("bad argument #1 to 'endsWith' (string expected, got %s)", type(str)), 2) end
|
||||
if type(ending) ~= "string" then error(string.format("bad argument #2 to 'endsWith' (string expected, got %s)", type(ending)), 2) end
|
||||
|
||||
return ending == "" or string.sub(str, -string.len(ending)) == ending
|
||||
end
|
||||
86
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/Utils/Util.lua
Normal file
86
LocalMods/LuaCsForBarotrauma/Lua/DefaultLib/Utils/Util.lua
Normal file
@@ -0,0 +1,86 @@
|
||||
Util = {}
|
||||
|
||||
local itemDictionary = {}
|
||||
local itemGroups = {}
|
||||
|
||||
local function AddItem(item)
|
||||
for _, itemGroup in pairs(itemGroups) do
|
||||
if itemGroup.func(item) then
|
||||
table.insert(itemGroup.items, item)
|
||||
end
|
||||
end
|
||||
|
||||
local id = item.Prefab.Identifier.Value
|
||||
if itemDictionary[id] == nil then
|
||||
itemDictionary[id] = {}
|
||||
end
|
||||
|
||||
table.insert(itemDictionary[id], item)
|
||||
end
|
||||
|
||||
Hook.Add("item.created", "luaSetup.util.itemDictionary", function (item)
|
||||
AddItem(item)
|
||||
end)
|
||||
|
||||
Hook.Add("roundEnd", "luaSetup.util.itemDictionary", function (item)
|
||||
itemDictionary = {}
|
||||
for _, itemGroup in pairs(itemGroups) do
|
||||
itemGroup.items = {}
|
||||
end
|
||||
end)
|
||||
|
||||
for _, item in pairs(Item.ItemList) do
|
||||
AddItem(item)
|
||||
end
|
||||
|
||||
Util.RegisterItemGroup = function(groupName, func)
|
||||
if type(groupName) ~= "string" then
|
||||
error(string.format("bad argument #1 to 'RegisterItemGroup' (string expected, got %s)", type(groupName)), 2)
|
||||
end
|
||||
|
||||
if type(func) ~= "function" then
|
||||
error(string.format("bad argument #2 to 'RegisterItemGroup' (function expected, got %s)", type(func)), 2)
|
||||
end
|
||||
|
||||
local items = {}
|
||||
for _, item in pairs(Item.ItemList) do
|
||||
if func(item) then
|
||||
table.insert(items, item)
|
||||
end
|
||||
end
|
||||
|
||||
itemGroups[groupName] = {
|
||||
func = func,
|
||||
items = items
|
||||
}
|
||||
end
|
||||
|
||||
Util.GetItemGroup = function(groupName)
|
||||
if type(groupName) ~= "string" then
|
||||
error(string.format("bad argument #1 to 'GetItemGroup' (string expected, got %s)", type(groupName)), 2)
|
||||
end
|
||||
|
||||
if not itemGroups[groupName] then
|
||||
error("bad argument #1 to 'GetItemGroup' couldn't find the specified groupName", 2)
|
||||
end
|
||||
|
||||
return itemGroups[groupName].items or {}
|
||||
end
|
||||
|
||||
Util.GetItemsById = function(id)
|
||||
if id == nil then
|
||||
error(string.format("bad argument #1 to 'GetItemsById' (string expected, got %s)", type(id)), 2)
|
||||
end
|
||||
|
||||
return itemDictionary[id]
|
||||
end
|
||||
|
||||
Util.FindClientCharacter = function(character)
|
||||
if CLIENT and Game.IsSingleplayer then return nil end
|
||||
|
||||
for _, client in pairs(Client.ClientList) do
|
||||
if client.Character == character then
|
||||
return client
|
||||
end
|
||||
end
|
||||
end
|
||||
38
LocalMods/LuaCsForBarotrauma/Lua/LuaSetup.lua
Normal file
38
LocalMods/LuaCsForBarotrauma/Lua/LuaSetup.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
LuaSetup = {}
|
||||
|
||||
local path = ...
|
||||
|
||||
local function AddTableToGlobal(tbl)
|
||||
for k, v in pairs(tbl) do
|
||||
_G[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
if SERVER then
|
||||
AddTableToGlobal(dofile(path .. "/Lua/DefaultLib/LibServer.lua"))
|
||||
else
|
||||
AddTableToGlobal(dofile(path .. "/Lua/DefaultLib/LibClient.lua"))
|
||||
end
|
||||
|
||||
AddTableToGlobal(dofile(path .. "/Lua/DefaultLib/LibShared.lua"))
|
||||
|
||||
AddTableToGlobal(dofile(path .. "/Lua/CompatibilityLib.lua"))
|
||||
|
||||
dofile(path .. "/Lua/DefaultHook.lua")
|
||||
|
||||
Descriptors = LuaUserData
|
||||
|
||||
dofile(path .. "/Lua/DefaultLib/Utils/Math.lua")
|
||||
dofile(path .. "/Lua/DefaultLib/Utils/String.lua")
|
||||
dofile(path .. "/Lua/DefaultLib/Utils/Util.lua")
|
||||
dofile(path .. "/Lua/DefaultLib/Utils/SteamApi.lua")
|
||||
|
||||
if not CSActive then
|
||||
for k, v in pairs(debug) do
|
||||
if k ~= "getmetatable" and k ~= "setmetatable" and k ~= "traceback" then
|
||||
debug[k] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
LuaSetup = nil
|
||||
8
LocalMods/LuaCsForBarotrauma/ModConfig.xml
Normal file
8
LocalMods/LuaCsForBarotrauma/ModConfig.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ModConfig>
|
||||
<Lua File="%ModDir%/Lua/LuaSetup.lua" IsAutorun="true" />
|
||||
<Config File="%ModDir%/Config/SettingsShared.xml"/>
|
||||
<Assembly File="%ModDir%/Publicized/BarotraumaCore.dll" IsReferenceModeOnly="true"/>
|
||||
<Assembly File="%ModDir%/Publicized/Barotrauma.dll" Target="Client" IsReferenceModeOnly="true" IsFileRequired="false"/>
|
||||
<Assembly File="%ModDir%/Publicized/DedicatedServer.dll" Target="Server" IsReferenceModeOnly="true"/>
|
||||
</ModConfig>
|
||||
BIN
LocalMods/LuaCsForBarotrauma/Publicized/BarotraumaCore.dll
Normal file
BIN
LocalMods/LuaCsForBarotrauma/Publicized/BarotraumaCore.dll
Normal file
Binary file not shown.
BIN
LocalMods/LuaCsForBarotrauma/Publicized/DedicatedServer.dll
Normal file
BIN
LocalMods/LuaCsForBarotrauma/Publicized/DedicatedServer.dll
Normal file
Binary file not shown.
6
LocalMods/LuaCsForBarotrauma/Style.xml
Normal file
6
LocalMods/LuaCsForBarotrauma/Style.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<style>
|
||||
<SettingsMenuTab.LuaCsSettings color="169,212,187,255" hovercolor="220,220,220,255" selectedcolor="255,255,255,255" pressedcolor="100,100,100,255" disabledcolor="125,125,125,125">
|
||||
<Sprite name="LuaCsSettings" texture="%ModDir%/LuaCsSettingsIcon.png" sourcerect="0,0,64,64" tile="false" maintainaspectratio="true" origin="0.5,0.5"/>
|
||||
</SettingsMenuTab.LuaCsSettings>
|
||||
</style>
|
||||
23
LocalMods/LuaCsForBarotrauma/Texts/English.xml
Normal file
23
LocalMods/LuaCsForBarotrauma/Texts/English.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<infotexts language="English" nowhitespace="false" translatedname="English">
|
||||
<LuaCsForBarotrauma.SettingsMenu.ModControlsButton>Mod Controls Settings</LuaCsForBarotrauma.SettingsMenu.ModControlsButton>
|
||||
<LuaCsForBarotrauma.SettingsMenu.ModGameplayButton>Mod Gameplay Settings</LuaCsForBarotrauma.SettingsMenu.ModGameplayButton>
|
||||
<LuaCsForBarotrauma.SettingsMenu.ResetVisibleSettings>Reset Displayed Settings</LuaCsForBarotrauma.SettingsMenu.ResetVisibleSettings>
|
||||
<LuaCsForBarotrauma.SettingsMenu.ResetPrompt.Title>Reset Visible Settings</LuaCsForBarotrauma.SettingsMenu.ResetPrompt.Title>
|
||||
<LuaCsForBarotrauma.SettingsMenu.ResetPrompt.Message>Are you sure you want to reset the values for currently displayed settings?</LuaCsForBarotrauma.SettingsMenu.ResetPrompt.Message>
|
||||
<LuaCsForBarotrauma.SettingsMenu.ResetPrompt.Yes>Yes</LuaCsForBarotrauma.SettingsMenu.ResetPrompt.Yes>
|
||||
<LuaCsForBarotrauma.SettingsMenu.ResetPrompt.No>No</LuaCsForBarotrauma.SettingsMenu.ResetPrompt.No>
|
||||
<!-- Settings -->
|
||||
<!-- Is Cs Enabled-->
|
||||
<LuaCsForBarotrauma.CsRunPolicy.DisplayName>Are C# Mods Allowed</LuaCsForBarotrauma.CsRunPolicy.DisplayName>
|
||||
<LuaCsForBarotrauma.CsRunPolicy.Tooltip>Should unsandboxed scripts and dlls be allowed to run.</LuaCsForBarotrauma.CsRunPolicy.Tooltip>
|
||||
<LuaCsForBarotrauma.CsRunPolicy.DisplayCategory>General</LuaCsForBarotrauma.CsRunPolicy.DisplayCategory>
|
||||
<!-- Use Caching -->
|
||||
<LuaCsForBarotrauma.UseCaching.DisplayName>Use Pre-Caching</LuaCsForBarotrauma.UseCaching.DisplayName>
|
||||
<LuaCsForBarotrauma.UseCaching.Tooltip>Should mod files be preloaded to speed up loading. Should only be turned off if you have mods that have issues with this.</LuaCsForBarotrauma.UseCaching.Tooltip>
|
||||
<LuaCsForBarotrauma.UseCaching.DisplayCategory>General</LuaCsForBarotrauma.UseCaching.DisplayCategory>
|
||||
<!-- Hide Usernames In Logs-->
|
||||
<LuaCsForBarotrauma.HideUserNamesInLogs.DisplayName>Hide Local OS Account Name In Logs</LuaCsForBarotrauma.HideUserNamesInLogs.DisplayName>
|
||||
<LuaCsForBarotrauma.HideUserNamesInLogs.Tooltip>If true, will replace your OS account name with 'USERNAME' in log files' paths.</LuaCsForBarotrauma.HideUserNamesInLogs.Tooltip>
|
||||
<LuaCsForBarotrauma.HideUserNamesInLogs.DisplayCategory>General</LuaCsForBarotrauma.HideUserNamesInLogs.DisplayCategory>
|
||||
</infotexts>
|
||||
3
LocalMods/LuaCsForBarotrauma/Texts/Portuguese.xml
Normal file
3
LocalMods/LuaCsForBarotrauma/Texts/Portuguese.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<infotexts language="Portuguese" nowhitespace="false" translatedname="Portuguese">
|
||||
</infotexts>
|
||||
6
LocalMods/LuaCsForBarotrauma/filelist.xml
Normal file
6
LocalMods/LuaCsForBarotrauma/filelist.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<contentpackage name="LuaCsForBarotrauma">
|
||||
<Text file="%ModDir%/Texts/English.xml"/>
|
||||
<UIStyle file="%ModDir%/Style.xml" />
|
||||
<!--<Text file="%ModDir%/Texts/Portuguese.xml"/>-->
|
||||
</contentpackage>
|
||||
Reference in New Issue
Block a user