using System; namespace Oxide.Plugins { [Info("SplitFix", "Krungh Crow", "0.0.1")] [Description("Skinned items keep their skins when splitting stacks")] public class SplitFix : RustPlugin { private Item OnItemSplit(Item item, int amount) { bool Debug = false; if (item.skin != 0) { item.amount -= amount; var newItem = ItemManager.Create(item.info, amount, item.skin); newItem.name = item.name; item.MarkDirty(); if (Debug) Puts($"A stack of [{item.name.ToString()}] was succesfully splitted"); return newItem; } return null; } } }