added fairy data and gen 6 efficacy changes

--- Schmogon/Data/Types/Type.cs
+++ Schmogon/Data/Types/Type.cs
@@ -24,123 +24,131 @@
     Fairy
   }

-  public class TypeEffect
+  public class TypeOffenseEffect
   {
-    internal static readonly IEnumerable<TypeEffect> TypeEffects = new List<TypeEffect>
+    internal static readonly IEnumerable<TypeOffenseEffect> TypeEffects = new List<TypeOffenseEffect>
     {
 #region typedefs
-      new TypeEffect
+      new TypeOffenseEffect
+      {
+              Type = Type.Fairy,
+              SuperEffectiveAgainst = new List<Type>{Type.Fighting,Type.Dragon,Type.Dark},
+              NotVeryEffectiveAgainst = new List<Type>{Type.Fire,Type.Poison,Type.Steel,},
+              NoEffectAgainst = new List<Type>()
+      },
+      new TypeOffenseEffect
       {
               Type = Type.Ghost,
               SuperEffectiveAgainst = new List<Type>{Type.Ghost,Type.Psychic},
-              NotVeryEffectiveAgainst = new List<Type>{Type.Steel,Type.Dark},
+              NotVeryEffectiveAgainst = new List<Type>{Type.Dark},
               NoEffectAgainst = new List<Type>{Type.Normal},
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Steel,
-              SuperEffectiveAgainst = new List<Type>{Type.Rock,Type.Ice},
+              SuperEffectiveAgainst = new List<Type>{Type.Rock,Type.Ice,Type.Fairy},
               NotVeryEffectiveAgainst = new List<Type>{Type.Steel,Type.Fire,Type.Water,Type.Electric},
               NoEffectAgainst = new List<Type>(),
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Dark,
               SuperEffectiveAgainst = new List<Type>{Type.Ghost,Type.Psychic},
-              NotVeryEffectiveAgainst = new List<Type>{Type.Fighting,Type.Steel,Type.Dark},
-              NoEffectAgainst = new List<Type>(),
-      },
-      new TypeEffect
+              NotVeryEffectiveAgainst = new List<Type>{Type.Fighting,Type.Fairy,Type.Dark},
+              NoEffectAgainst = new List<Type>(),
+      },
+      new TypeOffenseEffect
       {
               Type = Type.Electric,
               SuperEffectiveAgainst = new List<Type>{Type.Flying,Type.Water},
               NotVeryEffectiveAgainst = new List<Type>{Type.Grass,Type.Electric,Type.Dragon},
               NoEffectAgainst = new List<Type>{Type.Ground},
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Ice,
               SuperEffectiveAgainst = new List<Type>{Type.Flying,Type.Ground,Type.Grass,Type.Dragon},
               NotVeryEffectiveAgainst = new List<Type>{Type.Steel,Type.Fire,Type.Water,Type.Ice},
               NoEffectAgainst = new List<Type>(),
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Normal,
               SuperEffectiveAgainst = new List<Type>(),
               NotVeryEffectiveAgainst = new List<Type>{Type.Rock,Type.Steel},
               NoEffectAgainst = new List<Type>{Type.Ghost},
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Fire,
               SuperEffectiveAgainst = new List<Type>{Type.Bug,Type.Steel,Type.Grass,Type.Ice},
               NotVeryEffectiveAgainst = new List<Type>{Type.Rock,Type.Fire,Type.Water,Type.Dragon},
               NoEffectAgainst = new List<Type>(),
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Psychic,
               SuperEffectiveAgainst = new List<Type>{Type.Fighting,Type.Poison},
               NotVeryEffectiveAgainst = new List<Type>{Type.Steel,Type.Psychic},
               NoEffectAgainst = new List<Type>{Type.Dark},
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Flying,
               SuperEffectiveAgainst = new List<Type>{Type.Fighting,Type.Bug,Type.Grass},
               NotVeryEffectiveAgainst = new List<Type>{Type.Rock,Type.Steel,Type.Electric},
               NoEffectAgainst = new List<Type>(),
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Poison,
-              SuperEffectiveAgainst = new List<Type>{Type.Grass},
+              SuperEffectiveAgainst = new List<Type>{Type.Grass, Type.Fairy},
               NotVeryEffectiveAgainst = new List<Type>{Type.Poison,Type.Ground,Type.Rock,Type.Ghost},
               NoEffectAgainst = new List<Type>{Type.Steel},
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Dragon,
               SuperEffectiveAgainst = new List<Type>{Type.Dragon},
               NotVeryEffectiveAgainst = new List<Type>{Type.Steel},
-              NoEffectAgainst = new List<Type>(),
-      },
-      new TypeEffect
+              NoEffectAgainst = new List<Type>{Type.Fairy},
+      },
+      new TypeOffenseEffect
       {
               Type = Type.Water,
               SuperEffectiveAgainst = new List<Type>{Type.Ground,Type.Rock,Type.Fire},
               NotVeryEffectiveAgainst = new List<Type>{Type.Water,Type.Grass,Type.Dragon},
               NoEffectAgainst = new List<Type>(),
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Fighting,
               SuperEffectiveAgainst = new List<Type>{Type.Normal,Type.Rock,Type.Steel,Type.Ice,Type.Dark},
-              NotVeryEffectiveAgainst = new List<Type>{Type.Flying,Type.Poison,Type.Bug,Type.Psychic},
+              NotVeryEffectiveAgainst = new List<Type>{Type.Flying,Type.Poison,Type.Bug,Type.Psychic,Type.Fairy},
               NoEffectAgainst = new List<Type>{Type.Ghost},
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Rock,
               SuperEffectiveAgainst = new List<Type>{Type.Flying,Type.Bug,Type.Fire,Type.Ice},
               NotVeryEffectiveAgainst = new List<Type>{Type.Fighting,Type.Ground,Type.Steel},
               NoEffectAgainst = new List<Type>(),
       },
