/// <summary> /// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /// /// why do I do these things /// </summary> public void PopulateMovementData() { // Only populate the MovementData dictionary once, if (MovementData.Any() || movementTileData == null) { return; } foreach (var movementData in movementTileData.movementData) { if (MovementData.ContainsKey(movementData.movementType)) { continue; } MovementData.Add(movementData.movementType, movementData); } // If we have a general movement rule then assign it to any movement types that don't have data if (MovementData.ContainsKey(MovementType.General)) { var generalMovementRule = MovementData[MovementType.General]; foreach (var movementType in Enum.GetValues(typeof(MovementType)).Cast <MovementType>()) { if (MovementData.ContainsKey(movementType)) { continue; } MovementData.Add(movementType, generalMovementRule); } } }