(b3c71807f) Updated to the latest version of GameAnalytics
This commit is contained in:
@@ -80,8 +80,8 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="GameAnalytics.Mono, Version=1.0.7018.15293, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
@@ -351,12 +351,12 @@
|
|||||||
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
||||||
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets'))" />
|
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" />
|
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" />
|
||||||
|
|||||||
@@ -79,8 +79,8 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="GameAnalytics.Mono, Version=1.0.7018.15293, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
@@ -271,13 +271,12 @@
|
|||||||
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
||||||
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
|
||||||
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets'))" />
|
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets'))" />
|
||||||
|
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" />
|
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.DesktopGL.3.7.1.189\build\MonoGame.Framework.DesktopGL.targets')" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
@@ -288,8 +287,10 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
<!-- Write version number to a "Version.txt" file in the output folder -->
|
<!-- Write version number to a "Version.txt" file in the output folder -->
|
||||||
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
|
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
|
||||||
<Output TaskParameter="Assemblies" ItemName="CurrentAssembly" />
|
<Output TaskParameter="Assemblies" ItemName="CurrentAssembly" />
|
||||||
</GetAssemblyIdentity>
|
</GetAssemblyIdentity>
|
||||||
<Exec Command="echo v%(CurrentAssembly.Version) > $(TargetDir)Version.txt"></Exec>
|
<Exec Command="echo v%(CurrentAssembly.Version) > $(TargetDir)Version.txt">
|
||||||
|
</Exec>
|
||||||
</Target>
|
</Target>
|
||||||
|
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -43,7 +43,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
text = TextManager.GetWithVariable(textTag, "[key]", keyBind);
|
text = TextManager.Get(textTag).Replace("[key]", keyBind);
|
||||||
cachedHudTexts.Add(textTag + keyBind, text);
|
cachedHudTexts.Add(textTag + keyBind, text);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,9 +119,11 @@ namespace Barotrauma
|
|||||||
if ((int)newLevel > (int)prevLevel)
|
if ((int)newLevel > (int)prevLevel)
|
||||||
{
|
{
|
||||||
GUI.AddMessage(
|
GUI.AddMessage(
|
||||||
TextManager.GetWithVariables("SkillIncreased", new string[3] { "[name]", "[skillname]", "[newlevel]" },
|
TextManager.Get("SkillIncreased")
|
||||||
new string[3] { Name, TextManager.Get("SkillName." + skillIdentifier), ((int)newLevel).ToString() },
|
.Replace("[name]", Name)
|
||||||
new bool[3] { false, true, false }), Color.Green);
|
.Replace("[skillname]", TextManager.Get("SkillName." + skillIdentifier))
|
||||||
|
.Replace("[newlevel]", ((int)newLevel).ToString()),
|
||||||
|
Color.Green);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else if (state != InfectionState.Active && Character.Controlled == character)
|
else if (state != InfectionState.Active && Character.Controlled == character)
|
||||||
{
|
{
|
||||||
GUI.AddMessage(TextManager.GetWithVariable("HuskActivate", "[Attack]", GameMain.Config.KeyBind(InputType.Attack).ToString()),
|
GUI.AddMessage(TextManager.Get("HuskActivate").Replace("[Attack]", GameMain.Config.KeyBind(InputType.Attack).ToString()),
|
||||||
Color.Red);
|
Color.Red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (NetworkMember != null) NetworkMember.Disconnect();
|
if (NetworkMember != null) NetworkMember.Disconnect();
|
||||||
SteamManager.ShutDown();
|
SteamManager.ShutDown();
|
||||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnStop();
|
if (GameSettings.SendUserStatistics) GameAnalytics.OnQuit();
|
||||||
base.OnExiting(sender, args);
|
base.OnExiting(sender, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (GameMain.Client != null && interactor == Character.Controlled)
|
if (GameMain.Client != null && interactor == Character.Controlled)
|
||||||
{
|
{
|
||||||
var msgBox = new GUIMessageBox("", TextManager.GetWithVariable("CampaignEnterOutpostPrompt", "[locationname]",
|
var msgBox = new GUIMessageBox("", TextManager.Get("CampaignEnterOutpostPrompt")
|
||||||
Submarine.MainSub.AtStartPosition ? Map.CurrentLocation.Name : Map.SelectedLocation.Name),
|
.Replace("[locationname]", Submarine.MainSub.AtStartPosition ? Map.CurrentLocation.Name : Map.SelectedLocation.Name),
|
||||||
new string[] { TextManager.Get("Yes"), TextManager.Get("No") })
|
new string[] { TextManager.Get("Yes"), TextManager.Get("No") })
|
||||||
{
|
{
|
||||||
UserData = "watchmanprompt"
|
UserData = "watchmanprompt"
|
||||||
|
|||||||
@@ -125,12 +125,12 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else if (leavingSub.AtEndPosition)
|
else if (leavingSub.AtEndPosition)
|
||||||
{
|
{
|
||||||
endRoundButton.Text = ToolBox.LimitString(TextManager.GetWithVariable("EnterLocation", "[locationname]", Map.SelectedLocation.Name), endRoundButton.Font, endRoundButton.Rect.Width - 5);
|
endRoundButton.Text = ToolBox.LimitString(TextManager.Get("EnterLocation").Replace("[locationname]", Map.SelectedLocation.Name), endRoundButton.Font, endRoundButton.Rect.Width - 5);
|
||||||
endRoundButton.Visible = true;
|
endRoundButton.Visible = true;
|
||||||
}
|
}
|
||||||
else if (leavingSub.AtStartPosition)
|
else if (leavingSub.AtStartPosition)
|
||||||
{
|
{
|
||||||
endRoundButton.Text = ToolBox.LimitString(TextManager.GetWithVariable("EnterLocation", "[locationname]", Map.CurrentLocation.Name), endRoundButton.Font, endRoundButton.Rect.Width - 5);
|
endRoundButton.Text = ToolBox.LimitString(TextManager.Get("EnterLocation").Replace("[locationname]", Map.CurrentLocation.Name), endRoundButton.Font, endRoundButton.Rect.Width - 5);
|
||||||
endRoundButton.Visible = true;
|
endRoundButton.Visible = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -189,8 +189,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var msgBox = new GUIMessageBox("", TextManager.GetWithVariable("CampaignEnterOutpostPrompt", "[locationname]",
|
var msgBox = new GUIMessageBox("", TextManager.Get("CampaignEnterOutpostPrompt")
|
||||||
leavingSub.AtStartPosition ? Map.CurrentLocation.Name : Map.SelectedLocation.Name),
|
.Replace("[locationname]", leavingSub.AtStartPosition ? Map.CurrentLocation.Name : Map.SelectedLocation.Name),
|
||||||
new string[] { TextManager.Get("Yes"), TextManager.Get("No") })
|
new string[] { TextManager.Get("Yes"), TextManager.Get("No") })
|
||||||
{
|
{
|
||||||
UserData = "watchmanprompt"
|
UserData = "watchmanprompt"
|
||||||
|
|||||||
+1
-1
@@ -230,7 +230,7 @@ namespace Barotrauma.Tutorials
|
|||||||
} while (!Submarine.MainSub.AtEndPosition || Submarine.MainSub.DockedTo.Count == 0);
|
} while (!Submarine.MainSub.AtEndPosition || Submarine.MainSub.DockedTo.Count == 0);
|
||||||
RemoveCompletedObjective(segments[6]);
|
RemoveCompletedObjective(segments[6]);
|
||||||
yield return new WaitForSeconds(3f, false);
|
yield return new WaitForSeconds(3f, false);
|
||||||
GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.GetWithVariable("Captain.Radio.Complete", "[OUTPOSTNAME]", GameMain.GameSession.EndLocation.Name), ChatMessageType.Radio, null);
|
GameMain.GameSession?.CrewManager.AddSinglePlayerChatMessage(radioSpeakerName, TextManager.Get("Captain.Radio.Complete").Replace("[OUTPOSTNAME]", GameMain.GameSession.EndLocation.Name), ChatMessageType.Radio, null);
|
||||||
SetHighlight(captain_navConsole.Item, false);
|
SetHighlight(captain_navConsole.Item, false);
|
||||||
SetHighlight(captain_sonar.Item, false);
|
SetHighlight(captain_sonar.Item, false);
|
||||||
SetHighlight(captain_statusMonitor, false);
|
SetHighlight(captain_statusMonitor, false);
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.1f), paddedFrame.RectTransform), Mission.Name, font: GUI.LargeFont);
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.1f), paddedFrame.RectTransform), Mission.Name, font: GUI.LargeFont);
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.1f), paddedFrame.RectTransform), TextManager.GetWithVariable("MissionReward", "[reward]", Mission.Reward.ToString()));
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.1f), paddedFrame.RectTransform), TextManager.Get("MissionReward").Replace("[reward]", Mission.Reward.ToString()));
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedFrame.RectTransform), Mission.Description, wrap: true);
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedFrame.RectTransform), Mission.Description, wrap: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,19 @@ namespace Barotrauma
|
|||||||
|
|
||||||
GUIListBox infoTextBox = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.7f), paddedFrame.RectTransform));
|
GUIListBox infoTextBox = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.7f), paddedFrame.RectTransform));
|
||||||
|
|
||||||
|
string summaryText = TextManager.Get(gameOver ? "RoundSummaryGameOver" :
|
||||||
|
(progress ? "RoundSummaryProgress" : "RoundSummaryReturn"));
|
||||||
|
|
||||||
|
int width = 760, height = 500;
|
||||||
|
GUIFrame innerFrame = new GUIFrame(new RectTransform(new Vector2(0.4f, 0.5f), frame.RectTransform, Anchor.Center, minSize: new Point(width, height)));
|
||||||
|
var paddedFrame = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.9f), innerFrame.RectTransform, Anchor.Center))
|
||||||
|
{
|
||||||
|
Stretch = true,
|
||||||
|
RelativeSpacing = 0.03f
|
||||||
|
};
|
||||||
|
|
||||||
|
GUIListBox infoTextBox = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.7f), paddedFrame.RectTransform));
|
||||||
|
|
||||||
string summaryText = TextManager.GetWithVariables(gameOver ? "RoundSummaryGameOver" :
|
string summaryText = TextManager.GetWithVariables(gameOver ? "RoundSummaryGameOver" :
|
||||||
(progress ? "RoundSummaryProgress" : "RoundSummaryReturn"), new string[2] { "[sub]", "[location]" },
|
(progress ? "RoundSummaryProgress" : "RoundSummaryReturn"), new string[2] { "[sub]", "[location]" },
|
||||||
new string[2] { Submarine.MainSub.Name, progress ? GameMain.GameSession.EndLocation.Name : GameMain.GameSession.StartLocation.Name });
|
new string[2] { Submarine.MainSub.Name, progress ? GameMain.GameSession.EndLocation.Name : GameMain.GameSession.StartLocation.Name });
|
||||||
@@ -76,7 +89,7 @@ namespace Barotrauma
|
|||||||
if (GameMain.GameSession.Mission.Completed && singleplayer)
|
if (GameMain.GameSession.Mission.Completed && singleplayer)
|
||||||
{
|
{
|
||||||
var missionReward = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoTextBox.Content.RectTransform),
|
var missionReward = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoTextBox.Content.RectTransform),
|
||||||
TextManager.GetWithVariable("MissionReward", "[reward]", GameMain.GameSession.Mission.Reward.ToString()));
|
TextManager.Get("MissionReward").Replace("[reward]", GameMain.GameSession.Mission.Reward.ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ namespace Barotrauma.Items.Components
|
|||||||
if (child.UserData is Hull hull)
|
if (child.UserData is Hull hull)
|
||||||
{
|
{
|
||||||
if (hull.Submarine == null || !hull.Submarine.IsOutpost) { continue; }
|
if (hull.Submarine == null || !hull.Submarine.IsOutpost) { continue; }
|
||||||
string text = TextManager.GetWithVariable("MiniMapOutpostDockingInfo", "[outpost]", hull.Submarine.Name);
|
string text = TextManager.Get("MiniMapOutpostDockingInfo").Replace("[outpost]", hull.Submarine.Name);
|
||||||
Vector2 textSize = GUI.Font.MeasureString(text);
|
Vector2 textSize = GUI.Font.MeasureString(text);
|
||||||
Vector2 textPos = child.Center;
|
Vector2 textPos = child.Center;
|
||||||
if (textPos.X + textSize.X / 2 > submarineContainer.Rect.Right)
|
if (textPos.X + textSize.X / 2 > submarineContainer.Rect.Right)
|
||||||
|
|||||||
@@ -290,9 +290,9 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
noPowerTip = TextManager.Get("SteeringNoPowerTip");
|
noPowerTip = TextManager.Get("SteeringNoPowerTip");
|
||||||
autoPilotMaintainPosTip = TextManager.Get("SteeringAutoPilotMaintainPosTip");
|
autoPilotMaintainPosTip = TextManager.Get("SteeringAutoPilotMaintainPosTip");
|
||||||
autoPilotLevelStartTip = TextManager.GetWithVariable("SteeringAutoPilotLocationTip", "[locationname]",
|
autoPilotLevelStartTip = TextManager.Get("SteeringAutoPilotLocationTip").Replace("[locationname]",
|
||||||
GameMain.GameSession?.StartLocation == null ? "Start" : GameMain.GameSession.StartLocation.Name);
|
GameMain.GameSession?.StartLocation == null ? "Start" : GameMain.GameSession.StartLocation.Name);
|
||||||
autoPilotLevelEndTip = TextManager.GetWithVariable("SteeringAutoPilotLocationTip", "[locationname]",
|
autoPilotLevelEndTip = TextManager.Get("SteeringAutoPilotLocationTip").Replace("[locationname]",
|
||||||
GameMain.GameSession?.EndLocation == null ? "End" : GameMain.GameSession.EndLocation.Name);
|
GameMain.GameSession?.EndLocation == null ? "End" : GameMain.GameSession.EndLocation.Name);
|
||||||
|
|
||||||
steerArea = new GUICustomComponent(new RectTransform(new Point(viewSize), GuiFrame.RectTransform, Anchor.CenterLeft),
|
steerArea = new GUICustomComponent(new RectTransform(new Point(viewSize), GuiFrame.RectTransform, Anchor.CenterLeft),
|
||||||
|
|||||||
@@ -120,13 +120,13 @@ namespace Barotrauma.Items.Components
|
|||||||
if (uiElements[i] is GUIButton button)
|
if (uiElements[i] is GUIButton button)
|
||||||
{
|
{
|
||||||
button.Text = string.IsNullOrWhiteSpace(customInterfaceElementList[i].Label) ?
|
button.Text = string.IsNullOrWhiteSpace(customInterfaceElementList[i].Label) ?
|
||||||
TextManager.GetWithVariable("connection.signaloutx", "[num]", (i + 1).ToString()) :
|
TextManager.Get("connection.signaloutx").Replace("[num]", (i + 1).ToString()) :
|
||||||
customInterfaceElementList[i].Label;
|
customInterfaceElementList[i].Label;
|
||||||
}
|
}
|
||||||
else if (uiElements[i] is GUITickBox tickBox)
|
else if (uiElements[i] is GUITickBox tickBox)
|
||||||
{
|
{
|
||||||
tickBox.Text = string.IsNullOrWhiteSpace(customInterfaceElementList[i].Label) ?
|
tickBox.Text = string.IsNullOrWhiteSpace(customInterfaceElementList[i].Label) ?
|
||||||
TextManager.GetWithVariable("connection.signaloutx", "[num]", (i + 1).ToString()) :
|
TextManager.Get("connection.signaloutx").Replace("[num]", (i + 1).ToString()) :
|
||||||
customInterfaceElementList[i].Label;
|
customInterfaceElementList[i].Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -721,7 +721,7 @@ namespace Barotrauma
|
|||||||
var shadowSprite = GUI.Style.GetComponentStyle("OuterGlow").Sprites[GUIComponent.ComponentState.None][0];
|
var shadowSprite = GUI.Style.GetComponentStyle("OuterGlow").Sprites[GUIComponent.ComponentState.None][0];
|
||||||
string toolTip = mouseOnHealthInterface ? TextManager.Get("QuickUseAction.UseTreatment") :
|
string toolTip = mouseOnHealthInterface ? TextManager.Get("QuickUseAction.UseTreatment") :
|
||||||
Character.Controlled.FocusedItem != null ?
|
Character.Controlled.FocusedItem != null ?
|
||||||
TextManager.GetWithVariable("PutItemIn", "[itemname]", Character.Controlled.FocusedItem.Name, true) :
|
TextManager.Get("PutItemIn").Replace("[itemname]", Character.Controlled.FocusedItem.Name) :
|
||||||
TextManager.Get("DropItem");
|
TextManager.Get("DropItem");
|
||||||
int textWidth = (int)Math.Max(GUI.Font.MeasureString(draggingItem.Name).X, GUI.SmallFont.MeasureString(toolTip).X);
|
int textWidth = (int)Math.Max(GUI.Font.MeasureString(draggingItem.Name).X, GUI.SmallFont.MeasureString(toolTip).X);
|
||||||
int textSpacing = (int)(15 * GUI.Scale);
|
int textSpacing = (int)(15 * GUI.Scale);
|
||||||
@@ -771,11 +771,11 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (idJob == null)
|
if (idJob == null)
|
||||||
{
|
{
|
||||||
description = TextManager.GetWithVariable("IDCardName", "[name]", idName);
|
description = TextManager.Get("IDCardName").Replace("[name]", idName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
description = TextManager.GetWithVariables("IDCardNameJob", new string[2] { "[name]", "[job]" }, new string[2] { idName, idJob }, new bool[2] { false, true });
|
description = TextManager.Get("IDCardNameJob").Replace("[name]", idName).Replace("[job]", idJob);
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(item.Description))
|
if (!string.IsNullOrEmpty(item.Description))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -754,7 +754,7 @@ namespace Barotrauma
|
|||||||
itemInUseWarning.RectTransform.NonScaledSize = new Point(mergedHUDRect.Width, (int)(50 * GUI.Scale));
|
itemInUseWarning.RectTransform.NonScaledSize = new Point(mergedHUDRect.Width, (int)(50 * GUI.Scale));
|
||||||
if (itemInUseWarning.UserData != otherCharacter)
|
if (itemInUseWarning.UserData != otherCharacter)
|
||||||
{
|
{
|
||||||
itemInUseWarning.Text = TextManager.GetWithVariable("ItemInUse", "[character]", otherCharacter.Name);
|
itemInUseWarning.Text = TextManager.Get("ItemInUse").Replace("[character]", otherCharacter.Name);
|
||||||
itemInUseWarning.UserData = otherCharacter;
|
itemInUseWarning.UserData = otherCharacter;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
CrashMessageBox("A crash report (\"" + filePath + "\") was saved in the root folder of the game and sent to the developers.");
|
CrashMessageBox("A crash report (\"" + filePath + "\") was saved in the root folder of the game and sent to the developers.");
|
||||||
GameAnalytics.AddErrorEvent(EGAErrorSeverity.Critical, crashReport);
|
GameAnalytics.AddErrorEvent(EGAErrorSeverity.Critical, crashReport);
|
||||||
GameAnalytics.OnStop();
|
GameAnalytics.OnQuit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,8 +80,8 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="GameAnalytics.Mono, Version=1.0.6710.29255, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="GameAnalytics.Mono, Version=1.0.7018.15293, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\lib\net45\MonoGame.Framework.dll</HintPath>
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
@@ -307,12 +307,12 @@
|
|||||||
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
||||||
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets'))" />
|
<Error Condition="!Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" />
|
<Import Project="..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets" Condition="Exists('..\..\Libraries\NuGet\MonoGame.Framework.WindowsDX.3.7.1.189\build\MonoGame.Framework.WindowsDX.targets')" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="GameAnalytics.Mono.SDK" version="1.1.12" targetFramework="net45" />
|
<package id="GameAnalytics.Mono.SDK" version="2.1.6" targetFramework="net45" />
|
||||||
<package id="Microsoft.NETCore.Platforms" version="3.0.0-preview.19073.11" targetFramework="net45" />
|
<package id="Microsoft.NETCore.Platforms" version="3.0.0-preview.19073.11" targetFramework="net45" />
|
||||||
<package id="MonoGame.Framework.DesktopGL" version="3.7.1.189" targetFramework="net45" />
|
<package id="MonoGame.Framework.DesktopGL" version="3.7.1.189" targetFramework="net45" />
|
||||||
<package id="MonoGame.Framework.WindowsDX" version="3.7.1.189" targetFramework="net45" />
|
<package id="MonoGame.Framework.WindowsDX" version="3.7.1.189" targetFramework="net45" />
|
||||||
|
|||||||
@@ -149,7 +149,13 @@
|
|||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="GameAnalytics.Mono, Version=1.0.7018.15293, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\lib\net45\System.Data.SQLite.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
@@ -163,12 +169,6 @@
|
|||||||
<Reference Include="NLog">
|
<Reference Include="NLog">
|
||||||
<HintPath>..\..\Libraries\NuGet\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GameAnalytics.Mono">
|
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\GameAnalytics.Mono.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite">
|
|
||||||
<HintPath>..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\lib\net45\System.Data.SQLite.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="RestSharp">
|
<Reference Include="RestSharp">
|
||||||
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
|
<HintPath>..\..\Libraries\NuGet\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -293,5 +293,11 @@
|
|||||||
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedCode.projitems" Label="Shared" />
|
||||||
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
<Import Project="..\BarotraumaShared\SharedContent.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.1.1.12\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
<Import Project="..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets" Condition="Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\Libraries\NuGet\GameAnalytics.Mono.SDK.2.1.6\build\net45\GameAnalytics.Mono.SDK.targets'))" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -298,7 +298,7 @@ namespace Barotrauma
|
|||||||
CloseServer();
|
CloseServer();
|
||||||
|
|
||||||
SteamManager.ShutDown();
|
SteamManager.ShutDown();
|
||||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnStop();
|
if (GameSettings.SendUserStatistics) GameAnalytics.OnQuit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ResetFrameTime()
|
public static void ResetFrameTime()
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public void Greet(GameServer server, string codeWords, string codeResponse)
|
public void Greet(GameServer server, string codeWords, string codeResponse)
|
||||||
{
|
{
|
||||||
string greetingMessage = TextManager.GetWithVariable("TraitorStartMessage", "[targetname]", TargetCharacter.Name);
|
string greetingMessage = TextManager.Get("TraitorStartMessage").Replace("[targetname]", TargetCharacter.Name);
|
||||||
string moreAgentsMessage = TextManager.GetWithVariables("TraitorMoreAgentsMessage",
|
string moreAgentsMessage = TextManager.Get("TraitorMoreAgentsMessage")
|
||||||
new string[2] { "[codewords]", "[coderesponse]" }, new string[2] { codeWords, codeResponse });
|
.Replace("[codewords]", codeWords)
|
||||||
|
.Replace("[coderesponse]", codeResponse);
|
||||||
|
|
||||||
var greetingChatMsg = ChatMessage.Create(null, greetingMessage, ChatMessageType.Server, null);
|
var greetingChatMsg = ChatMessage.Create(null, greetingMessage, ChatMessageType.Server, null);
|
||||||
var moreAgentsChatMsg = ChatMessage.Create(null, moreAgentsMessage, ChatMessageType.Server, null);
|
var moreAgentsChatMsg = ChatMessage.Create(null, moreAgentsMessage, ChatMessageType.Server, null);
|
||||||
@@ -37,7 +38,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
var ownerMsg = ChatMessage.Create(
|
var ownerMsg = ChatMessage.Create(
|
||||||
null,//TextManager.Get("NewTraitor"),
|
null,//TextManager.Get("NewTraitor"),
|
||||||
TextManager.GetWithVariables("TraitorStartMessageServer", new string[2] { "[targetname]", "[traitorname]" }, new string[2] { TargetCharacter.Name, Character.Name }),
|
TextManager.Get("TraitorStartMessageServer").Replace("[targetname]", TargetCharacter.Name).Replace("[traitorname]", Character.Name),
|
||||||
ChatMessageType.MessageBox,
|
ChatMessageType.MessageBox,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ namespace Barotrauma.Networking
|
|||||||
{
|
{
|
||||||
if (endRoundTimer <= 0.0f)
|
if (endRoundTimer <= 0.0f)
|
||||||
{
|
{
|
||||||
SendChatMessage(TextManager.GetWithVariable("CrewDeadNoRespawns", "[time]", "60"), ChatMessageType.Server);
|
SendChatMessage(TextManager.Get("CrewDeadNoRespawns").Replace("[time]", "60"), ChatMessageType.Server);
|
||||||
}
|
}
|
||||||
endRoundTimer += deltaTime;
|
endRoundTimer += deltaTime;
|
||||||
}
|
}
|
||||||
@@ -728,7 +728,7 @@ namespace Barotrauma.Networking
|
|||||||
if (matchingSub == null)
|
if (matchingSub == null)
|
||||||
{
|
{
|
||||||
SendDirectChatMessage(
|
SendDirectChatMessage(
|
||||||
TextManager.GetWithVariable("CampaignStartFailedSubNotFound", "[subname]", subName),
|
TextManager.Get("CampaignStartFailedSubNotFound").Replace("[subname]", subName),
|
||||||
connectedClient, ChatMessageType.MessageBox);
|
connectedClient, ChatMessageType.MessageBox);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Barotrauma
|
|||||||
inputThread.Start();
|
inputThread.Start();
|
||||||
game.Run();
|
game.Run();
|
||||||
inputThread.Abort(); inputThread.Join();
|
inputThread.Abort(); inputThread.Join();
|
||||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnStop();
|
if (GameSettings.SendUserStatistics) GameAnalytics.OnQuit();
|
||||||
SteamManager.ShutDown();
|
SteamManager.ShutDown();
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ namespace Barotrauma
|
|||||||
if (GameSettings.SendUserStatistics)
|
if (GameSettings.SendUserStatistics)
|
||||||
{
|
{
|
||||||
GameAnalytics.AddErrorEvent(EGAErrorSeverity.Error, crashReport);
|
GameAnalytics.AddErrorEvent(EGAErrorSeverity.Error, crashReport);
|
||||||
GameAnalytics.OnStop();
|
GameAnalytics.OnQuit();
|
||||||
Console.Write("A crash report (\"crashreport.log\") was saved in the root folder of the game and sent to the developers.");
|
Console.Write("A crash report (\"crashreport.log\") was saved in the root folder of the game and sent to the developers.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="GameAnalytics.Mono.SDK" version="1.1.12" targetFramework="net45" />
|
<package id="GameAnalytics.Mono.SDK" version="2.1.6" targetFramework="net45" />
|
||||||
<package id="NLog" version="4.3.8" targetFramework="net45" />
|
<package id="NLog" version="4.3.8" targetFramework="net45" />
|
||||||
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
|
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -382,7 +382,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (Character.PressureTimer > 50.0f && Character.CurrentHull != null)
|
if (Character.PressureTimer > 50.0f && Character.CurrentHull != null)
|
||||||
{
|
{
|
||||||
Character.Speak(TextManager.GetWithVariable("DialogPressure", "[roomname]", Character.CurrentHull.DisplayName, true), null, 0, "pressure", 30.0f);
|
Character.Speak(TextManager.Get("DialogPressure").Replace("[roomname]", Character.CurrentHull.DisplayName), null, 0, "pressure", 30.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -111,7 +111,7 @@ namespace Barotrauma
|
|||||||
extinguisher.Use(deltaTime, character);
|
extinguisher.Use(deltaTime, character);
|
||||||
if (!targetHull.FireSources.Contains(fs))
|
if (!targetHull.FireSources.Contains(fs))
|
||||||
{
|
{
|
||||||
character.Speak(TextManager.GetWithVariable("DialogPutOutFire", "[roomname]", targetHull.Name, true), null, 0, "putoutfire", 10.0f);
|
character.Speak(TextManager.Get("DialogPutOutFire").Replace("[roomname]", targetHull.Name), null, 0, "putoutfire", 10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ namespace Barotrauma
|
|||||||
ItemComponent target = useController ? controller : component;
|
ItemComponent target = useController ? controller : component;
|
||||||
if (useController && controller == null)
|
if (useController && controller == null)
|
||||||
{
|
{
|
||||||
character.Speak(TextManager.GetWithVariable("DialogCantFindController", "[item]", component.Item.Name, true), null, 2.0f, "cantfindcontroller", 30.0f);
|
character.Speak(TextManager.Get("DialogCantFindController").Replace("[item]", component.Item.Name), null, 2.0f, "cantfindcontroller", 30.0f);
|
||||||
abandon = true;
|
abandon = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -45,7 +45,7 @@ namespace Barotrauma
|
|||||||
bool isCompleted = Item.IsFullCondition;
|
bool isCompleted = Item.IsFullCondition;
|
||||||
if (isCompleted)
|
if (isCompleted)
|
||||||
{
|
{
|
||||||
character?.Speak(TextManager.GetWithVariable("DialogItemRepaired", "[itemname]", Item.Name, true), null, 0.0f, "itemrepaired", 10.0f);
|
character?.Speak(TextManager.Get("DialogItemRepaired").Replace("[itemname]", Item.Name), null, 0.0f, "itemrepaired", 10.0f);
|
||||||
}
|
}
|
||||||
return isCompleted;
|
return isCompleted;
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
// If the current condition is less than the previous condition, we can't complete the task, so let's abandon it. The item is probably deteriorating at a greater speed than we can repair it.
|
// If the current condition is less than the previous condition, we can't complete the task, so let's abandon it. The item is probably deteriorating at a greater speed than we can repair it.
|
||||||
abandon = true;
|
abandon = true;
|
||||||
character?.Speak(TextManager.GetWithVariable("DialogCannotRepair", "[itemname]", Item.Name, true), null, 0.0f, "cannotrepair", 10.0f);
|
character?.Speak(TextManager.Get("DialogCannotRepair").Replace("[itemname]", Item.Name), null, 0.0f, "cannotrepair", 10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repairable.CurrentFixer = abandon && repairable.CurrentFixer == character ? null : character;
|
repairable.CurrentFixer = abandon && repairable.CurrentFixer == character ? null : character;
|
||||||
@@ -162,7 +162,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
return objective;
|
return objective;
|
||||||
},
|
},
|
||||||
onAbandon: () => character.Speak(TextManager.GetWithVariable("DialogCannotRepair", "[itemname]", Item.Name, true), null, 0.0f, "cannotrepair", 10.0f));
|
onAbandon: () => character.Speak(TextManager.Get("DialogCannotRepair").Replace("[itemname]", Item.Name), null, 0.0f, "cannotrepair", 10.0f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,10 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (character.SelectedCharacter != targetCharacter)
|
if (character.SelectedCharacter != targetCharacter)
|
||||||
{
|
{
|
||||||
character.Speak(TextManager.GetWithVariables("DialogFoundUnconsciousTarget", new string[2] { "[targetname]", "[roomname]" },
|
character.Speak(TextManager.Get("DialogFoundUnconsciousTarget")
|
||||||
new string[2] { targetCharacter.Name, targetCharacter.CurrentHull.DisplayName }, new bool[2] { false, true }),
|
.Replace("[targetname]", targetCharacter.Name).Replace("[roomname]", targetCharacter.CurrentHull.DisplayName),
|
||||||
null, 1.0f, "foundunconscioustarget" + targetCharacter.Name, 60.0f);
|
null, 1.0f,
|
||||||
|
"foundunconscioustarget" + targetCharacter.Name, 60.0f);
|
||||||
|
|
||||||
// Go to the target and select it
|
// Go to the target and select it
|
||||||
if (!character.CanInteractWith(targetCharacter))
|
if (!character.CanInteractWith(targetCharacter))
|
||||||
@@ -113,9 +114,10 @@ namespace Barotrauma
|
|||||||
// We can start applying treatment
|
// We can start applying treatment
|
||||||
if (character.SelectedCharacter != targetCharacter)
|
if (character.SelectedCharacter != targetCharacter)
|
||||||
{
|
{
|
||||||
character.Speak(TextManager.GetWithVariables("DialogFoundWoundedTarget", new string[2] { "[targetname]", "[roomname]" },
|
character.Speak(TextManager.Get("DialogFoundWoundedTarget")
|
||||||
new string[2] { targetCharacter.Name, targetCharacter.CurrentHull.DisplayName }, new bool[2] { false, true }),
|
.Replace("[targetname]", targetCharacter.Name).Replace("[roomname]", targetCharacter.CurrentHull.DisplayName),
|
||||||
null, 1.0f, "foundwoundedtarget" + targetCharacter.Name, 60.0f);
|
null, 1.0f,
|
||||||
|
"foundwoundedtarget" + targetCharacter.Name, 60.0f);
|
||||||
|
|
||||||
character.SelectCharacter(targetCharacter);
|
character.SelectCharacter(targetCharacter);
|
||||||
}
|
}
|
||||||
@@ -189,10 +191,9 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
itemListStr = string.Join(" or ", string.Join(", ", itemNameList.Take(itemNameList.Count - 1)), itemNameList.Last());
|
itemListStr = string.Join(" or ", string.Join(", ", itemNameList.Take(itemNameList.Count - 1)), itemNameList.Last());
|
||||||
}
|
}
|
||||||
|
character.Speak(TextManager.Get("DialogListRequiredTreatments")
|
||||||
|
.Replace("[targetname]", targetCharacter.Name)
|
||||||
character.Speak(TextManager.GetWithVariables("DialogListRequiredTreatments", new string[2] { "[targetname]", "[treatmentlist]" },
|
.Replace("[treatmentlist]", itemListStr),
|
||||||
new string[2] { targetCharacter.Name, itemListStr }, new bool[2] { false, true }),
|
|
||||||
null, 2.0f, "listrequiredtreatments" + targetCharacter.Name, 60.0f);
|
null, 2.0f, "listrequiredtreatments" + targetCharacter.Name, 60.0f);
|
||||||
}
|
}
|
||||||
character.DeselectCharacter();
|
character.DeselectCharacter();
|
||||||
@@ -235,7 +236,7 @@ namespace Barotrauma
|
|||||||
bool isCompleted = targetCharacter.Bleeding <= 0 && targetCharacter.Vitality / targetCharacter.MaxVitality > AIObjectiveRescueAll.GetVitalityThreshold(objectiveManager);
|
bool isCompleted = targetCharacter.Bleeding <= 0 && targetCharacter.Vitality / targetCharacter.MaxVitality > AIObjectiveRescueAll.GetVitalityThreshold(objectiveManager);
|
||||||
if (isCompleted)
|
if (isCompleted)
|
||||||
{
|
{
|
||||||
character.Speak(TextManager.GetWithVariable("DialogTargetHealed", "[targetname]", targetCharacter.Name),
|
character.Speak(TextManager.Get("DialogTargetHealed").Replace("[targetname]", targetCharacter.Name),
|
||||||
null, 1.0f, "targethealed" + targetCharacter.Name, 60.0f);
|
null, 1.0f, "targethealed" + targetCharacter.Name, 60.0f);
|
||||||
}
|
}
|
||||||
return isCompleted || targetCharacter.IsDead;
|
return isCompleted || targetCharacter.IsDead;
|
||||||
|
|||||||
@@ -171,12 +171,12 @@ namespace Barotrauma
|
|||||||
string messageTag = (givingOrderToSelf && !TargetAllCharacters ? "OrderDialogSelf." : "OrderDialog.") + AITag;
|
string messageTag = (givingOrderToSelf && !TargetAllCharacters ? "OrderDialogSelf." : "OrderDialog.") + AITag;
|
||||||
if (!string.IsNullOrEmpty(orderOption)) messageTag += "." + orderOption;
|
if (!string.IsNullOrEmpty(orderOption)) messageTag += "." + orderOption;
|
||||||
|
|
||||||
if (targetCharacterName == null) targetCharacterName = "";
|
string msg = TextManager.Get(messageTag, true);
|
||||||
if (targetRoomName == null) targetRoomName = "";
|
|
||||||
string msg = TextManager.GetWithVariables(messageTag, new string[2] { "[name]", "[roomname]" }, new string[2] { targetCharacterName, targetRoomName }, true);
|
|
||||||
if (msg == null) return "";
|
if (msg == null) return "";
|
||||||
|
|
||||||
return msg;
|
if (targetCharacterName == null) targetCharacterName = "";
|
||||||
|
if (targetRoomName == null) targetRoomName = "";
|
||||||
|
return msg.Replace("[name]", targetCharacterName).Replace("[roomname]", targetRoomName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
new GUIMessageBox("", TextManager.GetWithVariable("CargoSpawnNotification", "[roomname]", cargoRoom.DisplayName, true));
|
new GUIMessageBox("", TextManager.Get("CargoSpawnNotification").Replace("[roomname]", cargoRoom.DisplayName));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Dictionary<ItemContainer, int> availableContainers = new Dictionary<ItemContainer, int>();
|
Dictionary<ItemContainer, int> availableContainers = new Dictionary<ItemContainer, int>();
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ namespace Barotrauma
|
|||||||
character.TeamID = Character.TeamType.FriendlyNPC;
|
character.TeamID = Character.TeamType.FriendlyNPC;
|
||||||
character.SetCustomInteract(
|
character.SetCustomInteract(
|
||||||
WatchmanInteract,
|
WatchmanInteract,
|
||||||
hudText: TextManager.GetWithVariable("TalkHint", "[key]", GameMain.Config.KeyBind(InputType.Select).ToString()));
|
hudText: TextManager.Get("TalkHint").Replace("[key]", GameMain.Config.KeyBind(InputType.Select).ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void WatchmanInteract(Character watchman, Character interactor);
|
protected abstract void WatchmanInteract(Character watchman, Character interactor);
|
||||||
|
|||||||
@@ -396,12 +396,11 @@ namespace Barotrauma.Items.Components
|
|||||||
sinTime = 0;
|
sinTime = 0;
|
||||||
if (!leak.FlowTargetHull.ConnectedGaps.Any(g => !g.IsRoomToRoom && g.Open > 0.0f))
|
if (!leak.FlowTargetHull.ConnectedGaps.Any(g => !g.IsRoomToRoom && g.Open > 0.0f))
|
||||||
{
|
{
|
||||||
|
character.Speak(TextManager.Get("DialogLeaksFixed").Replace("[roomname]", leak.FlowTargetHull.DisplayName), null, 0.0f, "leaksfixed", 10.0f);
|
||||||
character.Speak(TextManager.GetWithVariable("DialogLeaksFixed", "[roomname]", leak.FlowTargetHull.DisplayName, true), null, 0.0f, "leaksfixed", 10.0f);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
character.Speak(TextManager.GetWithVariable("DialogLeakFixed", "[roomname]", leak.FlowTargetHull.DisplayName, true), null, 0.0f, "leakfixed", 10.0f);
|
character.Speak(TextManager.Get("DialogLeakFixed").Replace("[roomname]", leak.FlowTargetHull.DisplayName), null, 0.0f, "leakfixed", 10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -219,10 +219,8 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
dialogTag = "DialogSonarTargetLarge";
|
dialogTag = "DialogSonarTargetLarge";
|
||||||
}
|
}
|
||||||
|
character.Speak(TextManager.Get(dialogTag).Replace("[direction]", targetGroup.Key).Replace("[count]", targetGroup.Value.Count.ToString()),
|
||||||
character.Speak(TextManager.GetWithVariables(dialogTag, new string[2] { "[direction]", "[count]" },
|
null, 0, "sonartarget" + targetGroup.Value[0].ID, 30);
|
||||||
new string[2] { targetGroup.Key.ToString(), targetGroup.Value.Count.ToString() },
|
|
||||||
new bool[2] { true, false }), null, 0, "sonartarget" + targetGroup.Value[0].ID, 30);
|
|
||||||
|
|
||||||
//prevent the character from reporting other targets in the group
|
//prevent the character from reporting other targets in the group
|
||||||
for (int i = 1; i < targetGroup.Value.Count; i++)
|
for (int i = 1; i < targetGroup.Value.Count; i++)
|
||||||
@@ -241,7 +239,7 @@ namespace Barotrauma.Items.Components
|
|||||||
int clockDir = (int)Math.Round((angle / MathHelper.TwoPi) * 12);
|
int clockDir = (int)Math.Round((angle / MathHelper.TwoPi) * 12);
|
||||||
if (clockDir == 0) clockDir = 12;
|
if (clockDir == 0) clockDir = 12;
|
||||||
|
|
||||||
return TextManager.GetWithVariable("roomname.subdiroclock", "[dir]", clockDir.ToString());
|
return TextManager.Get("roomname.subdiroclock").Replace("[dir]", clockDir.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector2 GetTransducerPos()
|
private Vector2 GetTransducerPos()
|
||||||
|
|||||||
@@ -244,10 +244,9 @@ namespace Barotrauma.Items.Components
|
|||||||
#if CLIENT
|
#if CLIENT
|
||||||
rechargeSpeedSlider.BarScroll = RechargeSpeed / Math.Max(maxRechargeSpeed, 1.0f);
|
rechargeSpeedSlider.BarScroll = RechargeSpeed / Math.Max(maxRechargeSpeed, 1.0f);
|
||||||
#endif
|
#endif
|
||||||
|
character.Speak(TextManager.Get("DialogChargeBatteries")
|
||||||
character.Speak(TextManager.GetWithVariables("DialogChargeBatteries", new string[2] { "[itemname]", "[rate]" },
|
.Replace("[itemname]", item.Name)
|
||||||
new string[2] { item.Name, ((int)(rechargeSpeed / maxRechargeSpeed * 100.0f)).ToString() },
|
.Replace("[rate]", ((int)(rechargeSpeed / maxRechargeSpeed * 100.0f)).ToString()), null, 1.0f, "chargebattery", 10.0f);
|
||||||
new bool[2] { true, false }), null, 1.0f, "chargebattery", 10.0f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -261,9 +260,9 @@ namespace Barotrauma.Items.Components
|
|||||||
#if CLIENT
|
#if CLIENT
|
||||||
rechargeSpeedSlider.BarScroll = RechargeSpeed / Math.Max(maxRechargeSpeed, 1.0f);
|
rechargeSpeedSlider.BarScroll = RechargeSpeed / Math.Max(maxRechargeSpeed, 1.0f);
|
||||||
#endif
|
#endif
|
||||||
character.Speak(TextManager.GetWithVariables("DialogStopChargingBatteries", new string[2] { "[itemname]", "[rate]" },
|
character.Speak(TextManager.Get("DialogStopChargingBatteries")
|
||||||
new string[2] { item.Name, ((int)(rechargeSpeed / maxRechargeSpeed * 100.0f)).ToString() },
|
.Replace("[itemname]", item.Name)
|
||||||
new bool[2] { true, false }), null, 1.0f, "chargebattery", 10.0f);
|
.Replace("[rate]", ((int)(rechargeSpeed / maxRechargeSpeed * 100.0f)).ToString()), null, 1.0f, "chargebattery", 10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
var containShellObjective = new AIObjectiveContainItem(character, container.ContainableItems[0].Identifiers[0], container, objective.objectiveManager);
|
var containShellObjective = new AIObjectiveContainItem(character, container.ContainableItems[0].Identifiers[0], container, objective.objectiveManager);
|
||||||
character?.Speak(TextManager.GetWithVariable("DialogLoadTurret", "[itemname]", item.Name, true), null, 0.0f, "loadturret", 30.0f);
|
character?.Speak(TextManager.Get("DialogLoadTurret").Replace("[itemname]", item.Name), null, 0.0f, "loadturret", 30.0f);
|
||||||
containShellObjective.targetItemCount = usableProjectileCount + 1;
|
containShellObjective.targetItemCount = usableProjectileCount + 1;
|
||||||
containShellObjective.ignoredContainerIdentifiers = new string[] { containerItem.prefab.Identifier };
|
containShellObjective.ignoredContainerIdentifiers = new string[] { containerItem.prefab.Identifier };
|
||||||
objective.AddSubObjective(containShellObjective);
|
objective.AddSubObjective(containShellObjective);
|
||||||
@@ -506,7 +506,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
if (objective.Option.ToLowerInvariant() == "fireatwill")
|
if (objective.Option.ToLowerInvariant() == "fireatwill")
|
||||||
{
|
{
|
||||||
character?.Speak(TextManager.GetWithVariable("DialogFireTurret", "[itemname]", item.Name, true), null, 0.0f, "fireturret", 5.0f);
|
character?.Speak(TextManager.Get("DialogFireTurret").Replace("[itemname]", item.Name), null, 0.0f, "fireturret", 5.0f);
|
||||||
character.SetInput(InputType.Shoot, true, true);
|
character.SetInput(InputType.Shoot, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1539,8 +1539,9 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (requiredSkill != null)
|
if (requiredSkill != null)
|
||||||
{
|
{
|
||||||
GUI.AddMessage(TextManager.GetWithVariables("InsufficientSkills", new string[2] { "[requiredskill]", "[requiredlevel]" },
|
GUI.AddMessage(TextManager.Get("InsufficientSkills")
|
||||||
new string[2] { TextManager.Get("SkillName." + requiredSkill.Identifier), ((int)requiredSkill.Level).ToString() }, new bool[2] { true, false }), Color.Red);
|
.Replace("[requiredskill]", TextManager.Get("SkillName." + requiredSkill.Identifier))
|
||||||
|
.Replace("[requiredlevel]", ((int)requiredSkill.Level).ToString()), Color.Red);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -176,107 +176,6 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetWithVariables(string textTag, string[] variableTags, string[] variableValues, bool[] formatCapitals = null, bool returnNull = false, string fallBackTag = null)
|
|
||||||
{
|
|
||||||
string text = Get(textTag, returnNull, fallBackTag);
|
|
||||||
|
|
||||||
if (text == null || text.Length == 0 || variableTags.Length != variableValues.Length)
|
|
||||||
{
|
|
||||||
#if DEBUG
|
|
||||||
if (variableTags.Length != variableValues.Length)
|
|
||||||
{
|
|
||||||
DebugConsole.ThrowError("variableTags.Length and variableValues.Length do not match for \"" + textTag + "\".");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (formatCapitals != null && formatCapitals.Length != variableTags.Length)
|
|
||||||
{
|
|
||||||
DebugConsole.ThrowError("variableTags.Length and formatCapitals.Length do not match for \"" + textTag + "\".");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (returnNull)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return textTag;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (formatCapitals != null && !GameMain.Config.Language.Contains("Chinese"))
|
|
||||||
{
|
|
||||||
for (int i = 0; i < variableTags.Length; i++)
|
|
||||||
{
|
|
||||||
if (formatCapitals[i])
|
|
||||||
{
|
|
||||||
variableValues[i] = HandleCapitalization(text, variableTags[i], variableValues[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < variableTags.Length; i++)
|
|
||||||
{
|
|
||||||
text = text.Replace(variableTags[i], variableValues[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetWithVariable(string textTag, string variableTag, string variableValue, bool formatCapitals = false, bool returnNull = false, string fallBackTag = null)
|
|
||||||
{
|
|
||||||
string text = Get(textTag, returnNull, fallBackTag);
|
|
||||||
|
|
||||||
if (text == null || text.Length == 0)
|
|
||||||
{
|
|
||||||
if (returnNull)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return textTag;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (formatCapitals && !GameMain.Config.Language.Contains("Chinese"))
|
|
||||||
{
|
|
||||||
variableValue = HandleCapitalization(text, variableTag, variableValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
return text.Replace(variableTag, variableValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string HandleCapitalization(string text, string variableTag, string variableValue)
|
|
||||||
{
|
|
||||||
int index = text.IndexOf(variableTag) - 1;
|
|
||||||
if (index == -1)
|
|
||||||
{
|
|
||||||
return variableValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = index; i >= 0; i--)
|
|
||||||
{
|
|
||||||
if (text[i] == ' ')
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (text[i] != '.')
|
|
||||||
{
|
|
||||||
variableValue = variableValue.ToLower();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
variableValue = variableValue.First().ToString().ToUpper() + variableValue.Substring(1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return variableValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string ParseInputTypes(string text)
|
public static string ParseInputTypes(string text)
|
||||||
{
|
{
|
||||||
foreach (InputType inputType in Enum.GetValues(typeof(InputType)))
|
foreach (InputType inputType in Enum.GetValues(typeof(InputType)))
|
||||||
|
|||||||
Reference in New Issue
Block a user