Exemplo n.º 1
0
        public void Edit <T>(IAssetData asset)
        {
            if (asset.AssetNameEquals("Data\\CraftingRecipes"))
            {
                if (ja == null)
                {
                    return;
                }

                var dict = asset.AsDictionary <string, string>().Data;
                dict.Add("Frosty Stardrop", ja.GetObjectId("Frosty Stardrop Piece") + " 5/Field/434/false/null");
            }
            else if (asset.AssetNameEquals("Strings\\StringsFromMaps"))
            {
                var dict = asset.AsDictionary <string, string>().Data;
                dict.Add("FrostDungeon.LockedEntrance", "This door is locked right now.");
                dict.Add("FrostDungeon.Locked", "This door is locked. It probably needs a key.");
                dict.Add("FrostDungeon.LockedBoss", "This giant door is locked. Perhaps something nearby can open it.");
                dict.Add("FrostDungeon.Unlock", "The door has been unlocked.");
                dict.Add("FrostDungeon.ItemPuzzle", "There seems to be a silhouette on the pedestal.");
                dict.Add("FrostDungeon.Target", "A target.");
                dict.Add("FrostDungeon.Trail0", "Some festive lights.");
                dict.Add("FrostDungeon.Trail1", "A smashed candy cane.");
                dict.Add("FrostDungeon.Trail2", "Some festive ornaments.");
                dict.Add("FrostDungeon.Trail3", "A smashed miniature tree.");
            }
        }
Exemplo n.º 2
0
 private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
 {
     jsonAssets              = this.Helper.ModRegistry.GetApi <JsonAssetsAPI>("spacechase0.JsonAssets");
     jsonAssets.IdsAssigned += delegate(object sender2, EventArgs e2)
     {
         wt_id = jsonAssets.GetObjectId("White Turnip");
         sp_id = jsonAssets.GetObjectId("Spoiled Turnip");
     };
 }
Exemplo n.º 3
0
        private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
        {
            UpdateLastestTimeData();
            turnipPrice.Update(this.lastestTimeData.daysPlayed / 7);
            SetWhiteTurnipPrice(turnipPrice.GetTurnipPrice(lastestTimeData));

            DaisyMaeManager.createNPC();

            wt_id = jsonAssets.GetObjectId("White Turnip");
            sp_id = jsonAssets.GetObjectId("Spoiled Turnip");
        }
Exemplo n.º 4
0
        private void onButtonPressed(object sender, ButtonPressedEventArgs e)
        {
            if (e.Button.IsActionButton() && Game1.player.ActiveObject != null &&
                Game1.player.ActiveObject.Name.StartsWith("Critter Cage: "))
            {
                // Get the critter ID
                CritterData activeCritter = null;
                foreach (var critterData in CrittersData)
                {
                    int check = ja.GetObjectId("Critter Cage: " + critterData.Value.Name());
                    if (check == Game1.player.ActiveObject.ParentSheetIndex)
                    {
                        activeCritter = critterData.Value;
                        break;
                    }
                }

                // Spawn the critter
                int x = (int)e.Cursor.GrabTile.X + 1, y = (int)e.Cursor.GrabTile.Y + 1;
                var critter = activeCritter.MakeFunction(x, y);
                Game1.player.currentLocation.addCritter(critter);

                Game1.player.reduceActiveItemByOne();

                Helper.Input.Suppress(e.Button);
            }
        }
Exemplo n.º 5
0
        private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
        {
            for (int i = 0; i < MaxFish; i++)
            {
                fIDS.Add(ja.GetObjectId(ofNames[i]));

                //Monitor.Log($"Fish ID: {fIDS[i]}");
            }


            GenerateFish();


            this.Helper.Content.InvalidateCache("Data/Fish");
            this.Helper.Content.InvalidateCache("Data/Locations");
            this.Helper.Content.InvalidateCache("Data/ObjectInformation");
        }