示例#1
0
 bool CanUpdateSign(Signage sign, BasePlayer player)
 {
     if (m_configData.SignBlocks.ContainsKey(player.userID))
     {
         SignBlock signBlock = m_configData.SignBlocks[player.userID];
         player.ChatMessage(m_configData.Messages["forbidden"].Replace("%reason", signBlock.reason).Replace("%player_name", player.displayName));
         sign.Kill();
         return(false);
     }
     return(true);
 }
示例#2
0
            private void OnDestroy()
            {
                Destroy(boxCollider);

                if (secondary != null && !secondary.IsDestroyed)
                {
                    secondary.SetParent(null);
                    secondary.Kill(BaseNetworkable.DestroyMode.None);
                }

                if (primary != null && !primary.IsDestroyed)
                {
                    primary.SetParent(null);
                    primary.Kill();
                }
            }