-      new TypeEffect
+      new TypeOffenseEffect
       {
               Type = Type.Grass,
               SuperEffectiveAgainst = new List<Type>{Type.Ground,Type.Rock,Type.Water},
               NotVeryEffectiveAgainst = new List<Type>{Type.Flying,Type.Poison,Type.Bug,Type.Steel,Type.Fire,Type.Grass,Type.Dragon},
-      },
-      new TypeEffect
+              NoEffectAgainst = new List<Type>()
+      },
+      new TypeOffenseEffect
       {
               Type = Type.Bug,
               SuperEffectiveAgainst = new List<Type>{Type.Grass,Type.Psychic,Type.Dark},
-              NotVeryEffectiveAgainst = new List<Type>{Type.Fighting,Type.Flying,Type.Poison,Type.Ghost,Type.Steel,Type.Fire},
-              NoEffectAgainst = new List<Type>(),
-      },
-      new TypeEffect
+              NotVeryEffectiveAgainst = new List<Type>{Type.Fighting,Type.Flying,Type.Poison,Type.Ghost,Type.Steel,Type.Fire,Type.Fairy},
+              NoEffectAgainst = new List<Type>(),
+      },
+      new TypeOffenseEffect
       {
               Type = Type.Ground,
               SuperEffectiveAgainst = new List<Type>{Type.Poison,Type.Rock,Type.Steel,Type.Fire,Type.Electric},
@@ -155,8 +163,39 @@
     public IEnumerable<Type> NotVeryEffectiveAgainst { get; internal set; }
     public IEnumerable<Type> NoEffectAgainst { get; internal set; }

-    private TypeEffect()
+    private TypeOffenseEffect()
     {
     }
   }
