mirror of
https://github.com/TheJordanDev/PEAK-JordanMod.git
synced 2026-06-05 19:23:27 +02:00
0.1.10 | Added: Bonkable to thrown items
This commit is contained in:
@@ -47,3 +47,7 @@
|
||||
|
||||
- Centralized Audio loading in Worker class
|
||||
- Now load BingBong voicelines dynamically after Sound reloads.
|
||||
|
||||
# v0.1.10 | Bonkable items
|
||||
|
||||
- Added Bonkable component to items when thrown.
|
||||
@@ -8,7 +8,7 @@
|
||||
<!-- This is the display name of your mod. Example: BepInEx Template -->
|
||||
<AssemblyTitle>JordanMod</AssemblyTitle>
|
||||
<!-- This is the version number of your mod. -->
|
||||
<Version>0.1.9</Version>
|
||||
<Version>0.1.10</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using pworld.Scripts.Extensions;
|
||||
|
||||
namespace JordanMod.Events;
|
||||
|
||||
public class GlobalEventListener
|
||||
@@ -5,6 +7,12 @@ public class GlobalEventListener
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
GlobalEvents.OnItemThrown += OnItemThrown;
|
||||
}
|
||||
|
||||
private static void OnItemThrown(Item item)
|
||||
{
|
||||
item.gameObject.GetOrAddComponent<Bonkable>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ public class BingBongResponseData
|
||||
|
||||
public static BingBongResponseData FromBingBongResponse(Action_AskBingBong.BingBongResponse response)
|
||||
{
|
||||
Debug.Log($"Creating BingBongResponseData from response with SFX name: {response.sfx.name}, subtitleID: {response.subtitleID}");
|
||||
return new BingBongResponseData
|
||||
{
|
||||
Clips = (AudioClip[])response.sfx.clips.Clone(),
|
||||
|
||||
@@ -9,14 +9,6 @@ namespace JordanMod.Modules.ReplaceBingBong;
|
||||
public class ReplaceBingBongPatch
|
||||
{
|
||||
|
||||
[HarmonyPatch(typeof(Item), "Start")]
|
||||
[HarmonyPrefix]
|
||||
static void OnItemStart(Item __instance)
|
||||
{
|
||||
if (__instance.name != "BingBong_Prop Variant") return;
|
||||
Debug.Log($"Item {__instance.name} Start in scene {__instance.gameObject.scene.name} ({__instance.gameObject.scene.buildIndex})");
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(ItemActionBase), "OnEnable")]
|
||||
[HarmonyPrefix]
|
||||
static bool PreActionAskBingBongConstructorFix(ItemActionBase __instance)
|
||||
|
||||
Reference in New Issue
Block a user