v1.2.7.0 (Winter Update hotfix)
This commit is contained in:
@@ -1392,7 +1392,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (!(MapEntityPrefab.Find(null, deconstructItem.ItemIdentifier, showErrorMessages: false) is ItemPrefab targetItem))
|
||||
{
|
||||
ThrowError("Error in item \"" + itemPrefab.Name + "\" - could not find deconstruct item \"" + deconstructItem.ItemIdentifier + "\"!");
|
||||
ThrowErrorLocalized("Error in item \"" + itemPrefab.Name + "\" - could not find deconstruct item \"" + deconstructItem.ItemIdentifier + "\"!");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@ namespace Barotrauma
|
||||
rotation: RotationRad,
|
||||
clr: Color.White,
|
||||
depth: 0,
|
||||
thickness: 2f / Screen.Selected.Cam.Zoom);
|
||||
thickness: Math.Max(2f / Screen.Selected.Cam.Zoom, 1));
|
||||
|
||||
foreach (Rectangle t in Prefab.Triggers)
|
||||
{
|
||||
|
||||
@@ -218,6 +218,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (primaryMouseButtonHeld)
|
||||
{
|
||||
ShowHulls = true;
|
||||
hull.WaterVolume += 100000.0f * deltaTime;
|
||||
hull.networkUpdatePending = true;
|
||||
hull.serverUpdateDelay = 0.5f;
|
||||
|
||||
@@ -499,6 +499,13 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (Hull.HullList.Any(h => h.WaterVolume > 0.0f))
|
||||
{
|
||||
errorMsgs.Add(TextManager.Get("WaterInHullsWarning").Value);
|
||||
warnings.Add(SubEditorScreen.WarningType.WaterInHulls);
|
||||
Hull.ShowHulls = true;
|
||||
}
|
||||
|
||||
if (Info.Type == SubmarineType.Player)
|
||||
{
|
||||
foreach (Item item in Item.ItemList)
|
||||
|
||||
@@ -1597,7 +1597,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError("There was an error initializing the round.", e, true);
|
||||
DebugConsole.ThrowError("There was an error initializing the round.", e, createMessageBox: true);
|
||||
roundInitStatus = RoundInitStatus.Error;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -27,10 +27,9 @@ namespace Barotrauma.Particles
|
||||
get { return maxParticles; }
|
||||
set
|
||||
{
|
||||
if (maxParticles == value || value < 4) return;
|
||||
if (maxParticles == value || value < 4) { return; }
|
||||
|
||||
Particle[] newParticles = new Particle[value];
|
||||
|
||||
for (int i = 0; i < Math.Min(maxParticles, value); i++)
|
||||
{
|
||||
newParticles[i] = particles[i];
|
||||
@@ -39,6 +38,16 @@ namespace Barotrauma.Particles
|
||||
particleCount = Math.Min(particleCount, value);
|
||||
particles = newParticles;
|
||||
maxParticles = value;
|
||||
|
||||
var oldParticlesInCreationOrder = particlesInCreationOrder.ToList();
|
||||
particlesInCreationOrder.Clear();
|
||||
foreach (var particle in oldParticlesInCreationOrder)
|
||||
{
|
||||
if (particles.Contains(particle))
|
||||
{
|
||||
particlesInCreationOrder.AddLast(particle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private Particle[] particles;
|
||||
|
||||
+11
-11
@@ -1219,7 +1219,7 @@ namespace Barotrauma.CharacterEditor
|
||||
{
|
||||
if (RagdollParams.Joints.Any(j => j.Limb1 == fromLimb && j.Limb2 == toLimb))
|
||||
{
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("ExistingJointFound").Replace("[limbid1]", fromLimb.ToString()).Replace("[limbid2]", toLimb.ToString()));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("ExistingJointFound").Replace("[limbid1]", fromLimb.ToString()).Replace("[limbid2]", toLimb.ToString()));
|
||||
return;
|
||||
}
|
||||
if (RagdollParams.MainElement == null)
|
||||
@@ -1239,7 +1239,7 @@ namespace Barotrauma.CharacterEditor
|
||||
var lastJointElement = RagdollParams.MainElement.GetChildElements("joint").LastOrDefault() ?? RagdollParams.MainElement.GetChildElements("limb").LastOrDefault();
|
||||
if (lastJointElement == null)
|
||||
{
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("CantAddJointsNoLimbElements"));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("CantAddJointsNoLimbElements"));
|
||||
return;
|
||||
}
|
||||
lastJointElement.AddAfterSelf(newJointElement);
|
||||
@@ -1271,7 +1271,7 @@ namespace Barotrauma.CharacterEditor
|
||||
{
|
||||
if (character.IsHumanoid)
|
||||
{
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("HumanoidLimbDeletionDisabled"));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("HumanoidLimbDeletionDisabled"));
|
||||
break;
|
||||
}
|
||||
var limb = selectedLimbs[i];
|
||||
@@ -1675,7 +1675,7 @@ namespace Barotrauma.CharacterEditor
|
||||
if (contentPackage == null)
|
||||
{
|
||||
// This should not be possible.
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("NoContentPackageSelected"));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("NoContentPackageSelected"));
|
||||
return false;
|
||||
}
|
||||
if (vanilla != null && contentPackage == vanilla)
|
||||
@@ -2898,7 +2898,7 @@ namespace Barotrauma.CharacterEditor
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("CouldntOpenDirectory").Replace("[folder]", RagdollParams.Folder), e);
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("CouldntOpenDirectory").Replace("[folder]", RagdollParams.Folder), e);
|
||||
}
|
||||
}
|
||||
PopulateListBox();
|
||||
@@ -2932,7 +2932,7 @@ namespace Barotrauma.CharacterEditor
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError(TextManager.Get("DeleteFileError").Replace("[file]", selectedFile), e);
|
||||
DebugConsole.ThrowErrorLocalized(TextManager.Get("DeleteFileError").Replace("[file]", selectedFile), e);
|
||||
}
|
||||
msgBox.Close();
|
||||
listBox.ClearChildren();
|
||||
@@ -3058,7 +3058,7 @@ namespace Barotrauma.CharacterEditor
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("CouldntOpenDirectory").Replace("[folder]", CurrentAnimation.Folder), e);
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("CouldntOpenDirectory").Replace("[folder]", CurrentAnimation.Folder), e);
|
||||
}
|
||||
}
|
||||
PopulateListBox();
|
||||
@@ -3092,7 +3092,7 @@ namespace Barotrauma.CharacterEditor
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError(TextManager.GetWithVariable("DeleteFileError", "[file]", selectedFile), e);
|
||||
DebugConsole.ThrowErrorLocalized(TextManager.GetWithVariable("DeleteFileError", "[file]", selectedFile), e);
|
||||
}
|
||||
msgBox.Close();
|
||||
PopulateListBox();
|
||||
@@ -3129,7 +3129,7 @@ namespace Barotrauma.CharacterEditor
|
||||
humanAnimController.SwimFastParams = HumanSwimFastParams.GetAnimParams(character, fileName);
|
||||
break;
|
||||
default:
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("AnimationTypeNotImplemented").Replace("[type]", selectedType.ToString()));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("AnimationTypeNotImplemented").Replace("[type]", selectedType.ToString()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3150,7 +3150,7 @@ namespace Barotrauma.CharacterEditor
|
||||
character.AnimController.SwimFastParams = FishSwimFastParams.GetAnimParams(character, fileName);
|
||||
break;
|
||||
default:
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("AnimationTypeNotImplemented").Replace("[type]", selectedType.ToString()));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("AnimationTypeNotImplemented").Replace("[type]", selectedType.ToString()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3548,7 +3548,7 @@ namespace Barotrauma.CharacterEditor
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError(GetCharacterEditorTranslation("NoFieldForParameterFound").Replace("[parameter]", name.Value));
|
||||
DebugConsole.ThrowErrorLocalized(GetCharacterEditorTranslation("NoFieldForParameterFound").Replace("[parameter]", name.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,8 @@ namespace Barotrauma
|
||||
WallCount,
|
||||
ItemCount,
|
||||
LightCount,
|
||||
ShadowCastingLightCount
|
||||
ShadowCastingLightCount,
|
||||
WaterInHulls
|
||||
}
|
||||
|
||||
public static Vector2 MouseDragStart = Vector2.Zero;
|
||||
@@ -1319,7 +1320,7 @@ namespace Barotrauma
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError(TextManager.GetWithVariable("DeleteFileError", "[file]", assemblyPrefab.Name), e);
|
||||
DebugConsole.ThrowErrorLocalized(TextManager.GetWithVariable("DeleteFileError", "[file]", assemblyPrefab.Name), e);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -1557,7 +1558,9 @@ namespace Barotrauma
|
||||
if (editorSelectedTime.TryUnwrap(out DateTime selectedTime))
|
||||
{
|
||||
TimeSpan timeInEditor = DateTime.Now - selectedTime;
|
||||
if (timeInEditor.TotalSeconds > Timing.TotalTime)
|
||||
//this is intended for diagnosing why the "x hours in editor" achievement seems to sometimes trigger too soon
|
||||
//require the time in editor to be x1.5 higher to disregard any rounding errors or discrepancies in Datetime.Now and the game's own timekeeping
|
||||
if (timeInEditor.TotalSeconds > Timing.TotalTime * 1.5)
|
||||
{
|
||||
DebugConsole.ThrowErrorAndLogToGA(
|
||||
"SubEditorScreen.DeselectEditorSpecific:InvalidTimeInEditor",
|
||||
@@ -3711,7 +3714,7 @@ namespace Barotrauma
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError(TextManager.GetWithVariable("DeleteFileError", "[file]", sub.FilePath), e);
|
||||
DebugConsole.ThrowErrorLocalized(TextManager.GetWithVariable("DeleteFileError", "[file]", sub.FilePath), e);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -5199,9 +5202,7 @@ namespace Barotrauma
|
||||
SkipInventorySlotUpdate = false;
|
||||
ImageManager.Update((float)deltaTime);
|
||||
|
||||
#if DEBUG
|
||||
Hull.UpdateCheats((float)deltaTime, cam);
|
||||
#endif
|
||||
|
||||
if (GameMain.GraphicsWidth != screenResolution.X || GameMain.GraphicsHeight != screenResolution.Y)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user