+
+  public class TypeDefenseEffect
+  {
+    public Type Type { get; private set; }
+
+    /// <summary>
+    /// This contains a list of Types such that attacking this type with any of those types results in a "not very effective",
+    /// which means 50% damage
+    /// </summary>
+    public IEnumerable<Type> StrongDefenseAgainst { get; private set; }
+
+    /// <summary>
+    /// This contains a list of Types such that attacking this type with any of those types results in a "super effective",
+    /// which means 200% damage
+    /// </summary>
+    public IEnumerable<Type> WeakDefenseAgainst { get; private set; }
+
+    /// <summary>
+    /// This contains a list of Types such that attacking this type with any of those types results in "no effect",
+    /// which means 0% damage
+    /// </summary>
+    public IEnumerable<Type> FullDefenseAgainst { get; private set; }
+
+    internal TypeDefenseEffect(Type type, IEnumerable<Type> strongDefenseAgainst, IEnumerable<Type> weakDefenseAgainst, IEnumerable<Type> fullDefenseAgainst)
+    {
+      Type = type;
+      StrongDefenseAgainst = strongDefenseAgainst;
+      WeakDefenseAgainst = weakDefenseAgainst;
+      FullDefenseAgainst = fullDefenseAgainst;
+    }
+  }
 }


Add missing namespace

Add missing namespace

--- Scripts/LiteNetLibClient.cs
+++ Scripts/LiteNetLibClient.cs
@@ -3,6 +3,7 @@
 using UnityEngine;
 using LiteNetLib;
 using LiteNetLib.Utils;
