1. Hi. I'm a beginner who started C #.
    I am making MOD to make the cupboard resource unnecessary.
    Program to immediately delete the resources to be dropped when the cupboard is destroyed ?
    Is it possible with hook OnEntityDeath?
    And how?
     
  2. You can use this as a temporary fix for your problem, however a better solution certainly exists as I probably shouldn't advocate erasing "dead" entities.

    If you can find the container of the cupboard, and erase its contents that would probably be the best solution. However it's not a LootContainer so I'm not sure of its type.

    Code:
            void OnEntityDeath(BaseCombatEntity entity, HitInfo info)
            {
                if (entity.name == "assets/prefabs/deployable/tool cupboard/cupboard.tool.deployed.prefab")
                {
                    entity.Kill();
                }
            }
    
     
  3. You could just use server settings.

    decay.upkeep false
     
  4. Thanks.Work !