This commit is contained in:
moonheart08 2020-10-08 22:00:24 -05:00
parent 5bec4a5921
commit 50c6173d91
14 changed files with 261 additions and 8 deletions

View file

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using Robust.Shared.ContentPack;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Localization.Macros;
using Robust.Shared.Prototypes;
namespace Content.Shared
{
public class EntryPoint: GameShared
{
// See line 25. Controls the default game culture and language.
// Robust calls this culture, but you might find it more fitting to call it the game
// language. Robust doesn't support changing this mid-game. Load your config file early
// if you want that.
private const string Culture = "en-US";
public override void PreInit()
{
Console.WriteLine("BLUH");
IoCManager.InjectDependencies(this);
var textMacroFactory = IoCManager.Resolve<ITextMacroFactory>();
textMacroFactory.DoAutoRegistrations();
// Default to en-US.
// DEVNOTE: If you want your game to be multiregional at runtime, you'll need to
// do something more complicated here.
Loc.LoadCulture(new CultureInfo(Culture));
// TODO: Document what else you might want to put here
}
public override void Init()
{
// TODO: Document what you put here
}
public override void PostInit()
{
base.PostInit();
// DEVNOTE: You might want to put special init handlers for, say, tiles here.
// TODO: Document what else you might want to put here
}
}
}

View file

@ -0,0 +1,21 @@
using Robust.Shared;
using Robust.Shared.Configuration;
namespace Content.Shared
{
// DEVNOTE: This is the same as SS14's CCVars. Except it's not named CCVars as that name is
// hot garbage.
[CVarDefs]
public sealed class GameConfigVars: CVars
{
// Declare persistent game config variables here.
// ```
// public static readonly CVarDef<SerializableType>
// VariableName = CVarDef.Create("namespace.varname", default_value, CVar.TYPE | CVar.OTHERTYPE)
// ```
// This is a good spot to store your database config, among other things.
public static readonly CVarDef<bool>
DummyCVarForTemplate = CVarDef.Create("dummy.whydoineedthis", true, CVar.ARCHIVE);
}
}

15
Content.Shared/app.config Normal file
View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.86.0.518" newVersion="0.86.0.518" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>