Skip to content

Commit

Permalink
fix: change compatibility with ReservedWeaponSlot (#38)
Browse files Browse the repository at this point in the history
Release-as: 1.4.7
  • Loading branch information
Hypick122 committed Mar 19, 2024
1 parent d9be920 commit 98efc50
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions BetterShotgun/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,11 @@ private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
_isLoaded = true;

var ammoName = "Shell";
if (Chainloader.PluginInfos.ContainsKey("FlipMods.ReservedWeaponSlot"))
{
ammoName = "Ammo";
Log.LogWarning(
"ReservedWeaponSlot detected, the name of the cartridges changes from \"Shell\" to \"Ammo\"");
}

RegisterItem(Shotgun, "Shotgun", SyncConfig.Instance.ShotgunMaxDiscount.Value,
SyncConfig.Instance.ShotgunMinValue.Value, SyncConfig.Instance.ShotgunMaxValue.Value,
SyncConfig.Instance.ShotgunWeight.Value, SyncConfig.Instance.ShotgunPrice.Value,
SyncConfig.Instance.ShotgunRarity.Value);
RegisterItem(ShotgunShell, ammoName, SyncConfig.Instance.ShellMaxDiscount.Value,
RegisterItem(ShotgunShell, "Shells", SyncConfig.Instance.ShellMaxDiscount.Value,
SyncConfig.Instance.ShellMinValue.Value, SyncConfig.Instance.ShellMaxValue.Value, 0,
SyncConfig.Instance.ShellPrice.Value, SyncConfig.Instance.ShellRarity.Value);
}
Expand Down

0 comments on commit 98efc50

Please sign in to comment.