Skip to content

Commit

Permalink
remove sn loading screen in bz
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Oct 4, 2023
1 parent 88c53dd commit 01833d1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SCHIZO/Loading/BackgroundLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static BackgroundLoader()

foreach (LoadingBackground background in collection.backgrounds)
{
LoadingBackgrounds[background.randomListId] = background;
if (background.game.HasFlag(GAME)) LoadingBackgrounds[background.randomListId] = background;
}
}

Expand Down
5 changes: 4 additions & 1 deletion SCHIZO/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ namespace SCHIZO;
public class Plugin : BaseUnityPlugin
{
#if BELOWZERO
public static bool IS_SUBNAUTICA => false;
public static bool IS_BELOWZERO => true;
public static Game GAME => Game.BelowZero;
#else
public static bool IS_SUBNAUTICA => true;
public static bool IS_BELOWZERO => false;
public static Game GAME => Game.Subnautica;
#endif
public static bool IS_SUBNAUTICA => !IS_BELOWZERO;

public static ManualLogSource LOGGER { get; private set; }

Expand Down
Binary file modified SCHIZO/Resources/AssetBundles/assets
Binary file not shown.
4 changes: 4 additions & 0 deletions SCHIZO/Unity/Interop/NaughtyAttributesInterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ public BoxGroupAttribute(string group)
{
}
}

public class EnumFlagsAttribute : Attribute
{
}
1 change: 1 addition & 0 deletions Unity/Assets/Loading/Backgrounds/2/2.asset
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ MonoBehaviour:
art: {fileID: 21300000, guid: edae5d30145a4dd4e8a323cd7d044531, type: 3}
credit: Art by yamplum
randomListId: 2
game: 1
8 changes: 8 additions & 0 deletions Unity/Assets/Scripts/SCHIZO/Game.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

[Flags]
public enum Game
{
Subnautica = 1,
BelowZero = 2,
}
11 changes: 11 additions & 0 deletions Unity/Assets/Scripts/SCHIZO/Game.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Unity/Assets/Scripts/SCHIZO/Loading/LoadingBackground.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
using NaughtyAttributes;
using UnityEngine;

// ReSharper disable once CheckNamespace
namespace SCHIZO.Unity.Loading
Expand All @@ -9,5 +10,6 @@ public sealed class LoadingBackground : ScriptableObject
public Sprite art;
public string credit;
public string randomListId;
[EnumFlags] public Game game = Game.Subnautica | Game.BelowZero;
}
}

0 comments on commit 01833d1

Please sign in to comment.