This repository has been archived by the owner on Aug 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from SynapseSL/development
Development
- Loading branch information
Showing
11 changed files
with
125 additions
and
30 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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
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,12 @@ | ||
using UnityEngine; | ||
using Interactables.Interobjects.DoorUtils; | ||
|
||
namespace Synapse.Api | ||
{ | ||
public class Prefabs | ||
{ | ||
internal Prefabs() { } | ||
|
||
public DoorVariant DoorVariantPrefab { get; internal set; } | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
Synapse/Patches/SynapsePatches/Wrapper/DoorSpawnpointPatch.cs
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,24 @@ | ||
using HarmonyLib; | ||
using MapGeneration; | ||
using Synapse.Api; | ||
|
||
namespace Synapse.Patches.SynapsePatches | ||
{ | ||
[HarmonyPatch(typeof(DoorSpawnpoint), nameof(DoorSpawnpoint.Start))] | ||
public class DoorSpawnpointPatch | ||
{ | ||
private static bool Prefix(DoorSpawnpoint __instance) | ||
{ | ||
try | ||
{ | ||
if (Server.Get.Prefabs.DoorVariantPrefab == null) | ||
Server.Get.Prefabs.DoorVariantPrefab = UnityEngine.Object.Instantiate(__instance.TargetPrefab); | ||
} | ||
catch (System.Exception e) | ||
{ | ||
Logger.Get.Error($"Synapse-DoorSpawnpoint: DoorSpawnpoint Start Patch failed!!\n{e}"); | ||
} | ||
return true; | ||
} | ||
} | ||
} |
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
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
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
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