+using LiteNetLibHighLevel.Utils;

 namespace LiteNetLibHighLevel
 {


Fix off-by-one error in IReturnListHandler-using logic

--- SharpLua/Interfacing/Lua.cs
+++ SharpLua/Interfacing/Lua.cs
@@ -407,8 +407,8 @@
                 {
                     if (LuaDLL.lua_pcall(luaState, pushed_args, xlate.NumResults, docall_base) == 0)
                     {
-                        object[] result = xlate.PopValues(luaState, oldTop + 1);
-                        Debug.Assert(luaState.top >= oldTop + 1);
+                        object[] result = xlate.PopValues(luaState, oldTop + 2);
+                        Debug.Assert(luaState.top >= oldTop + 2);
                         LuaDLL.lua_settop(luaState, oldTop);
                         return result;
                     }
@@ -951,7 +951,7 @@

         object[] IReturnListHandler.PopValues(Lua.LuaState L, int stktop)
         {
-            return translator.popValues(L, stktop);
+            return translator.popValues(L, stktop - 1);
         }

         #endregion


Fix build error.

Fix build error.

--- Source/Core/Bootstrapper.cs
+++ Source/Core/Bootstrapper.cs
@@ -146,23 +146,20 @@
         }

         public static IElasticClient GetElasticClient(Uri serverUri, bool deleteExistingIndexes = false) {
-            var pool = new Elasticsearch.Net.ConnectionPool.SniffingConnectionPool(esNodes.Select(c => new Uri(c)));
-
             var settings = new ConnectionSettings(new SniffingConnectionPool(new[] { serverUri }))
                 .SetDefaultIndex("_all")
                 .SniffOnStartup(true)
                 .SniffLifeSpan(TimeSpan.FromMinutes(1))
                 .SetTimeout(1000)
-                .MaximumRetries(5)
-                    .EnableMetrics()
-                    .SetJsonSerializerSettingsModifier(s => {
-                    s.ContractResolver = new EmptyCollectionElasticContractResolver(settings);
-                    s.AddModelConverters();
-                })
                 .MapDefaultTypeNames(m => m.Add(typeof(PersistentEvent), "events").Add(typeof(Stack), "stacks"))
                 .MapDefaultTypeIndices(m => m.Add(typeof(Stack), ElasticSearchRepository<Stack>.StacksIndexName))
                 .MapDefaultTypeIndices(m => m.Add(typeof(PersistentEvent), ElasticSearchRepository<PersistentEvent>.EventsIndexName + "-*"))
                 .SetDefaultPropertyNameInferrer(p => p.ToLowerUnderscoredWords());
+
+            settings.MaximumRetries(5).EnableMetrics().SetJsonSerializerSettingsModifier(s => {
+                s.ContractResolver = new EmptyCollectionElasticContractResolver(settings);
+                s.AddModelConverters();
+            });

             var client = new ElasticClient(settings, new KeepAliveHttpConnection(settings));
             ConfigureMapping(client, deleteExistingIndexes);


Time Docs #CHANGE: Clarified usage of Time.DeltaTime and Time.TimeMult.

--- Source/Core/Duality/Time.cs
+++ Source/Core/Duality/Time.cs
@@ -53,6 +53,7 @@
 		}
 		/// <summary>
 		/// [GET] Returns the time passed since the last frame in seconds weighted by <see cref="TimeScale"/>.
+		/// You can multiply your "per second" updates with this value to make them framerate independent.
 		/// </summary>
 		public static float DeltaTime
 		{
@@ -81,8 +82,13 @@
 			get { return gameTimer; }
 		}
 		/// <summary>
-		/// [GET] Multiply any frame-independend movement or change with this factor.
-		/// It also applies the time scale you set.
+		/// [GET] A factor that represents how long the last frame took relative to the desired
+		/// frame time. When your game runs at half the target frame rate, this factor will be 2.0f,
+		/// when it runs at double the target frame rate, it will be 0.5f and so on. Similar to
+		/// <see cref="DeltaTime"/>, except as an abstract factor, rather than passed time.
+		///
+		/// You can multiply your "per frame" updates with this value to make them framerate independent
+		/// in the same way you can multiply your "per second" updates with <see cref="DeltaTime"/>.
 		/// </summary>
 		public static float TimeMult
 		{


Listen on the IPv6 address, listens on the v4 one too.

--- Source/Core/HttpListener.cs
+++ Source/Core/HttpListener.cs
@@ -12,7 +12,7 @@
 		public static Task Listen(int port, IPAddress ip = null)
 		{
 			if(ip == null)
-				ip = IPAddress.Any;
+				ip = IPAddress.IPv6Any;
 			var listener = new TcpListener(ip, port);
 			listener.Start();


Use InstructionalButtons class in TabView

--- Source/PauseMenu/TabView.cs
+++ Source/PauseMenu/TabView.cs
@@ -20,6 +20,11 @@
             CanLeave = true;

             MoneySubtitle = "";
+
+            InstructionalButtons = new InstructionalButtons();
+            InstructionalButtons.Buttons.Add(new InstructionalButton(GameControl.FrontendAccept, "Select"));
+            InstructionalButtons.Buttons.Add(new InstructionalButton(GameControl.CellphoneCancel, "Back"));
+            InstructionalButtons.Buttons.Add(new InstructionalButtonGroup(new[] { GameControl.FrontendLb, GameControl.FrontendRb }, "Browse"));
         }

         public string Title { get; set; }
@@ -58,37 +63,23 @@
         public int Index;
         private bool _visible;

+        public InstructionalButtons InstructionalButtons { get; }
+
         public void AddTab(TabItem item)
         {
             Tabs.Add(item);
             item.Parent = this;
         }

-        private Scaleform _sc;
         public void ShowInstructionalButtons()
         {
-            if (_sc == null)
-            {
-                _sc = new Scaleform(0);
-                _sc.Load("instructional_buttons");
-            }
-
-            _sc.CallFunction("CLEAR_ALL");
-            _sc.CallFunction("TOGGLE_MOUSE_BUTTONS", 0);
-            _sc.CallFunction("CREATE_CONTAINER");
-
-
-            _sc.CallFunction("SET_DATA_SLOT", 0, (string)NativeFunction.CallByHash(0x0499d7b09fc9b407, typeof(string), 2, (int)GameControl.CellphoneSelect, 0), "Select");
-            _sc.CallFunction("SET_DATA_SLOT", 1, (string)NativeFunction.CallByHash(0x0499d7b09fc9b407, typeof(string), 2, (int)GameControl.CellphoneCancel, 0), "Back");
-
-            _sc.CallFunction("SET_DATA_SLOT", 2, (string)NativeFunction.CallByHash(0x0499d7b09fc9b407, typeof(string), 2, (int)GameControl.FrontendRb, 0), "");
-            _sc.CallFunction("SET_DATA_SLOT", 3, (string)NativeFunction.CallByHash(0x0499d7b09fc9b407, typeof(string), 2, (int)GameControl.FrontendLb, 0), "Browse");
+            InstructionalButtons.Draw();

         }

         public void DrawInstructionalButton(int slot, GameControl control, string text)
         {
-            _sc.CallFunction("SET_DATA_SLOT", slot, (string)NativeFunction.CallByHash(0x0499d7b09fc9b407, typeof(string), 2, (int)control, 0), text);
+            InstructionalButtons.Buttons.Add(new InstructionalButton(control, text));
         }

         public void ProcessControls()
@@ -289,10 +280,6 @@
             }

             Tabs[Index].Draw();
-
-            _sc.CallFunction("DRAW_INSTRUCTIONAL_BUTTONS", -1);
-
-            _sc.Render2D();
         }

         public void DrawTextures(Rage.Graphics g)


