Build 0.18.11.0
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
foreach (Item item in captain.Inventory.AllItemsMod)
|
||||
{
|
||||
if (item.HasTag("identitycard") || item.HasTag("headset")) { continue; }
|
||||
if (item.HasTag("identitycard") || item.HasTag("mobileradio")) { continue; }
|
||||
item.Unequip(captain);
|
||||
captain.Inventory.RemoveItem(item);
|
||||
}
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
foreach (Item item in doctor.Inventory.AllItemsMod)
|
||||
{
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("headset")) { continue; }
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("mobileradio")) { continue; }
|
||||
item.Unequip(doctor);
|
||||
doctor.Inventory.RemoveItem(item);
|
||||
}
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
foreach (Item item in engineer.Inventory.AllItemsMod)
|
||||
{
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("headset")) { continue; }
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("mobileradio")) { continue; }
|
||||
item.Unequip(engineer);
|
||||
engineer.Inventory.RemoveItem(item);
|
||||
}
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
foreach (Item item in mechanic.Inventory.AllItemsMod)
|
||||
{
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("headset")) { continue; }
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("mobileradio")) { continue; }
|
||||
item.Unequip(mechanic);
|
||||
mechanic.Inventory.RemoveItem(item);
|
||||
}
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ namespace Barotrauma.Tutorials
|
||||
|
||||
foreach (Item item in officer.Inventory.AllItemsMod)
|
||||
{
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("headset")) { continue; }
|
||||
if (item.HasTag("clothing") || item.HasTag("identitycard") || item.HasTag("mobileradio")) { continue; }
|
||||
item.Unequip(officer);
|
||||
officer.Inventory.RemoveItem(item);
|
||||
}
|
||||
|
||||
@@ -147,9 +147,10 @@ namespace Barotrauma.Items.Components
|
||||
//because some of the wires connected to the panel may not exist yet
|
||||
long msgStartPos = msg.BitPosition;
|
||||
msg.ReadUInt16(); //user ID
|
||||
foreach (Connection connection in Connections)
|
||||
foreach (Connection _ in Connections)
|
||||
{
|
||||
for (int i = 0; i < connection.MaxWires; i++)
|
||||
uint wireCount = msg.ReadVariableUInt32();
|
||||
for (int i = 0; i < wireCount; i++)
|
||||
{
|
||||
msg.ReadUInt16();
|
||||
}
|
||||
|
||||
@@ -462,6 +462,8 @@ namespace Barotrauma
|
||||
Slider(voiceChat, (0, 500), 26, (v) => $"{Round(v)} ms", unsavedConfig.Audio.VoiceChatCutoffPrevention, (v) => unsavedConfig.Audio.VoiceChatCutoffPrevention = Round(v), TextManager.Get("CutoffPreventionTooltip"));
|
||||
}
|
||||
|
||||
|
||||
private bool inputBoxSelectedThisFrame = false;
|
||||
private void CreateControlsTab()
|
||||
{
|
||||
GUIFrame content = CreateNewContentFrame(Tab.Controls);
|
||||
@@ -510,16 +512,13 @@ namespace Barotrauma
|
||||
bool willBeSelected = !btn.Selected;
|
||||
if (willBeSelected)
|
||||
{
|
||||
inputBoxSelectedThisFrame = true;
|
||||
currentSetter = (v) =>
|
||||
{
|
||||
valueSetter(v);
|
||||
btn.Text = valueNameGetter();
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
currentSetter = null;
|
||||
}
|
||||
|
||||
btn.Selected = willBeSelected;
|
||||
return true;
|
||||
@@ -538,6 +537,12 @@ namespace Barotrauma
|
||||
{
|
||||
if (currentSetter is null) { return; }
|
||||
|
||||
if (PlayerInput.PrimaryMouseButtonClicked() && inputBoxSelectedThisFrame)
|
||||
{
|
||||
inputBoxSelectedThisFrame = false;
|
||||
return;
|
||||
}
|
||||
|
||||
void clearSetter()
|
||||
{
|
||||
currentSetter = null;
|
||||
@@ -551,7 +556,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
var pressedKeys = PlayerInput.GetKeyboardState.GetPressedKeys();
|
||||
if ((pressedKeys?.Any() ?? false))
|
||||
if (pressedKeys?.Any() ?? false)
|
||||
{
|
||||
if (pressedKeys.Contains(Keys.Escape))
|
||||
{
|
||||
@@ -562,7 +567,8 @@ namespace Barotrauma
|
||||
callSetter(pressedKeys.First());
|
||||
}
|
||||
}
|
||||
else if (PlayerInput.PrimaryMouseButtonClicked() && !(GUI.MouseOn is GUIButton))
|
||||
else if (PlayerInput.PrimaryMouseButtonClicked() &&
|
||||
(GUI.MouseOn == null || !(GUI.MouseOn is GUIButton) || GUI.MouseOn.IsChildOf(keyMapList.Content)))
|
||||
{
|
||||
callSetter(MouseButton.PrimaryMouse);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user