Skip to content

Commit

Permalink
Works for Deli 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nrgill28 committed Apr 5, 2021
1 parent 4b47c57 commit e237286
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 77 deletions.
3 changes: 3 additions & 0 deletions WurstMod/Runtime/Entrypoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class Entrypoint : DeliBehaviour

public Entrypoint()
{
// Patches
Patches.Patch();

// Add a number of callbacks
Stages.Setup += StagesOnSetup;
SceneManager.sceneLoaded += SceneManager_sceneLoaded;
Expand Down
11 changes: 1 addition & 10 deletions WurstMod/Runtime/Loader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,8 @@ public static IEnumerator OnSceneLoad(Scene scene)

if (IsLoadInProgress && LevelToLoad.HasValue)
{
// We're loading the modded scene after the base scene
ScenePatcher.RunPatches(scene);

IsLoadInProgress = false;
}

if (!IsLoadInProgress && !LevelToLoad.HasValue)
{
// We're loading a base scene
ScenePatcher.RunPatches(scene);
}
}

/// <summary>
Expand Down Expand Up @@ -135,7 +126,7 @@ private static IEnumerator MergeCustomScene(LevelInfo level)
yield return null;

// Then merge the scene into the original
SceneManager.MergeScenes(SceneManager.GetSceneAt(SceneManager.sceneCount - 1), SceneManager.GetActiveScene());
SceneManager.MergeScenes(SceneManager.GetSceneByName(sceneName), SceneManager.GetActiveScene());

// Find the level component
ObjectReferences.CustomScene = _loadedScene.GetRootGameObjects()
Expand Down
20 changes: 0 additions & 20 deletions WurstMod/Runtime/ScenePatchers/MainMenuScenePatcher.cs

This file was deleted.

43 changes: 0 additions & 43 deletions WurstMod/Runtime/ScenePatchers/ScenePatcher.cs

This file was deleted.

2 changes: 1 addition & 1 deletion WurstMod/Shared/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
internal static class Constants
{
public const string LegacyLevelsDirectory = "mods/legacy/CustomLevels";
public const string LegacyLevelsDirectory = "Deli/mods/legacy/CustomLevels";
public const string FilenameLevelData = "leveldata";
public const string FilenameLevelInfo = "info.json";
public const string FilenameLevelThumbnail = "thumb.png";
Expand Down
3 changes: 2 additions & 1 deletion WurstMod/Shared/LevelInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using FistVR;
using UnityEngine;
using Valve.Newtonsoft.Json;
using Valve.VR.InteractionSystem.Sample;

namespace WurstMod.Shared
{
Expand Down Expand Up @@ -32,7 +33,7 @@ public Texture2D Thumbnail
{
get
{
var stream = AssetBundlePath.OpenRead();
var stream = ThumbnailPath.OpenRead();
var buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
var tex = new Texture2D(0, 0);
Expand Down
2 changes: 0 additions & 2 deletions WurstMod/WurstMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@
<Compile Include="Runtime\SceneLoaders\SandboxSceneLoader.cs" />
<Compile Include="Runtime\SceneLoaders\TakeAndHoldSceneLoader.cs" />
<Compile Include="Runtime\ScenePatchers\Generic_LevelPopulator.cs" />
<Compile Include="Runtime\ScenePatchers\MainMenuScenePatcher.cs" />
<Compile Include="Runtime\ScenePatchers\ScenePatcher.cs" />
<Compile Include="Runtime\ScenePatchers\TNH_LevelSelector.cs" />
<Compile Include="Runtime\SosigSpawnerHelper.cs" />
<Compile Include="Runtime\SpriteLoader.cs" />
Expand Down

0 comments on commit e237286

Please sign in to comment.