Fixed bug where backup directory was treated as a file.

--- TeamCityBackup/TeamCityBackup/Clean.cs
+++ TeamCityBackup/TeamCityBackup/Clean.cs
@@ -20,7 +20,7 @@

         public bool Run()
         {
-            if (!File.Exists(options.BackupDirectory))
+            if (!Directory.Exists(options.BackupDirectory))
             {
                 Console.Error.WriteLine("The backup directory '{0}' does not exist.", options.BackupDirectory);
                 return false;


Test #1305, allow unordered fields in any sequence

Currently not required as ordering places columns in known order, but this may change in future.  Columns without specific order may be in any order in final table.

--- Tests/Linq/UserTests/Issue1305Tests.cs
+++ Tests/Linq/UserTests/Issue1305Tests.cs
@@ -66,13 +66,17 @@
 				var table = s.Tables.FirstOrDefault(_ => _.TableName.Equals("ColumnOrderTest", StringComparison.OrdinalIgnoreCase));
 				Assert.IsNotNull(table);

+				// Confirm order of specified fields only
 				Assert.AreEqual("RecordID",			table.Columns[0].ColumnName);
 				Assert.AreEqual("EffectiveStart",   table.Columns[1].ColumnName);
 				Assert.AreEqual("EffectiveEnd",     table.Columns[2].ColumnName);
 				Assert.AreEqual("Key",              table.Columns[3].ColumnName);
-				Assert.AreEqual("Name",             table.Columns[4].ColumnName);
-				Assert.AreEqual("Code",             table.Columns[5].ColumnName);
 				Assert.AreEqual("AuditID",          table.Columns[6].ColumnName);
+
+				// Confirm that unordered fields are in the right range of positions
+				string[] unordered = new[] { "Name", "Code" };
+				Assert.Contains(table.Columns[4].ColumnName, unordered);
+				Assert.Contains(table.Columns[5].ColumnName, unordered);
 			}
 		}
 #endif


Fixed test that broke with zxing.net update

--- Tests/Tests.MonoTouch/DecodingTests.cs
+++ Tests/Tests.MonoTouch/DecodingTests.cs
@@ -95,10 +95,9 @@

 			var barcodeReader = new BarcodeReader(null, (brimg) => 			                                      {
-
-				using (var bmp = new Bitmap(brimg))
-					return new RGBLuminanceSource(bmp, bmp.Width, bmp.Height);
-
+
+				return new RGBLuminanceSource(uimg);
+
 			}, null, null); //(p, w, h, f) => new RGBLuminanceSource(p, w, h, RGBLuminanceSource.BitmapFormat.Unknown));

 			var r = barcodeReader.Decode(uimg);


fix weed scything

fix weed scything

--- TractorMod/Framework/TractorManager.cs
+++ TractorMod/Framework/TractorManager.cs
@@ -253,7 +253,8 @@
                         this.TemporarilyCheckAction(tile);
                     else if (obj.name.ToLower().Contains("weed"))
                     {
-                        obj.performToolAction(tool);
+                        this.UseToolOnTile(tool, tile); // doesn't do anything to the weed, but sets up for the tool action (e.g. sets last user)
+                        obj.performToolAction(tool);    // triggers weed drops, but doesn't remove weed
                         location.removeObject(tile, false);
                     }
                 }


minor fix in message

minor fix in message

