public override void HandleMetadata(int x, int y, string metadata)
 {
     string sl = metadata.Substring(0, metadata.IndexOf(' '));
     Console.WriteLine(sl);
     level = SecurityLevel.GetSecurityLevelByName(sl);
     message = metadata.Substring(metadata.IndexOf(' '));
 }
예제 #2
0
 public DoorTile()
 {
     this.Collidable = true;
     this.texture = "doortile_closed";
     securityLevel = SecurityLevel.PURPLE;
     Closed = true;
 }
 public TerminalTile()
 {
     this.Collidable = true;
     this.texture = "terminaltile";
     level = SecurityLevel.PURPLE;
     message = "No Message in Metadata!";
 }
        public override void HandleMetadata(int x, int y, string metadata)
        {
            string[] data = metadata.Split(' ');
            level = SecurityLevel.GetSecurityLevelByName(data[0]);
            string[] types = data[1].Substring(1, data[1].IndexOf('}')-1).Split(',');
            //Select a type in this chest
            int itemInChest = rng.Next(types.Length);

            string type = types[itemInChest];
            Console.WriteLine("Selected Item " + itemInChest + " it's " + type + " " + types.Length);

            itemInside = ItemEntity.CreateItem(type);
        }
        public override void HandleMetadata(int x, int y, string metadata)
        {
            commandedTiles.Clear();
            //format {x,y;x1,y1;x2,y2}
            string[] bits = metadata.Split(' ');
            string terminals = bits[1];
            terminals = terminals.Replace("{", "").Replace("}", "");
            string[] tiles = terminals.Split(';');

            for (int i = 0; i < tiles.Length; i++)
            {
                string[] xy = tiles[i].Split(',');
                int tx = int.Parse(xy[0]);
                int ty = int.Parse(xy[1]);
                commandedTiles.Add(Station.Instance.GetTile(tx, ty));
            }

            level = SecurityLevel.GetSecurityLevelByName(bits[0]);
        }
 public ChestTile()
 {
     this.texture = "chesttile_bg";
     this.level = SecurityLevel.PURPLE;
     this.Collidable = true;
 }
 public SecurityTerminal()
 {
     this.texture = "securitytile";
     this.Collidable = true;
     level = SecurityLevel.PURPLE;
 }
예제 #8
0
 public override void HandleMetadata(int x, int y, string metadata)
 {
     this.securityLevel = SecurityLevel.GetSecurityLevelByName(metadata);
 }
        public void SetLevel(SecurityLevel level)
        {
            this.level = level;

            this.Name = level.name + " SCard";
        }
 public void ChangeSecurityLevel(SecurityLevel level)
 {
     this.securityLevel = level;
 }