-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="TShock" Version="5.1.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.3.32922.545 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ForceChinese", "ForceChinese.csproj", "{339CEF56-D9BE-45A6-9EE0-BE516C42AE8E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{339CEF56-D9BE-45A6-9EE0-BE516C42AE8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{339CEF56-D9BE-45A6-9EE0-BE516C42AE8E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{339CEF56-D9BE-45A6-9EE0-BE516C42AE8E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{339CEF56-D9BE-45A6-9EE0-BE516C42AE8E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {FFAB03F1-2573-439A-9BD4-79BAA60E355E} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
using System.Data; | ||
using Terraria.Localization; | ||
using TerrariaApi.Server; | ||
using TShockAPI; | ||
|
||
|
||
namespace ForceChinese | ||
{ | ||
[ApiVersion(2, 1)] | ||
public class Main : TerrariaPlugin | ||
{ | ||
public override string Author | ||
{ | ||
get | ||
{ | ||
return "Cai"; | ||
} | ||
} | ||
|
||
|
||
public override string Description | ||
{ | ||
get | ||
{ | ||
return "强制使用简体中文作为服务器语言"; | ||
} | ||
} | ||
|
||
public override string Name | ||
{ | ||
get | ||
{ | ||
return "ForceChineseLang(强制简体中文)"; | ||
} | ||
} | ||
|
||
public override Version Version | ||
{ | ||
get | ||
{ | ||
return new Version(1, 2, 0, 0); | ||
} | ||
} | ||
|
||
public Main(Terraria.Main game) : base(game) | ||
{ | ||
//LanguageManager.Instance.SetLanguage(7); | ||
if (Terraria.Program.LaunchParameters.ContainsKey("-lang")) | ||
{ | ||
Terraria.Program.LaunchParameters["-lang"] = "7"; | ||
|
||
} | ||
else | ||
{ | ||
Terraria.Program.LaunchParameters.Add("-lang", "7"); | ||
|
||
} | ||
Console.WriteLine( | ||
"[ForceChineseLang]已强制修改语言选项!\n" + | ||
"*如需使用其他语言请移除此插件!\n" + | ||
"*本插件为免费插件"); | ||
base.Order = int.MinValue; | ||
} | ||
|
||
public override void Initialize() | ||
{ | ||
|
||
} | ||
|
||
|
||
|
||
protected override void Dispose(bool disposing) | ||
{ | ||
if (disposing) | ||
{ | ||
|
||
} | ||
base.Dispose(disposing); | ||
} | ||
} | ||
} |