public override void Load(SpecialOrder order, Dictionary <string, string> data) { if (data.ContainsKey("AcceptedContextTags")) { acceptableContextTagSets.Add(order.Parse(data["AcceptedContextTags"])); } }
public void addWorldStateID(string id) { if (!hasWorldStateID(id)) { worldStateIDs.Add(id); } }
public void loadQuestInfo() { if (whoToGreet.Count <= 0) { base.questTitle = Game1.content.LoadString("Strings\\StringsFromCSFiles:SocializeQuest.cs.13785"); parts.Clear(); parts.Add(new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13786", (random.NextDouble() < 0.3) ? new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13787") : ((random.NextDouble() < 0.5) ? new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13788") : new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13789")))); parts.Add("Strings\\StringsFromCSFiles:SocializeQuest.cs.13791"); foreach (string name in Game1.content.Load <Dictionary <string, string> >("Data\\NPCDispositions").Keys) { switch (name) { default: whoToGreet.Add(name); break; case "Kent": case "Sandy": case "Dwarf": case "Marlon": case "Wizard": case "Krobus": break; } } objective.Value = new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13802", "2", whoToGreet.Count); total.Value = whoToGreet.Count; whoToGreet.Remove("Lewis"); whoToGreet.Remove("Robin"); } }
public void loadQuestInfo() { if (whoToGreet.Count > 0) { return; } base.questTitle = Game1.content.LoadString("Strings\\StringsFromCSFiles:SocializeQuest.cs.13785"); parts.Clear(); parts.Add(new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13786", (random.NextDouble() < 0.3) ? new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13787") : ((random.NextDouble() < 0.5) ? new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13788") : new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13789")))); parts.Add("Strings\\StringsFromCSFiles:SocializeQuest.cs.13791"); Dictionary <string, string> npcs = Game1.content.Load <Dictionary <string, string> >("Data\\NPCDispositions"); foreach (string name in npcs.Keys) { switch (name) { case "Kent": case "Sandy": case "Dwarf": case "Marlon": case "Wizard": case "Krobus": case "Leo": continue; } if (!(npcs[name].Split('/')[7] != "Town")) { whoToGreet.Add(name); } } objective.Value = new DescriptionElement("Strings\\StringsFromCSFiles:SocializeQuest.cs.13802", "2", whoToGreet.Count); total.Value = whoToGreet.Count; whoToGreet.Remove("Lewis"); whoToGreet.Remove("Robin"); }
public Crop(int seedIndex, int tileX, int tileY) : this() { Dictionary <int, string> cropData = Game1.content.Load <Dictionary <int, string> >("Data\\Crops"); if (seedIndex == 770) { seedIndex = getRandomLowGradeCropForThisSeason(Game1.currentSeason); if (seedIndex == 473) { seedIndex--; } } if (cropData.ContainsKey(seedIndex)) { string[] split = cropData[seedIndex].Split('/'); string[] phaseSplit = split[0].Split(' '); for (int k = 0; k < phaseSplit.Length; k++) { phaseDays.Add(Convert.ToInt32(phaseSplit[k])); } phaseDays.Add(99999); string[] seasonSplit = split[1].Split(' '); for (int j = 0; j < seasonSplit.Length; j++) { seasonsToGrowIn.Add(seasonSplit[j]); } rowInSpriteSheet.Value = Convert.ToInt32(split[2]); if ((int)rowInSpriteSheet == 23) { whichForageCrop.Value = seedIndex; } else { netSeedIndex.Value = seedIndex; } indexOfHarvest.Value = Convert.ToInt32(split[3]); regrowAfterHarvest.Value = Convert.ToInt32(split[4]); harvestMethod.Value = Convert.ToInt32(split[5]); ResetCropYield(); raisedSeeds.Value = Convert.ToBoolean(split[7]); string[] programColors = split[8].Split(' '); if (programColors.Length != 0 && programColors[0].Equals("true")) { List <Color> colors = new List <Color>(); for (int i = 1; i < programColors.Length; i += 3) { colors.Add(new Color(Convert.ToByte(programColors[i]), Convert.ToByte(programColors[i + 1]), Convert.ToByte(programColors[i + 2]))); } Random r = new Random(tileX * 1000 + tileY + Game1.dayOfMonth); tintColor.Value = colors[r.Next(colors.Count)]; programColored.Value = true; } flip.Value = (Game1.random.NextDouble() < 0.5); } updateDrawMath(new Vector2(tileX, tileY)); }
public override void Load(SpecialOrder order, Dictionary <string, string> data) { if (data.ContainsKey("AcceptedContextTags")) { acceptableContextTagSets.Add(order.Parse(data["AcceptedContextTags"])); } if (data.ContainsKey("UseShipmentValue") && data["UseShipmentValue"].ToLowerInvariant().Trim() == "true") { useShipmentValue.Value = true; } }
public override void Load(SpecialOrder order, Dictionary <string, string> data) { if (data.ContainsKey("AcceptedContextTags")) { acceptableContextTagSets.Add(order.Parse(data["AcceptedContextTags"])); } if (data.ContainsKey("MinimumLikeLevel")) { minimumLikeLevel.Value = (LikeLevels)Enum.Parse(typeof(LikeLevels), data["MinimumLikeLevel"]); } }
public override void Load(SpecialOrder order, Dictionary <string, string> data) { base.Load(order, data); if (data.ContainsKey("TargetName")) { string[] array = order.Parse(data["TargetName"]).Split(','); foreach (string target in array) { targetNames.Add(target.Trim()); } } }
public override void Load(SpecialOrder order, Dictionary <string, string> data) { string[] array = order.Parse(data["MailReceived"]).Split(' '); foreach (string s in array) { grantedMails.Add(s); } if (data.ContainsKey("NoLetter")) { noLetter.Value = Convert.ToBoolean(order.Parse(data["NoLetter"])); } if (data.ContainsKey("Host")) { host.Value = Convert.ToBoolean(order.Parse(data["Host"])); } }
public override void Load(SpecialOrder order, Dictionary <string, string> data) { if (data.ContainsKey("AcceptedContextTags")) { acceptableContextTagSets.Add(order.Parse(data["AcceptedContextTags"])); } if (data.ContainsKey("TargetName")) { targetName.Value = order.Parse(data["TargetName"]); } else { targetName.Value = _order.requester.Value; } if (data.ContainsKey("Message")) { message.Value = order.Parse(data["Message"]); } else { message.Value = ""; } }
public override void Load(SpecialOrder order, Dictionary <string, string> data) { if (data.ContainsKey("AcceptedContextTags")) { acceptableContextTagSets.Add(order.Parse(data["AcceptedContextTags"].Trim())); } if (data.ContainsKey("DropBox")) { dropBox.Value = order.Parse(data["DropBox"].Trim()); } if (data.ContainsKey("DropBoxGameLocation")) { dropBoxGameLocation.Value = order.Parse(data["DropBoxGameLocation"].Trim()); } if (data.ContainsKey("DropBoxIndicatorLocation")) { string coordinates = order.Parse(data["DropBoxIndicatorLocation"]); dropBoxTileLocation.Value = new NetVector2(new Vector2((float)Convert.ToDouble(coordinates.Split(' ')[0]), (float)Convert.ToDouble(coordinates.Split(' ')[1]))); } if (data.ContainsKey("MinimumCapacity")) { minimumCapacity.Value = int.Parse(order.Parse(data["MinimumCapacity"])); } }