The flag NoDeploy multiplies items

The flag NoDeploy multiplies seeds when planted. Ladders and neon signs when you try to place them on walls. ....

Well, isn't there a solution for that?

The issue appears to be with the new KillEntityAndReturnItem method that starts on line 304:

        private void KillEntityAndReturnItem(BasePlayer player, BaseEntity entity, Item item)
        {
            ItemDefinition itemDefinition = item == null ? null : item.info;
            int amount = item.amount;
            ulong skin = item == null ? 0UL : item.skin;

            entity.Invoke(() =>
            {
                if (entity && !entity.IsDestroyed)
                    entity.Kill(BaseNetworkable.DestroyMode.Gib);

                if (itemDefinition != null)
                    player.GiveItem(ItemManager.Create(itemDefinition, amount, skin));

            }, 0.1f);
        }



I resolved it by changing line 307 to assign a value of 1 to amount instead of referring to item.amount. It seems that item.amount counts the amount of the item in the player's inventory instead of the amount of items placed.

I couldn't think of a situation where a player would deploy an item and have this method called where the amount would be anything other than 1.