public void NewDay() { readyChecks.Clear(); luauIngredients.Clear(); grangeDisplay.Clear(); movieInvitations.Clear(); }
public override void _GetOneFrom(Item source) { combinedRings.Clear(); foreach (Ring combinedRing in (source as CombinedRing).combinedRings) { Ring ring = combinedRing.getOne() as Ring; combinedRings.Add(ring); } loadDisplayFields(); base._GetOneFrom(source); }
public void Refresh() { NetList.Clear(); try { var builder = new LSBuilder(); var obj = builder.Get(MARKET_URL); if (obj["status"].Value.Equals("success")) { NetList = obj["tag"].GetValue(typeof(List <Metadata>)) as List <Metadata>; } } catch (Exception e) { } }
public void Refresh() { NetList.Clear(); try { var builder = new LSBuilder(); var obj = builder.Get(Config["MarketUrl"].Value); if (obj["status"].Value.Equals("success")) { NetList = obj["tag"].GetValue(typeof(List <Metadata>)) as List <Metadata>; } } catch (Exception e) { throw new PluginExecption("PluginListDownloadError"); } }
public override void DayUpdate(int dayOfMonth) { base.DayUpdate(dayOfMonth); if (dayOfMonth % 7 % 5 == 0) { travelingMerchantDay = true; travelingMerchantBounds.Add(new Microsoft.Xna.Framework.Rectangle(1472, 640, 492, 116)); travelingMerchantBounds.Add(new Microsoft.Xna.Framework.Rectangle(1652, 744, 76, 48)); travelingMerchantBounds.Add(new Microsoft.Xna.Framework.Rectangle(1812, 744, 104, 48)); foreach (Microsoft.Xna.Framework.Rectangle travelingMerchantBound in travelingMerchantBounds) { Utility.clearObjectsInArea(travelingMerchantBound, this); } if (Game1.IsMasterGame && Game1.netWorldState.Value.VisitsUntilY1Guarantee >= 0) { Game1.netWorldState.Value.VisitsUntilY1Guarantee--; } } else { travelingMerchantBounds.Clear(); travelingMerchantDay = false; } if (Game1.currentSeason.Equals("spring")) { for (int i = 0; i < 7; i++) { Vector2 origin = new Vector2(Game1.random.Next(70, map.Layers[0].LayerWidth - 10), Game1.random.Next(68, map.Layers[0].LayerHeight - 15)); if (!(origin.Y > 30f)) { continue; } foreach (Vector2 v in Utility.recursiveFindOpenTiles(this, origin, 16)) { string s = doesTileHaveProperty((int)v.X, (int)v.Y, "Diggable", "Back"); if (!terrainFeatures.ContainsKey(v) && s != null && Game1.random.NextDouble() < (double)(1f - Vector2.Distance(origin, v) * 0.15f)) { terrainFeatures.Add(v, new HoeDirt(0, new Crop(forageCrop: true, 1, (int)v.X, (int)v.Y))); } } } } if (Game1.year > 2 && getCharacterFromName("TrashBear") != null) { characters.Remove(getCharacterFromName("TrashBear")); } }
public override void TransferDataFromSavedLocation(GameLocation l) { base.TransferDataFromSavedLocation(l); IslandFieldOffice loc = l as IslandFieldOffice; uncollectedRewards.Clear(); uncollectedRewards.Set(loc.uncollectedRewards); piecesDonated.Clear(); piecesDonated.Set(loc.piecesDonated); centerSkeletonRestored.Value = loc.centerSkeletonRestored.Value; snakeRestored.Value = loc.snakeRestored.Value; batRestored.Value = loc.batRestored.Value; frogRestored.Value = loc.frogRestored.Value; plantsRestoredLeft.Value = loc.plantsRestoredLeft.Value; plantsRestoredRight.Value = loc.plantsRestoredRight.Value; hasFailedSurveyToday.Value = loc.hasFailedSurveyToday.Value; }
public void NewDay() { if (Game1.IsClient) { return; } readyChecks.Clear(); luauIngredients.Clear(); if (grangeDisplay.Count > 0) { for (int i = 0; i < grangeDisplay.Count; i++) { Item item = grangeDisplay[i]; grangeDisplay[i] = null; if (item != null) { returnedDonations.Add(item); newLostAndFoundItems.Value = true; } } } grangeDisplay.Clear(); movieInvitations.Clear(); }
public override void UpdateWhenCurrentLocation(GameTime time) { enterValueEvent.Poll(); if ((localPhase != 1 || currentPlaybackCrystalSequenceIndex < 0 || currentPlaybackCrystalSequenceIndex >= currentCrystalSequence.Count) && localPhase != netPhase.Value) { localPhaseTimer = netPhaseTimer.Value; localPhase = netPhase.Value; if (localPhase != 1) { currentPlaybackCrystalSequenceIndex = -1; } else { currentPlaybackCrystalSequenceIndex = 0; } } base.UpdateWhenCurrentLocation(time); foreach (CaveCrystal crystal in crystals) { crystal.update(); } if (localPhaseTimer > 0f) { localPhaseTimer -= (float)time.ElapsedGameTime.TotalMilliseconds; if (localPhaseTimer <= 0f) { switch (localPhase) { case 0: case 4: currentPlaybackCrystalSequenceIndex = 0; if (Game1.IsMasterGame) { currentDifficulty.Value++; currentCrystalSequence.Clear(); currentCrystalSequenceIndex.Value = 0; if ((int)currentDifficulty > (((int)timesFailed < 8) ? 7 : 6)) { netPhaseTimer.Value = 10f; netPhase.Value = 5; break; } for (int i = 0; i < (int)currentDifficulty; i++) { currentCrystalSequence.Add(Game1.random.Next(5)); } netPhase.Value = 1; } betweenNotesTimer = 600f; break; case 5: if (Game1.currentLocation == this) { Game1.playSound("fireball"); Utility.addSmokePuff(this, new Vector2(5f, 1f) * 64f); Utility.addSmokePuff(this, new Vector2(7f, 1f) * 64f); } if (Game1.IsMasterGame) { Game1.player.team.MarkCollectedNut("IslandWestCavePuzzle"); Game1.createObjectDebris(73, 5, 1, this); Game1.createObjectDebris(73, 7, 1, this); Game1.createObjectDebris(73, 6, 1, this); } completed.Value = true; if (Game1.currentLocation == this) { addCompletionTorches(); } break; } } } int num = localPhase; if (num != 1) { _ = 5; return; } betweenNotesTimer -= (float)time.ElapsedGameTime.TotalMilliseconds; if (!(betweenNotesTimer <= 0f) || currentCrystalSequence.Count <= 0 || currentPlaybackCrystalSequenceIndex < 0) { return; } int which = currentCrystalSequence[currentPlaybackCrystalSequenceIndex]; if (which < crystals.Count) { crystals[which].activate(); } currentPlaybackCrystalSequenceIndex++; int betweenNotesDivisor = currentDifficulty; if ((int)currentDifficulty > 5) { betweenNotesDivisor--; if ((int)timesFailed >= 4) { betweenNotesDivisor--; } if ((int)timesFailed >= 6) { betweenNotesDivisor--; } if ((int)timesFailed >= 8) { betweenNotesDivisor = 3; } } else if ((int)timesFailed >= 4 && (int)currentDifficulty > 4) { betweenNotesDivisor--; } betweenNotesTimer = 1500f / (float)betweenNotesDivisor; if ((int)currentDifficulty > (((int)timesFailed < 8) ? 7 : 6)) { betweenNotesTimer = 100f; } if (currentPlaybackCrystalSequenceIndex < currentCrystalSequence.Count) { return; } currentPlaybackCrystalSequenceIndex = -1; if ((int)currentDifficulty > (((int)timesFailed < 8) ? 7 : 6)) { if (Game1.IsMasterGame) { netPhaseTimer.Value = 1000f; netPhase.Value = 5; } } else if (Game1.IsMasterGame) { netPhase.Value = 2; currentCrystalSequenceIndex.Value = 0; } }