Пример #1
0
 public override void TransferDataFromSavedLocation(GameLocation l)
 {
     if (l is IslandNorth)
     {
         IslandNorth location = l as IslandNorth;
         bridgeFixed.Value     = location.bridgeFixed;
         boulderRemoved.Value  = location.boulderRemoved;
         treeNutShot.Value     = location.treeNutShot.Value;
         caveOpened.Value      = location.caveOpened.Value;
         traderActivated.Value = location.traderActivated.Value;
     }
     base.TransferDataFromSavedLocation(l);
 }
Пример #2
0
 public override string checkForBuriedItem(int xLocation, int yLocation, bool explosion, bool detectOnly, Farmer who)
 {
     if (xLocation == 27 && yLocation == 28 && who.secretNotesSeen.Contains(1010))
     {
         Game1.player.team.RequestLimitedNutDrops("Island_N_BuriedTreasureNut", this, xLocation * 64, yLocation * 64, 1);
         if (!Game1.player.hasOrWillReceiveMail("Island_N_BuriedTreasure"))
         {
             Game1.createItemDebris(new Object(289, 1), new Vector2(xLocation, yLocation) * 64f, 1);
             Game1.addMailForTomorrow("Island_N_BuriedTreasure", noLetter: true);
         }
     }
     if (xLocation == 26 && yLocation == 81 && !Game1.player.team.collectedNutTracker.ContainsKey("Buried_IslandNorth_26_81"))
     {
         DelayedAction.functionAfterDelay(delegate
         {
             IslandNorth islandNorth   = this;
             TemporaryAnimatedSprite t = getTemporarySpriteByID(79797);
             if (t != null)
             {
                 t.sourceRectStartingPos.X += 40f;
                 t.sourceRect.X             = 181;
                 t.interval       = 100f;
                 t.shakeIntensity = 1f;
                 playSound("monkey1");
                 t.motion                = new Vector2(-3f, -10f);
                 t.acceleration          = new Vector2(0f, 0.3f);
                 t.yStopCoordinate       = (int)t.position.Y + 1;
                 t.reachedStopCoordinate = delegate
                 {
                     islandNorth.temporarySprites.Add(new TemporaryAnimatedSprite(50, t.position, Color.Green)
                     {
                         drawAboveAlwaysFront = true
                     });
                     islandNorth.removeTemporarySpritesWithID(79797);
                     islandNorth.playSound("leafrustle");
                 };
             }
         }, 700);
     }
     return(base.checkForBuriedItem(xLocation, yLocation, explosion, detectOnly, who));
 }