Skip to content

Commit

Permalink
Fix for game changes for PS beta.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwindalmir committed May 12, 2023
1 parent 1cc954f commit b2a8211
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions SEWorkshopTool/SpaceGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Sandbox;
using Sandbox.Engine.Networking;
using Sandbox.Game;
using Sandbox.Game.Multiplayer;
using System;
using System.Collections.Generic;
using System.Configuration;
Expand Down Expand Up @@ -37,7 +38,7 @@ protected override bool SetupBasicGameInfo()

var appDataPath = m_startup.GetAppDataPath();
VRage.Platform.Windows.MyVRageWindows.Init(MyPerGameSettings.BasicGameInfo.ApplicationName, MySandboxGame.Log, appDataPath, false);
MyInitializer.InvokeBeforeRun(AppId, MyPerGameSettings.BasicGameInfo.ApplicationName + "ModTool", MyVRage.Platform.System.GetAppDataPath());
MyInitializer.InvokeBeforeRun(AppId, MyPerGameSettings.BasicGameInfo.ApplicationName + "ModTool", MyVRage.Platform.System.GetRootPath(), MyVRage.Platform.System.GetAppDataPath());
MyRenderProxy.Initialize((IMyRender)new MyNullRender());
MyInitializer.InitCheckSum();

Expand All @@ -50,7 +51,7 @@ protected override bool SetupBasicGameInfo()
MySteamGameService.InitNetworking(m_ds, m_steamService, MyPerGameSettings.BasicGameInfo.GameName, null);

// If user specified --modio, set that as the "default" (added first)
var modioService = MyModIoService.Create(MyServiceManager.Instance.GetService<IMyGameService>(), ModIO_GameName, ModIO_GameID, ModIO_Key, ModIO_TestGameID, ModIO_TestKey, MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, m_useModIO ? true : false);
var modioService = MyModIoService.Create(MyServiceManager.Instance.GetService<IMyGameService>(), ModIO_GameName, ModIO_GameID, ModIO_Key, ModIO_TestGameID, ModIO_TestKey, MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, Sync.IsDedicated, MyPlatformGameSettings.MODIO_PLATFORM, MyPlatformGameSettings.MODIO_PORTAL);

if (m_useModIO)
MyGameService.WorkshopService.AddAggregate(modioService);
Expand Down Expand Up @@ -162,7 +163,7 @@ private void PostAuthentication(string token, int expires)
private void ManuallyAddDLCs()
{
var obj = typeof(MyDLCs.MyDLC).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null,
new Type[] { typeof(uint), typeof(string), typeof(MyStringId), typeof(MyStringId), typeof(string), typeof(string), typeof(string), typeof(string) }, null);
new Type[] { typeof(uint), typeof(string), typeof(MyStringId), typeof(MyStringId), typeof(string), typeof(string), typeof(string), typeof(string), typeof(PsProductIds), typeof(PsProductIds) }, null);

if (obj == null)
{
Expand All @@ -181,7 +182,9 @@ private void ManuallyAddDLCs()
string.Empty,
string.Empty,
string.Empty,
string.Empty
string.Empty,
default(PsProductIds),
default(PsProductIds)
}) as MyDLCs.MyDLC;


Expand Down
2 changes: 1 addition & 1 deletion WorkshopToolCommon/WorkshopHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public static bool TryCreateWorldInstanceBlocking(WorkshopType type, MyWorkshopI
MyWorkshop.MyWorkshopPathInfo.CreateWorldInfo() :
MyWorkshop.MyWorkshopPathInfo.CreateScenarioInfo();

return MyWorkshop.TryCreateWorldInstanceBlocking(world, pathinfo, out sessionPath, overwrite);
return MyWorkshop.TryCreateWorldInstanceBlocking(world, pathinfo, out sessionPath, overwrite, null);
#else
return MyWorkshop.TryCreateWorldInstanceBlocking(world, out sessionPath, overwrite, null);
#endif
Expand Down

0 comments on commit b2a8211

Please sign in to comment.