Beispiel #1
0
        public override void Use(Player p, string message, CommandData data)
        {
            if (!p.level.Config.Guns)
            {
                p.Message("Missiles cannot be used on this map!"); return;
            }
            if (p.weapon != null && message.Length == 0)
            {
                p.weapon.Disable(); return;
            }

            WeaponType type = Weapon.ParseType(message);

            if (type == WeaponType.Invalid)
            {
                Help(p); return;
            }

            Missile missile = GetMissile(type);

            missile.type = type;
            missile.Enable(p);
        }