--- Src/Pc/Compiler/Compiler.cs
+++ Src/Pc/Compiler/Compiler.cs
@@ -989,7 +989,7 @@
             List<string> importedFiles,
             Dictionary<string, Dictionary<int, SourceInfo>> idToSourceInfo)
         {
-            using (this.Profiler.Start("Compiler generating C", Path.GetFileName(RootProgramName.ToString())))
+            using (this.Profiler.Start("Compiler generating code", Path.GetFileName(RootProgramName.ToString())))
             {
                 // Load all dependencies of P2CProgram.4ml in order
                 LoadManifestProgram("P.4ml");


138: 	After using context menu of tray icon to exit SuperPutty it can't be started again (adding check to never save minimized state)

git-svn-id: c7824798988443d6e8397993074642516d192594@197 8d6e282c-8220-11de-b77e-d9b456c0130a

--- SuperPutty/frmSuperPutty.cs
+++ SuperPutty/frmSuperPutty.cs
@@ -148,7 +148,7 @@
             if (SuperPuTTY.Settings.RestoreWindowLocation)// && this.WindowState != FormWindowState.Minimized)
             {
                 SuperPuTTY.Settings.WindowPosition = this.lastNormalDesktopBounds;
-                SuperPuTTY.Settings.WindowState = this.WindowState;
+                SuperPuTTY.Settings.WindowState = this.WindowState == FormWindowState.Minimized ? FormWindowState.Normal : this.WindowState;
                 SuperPuTTY.Settings.Save();
             }


Go to end of command with key up/down

Go to end of command with key up/down

git-svn-id: c7824798988443d6e8397993074642516d192594@116 8d6e282c-8220-11de-b77e-d9b456c0130a

--- SuperPutty/frmSuperPutty.cs
+++ SuperPutty/frmSuperPutty.cs
@@ -594,6 +594,7 @@
                     if (commandMRUIndex >= 0)
                     {
                         tsSendCommandCombo.Text = (string) tsSendCommandCombo.Items[commandMRUIndex];
+                        tsSendCommandCombo.SelectionStart = tsSendCommandCombo.Text.Length;
                     }
                 }
                 e.Handled = true;
@@ -610,6 +611,7 @@
                     if (commandMRUIndex < tsSendCommandCombo.Items.Count)
                     {
                         tsSendCommandCombo.Text = (string)tsSendCommandCombo.Items[commandMRUIndex];
+                        tsSendCommandCombo.SelectionStart = tsSendCommandCombo.Text.Length;
                     }
                 }
                 e.Handled = true;


fix bugs in BitWriter

fix bugs in BitWriter

--- SwfSharp/Utils/BitWriter.cs
+++ SwfSharp/Utils/BitWriter.cs
@@ -130,6 +130,7 @@

         private static uint GetBitsForFieldNeg(int value)
         {
+            if (value == -1) return 2;
             const uint mask = 0x80000000;
             var bits = 32U;
             while ((value & mask) != 0 && bits > 0)
@@ -277,25 +278,20 @@
             }
         }

-        private static uint GetFixed(float data)
+        private static int GetFixed(float data)
         {
             var value = data * 65536.0;
-            return (uint) value;
+            return (int) value;
         }

         public void WriteBitSizeAndData(uint sizeBits, float[] data)
         {
-            var values = new uint[data.Length];
+            var values = new int[data.Length];
             for (int i = 0; i < data.Length; i++)
             {
                 values[i] = GetFixed(data[i]);
             }
-            var bitsPerValue = MinBitsPerField(values);
-            WriteBits(sizeBits, bitsPerValue);
-            for (int i = 0; i < values.Length; i++)
-            {
-                WriteBits(bitsPerValue, values[i]);
-            }
+            WriteBitSizeAndData(sizeBits, values);
         }

         public void WriteBitSizeAndData(uint sizeBits, uint[] data)


Skip JSON checking for load tests

Skip JSON checking for load tests

--- TMDbLibTests/ClientTests.cs
+++ TMDbLibTests/ClientTests.cs
@@ -83,6 +83,9 @@
         [Fact]
         public void ClientRateLimitTest()
         {
+            IgnoreMissingJson = true;
+            IgnoreMissingProperties = true;
+
             const int id = IdHelper.AGoodDayToDieHard;

             TMDbClient client = new TMDbClient(TestConfig.APIKey);