Release v0.15.12.0

This commit is contained in:
Joonas Rikkonen
2021-10-27 18:50:57 +03:00
parent bf95e82d80
commit 234fb6bc06
450 changed files with 26042 additions and 10457 deletions
@@ -51,7 +51,7 @@ namespace Barotrauma
{
keyMapping = new KeyOrMouse[Enum.GetNames(typeof(InputType)).Length];
keyMapping[(int)InputType.Run] = new KeyOrMouse(Keys.LeftShift);
keyMapping[(int)InputType.Attack] = new KeyOrMouse(Keys.R);
keyMapping[(int)InputType.Attack] = new KeyOrMouse(Keys.F);
keyMapping[(int)InputType.Crouch] = new KeyOrMouse(Keys.LeftControl);
keyMapping[(int)InputType.Grab] = new KeyOrMouse(Keys.G);
keyMapping[(int)InputType.Health] = new KeyOrMouse(Keys.H);
@@ -173,7 +173,7 @@ namespace Barotrauma
}
}
private void LoadKeyBinds(XElement element)
private void LoadKeyBinds(XElement element, Version gameVersion)
{
foreach (XAttribute attribute in element.Attributes())
{
@@ -183,7 +183,6 @@ namespace Barotrauma
keyMapping[(int)InputType.TakeHalfFromInventorySlot] = new KeyOrMouse(Keys.LeftShift);
keyMapping[(int)InputType.TakeOneFromInventorySlot] = new KeyOrMouse(Keys.LeftControl);
}
if (!Enum.TryParse(attribute.Name.ToString(), true, out InputType inputType)) { continue; }
if (int.TryParse(attribute.Value.ToString(), out int mouseButtonInt))
@@ -199,6 +198,13 @@ namespace Barotrauma
keyMapping[(int)inputType] = new KeyOrMouse(key);
}
}
//v0.15 added creature attacks that can be used with a character capable of speaking (with mudraptor or spineling genes),
//which causes the previous attack keybind R to conflict with the radio keybind
// -> automatically change it to F
if (gameVersion < new Version(0, 15, 0, 0))
{
keyMapping[(int)InputType.Attack] = new KeyOrMouse(Keys.F);
}
}
private void LoadInventoryKeybinds(XElement element)
@@ -223,10 +229,12 @@ namespace Barotrauma
private void LoadControls(XDocument doc)
{
var gameVersion = new Version(doc.Root.GetAttributeString("gameversion", "0.0.0.0"));
XElement keyMapping = doc.Root.Element("keymapping");
if (keyMapping != null)
{
LoadKeyBinds(keyMapping);
LoadKeyBinds(keyMapping, gameVersion);
}
XElement inventoryKeyMapping = doc.Root.Element("inventorykeymapping");
@@ -1518,6 +1526,12 @@ namespace Barotrauma
"Automatic quickstart enabled",
"Will the game automatically move on to Quickstart when the game is launched");
addDebugTickBox(
TestScreenEnabled,
(b) => TestScreenEnabled = b,
"Test screen enabled",
"Will the game automatically move on to a test screen when the game is launched");
addDebugTickBox(
AutomaticCampaignLoadEnabled,
(b) => AutomaticCampaignLoadEnabled = b,
@@ -1831,6 +1845,7 @@ namespace Barotrauma
ic.ParseMsg();
}
}
CharacterHUD.ShouldRecreateHudTexts = true;
}
private void ApplySettings()