Initial
This commit is contained in:
parent
7a77b79dc5
commit
cdadd75ee9
104 changed files with 9416 additions and 0 deletions
22
ScarletMansion/ScarletMansion/GamePatch/ShotgunItemPatch.cs
Normal file
22
ScarletMansion/ScarletMansion/GamePatch/ShotgunItemPatch.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace ScarletMansion.GamePatch {
|
||||
public class ShotgunItemPatch {
|
||||
|
||||
[HarmonyPatch(typeof(ShotgunItem), "ShootGun")]
|
||||
[HarmonyPostfix]
|
||||
public static void ShootGunPatch(ref ShotgunItem __instance, Vector3 shotgunPosition, Vector3 shotgunForward){
|
||||
if (Components.ScarletDoorLock.ScarletDoorRaycast(__instance, shotgunPosition, shotgunForward, 30f, out var door)){
|
||||
var damage = PluginConfig.Instance.shotgunDamageValue;
|
||||
door.ApplyDamageServerRpc(shotgunForward, damage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue