EnableTNTPhysics() public method

public EnableTNTPhysics ( Player player, bool announce ) : void
player Player
announce bool
return void
Example #1
0
        public static void LoadSettings(XElement el, World world)
        {
            XAttribute temp;

            if ((temp = el.Attribute("plantPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnablePlantPhysics(Player.Console, false);
                }
            }
            if ((temp = el.Attribute("tntPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableTNTPhysics(Player.Console, false);
                }
            }
            if ((temp = el.Attribute("waterPhysics")) != null)
            {
                bool isPhy;
                if (bool.TryParse(temp.Value, out isPhy))
                {
                    world.EnableWaterPhysics(Player.Console, false);
                }
            }
        }
Example #2
0
        public static void Start(Player player)
        {
            Map map = MapGeneratorOld.GenerateEmpty(64, 128, 16);

            map.Save("maps/minefield.fcm");
            if (_world != null)
            {
                WorldManager.RemoveWorld(_world);
            }
            WorldManager.AddWorld(Player.Console, "Minefield", map, true);
            _map   = map;
            _world = WorldManager.FindWorldExact("Minefield");
            SetUpRed();
            SetUpMiddleWater();
            SetUpGreen();
            SetUpMines();
            _map.Spawn = new Position(_map.Width / 2, 5, _ground + 3).ToVector3I().ToPlayerCoords();
            _world.LoadMap();
            _world.gameMode = GameMode.MineField;
            _world.EnableTNTPhysics(Player.Console, false);
            Server.Message("{0}&S started a game of MineField on world Minefield!", player.ClassyName);
            WorldManager.SaveWorldList();
            Server.RequestGC();
        }
Example #3
0
 public static void LoadSettings(XElement el, World world)
 {
     XAttribute temp;
     if ((temp = el.Attribute("plantPhysics")) != null)
     {
         bool isPhy;
         if (bool.TryParse(temp.Value, out isPhy))
         {
             world.EnablePlantPhysics(Player.Console, false);
         }
     }
     if ((temp = el.Attribute("tntPhysics")) != null)
     {
         bool isPhy;
         if (bool.TryParse(temp.Value, out isPhy))
         {
             world.EnableTNTPhysics(Player.Console, false);
         }
     }
     if ((temp = el.Attribute("waterPhysics")) != null)
     {
         bool isPhy;
         if (bool.TryParse(temp.Value, out isPhy))
         {
             world.EnableWaterPhysics(Player.Console, false);
         }
     }
 }
Example #4
0
 public static void Start( Player player )
 {
     Map map = MapGeneratorOld.GenerateEmpty( 64, 128, 16 );
     map.Save( "maps/minefield.fcm" );
     if ( _world != null ) {
         WorldManager.RemoveWorld( _world );
     }
     WorldManager.AddWorld( Player.Console, "Minefield", map, true );
     _map = map;
     _world = WorldManager.FindWorldExact( "Minefield" );
     SetUpRed();
     SetUpMiddleWater();
     SetUpGreen();
     SetUpMines();
     _map.Spawn = new Position( _map.Width / 2, 5, _ground + 3 ).ToVector3I().ToPlayerCoords();
     _world.LoadMap();
     _world.gameMode = GameMode.MineField;
     _world.EnableTNTPhysics( Player.Console, false );
     Server.Message( "{0}&S started a game of MineField on world Minefield!", player.ClassyName );
     WorldManager.SaveWorldList();
     Server.RequestGC();
 }