コード例 #1
0
ファイル: SSNSigns.cs プロジェクト: popov-aa/SSNOxide
 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();
                }
            }