コード例 #1
0
 private void OnEntRemoved(EntityUid uid, AntiRottingContainerComponent component, EntRemovedFromContainerMessage args)
 {
     if (TryComp <PerishableComponent>(args.Entity, out var perishable))
     {
         ToggleDecomposition(args.Entity, true, perishable);
     }
 }
コード例 #2
0
        /// Containers

        private void OnEntInserted(EntityUid uid, AntiRottingContainerComponent component, EntInsertedIntoContainerMessage args)
        {
            if (TryComp <PerishableComponent>(args.Entity, out var perishable))
            {
                ToggleDecomposition(args.Entity, false, perishable);
            }
        }