Skip to content

Instantly share code, notes, and snippets.

@M3ales
Last active October 31, 2021 00:15
Show Gist options
  • Save M3ales/568b279706d98428777e1247f4b7f1b4 to your computer and use it in GitHub Desktop.
Save M3ales/568b279706d98428777e1247f4b7f1b4 to your computer and use it in GitHub Desktop.
All possible debug commands and their functionality, that can be invoked from the SMAPI console by using the 'debug' command. (1.3.24)
public bool parseDebugInput(string debugInput)
{
Game1.lastDebugInput = debugInput;
debugInput = debugInput.Trim();
string[] debugSplit = debugInput.Split(' ');
try
{
if (Game1.panMode)
{
if (debugSplit[0].Equals("exit") || debugSplit[0].ToLower().Equals("panmode"))
{
Game1.panMode = false;
Game1.viewportFreeze = false;
this.panModeString = "";
Game1.debugMode = false;
Game1.debugOutput = "";
this.panFacingDirectionWait = false;
return true;
}
if (debugSplit[0].Equals("clear"))
{
this.panModeString = "";
Game1.debugOutput = "";
this.panFacingDirectionWait = false;
return true;
}
if (this.panFacingDirectionWait)
return false;
int result = 0;
if (int.TryParse(debugSplit[0], out result))
{
this.panModeString = this.panModeString + (this.panModeString.Length > 0 ? (object) "/" : (object) "") + (object) result + " ";
Game1.debugOutput = this.panModeString + Game1.content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3191");
}
return true;
}
switch (debugSplit[0])
{
case "KillAllHorses":
using (IEnumerator<GameLocation> enumerator = Game1.locations.GetEnumerator())
{
while (enumerator.MoveNext())
{
GameLocation current = enumerator.Current;
for (int index = current.characters.Count - 1; index >= 0; --index)
{
if (current.characters[index] is Horse)
{
current.characters.RemoveAt(index);
Game1.playSound("drumkit0");
}
}
}
break;
}
case "LSD":
Game1.bloom.startShifting((float) Convert.ToDouble(debugSplit[1]), (float) Convert.ToDouble(debugSplit[2]), (float) Convert.ToDouble(debugSplit[3]) / 1000f, (float) Convert.ToDouble(debugSplit[4]) / 100f, (float) Convert.ToDouble(debugSplit[5]) / 100f, (float) Convert.ToDouble(debugSplit[6]) / 100f, (float) Convert.ToDouble(debugSplit[7]) / 100f, (float) Convert.ToDouble(debugSplit[8]) / 100f, (float) Convert.ToDouble(debugSplit[9]) / 100f, (float) Convert.ToDouble(debugSplit[10]) / 100f, (float) Convert.ToDouble(debugSplit[11]), true);
break;
case "TV":
Game1.player.addItemToInventoryBool((Item) new TV(Game1.random.NextDouble() < 0.5 ? 1466 : 1468, Vector2.Zero), false);
break;
case "achieve":
Program.sdk.GetAchievement(debugSplit[1]);
break;
case "achievement":
Game1.getAchievement(Convert.ToInt32(debugSplit[1]));
break;
case "addAllCrafting":
using (Dictionary<string, string>.KeyCollection.Enumerator enumerator = CraftingRecipe.craftingRecipes.Keys.GetEnumerator())
{
while (enumerator.MoveNext())
Game1.player.craftingRecipes.Add(enumerator.Current, 0);
break;
}
case "addJunimo":
case "aj":
case "j":
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).addCharacter((NPC) new Junimo(new Vector2((float) Convert.ToInt32(debugSplit[1]), (float) Convert.ToInt32(debugSplit[2])) * 64f, Convert.ToInt32(debugSplit[3]), false));
break;
case "addKent":
Game1.getLocationFromName("SamHouse").characters.Add(new NPC(new AnimatedSprite("Characters\\Kent"), new Vector2(512f, 832f), "SamHouse", 3, "Kent", false, (Dictionary<int, int[]>) null, Game1.content.Load<Texture2D>("Portraits\\Kent")));
Game1.player.friendshipData.Add("Kent", new Friendship());
break;
case "addOtherFarmer":
Farmer owner = new Farmer(new FarmerSprite("Characters\\Farmer\\farmer_base"), new Vector2(Game1.player.Position.X - 64f, Game1.player.Position.Y), 2, Dialogue.randomName(), (List<Item>) null, true);
owner.changeShirt(Game1.random.Next(40));
owner.changePants(new Color(Game1.random.Next((int) byte.MaxValue), Game1.random.Next((int) byte.MaxValue), Game1.random.Next((int) byte.MaxValue)));
owner.changeHairStyle(Game1.random.Next(FarmerRenderer.hairStylesTexture.Height / 96 * 8));
if (Game1.random.NextDouble() < 0.5)
owner.changeHat(Game1.random.Next(-1, FarmerRenderer.hatsTexture.Height / 80 * 12));
else
Game1.player.changeHat(-1);
owner.changeHairColor(new Color(Game1.random.Next((int) byte.MaxValue), Game1.random.Next((int) byte.MaxValue), Game1.random.Next((int) byte.MaxValue)));
owner.changeSkinColor(Game1.random.Next(16));
owner.FarmerSprite.setOwner(owner);
owner.currentLocation = Game1.currentLocation;
Game1.otherFarmers.Add((long) Game1.random.Next(), owner);
break;
case "al":
case "ambientLight":
Game1.ambientLight = new Color(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]), Convert.ToInt32(debugSplit[3]));
break;
case "allMail":
using (Dictionary<string, string>.KeyCollection.Enumerator enumerator = Game1.content.Load<Dictionary<string, string>>("Data\\mail").Keys.GetEnumerator())
{
while (enumerator.MoveNext())
Game1.addMailForTomorrow(enumerator.Current, false, false);
break;
}
case "allbundles":
foreach (KeyValuePair<int, NetArray<bool, NetBool>> fieldPair in (Game1.getLocationFromName("CommunityCenter") as CommunityCenter).bundles.FieldPairs)
{
for (int index = 0; index < fieldPair.Value.Count; ++index)
fieldPair.Value[index] = true;
}
Game1.playSound("crystal");
break;
case "animal":
Utility.addAnimalToFarm(new FarmAnimal(debugInput.Substring(debugInput.IndexOf(' ')).Trim(), Game1.multiplayer.getNewID(), Game1.player.UniqueMultiplayerID));
break;
case "animalInfo":
Game1.showGlobalMessage(string.Concat((object) Game1.getFarm().getAllFarmAnimals().Count));
break;
case "ax":
Game1.player.addItemToInventoryBool((Item) new Axe(), false);
Game1.playSound("coin");
break;
case "b":
case "bi":
case "big":
case "bigitem":
if (Game1.bigCraftablesInformation.ContainsKey(Convert.ToInt32(debugSplit[1])))
{
Game1.playSound("coin");
Game1.player.addItemToInventory((Item) new Object(Vector2.Zero, Convert.ToInt32(debugSplit[1]), false));
break;
}
break;
case "backpack":
Game1.player.increaseBackpackSize(Math.Min(20 - (int) ((NetFieldBase<int, NetInt>) Game1.player.maxItems), Convert.ToInt32(debugSplit[1])));
break;
case "barn":
case "upgradebarn":
Game1.player.BarnUpgradeLevel = Math.Min(3, Game1.player.BarnUpgradeLevel + 1);
Game1.removeFrontLayerForFarmBuildings();
Game1.addNewFarmBuildingMaps();
break;
case "bc":
case "buildcoop":
Game1.getFarm().buildStructure(new BluePrint("Coop"), new Vector2((float) Convert.ToInt32(debugSplit[1]), (float) Convert.ToInt32(debugSplit[2])), Game1.player, false, false);
Game1.getFarm().buildings.Last<Building>().daysOfConstructionLeft.Value = 0;
break;
case "beachBridge":
(Game1.getLocationFromName("Beach") as Beach).bridgeFixed.Value = !(bool) ((NetFieldBase<bool, NetBool>) (Game1.getLocationFromName("Beach") as Beach).bridgeFixed);
if (!(bool) ((NetFieldBase<bool, NetBool>) (Game1.getLocationFromName("Beach") as Beach).bridgeFixed))
{
(Game1.getLocationFromName("Beach") as Beach).setMapTile(58, 13, 284, "Buildings", (string) null, 1);
break;
}
break;
case "befriendAnimals":
if (Game1.currentLocation is AnimalHouse)
{
using (IEnumerator<FarmAnimal> enumerator = (Game1.currentLocation as AnimalHouse).animals.Values.GetEnumerator())
{
while (enumerator.MoveNext())
enumerator.Current.friendshipTowardFarmer.Value = debugSplit.Length > 1 ? Convert.ToInt32(debugSplit[1]) : 1000;
break;
}
}
else
break;
case "bloom":
Game1.bloomDay = true;
Game1.bloom.Visible = true;
Game1.bloom.Settings.BloomThreshold = (float) (Convert.ToDouble(debugSplit[1]) / 10.0);
Game1.bloom.Settings.BlurAmount = (float) (Convert.ToDouble(debugSplit[2]) / 10.0);
Game1.bloom.Settings.BloomIntensity = (float) (Convert.ToDouble(debugSplit[3]) / 10.0);
Game1.bloom.Settings.BaseIntensity = (float) (Convert.ToDouble(debugSplit[4]) / 10.0);
Game1.bloom.Settings.BloomSaturation = (float) (Convert.ToDouble(debugSplit[5]) / 10.0);
Game1.bloom.Settings.BaseSaturation = (float) (Convert.ToDouble(debugSplit[6]) / 10.0);
Game1.bloom.Settings.brightWhiteOnly = debugSplit.Length > 7;
break;
case "bloomDay":
Game1.bloomDay = !Game1.bloomDay;
Game1.bloom.Visible = Game1.bloomDay;
Game1.bloom.reload();
break;
case "bluebook":
Game1.player.items.Add((Item) new Blueprints());
break;
case "blueprint":
Game1.player.blueprints.Add(debugInput.Substring(debugInput.IndexOf(' ')).Trim());
break;
case "boots":
Game1.player.addItemToInventoryBool((Item) new Boots(Convert.ToInt32(debugSplit[1])), false);
Game1.playSound("coin");
break;
case "build":
Game1.getFarm().buildStructure(new BluePrint(debugSplit[1].Replace('9', ' ')), debugSplit.Length > 3 ? new Vector2((float) Convert.ToInt32(debugSplit[2]), (float) Convert.ToInt32(debugSplit[3])) : new Vector2((float) (Game1.player.getTileX() + 1), (float) Game1.player.getTileY()), Game1.player, false, false);
Game1.getFarm().buildings.Last<Building>().daysOfConstructionLeft.Value = 0;
break;
case "bundle":
for (int index = 0; index < (Game1.getLocationFromName("CommunityCenter") as CommunityCenter).bundles[Convert.ToInt32(debugSplit[1])].Length; ++index)
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).bundles.FieldDict[Convert.ToInt32(debugSplit[1])][index] = true;
Game1.playSound("crystal");
break;
case "busDriveBack":
(Game1.getLocationFromName("BusStop") as BusStop).busDriveBack();
break;
case "busDriveOff":
(Game1.getLocationFromName("BusStop") as BusStop).busDriveOff();
break;
case "c":
case "canmove":
case "cm":
Game1.player.isEating = false;
Game1.player.CanMove = true;
Game1.player.UsingTool = false;
Game1.player.usingSlingshot = false;
Game1.player.FarmerSprite.PauseForSingleAnimation = false;
if (Game1.player.CurrentTool is FishingRod)
(Game1.player.CurrentTool as FishingRod).isFishing = false;
if (Game1.player.mount != null)
{
Game1.player.mount.dismount();
break;
}
break;
case "can":
case "wateringcan":
Game1.player.addItemToInventoryBool((Item) new WateringCan(), false);
Game1.playSound("coin");
break;
case "cat":
Game1.currentLocation.characters.Add((NPC) new Cat(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2])));
break;
case "caughtFish":
case "fishCaught":
Game1.stats.FishCaught = (uint) Convert.ToInt32(debugSplit[1]);
break;
case "ccload":
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).loadArea(Convert.ToInt32(debugSplit[1]), true);
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).areasComplete[Convert.ToInt32(debugSplit[1])] = true;
break;
case "ccloadcutscene":
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).restoreAreaCutscene(Convert.ToInt32(debugSplit[1]));
break;
case "characterInfo":
Game1.showGlobalMessage(Game1.currentLocation.characters.Count.ToString() + " characters on this map");
break;
case "child":
case "kid":
if (Game1.player.getChildren().Count > 0)
{
++Game1.player.getChildren()[0].Age;
Game1.player.getChildren()[0].reloadSprite();
break;
}
(Game1.getLocationFromName("FarmHouse") as FarmHouse).characters.Add((NPC) new Child("Baby", Game1.random.NextDouble() < 0.5, Game1.random.NextDouble() < 0.5, Game1.player));
break;
case "child2":
if (Game1.player.getChildren().Count > 1)
{
++Game1.player.getChildren()[1].Age;
Game1.player.getChildren()[1].reloadSprite();
break;
}
(Game1.getLocationFromName("FarmHouse") as FarmHouse).characters.Add((NPC) new Child("Baby2", Game1.random.NextDouble() < 0.5, Game1.random.NextDouble() < 0.5, Game1.player));
break;
case "clearCharacters":
Game1.currentLocation.characters.Clear();
break;
case "clearFurniture":
(Game1.currentLocation as FarmHouse).furniture.Clear();
break;
case "clearLightGlows":
Game1.currentLocation.lightGlows.Clear();
break;
case "clearMail":
Game1.player.mailReceived.Clear();
break;
case "clearMuseum":
(Game1.getLocationFromName("ArchaeologyHouse") as LibraryMuseum).museumPieces.Clear();
break;
case "clearSpecials":
Game1.player.hasRustyKey = false;
Game1.player.hasSkullKey = false;
Game1.player.hasSpecialCharm = false;
Game1.player.hasDarkTalisman = false;
Game1.player.hasMagicInk = false;
Game1.player.hasClubCard = false;
Game1.player.canUnderstandDwarves = false;
Game1.player.hasMagnifyingGlass = false;
break;
case "clearquests":
Game1.player.questLog.Clear();
break;
case "clone":
Game1.currentLocation.characters.Add(Game1.getCharacterFromName(debugSplit[1], false));
break;
case "cmenu":
case "customize":
case "customizeMenu":
Game1.activeClickableMenu = (IClickableMenu) new CharacterCustomization(CharacterCustomization.Source.NewGame);
break;
case "completeCC":
Game1.player.mailReceived.Add("ccCraftsRoom");
Game1.player.mailReceived.Add("ccVault");
Game1.player.mailReceived.Add("ccFishTank");
Game1.player.mailReceived.Add("ccBoilerRoom");
Game1.player.mailReceived.Add("ccPantry");
Game1.player.mailReceived.Add("ccBulletin");
CommunityCenter locationFromName = Game1.getLocationFromName("CommunityCenter") as CommunityCenter;
for (int index = 0; index < locationFromName.areasComplete.Count; ++index)
locationFromName.areasComplete[index] = true;
break;
case "completeJoja":
Game1.player.mailReceived.Add("ccCraftsRoom");
Game1.player.mailReceived.Add("ccVault");
Game1.player.mailReceived.Add("ccFishTank");
Game1.player.mailReceived.Add("ccBoilerRoom");
Game1.player.mailReceived.Add("ccPantry");
Game1.player.mailReceived.Add("jojaCraftsRoom");
Game1.player.mailReceived.Add("jojaVault");
Game1.player.mailReceived.Add("jojaFishTank");
Game1.player.mailReceived.Add("jojaBoilerRoom");
Game1.player.mailReceived.Add("jojaPantry");
Game1.player.mailReceived.Add("JojaMember");
break;
case "completeQuest":
Game1.player.completeQuest(Convert.ToInt32(debugSplit[1]));
break;
case "conventionMode":
Game1.conventionMode = !Game1.conventionMode;
break;
case "cooking":
using (Dictionary<string, string>.KeyCollection.Enumerator enumerator = CraftingRecipe.cookingRecipes.Keys.GetEnumerator())
{
while (enumerator.MoveNext())
{
string current = enumerator.Current;
if (!Game1.player.cookingRecipes.ContainsKey(current))
Game1.player.cookingRecipes.Add(current, 0);
}
break;
}
case "cookingrecipe":
Game1.player.cookingRecipes.Add(debugInput.Substring(debugInput.IndexOf(' ')).Trim(), 0);
break;
case "coop":
case "upgradecoop":
Game1.player.CoopUpgradeLevel = Math.Min(3, Game1.player.CoopUpgradeLevel + 1);
Game1.removeFrontLayerForFarmBuildings();
Game1.addNewFarmBuildingMaps();
break;
case "crafting":
using (Dictionary<string, string>.KeyCollection.Enumerator enumerator = CraftingRecipe.craftingRecipes.Keys.GetEnumerator())
{
while (enumerator.MoveNext())
{
string current = enumerator.Current;
if (!Game1.player.craftingRecipes.ContainsKey(current))
Game1.player.craftingRecipes.Add(current, 0);
}
break;
}
case "craftingrecipe":
Game1.player.craftingRecipes.Add(debugInput.Substring(debugInput.IndexOf(' ')).Trim(), 0);
break;
case "dap":
case "daysPlayed":
Game1.showGlobalMessage(Game1.content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3332", (object) (int) Game1.stats.DaysPlayed));
break;
case "darkTalisman":
Game1.player.hasDarkTalisman = true;
Game1.getLocationFromName("Railroad").setMapTile(54, 35, 287, "Buildings", "", 1);
Game1.getLocationFromName("Railroad").setMapTile(54, 34, 262, "Front", "", 1);
Game1.getLocationFromName("WitchHut").setMapTile(4, 11, 114, "Buildings", "", 1);
Game1.getLocationFromName("WitchHut").setTileProperty(4, 11, "Buildings", "Action", "MagicInk");
Game1.player.hasMagicInk = false;
Game1.player.mailReceived.Clear();
break;
case "dateplayer":
using (IEnumerator<Farmer> enumerator = Game1.getAllFarmers().GetEnumerator())
{
while (enumerator.MoveNext())
{
Farmer current = enumerator.Current;
if (current != Game1.player && (bool) ((NetFieldBase<bool, NetBool>) current.isCustomized))
{
Game1.player.team.GetFriendship(Game1.player.UniqueMultiplayerID, current.UniqueMultiplayerID).Status = FriendshipStatus.Dating;
break;
}
}
break;
}
case "dating":
Game1.player.friendshipData[debugSplit[1]].Status = FriendshipStatus.Dating;
break;
case "day":
Game1.stats.DaysPlayed = (uint) ((Utility.getSeasonNumber(Game1.currentSeason) * 28 + Convert.ToInt32(debugSplit[1])) * Game1.year);
Game1.dayOfMonth = Convert.ToInt32(debugSplit[1]);
break;
case "dayUpdate":
Game1.currentLocation.DayUpdate(Game1.dayOfMonth);
if (debugSplit.Length > 1)
{
for (int index = 0; index < Convert.ToInt32(debugSplit[1]) - 1; ++index)
Game1.currentLocation.DayUpdate(Game1.dayOfMonth);
break;
}
break;
case "db":
Game1.activeClickableMenu = (IClickableMenu) new DialogueBox(Game1.getCharacterFromName(debugSplit.Length > 1 ? debugSplit[1] : "Pierre", false).CurrentDialogue.Peek());
break;
case "debrisWeather":
Game1.debrisWeather.Clear();
Game1.isDebrisWeather = !Game1.isDebrisWeather;
if (Game1.isDebrisWeather)
{
Game1.populateDebrisWeatherArray();
break;
}
break;
case "deleteArch":
Game1.player.archaeologyFound.Clear();
Game1.player.fishCaught.Clear();
Game1.player.mineralsFound.Clear();
Game1.player.mailReceived.Clear();
break;
case "deliveryquest":
Game1.player.questLog.Add((Quest) new ItemDeliveryQuest());
break;
case "dialogue":
Game1.getCharacterFromName(debugSplit[1], false).CurrentDialogue.Push(new Dialogue(debugInput.Substring(debugInput.IndexOf("0") + 1), Game1.getCharacterFromName(debugSplit[1], false)));
break;
case "die":
Game1.player.health = 0;
break;
case "divorce":
Game1.player.divorceTonight.Value = true;
break;
case "doesItemExist":
Game1.showGlobalMessage(Utility.doesItemWithThisIndexExistAnywhere(Convert.ToInt32(debugSplit[1]), debugSplit.Length > 2) ? "Yes" : "No");
break;
case "dog":
Game1.currentLocation.characters.Add((NPC) new Dog(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2])));
break;
case "dp":
Game1.stats.daysPlayed = (uint) Convert.ToInt32(debugSplit[1]);
break;
case "ee":
Game1.pauseTime = 0.0f;
Game1.nonWarpFade = true;
Game1.eventFinished();
Game1.fadeScreenToBlack();
Game1.viewportFreeze = false;
break;
case "emote":
Game1.player.doEmote(Convert.ToInt32(debugSplit[1]));
break;
case "end":
Game1.warpFarmer("Town", 20, 20, false);
Game1.getLocationFromName("Town").currentEvent = new Event(Utility.getStardewHeroCelebrationEventString(90), -1, (Farmer) null);
this.makeCelebrationWeatherDebris();
Utility.perpareDayForStardewCelebration(90);
break;
case "endEvent":
case "leaveEvent":
Game1.pauseTime = 0.0f;
Game1.player.eventsSeen.Clear();
Game1.player.dialogueQuestionsAnswered.Clear();
Game1.player.mailReceived.Clear();
Game1.nonWarpFade = true;
Game1.eventFinished();
Game1.fadeScreenToBlack();
Game1.viewportFreeze = false;
break;
case "energize":
Game1.player.Stamina = (float) Game1.player.MaxStamina;
if (debugSplit.Length > 1)
{
Game1.player.Stamina = (float) Convert.ToInt32(debugSplit[1]);
break;
}
break;
case "engaged":
Game1.player.changeFriendship(2500, Game1.getCharacterFromName(debugSplit[1], false));
Game1.player.spouse = debugSplit[1];
Game1.player.friendshipData[debugSplit[1]].Status = FriendshipStatus.Engaged;
WorldDate date1 = Game1.Date;
++date1.TotalDays;
Game1.player.friendshipData[debugSplit[1]].WeddingDate = date1;
break;
case "engageplayer":
using (IEnumerator<Farmer> enumerator = Game1.getAllFarmers().GetEnumerator())
{
while (enumerator.MoveNext())
{
Farmer current = enumerator.Current;
if (current != Game1.player && (bool) ((NetFieldBase<bool, NetBool>) current.isCustomized))
{
Friendship friendship = Game1.player.team.GetFriendship(Game1.player.UniqueMultiplayerID, current.UniqueMultiplayerID);
friendship.Status = FriendshipStatus.Engaged;
friendship.WeddingDate = Game1.Date;
++friendship.WeddingDate.TotalDays;
break;
}
}
break;
}
case "event":
if (debugSplit.Length <= 3)
Game1.player.eventsSeen.Clear();
string locationName = debugSplit[1];
if (locationName == "Pool")
locationName = "BathHouse_Pool";
if (Game1.content.Load<Dictionary<string, string>>("Data\\Events\\" + locationName).ElementAt<KeyValuePair<string, string>>(Convert.ToInt32(debugSplit[2])).Key.Contains<char>('/'))
{
LocationRequest locationRequest = Game1.getLocationRequest(locationName, false);
locationRequest.OnLoad += (LocationRequest.Callback) (() => Game1.currentLocation.currentEvent = new Event(Game1.content.Load<Dictionary<string, string>>("Data\\Events\\" + locationName).ElementAt<KeyValuePair<string, string>>(Convert.ToInt32(debugSplit[2])).Value, -1, (Farmer) null));
Game1.warpFarmer(locationRequest, 8, 8, Game1.player.FacingDirection);
break;
}
break;
case "eventOver":
Game1.eventFinished();
break;
case "eventseen":
case "seenevent":
Game1.player.eventsSeen.Add(Convert.ToInt32(debugSplit[1]));
break;
case "exhaust":
Game1.player.Stamina = -15f;
break;
case "experience":
Game1.player.gainExperience(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]));
break;
case "f":
case "floor":
(Game1.getLocationFromName("FarmHouse") as FarmHouse).setFloor(debugSplit.Length > 1 ? Convert.ToInt32(debugSplit[1]) : (Game1.getLocationFromName("FarmHouse") as FarmHouse).floor[0] + 1, -1, true);
break;
case "face":
case "faceDirection":
case "fd":
if (debugSplit[1].Equals("farmer"))
{
Game1.player.Halt();
Game1.player.completelyStopAnimatingOrDoingAction();
Game1.player.faceDirection(Convert.ToInt32(debugSplit[2]));
break;
}
Game1.getCharacterFromName(debugSplit[1], false).faceDirection(Convert.ToInt32(debugSplit[2]));
break;
case "facePlayer":
Game1.getCharacterFromName(debugSplit[1], false).faceTowardFarmer = true;
break;
case "farmMap":
for (int index = 0; index < Game1.locations.Count; ++index)
{
if (Game1.locations[index] is Farm)
Game1.locations.RemoveAt(index);
if (Game1.locations[index] is FarmHouse)
Game1.locations.RemoveAt(index);
}
Game1.whichFarm = Convert.ToInt32(debugSplit[1]);
Game1.locations.Add((GameLocation) new Farm("Maps\\" + Farm.getMapNameFromTypeInt(Game1.whichFarm), "Farm"));
Game1.locations.Add((GameLocation) new FarmHouse("Maps\\FarmHouse", "FarmHouse"));
break;
case "fb":
case "fillbin":
Game1.getFarm().shippingBin.Add((Item) new Object(24, 1, false, -1, 0));
Game1.getFarm().shippingBin.Add((Item) new Object(82, 1, false, -1, 0));
Game1.getFarm().shippingBin.Add((Item) new Object(136, 1, false, -1, 0));
Game1.getFarm().shippingBin.Add((Item) new Object(16, 1, false, -1, 0));
Game1.getFarm().shippingBin.Add((Item) new Object(388, 1, false, -1, 0));
break;
case "fbp":
case "fill":
case "fillbackpack":
case "fillbp":
for (int index = 0; index < Game1.player.items.Count; ++index)
{
if (Game1.player.items[index] == null)
{
int num = -1;
while (!Game1.objectInformation.ContainsKey(num))
num = Game1.random.Next(1000);
bool flag = false;
if (num >= 516 && num <= 534)
flag = true;
if (flag)
Game1.player.items[index] = (Item) new Ring(num);
else
Game1.player.items[index] = (Item) new Object(num, 1, false, -1, 0);
}
}
break;
case "fenceDecay":
using (IEnumerator<Object> enumerator = Game1.currentLocation.objects.Values.GetEnumerator())
{
while (enumerator.MoveNext())
{
object current = (object) enumerator.Current;
if (current is Fence)
(current as Fence).health.Value -= (float) Convert.ToInt32(debugSplit[1]);
}
break;
}
case "festivalScore":
Game1.player.festivalScore += Convert.ToInt32(debugSplit[1]);
break;
case "ff":
case "furniture":
if (debugSplit.Length < 2)
{
Furniture furniture = (Furniture) null;
while (furniture == null)
{
try
{
furniture = new Furniture(Game1.random.Next(1613), Vector2.Zero);
}
catch (Exception ex)
{
}
}
Game1.player.addItemToInventoryBool((Item) furniture, false);
break;
}
Game1.player.addItemToInventoryBool((Item) new Furniture(Convert.ToInt32(debugSplit[1]), Vector2.Zero), false);
break;
case "fish":
Game1.activeClickableMenu = (IClickableMenu) new BobberBar(Convert.ToInt32(debugSplit[1]), 0.5f, true, (Game1.player.CurrentTool as FishingRod).attachments[1] != null ? (Game1.player.CurrentTool as FishingRod).attachments[1].ParentSheetIndex : -1);
break;
case "fishing":
Game1.player.FishingLevel = Convert.ToInt32(debugSplit[1]);
break;
case "fixAnimals":
Farm farm1 = Game1.getFarm();
using (IEnumerator<Building> enumerator = farm1.buildings.GetEnumerator())
{
while (enumerator.MoveNext())
{
Building current = enumerator.Current;
if (current.indoors.Value != null && current.indoors.Value is AnimalHouse)
{
foreach (FarmAnimal farmAnimal in (current.indoors.Value as AnimalHouse).animals.Values)
{
foreach (Building building in farm1.buildings)
{
if (building.indoors.Value != null && building.indoors.Value is AnimalHouse && ((building.indoors.Value as AnimalHouse).animalsThatLiveHere.Contains((long) ((NetFieldBase<long, NetLong>) farmAnimal.myID)) && !building.Equals((object) farmAnimal.home)))
{
for (int index = (building.indoors.Value as AnimalHouse).animalsThatLiveHere.Count - 1; index >= 0; --index)
{
if ((building.indoors.Value as AnimalHouse).animalsThatLiveHere[index] == (long) ((NetFieldBase<long, NetLong>) farmAnimal.myID))
{
(building.indoors.Value as AnimalHouse).animalsThatLiveHere.RemoveAt(index);
Game1.playSound("crystal");
}
}
}
}
}
for (int index = (current.indoors.Value as AnimalHouse).animalsThatLiveHere.Count - 1; index >= 0; --index)
{
if (Utility.getAnimal((current.indoors.Value as AnimalHouse).animalsThatLiveHere[index]) == null)
{
(current.indoors.Value as AnimalHouse).animalsThatLiveHere.RemoveAt(index);
Game1.playSound("crystal");
}
}
}
}
break;
}
case "fo":
case "frameOffset":
int num1 = debugSplit[2].Contains<char>('s') ? -1 : 1;
FarmerRenderer.featureXOffsetPerFrame[Convert.ToInt32(debugSplit[1])] = (int) (short) (num1 * Convert.ToInt32(debugSplit[2].Last<char>().ToString() ?? ""));
int num2 = debugSplit[3].Contains<char>('s') ? -1 : 1;
FarmerRenderer.featureYOffsetPerFrame[Convert.ToInt32(debugSplit[1])] = (int) (short) (num2 * Convert.ToInt32(debugSplit[3].Last<char>().ToString() ?? ""));
if (debugSplit.Length > 4)
{
int num3 = debugSplit[4].Contains<char>('s') ? -1 : 1;
break;
}
break;
case "friend":
case "friendship":
NPC characterFromName = Game1.getCharacterFromName(debugSplit[1], false);
if (characterFromName != null && !Game1.player.friendshipData.ContainsKey(characterFromName.Name))
Game1.player.friendshipData.Add(characterFromName.Name, new Friendship());
Game1.player.friendshipData[debugSplit[1]].Points = Convert.ToInt32(debugSplit[2]);
break;
case "friendAll":
using (DisposableList<NPC>.Enumerator enumerator = Utility.getAllCharacters().GetEnumerator())
{
while (enumerator.MoveNext())
{
NPC current = enumerator.Current;
if (current != null && !Game1.player.friendshipData.ContainsKey(current.Name))
Game1.player.friendshipData.Add(current.Name, new Friendship());
Game1.player.changeFriendship(2500, current);
}
break;
}
case "fruitTrees":
using (IEnumerator<KeyValuePair<Vector2, TerrainFeature>> enumerator = Game1.currentLocation.terrainFeatures.Pairs.GetEnumerator())
{
while (enumerator.MoveNext())
{
KeyValuePair<Vector2, TerrainFeature> current = enumerator.Current;
if (current.Value is FruitTree)
{
(current.Value as FruitTree).daysUntilMature.Value -= 27;
current.Value.dayUpdate(Game1.currentLocation, current.Key);
}
}
break;
}
case "gamePad":
Game1.options.gamepadControls = !Game1.options.gamepadControls;
Game1.options.mouseControls = !Game1.options.gamepadControls;
Game1.showGlobalMessage(Game1.options.gamepadControls ? Game1.content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3209") : Game1.content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3210"));
break;
case "gamemode":
Game1.setGameMode(Convert.ToByte(debugSplit[1]));
break;
case "getstat":
Game1.debugOutput = Game1.stats.GetType().GetProperty(debugSplit[1]).GetValue((object) Game1.stats, (object[]) null).ToString();
break;
case "gold":
Game1.player.Money += 1000000;
break;
case "growAnimals":
using (IEnumerator<FarmAnimal> enumerator = (Game1.currentLocation as AnimalHouse).animals.Values.GetEnumerator())
{
while (enumerator.MoveNext())
{
FarmAnimal current = enumerator.Current;
current.age.Value = (int) (byte) ((NetFieldBase<byte, NetByte>) current.ageWhenMature) - 1;
current.dayUpdate(Game1.currentLocation);
}
break;
}
case "growAnimalsFarm":
using (IEnumerator<FarmAnimal> enumerator = (Game1.currentLocation as Farm).animals.Values.GetEnumerator())
{
while (enumerator.MoveNext())
{
FarmAnimal current = enumerator.Current;
if (current.isBaby())
{
current.age.Value = (int) (byte) ((NetFieldBase<byte, NetByte>) current.ageWhenMature) - 1;
current.dayUpdate(Game1.currentLocation);
}
}
break;
}
case "growCrops":
using (IEnumerator<KeyValuePair<Vector2, TerrainFeature>> enumerator = Game1.currentLocation.terrainFeatures.Pairs.GetEnumerator())
{
while (enumerator.MoveNext())
{
KeyValuePair<Vector2, TerrainFeature> current = enumerator.Current;
if (current.Value is HoeDirt && (current.Value as HoeDirt).crop != null)
{
for (int index = 0; index < Convert.ToInt32(debugSplit[1]); ++index)
{
if ((current.Value as HoeDirt).crop != null)
(current.Value as HoeDirt).crop.newDay(1, -1, (int) current.Key.X, (int) current.Key.Y, Game1.getLocationFromName("Farm"));
}
}
}
break;
}
case "growgrass":
Game1.currentLocation.spawnWeeds(false);
Game1.currentLocation.growWeedGrass(Convert.ToInt32(debugSplit[1]));
break;
case "hairColor":
Game1.player.changeHairColor(new Color(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]), Convert.ToInt32(debugSplit[3])));
break;
case "hairStyle":
Game1.player.changeHairStyle(Convert.ToInt32(debugSplit[1]));
break;
case "hat":
Game1.player.changeHat(Convert.ToInt32(debugSplit[1]));
Game1.playSound("coin");
break;
case "heal":
Game1.player.health = Game1.player.maxHealth;
break;
case "hoe":
Game1.player.addItemToInventoryBool((Item) new Hoe(), false);
Game1.playSound("coin");
break;
case "horse":
Game1.currentLocation.characters.Add((NPC) new Horse(Guid.NewGuid(), Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2])));
break;
case "house":
case "houseUpgrade":
case "hu":
Utility.getHomeOfFarmer(Game1.player).moveObjectsForHouseUpgrade(Convert.ToInt32(debugSplit[1]));
Utility.getHomeOfFarmer(Game1.player).setMapForUpgradeLevel(Convert.ToInt32(debugSplit[1]));
Game1.player.HouseUpgradeLevel = Convert.ToInt32(debugSplit[1]);
Game1.removeFrontLayerForFarmBuildings();
Game1.addNewFarmBuildingMaps();
break;
case "hurry":
Game1.getCharacterFromName(debugSplit[1], false).warpToPathControllerDestination();
break;
case "i":
case "item":
if (Game1.objectInformation.ContainsKey(Convert.ToInt32(debugSplit[1])))
{
Game1.playSound("coin");
Game1.player.addItemToInventoryBool((Item) new Object(Convert.ToInt32(debugSplit[1]), debugSplit.Length >= 3 ? Convert.ToInt32(debugSplit[2]) : 1, false, -1, debugSplit.Length >= 4 ? Convert.ToInt32(debugSplit[3]) : 0), false);
break;
}
break;
case "in":
case "itemnamed":
using (IEnumerator<int> enumerator = Game1.objectInformation.Keys.GetEnumerator())
{
while (enumerator.MoveNext())
{
int current = enumerator.Current;
if (Game1.objectInformation[current].Substring(0, Game1.objectInformation[current].IndexOf('/')).ToLower().Replace(" ", "").Equals(debugSplit[1]))
{
Game1.player.addItemToInventory((Item) new Object(current, debugSplit.Length >= 3 ? Convert.ToInt32(debugSplit[2]) : 1, false, -1, debugSplit.Length >= 4 ? Convert.ToInt32(debugSplit[3]) : 0));
Game1.playSound("coin");
}
}
break;
}
case "jn":
case "junimoNote":
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).addJunimoNote(Convert.ToInt32(debugSplit[1]));
break;
case "jump":
float jumpVelocity = 8f;
if (debugSplit.Length > 2)
jumpVelocity = (float) Convert.ToDouble(debugSplit[2]);
if (debugSplit[1].Equals("farmer"))
{
Game1.player.jump(jumpVelocity);
break;
}
Game1.getCharacterFromName(debugSplit[1], false).jump(jumpVelocity);
break;
case "junimoStar":
((Game1.getLocationFromName("CommunityCenter") as CommunityCenter).characters[0] as Junimo).returnToJunimoHutToFetchStar((GameLocation) (Game1.getLocationFromName("CommunityCenter") as CommunityCenter));
break;
case "killAll":
string str1 = debugSplit[1];
using (IEnumerator<GameLocation> enumerator = Game1.locations.GetEnumerator())
{
while (enumerator.MoveNext())
{
GameLocation current = enumerator.Current;
if (!current.Equals(Game1.currentLocation))
{
current.characters.Clear();
}
else
{
for (int index = current.characters.Count - 1; index >= 0; --index)
{
if (!current.characters[index].Name.Equals(str1))
current.characters.RemoveAt(index);
}
}
}
break;
}
case "killMonsterStat":
case "kms":
string key1 = debugSplit[1].Replace("0", " ");
int int32_1 = Convert.ToInt32(debugSplit[2]);
if (Game1.stats.specificMonstersKilled.ContainsKey(key1))
Game1.stats.specificMonstersKilled[key1] = int32_1;
else
Game1.stats.specificMonstersKilled.Add(key1, int32_1);
Game1.debugOutput = Game1.content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3159", (object) key1, (object) int32_1);
break;
case "killNPC":
for (int index1 = Game1.locations.Count - 1; index1 >= 0; --index1)
{
for (int index2 = 0; index2 < Game1.locations[index1].characters.Count; ++index2)
{
if (Game1.locations[index1].characters[index2].Name.Equals(debugSplit[1]))
{
Game1.locations[index1].characters.RemoveAt(index2);
break;
}
}
}
break;
case "ladder":
case "shaft":
if (debugSplit.Length > 1)
{
Game1.mine.createLadderDown(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]), debugSplit[0] == "shaft");
break;
}
Game1.mine.createLadderDown(Game1.player.getTileX(), Game1.player.getTileY() + 1, debugSplit[0] == "shaft");
break;
case "lantern":
Game1.player.items.Add((Item) new Lantern());
break;
case "levelup":
Game1.activeClickableMenu = (IClickableMenu) new LevelUpMenu(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]));
break;
case "localInfo":
Game1.debugOutput = "";
int num4 = 0;
int num5 = 0;
int num6 = 0;
foreach (TerrainFeature terrainFeature in Game1.currentLocation.terrainFeatures.Values)
{
if (terrainFeature is Grass)
++num4;
else if (terrainFeature is Tree)
++num5;
else
++num6;
}
Game1.debugOutput = Game1.debugOutput + "Grass:" + (object) num4 + ", ";
Game1.debugOutput = Game1.debugOutput + "Trees:" + (object) num5 + ", ";
Game1.debugOutput = Game1.debugOutput + "Other Terrain Features:" + (object) num6 + ", ";
Game1.debugOutput = Game1.debugOutput + "Objects: " + (object) Game1.currentLocation.objects.Count() + ", ";
Game1.debugOutput = Game1.debugOutput + "temporarySprites: " + (object) Game1.currentLocation.temporarySprites.Count + ", ";
Game1.drawObjectDialogue(Game1.debugOutput);
break;
case "lookup":
case "lu":
using (IEnumerator<int> enumerator = Game1.objectInformation.Keys.GetEnumerator())
{
while (enumerator.MoveNext())
{
int current = enumerator.Current;
if (Game1.objectInformation[current].Substring(0, Game1.objectInformation[current].IndexOf('/')).ToLower().Equals(debugInput.Substring(debugInput.IndexOf(' ') + 1)))
Game1.debugOutput = debugSplit[1] + " " + (object) current;
}
break;
}
case "m":
case "musicvolume":
case "mv":
Game1.musicPlayerVolume = (float) Convert.ToDouble(debugSplit[1]);
Game1.options.musicVolumeLevel = (float) Convert.ToDouble(debugSplit[1]);
Game1.musicCategory.SetVolume(Game1.options.musicVolumeLevel);
break;
case "mailForTomorrow":
case "mft":
Game1.addMailForTomorrow(debugSplit[1].Replace('0', '_'), debugSplit.Length > 2, false);
break;
case "mainMenu":
case "mainmenu":
case "removeDebris":
Game1.currentLocation.debris.Clear();
break;
case "makeEx":
Game1.player.friendshipData[debugSplit[1]].Status = FriendshipStatus.Divorced;
break;
case "makeInedible":
if (Game1.player.ActiveObject != null)
{
Game1.player.ActiveObject.edibility.Value = -300;
break;
}
break;
case "marry":
Game1.player.changeFriendship(2500, Game1.getCharacterFromName(debugSplit[1], false));
Game1.player.spouse = debugSplit[1];
Game1.player.friendshipData[debugSplit[1]].Status = FriendshipStatus.Married;
Game1.prepareSpouseForWedding();
break;
case "marryplayer":
using (IEnumerator<Farmer> enumerator = Game1.getOnlineFarmers().GetEnumerator())
{
while (enumerator.MoveNext())
{
Farmer current = enumerator.Current;
if (current != Game1.player && (bool) ((NetFieldBase<bool, NetBool>) current.isCustomized))
{
Friendship friendship = Game1.player.team.GetFriendship(Game1.player.UniqueMultiplayerID, current.UniqueMultiplayerID);
friendship.Status = FriendshipStatus.Married;
friendship.WeddingDate = Game1.Date;
break;
}
}
break;
}
case "mineinfo":
Game1.debugOutput = "MineShaft.lowestLevelReached = " + (object) MineShaft.lowestLevelReached + "\nplayer.deepestMineLevel = " + (object) Game1.player.deepestMineLevel;
break;
case "minelevel":
Game1.enterMine(Convert.ToInt32(debugSplit[1]));
break;
case "minigame":
string str2 = debugSplit[1];
if (!(str2 == "cowboy"))
{
if (!(str2 == "blastoff"))
{
if (!(str2 == "minecart"))
{
if (str2 == "grandpa")
{
Game1.currentMinigame = (IMinigame) new GrandpaStory();
break;
}
break;
}
Game1.currentMinigame = (IMinigame) new MineCart(5, 4);
break;
}
Game1.currentMinigame = (IMinigame) new RobotBlastoff();
break;
}
Game1.updateViewportForScreenSizeChange(false, Game1.graphics.PreferredBackBufferWidth, Game1.graphics.PreferredBackBufferHeight);
Game1.currentMinigame = (IMinigame) new AbigailGame(false);
break;
case "money":
Game1.player.Money = Convert.ToInt32(debugSplit[1]);
break;
case "monster":
Type type = Type.GetType("StardewValley.Monsters." + debugSplit[1]);
Vector2 vector2 = new Vector2(Convert.ToSingle(debugSplit[2]), Convert.ToSingle(debugSplit[3])) * 64f;
object[] objArray;
if (debugSplit.Length > 4)
objArray = new object[2]
{
(object) vector2,
(object) Convert.ToInt32(debugSplit[4])
};
else
objArray = new object[1]{ (object) vector2 };
Monster instance = Activator.CreateInstance(type, objArray) as Monster;
Game1.currentLocation.characters.Add((NPC) instance);
break;
case "morepollen":
for (int index = 0; index < Convert.ToInt32(debugSplit[1]); ++index)
{
List<WeatherDebris> debrisWeather = Game1.debrisWeather;
Random random1 = Game1.random;
int minValue1 = 0;
Viewport viewport = Game1.graphics.GraphicsDevice.Viewport;
int width = viewport.Width;
double num3 = (double) random1.Next(minValue1, width);
Random random2 = Game1.random;
int minValue2 = 0;
viewport = Game1.graphics.GraphicsDevice.Viewport;
int height = viewport.Height;
double num7 = (double) random2.Next(minValue2, height);
WeatherDebris weatherDebris = new WeatherDebris(new Vector2((float) num3, (float) num7), 0, (float) Game1.random.Next(15) / 500f, (float) Game1.random.Next(-10, 0) / 50f, (float) Game1.random.Next(10) / 50f);
debrisWeather.Add(weatherDebris);
}
break;
case "movebuilding":
Game1.getFarm().getBuildingAt(new Vector2((float) Convert.ToInt32(debugSplit[1]), (float) Convert.ToInt32(debugSplit[2]))).tileX.Value = Convert.ToInt32(debugSplit[3]);
Game1.getFarm().getBuildingAt(new Vector2((float) Convert.ToInt32(debugSplit[1]), (float) Convert.ToInt32(debugSplit[2]))).tileY.Value = Convert.ToInt32(debugSplit[4]);
break;
case "mp":
Game1.player.addItemToInventoryBool((Item) new MilkPail(), false);
break;
case "museumloot":
using (IEnumerator<KeyValuePair<int, string>> enumerator = Game1.objectInformation.GetEnumerator())
{
while (enumerator.MoveNext())
{
KeyValuePair<int, string> current = enumerator.Current;
string str3 = current.Value.Split('/')[3];
if ((str3.Contains("Arch") || str3.Contains("Minerals")) && (!Game1.player.mineralsFound.ContainsKey(current.Key) && !Game1.player.archaeologyFound.ContainsKey(current.Key)))
{
if (str3.Contains("Arch"))
Game1.player.foundArtifact(current.Key, 1);
else
Game1.player.addItemToInventoryBool((Item) new Object(current.Key, 1, false, -1, 0), false);
}
if (Game1.player.freeSpotsInInventory() == 0)
return true;
}
break;
}
case "mushroomTrees":
using (IEnumerator<TerrainFeature> enumerator = Game1.currentLocation.terrainFeatures.Values.GetEnumerator())
{
while (enumerator.MoveNext())
{
TerrainFeature current = enumerator.Current;
if (current is Tree)
(current as Tree).treeType.Value = 7;
}
break;
}
case "netclear":
Game1.multiplayer.logging.Clear();
break;
case "netdump":
Game1.debugOutput = "Wrote log to " + Game1.multiplayer.logging.Dump();
break;
case "nethost":
Game1.multiplayer.StartServer();
break;
case "netjoin":
Game1.activeClickableMenu = (IClickableMenu) new FarmhandMenu();
break;
case "netlog":
Game1.multiplayer.logging.IsLogging = !Game1.multiplayer.logging.IsLogging;
Game1.debugOutput = "Turned " + (Game1.multiplayer.logging.IsLogging ? "on" : "off") + " network write logging";
break;
case "noSave":
case "nosave":
case "ns":
Game1.saveOnNewDay = !Game1.saveOnNewDay;
if (!Game1.saveOnNewDay)
{
Game1.playSound("bigDeSelect");
break;
}
Game1.playSound("bigSelect");
break;
case "note":
if (!Game1.player.archaeologyFound.ContainsKey(102))
Game1.player.archaeologyFound.Add(102, new int[2]);
Game1.player.archaeologyFound[102][0] = 18;
Game1.currentLocation.readNote(Convert.ToInt32(debugSplit[1]));
break;
case "owl":
Game1.currentLocation.addOwl();
break;
case "pan":
Game1.player.addItemToInventoryBool((Item) new Pan(), false);
break;
case "panMode":
case "panmode":
case "pm":
Game1.panMode = true;
Game1.viewportFreeze = true;
Game1.debugMode = true;
this.panFacingDirectionWait = false;
this.panModeString = "";
break;
case "pants":
Game1.player.changePants(new Color(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]), Convert.ToInt32(debugSplit[3])));
break;
case "petToFarm":
(Game1.getCharacterFromName(Game1.player.getPetName(), false) as Pet).setAtFarmPosition();
break;
case "pick":
case "pickax":
case "pickaxe":
Game1.player.addItemToInventoryBool((Item) new Pickaxe(), false);
Game1.playSound("coin");
break;
case "plaque":
(Game1.getLocationFromName("CommunityCenter") as CommunityCenter).addStarToPlaque();
break;
case "playMusic":
Game1.changeMusicTrack(debugSplit[1]);
break;
case "playSound":
case "ps":
Game1.playSound(debugSplit[1]);
break;
case "pole":
Game1.player.addItemToInventoryBool((Item) new FishingRod(debugSplit.Length > 1 ? Convert.ToInt32(debugSplit[1]) : 0), false);
break;
case "pregnant":
WorldDate date2 = Game1.Date;
++date2.TotalDays;
Game1.player.GetSpouseFriendship().NextBirthingDate = date2;
Game1.player.getRidOfChildren();
break;
case "profession":
Game1.player.professions.Add(Convert.ToInt32(debugSplit[1]));
break;
case "quest":
Game1.player.questLog.Add(Quest.getQuestFromId(Convert.ToInt32(debugSplit[1])));
break;
case "question":
Game1.player.dialogueQuestionsAnswered.Add(Convert.ToInt32(debugSplit[1]));
break;
case "quests":
foreach (int key2 in Game1.content.Load<Dictionary<int, string>>("Data\\Quests").Keys)
{
if (!Game1.player.hasQuest(key2))
Game1.player.addQuest(key2);
}
Game1.player.questLog.Add((Quest) new ItemDeliveryQuest());
Game1.player.questLog.Add((Quest) new SlayMonsterQuest());
break;
case "r":
Game1.currentLocation.cleanupBeforePlayerExit();
Game1.currentLocation.resetForPlayerEntry();
break;
case "rain":
Game1.isRaining = !Game1.isRaining;
Game1.isDebrisWeather = false;
break;
case "readyForHarvest":
case "rfh":
Game1.currentLocation.objects[new Vector2((float) Convert.ToInt32(debugSplit[1]), (float) Convert.ToInt32(debugSplit[2]))].minutesUntilReady.Value = 1;
break;
case "refuel":
if (Game1.player.getToolFromName("Lantern") != null)
{
((Lantern) Game1.player.getToolFromName("Lantern")).fuelLeft = 100;
break;
}
break;
case "removeBuildings":
Game1.getFarm().buildings.Clear();
break;
case "removeDirt":
for (int index = Game1.currentLocation.terrainFeatures.Count() - 1; index >= 0; --index)
{
KeyValuePair<Vector2, TerrainFeature> keyValuePair = Game1.currentLocation.terrainFeatures.Pairs.ElementAt<KeyValuePair<Vector2, TerrainFeature>>(index);
if (keyValuePair.Value is HoeDirt)
{
NetVector2Dictionary<TerrainFeature, NetRef<TerrainFeature>> terrainFeatures = Game1.currentLocation.terrainFeatures;
keyValuePair = Game1.currentLocation.terrainFeatures.Pairs.ElementAt<KeyValuePair<Vector2, TerrainFeature>>(index);
Vector2 key2 = keyValuePair.Key;
terrainFeatures.Remove(key2);
}
}
break;
case "removeFurniture":
(Game1.currentLocation as DecoratableLocation).furniture.Clear();
break;
case "removeLargeTF":
Game1.currentLocation.largeTerrainFeatures.Clear();
break;
case "removeLights":
Game1.currentLightSources.Clear();
break;
case "removeNPC":
foreach (GameLocation location in (IEnumerable<GameLocation>) Game1.locations)
{
foreach (NPC character in location.characters)
{
if (character.Name == debugSplit[1])
{
location.characters.Remove(character);
Game1.debugOutput = "Removed " + debugSplit[1] + " from " + location.Name;
return true;
}
}
if (location is BuildableGameLocation)
{
foreach (Building building in (location as BuildableGameLocation).buildings)
{
if (building.indoors.Value != null)
{
foreach (NPC character in building.indoors.Value.characters)
{
if (character.Name == debugSplit[1])
{
building.indoors.Value.characters.Remove(character);
Game1.debugOutput = "Removed " + debugSplit[1] + " from " + (string) ((NetFieldBase<string, NetString>) building.indoors.Value.uniqueName);
return true;
}
}
}
}
}
}
Game1.debugOutput = "Couldn't find " + debugSplit[1];
break;
case "removeObjects":
Game1.currentLocation.objects.Clear();
break;
case "removeQuest":
Game1.player.removeQuest(Convert.ToInt32(debugSplit[1]));
break;
case "removeTF":
case "removeTerrainFeatures":
Game1.currentLocation.terrainFeatures.Clear();
break;
case "resetAchievements":
Program.sdk.ResetAchievements();
break;
case "resetJunimoNotes":
using (IEnumerator<NetArray<bool, NetBool>> enumerator = (Game1.getLocationFromName("CommunityCenter") as CommunityCenter).bundles.Fields.GetEnumerator())
{
while (enumerator.MoveNext())
{
NetArray<bool, NetBool> current = enumerator.Current;
for (int index = 0; index < current.Count; ++index)
current[index] = false;
}
break;
}
case "resetMines":
MineShaft.permanentMineChanges.Clear();
Game1.playSound("jingle1");
break;
case "resource":
Debris.getDebris(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]));
break;
case "ring":
Game1.player.addItemToInventoryBool((Item) new Ring(Convert.ToInt32(debugSplit[1])), false);
Game1.playSound("coin");
break;
case "save":
Game1.saveOnNewDay = !Game1.saveOnNewDay;
if (Game1.saveOnNewDay)
{
Game1.playSound("bigSelect");
break;
}
Game1.playSound("bigDeSelect");
break;
case "sb":
Game1.getCharacterFromName(debugSplit[1], false).showTextAboveHead(Game1.content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3206"), -1, 2, 3000, 0);
break;
case "scissors":
case "shears":
Game1.player.addItemToInventoryBool((Item) new Shears(), false);
break;
case "sdkinfo":
case "steaminfo":
Program.sdk.DebugInfo();
break;
case "season":
Game1.currentSeason = debugSplit[1];
Game1.setGraphicsForSeason();
break;
case "seenmail":
Game1.player.mailReceived.Add(debugSplit[1]);
break;
case "setFrame":
case "sf":
Game1.player.FarmerSprite.PauseForSingleAnimation = true;
Game1.player.FarmerSprite.setCurrentSingleAnimation(Convert.ToInt32(debugSplit[1]));
break;
case "setUpFarm":
Game1.getFarm().buildings.Clear();
for (int x = 0; x < Game1.getFarm().map.Layers[0].LayerWidth; ++x)
{
for (int y = 0; y < 16 + (debugSplit.Length > 1 ? 32 : 0); ++y)
Game1.getFarm().removeEverythingExceptCharactersFromThisTile(x, y);
}
for (int x = 56; x < 71; ++x)
{
for (int y = 17; y < 34; ++y)
{
Game1.getFarm().removeEverythingExceptCharactersFromThisTile(x, y);
if (x > 57 && y > 18 && (x < 70 && y < 29))
Game1.getFarm().terrainFeatures.Add(new Vector2((float) x, (float) y), (TerrainFeature) new HoeDirt());
}
}
Game1.getFarm().buildStructure(new BluePrint("Coop"), new Vector2(52f, 11f), Game1.player, false, false);
Game1.getFarm().buildings.Last<Building>().daysOfConstructionLeft.Value = 0;
Game1.getFarm().buildStructure(new BluePrint("Silo"), new Vector2(36f, 9f), Game1.player, false, false);
Game1.getFarm().buildings.Last<Building>().daysOfConstructionLeft.Value = 0;
Game1.getFarm().buildStructure(new BluePrint("Barn"), new Vector2(42f, 10f), Game1.player, false, false);
Game1.getFarm().buildings.Last<Building>().daysOfConstructionLeft.Value = 0;
Game1.player.getToolFromName("Ax").UpgradeLevel = 4;
Game1.player.getToolFromName("Watering Can").UpgradeLevel = 4;
Game1.player.getToolFromName("Hoe").UpgradeLevel = 4;
Game1.player.getToolFromName("Pickaxe").UpgradeLevel = 4;
Game1.player.Money += 20000;
Game1.player.addItemToInventoryBool((Item) new Shears(), false);
Game1.player.addItemToInventoryBool((Item) new MilkPail(), false);
Game1.player.addItemToInventoryBool((Item) new Object(472, 999, false, -1, 0), false);
Game1.player.addItemToInventoryBool((Item) new Object(473, 999, false, -1, 0), false);
Game1.player.addItemToInventoryBool((Item) new Object(322, 999, false, -1, 0), false);
Game1.player.addItemToInventoryBool((Item) new Object(388, 999, false, -1, 0), false);
Game1.player.addItemToInventoryBool((Item) new Object(390, 999, false, -1, 0), false);
break;
case "setstat":
Game1.stats.GetType().GetProperty(debugSplit[1]).SetValue((object) Game1.stats, (object) Convert.ToUInt32(debugSplit[2]), (object[]) null);
break;
case "shirt":
Game1.player.changeShirt(Convert.ToInt32(debugSplit[1]));
break;
case "showExperience":
Game1.debugOutput = Convert.ToString(Game1.player.experiencePoints[Convert.ToInt32(debugSplit[1])]);
break;
case "skinColor":
Game1.player.changeSkinColor(Convert.ToInt32(debugSplit[1]));
break;
case "skullGear":
Game1.player.hasSkullKey = true;
Game1.player.MaxItems = 32;
Game1.player.leftRing.Value = new Ring(527);
Game1.player.rightRing.Value = new Ring(523);
Game1.player.boots.Value = new Boots(514);
Game1.player.clearBackpack();
Pickaxe pickaxe = new Pickaxe();
pickaxe.UpgradeLevel = 4;
Game1.player.addItemToInventory((Item) pickaxe);
Game1.player.addItemToInventory((Item) new MeleeWeapon(4));
Game1.player.addItemToInventory((Item) new Object(226, 20, false, -1, 0));
Game1.player.addItemToInventory((Item) new Object(288, 20, false, -1, 0));
Game1.player.professions.Add(24);
Game1.player.maxHealth = 75;
break;
case "skullkey":
Game1.player.hasSkullKey = true;
break;
case "sl":
Game1.player.shiftToolbar(false);
break;
case "slayquest":
Game1.player.questLog.Add((Quest) new SlayMonsterQuest());
break;
case "slimecraft":
Game1.player.craftingRecipes.Add("Slime Incubator", 0);
Game1.player.craftingRecipes.Add("Slime Egg-Press", 0);
Game1.playSound("crystal");
break;
case "slingshot":
Game1.player.addItemToInventoryBool((Item) new Slingshot(), false);
Game1.playSound("coin");
break;
case "sn":
Game1.player.hasMagnifyingGlass = true;
if (debugSplit.Length > 1)
{
int int32_2 = Convert.ToInt32(debugSplit[1]);
Object object1 = new Object(79, 1, false, -1, 0);
Object object2 = object1;
object2.name = object2.name + " #" + (object) int32_2;
Game1.player.addItemToInventory((Item) object1);
break;
}
Game1.player.addItemToInventory((Item) Game1.currentLocation.tryToCreateUnseenSecretNote(Game1.player));
break;
case "spawnweeds":
for (int index = 0; index < Convert.ToInt32(debugSplit[1]); ++index)
Game1.currentLocation.spawnWeedsAndStones(1, false, true);
break;
case "specialItem":
Game1.player.specialItems.Add(Convert.ToInt32(debugSplit[1]));
break;
case "specials":
Game1.player.hasRustyKey = true;
Game1.player.hasSkullKey = true;
Game1.player.hasSpecialCharm = true;
Game1.player.hasDarkTalisman = true;
Game1.player.hasMagicInk = true;
Game1.player.hasClubCard = true;
Game1.player.canUnderstandDwarves = true;
Game1.player.hasMagnifyingGlass = true;
Game1.player.eventsSeen.Add(2120303);
Game1.player.eventsSeen.Add(3910979);
break;
case "speech":
Game1.getCharacterFromName(debugSplit[1], false).CurrentDialogue.Push(new Dialogue(debugInput.Substring(debugInput.IndexOf("0") + 1), Game1.getCharacterFromName(debugSplit[1], false)));
Game1.drawDialogue(Game1.getCharacterFromName(debugSplit[1], false));
break;
case "speed":
Game1.player.addedSpeed = Convert.ToInt32(debugSplit[1]);
break;
case "spreadDirt":
Farm farm2 = Game1.getFarm();
for (int xTile = 0; xTile < farm2.map.Layers[0].LayerWidth; ++xTile)
{
for (int yTile = 0; yTile < farm2.map.Layers[0].LayerHeight; ++yTile)
{
if (!farm2.terrainFeatures.ContainsKey(new Vector2((float) xTile, (float) yTile)) && farm2.doesTileHaveProperty(xTile, yTile, "Diggable", "Back") != null && farm2.isTileLocationTotallyClearAndPlaceable(new Vector2((float) xTile, (float) yTile)))
farm2.terrainFeatures.Add(new Vector2((float) xTile, (float) yTile), (TerrainFeature) new HoeDirt());
}
}
break;
case "spreadSeeds":
using (IEnumerator<KeyValuePair<Vector2, TerrainFeature>> enumerator = Game1.getFarm().terrainFeatures.Pairs.GetEnumerator())
{
while (enumerator.MoveNext())
{
KeyValuePair<Vector2, TerrainFeature> current = enumerator.Current;
if (current.Value is HoeDirt)
(current.Value as HoeDirt).crop = new Crop(Convert.ToInt32(debugSplit[1]), (int) current.Key.X, (int) current.Key.Y);
}
break;
}
case "sprinkle":
Utility.addSprinklesToLocation(Game1.currentLocation, Game1.player.getTileX(), Game1.player.getTileY(), 7, 7, 2000, 100, Color.White, (string) null, false);
break;
case "sr":
Game1.player.shiftToolbar(true);
break;
case "stoprafting":
Game1.player.isRafting = false;
break;
case "test":
Game1.currentMinigame = (IMinigame) new Test();
break;
case "time":
Game1.timeOfDay = Convert.ToInt32(debugSplit[1]);
Game1.outdoorLight = Color.White;
break;
case "toggleCatPerson":
Game1.player.catPerson = !Game1.player.catPerson;
break;
case "tool":
Game1.player.getToolFromName(debugSplit[1]).UpgradeLevel = Convert.ToInt32(debugSplit[2]);
break;
case "toss":
Game1.currentLocation.TemporarySprites.Add(new TemporaryAnimatedSprite(738, 2700f, 1, 0, Game1.player.getTileLocation() * 64f, false, false)
{
rotationChange = (float) Math.PI / 32f,
motion = new Vector2(0.0f, -6f),
acceleration = new Vector2(0.0f, 0.08f)
});
break;
case "train":
(Game1.getLocationFromName("Railroad") as Railroad).setTrainComing(7500);
break;
case "upgradeBarn":
using (IEnumerator<Building> enumerator = Game1.getFarm().buildings.GetEnumerator())
{
while (enumerator.MoveNext())
{
Building current = enumerator.Current;
if (current is Barn)
current.daysUntilUpgrade.Value = 1;
}
break;
}
case "upgradeCoop":
using (IEnumerator<Building> enumerator = Game1.getFarm().buildings.GetEnumerator())
{
while (enumerator.MoveNext())
{
Building current = enumerator.Current;
if (current is Coop)
current.daysUntilUpgrade.Value = 1;
}
break;
}
case "upgradehouse":
Game1.player.HouseUpgradeLevel = Math.Min(3, Game1.player.HouseUpgradeLevel + 1);
Game1.removeFrontLayerForFarmBuildings();
Game1.addNewFarmBuildingMaps();
break;
case "version":
Game1.debugOutput = string.Concat((object) typeof (Game1).Assembly.GetName().Version);
break;
case "viewport":
Game1.viewport.X = Convert.ToInt32(debugSplit[1]) * 64;
Game1.viewport.Y = Convert.ToInt32(debugSplit[2]) * 64;
break;
case "w":
case "wall":
(Game1.getLocationFromName("FarmHouse") as FarmHouse).setWallpaper(debugSplit.Length > 1 ? Convert.ToInt32(debugSplit[1]) : (Game1.getLocationFromName("FarmHouse") as FarmHouse).wallPaper[0] + 1, -1, true);
break;
case "wallpaper":
case "wp":
bool isFloor = Game1.random.NextDouble() < 0.5;
Game1.player.addItemToInventoryBool((Item) new Wallpaper(isFloor ? Game1.random.Next(40) : Game1.random.Next(112), isFloor), false);
break;
case "wand":
Game1.player.addItemToInventoryBool((Item) new Wand(), false);
Game1.playSound("coin");
break;
case "warp":
if (Game1.getLocationFromName(debugSplit[1]) != null)
{
Game1.warpFarmer(debugSplit[1], Convert.ToInt32(debugSplit[2]), Convert.ToInt32(debugSplit[3]), false);
break;
}
break;
case "warpCharacter":
case "wc":
if (Game1.getCharacterFromName(debugSplit[1], false) != null)
{
Game1.warpCharacter(Game1.getCharacterFromName(debugSplit[1], false), Game1.currentLocation.Name, new Vector2((float) Convert.ToInt32(debugSplit[2]), (float) Convert.ToInt32(debugSplit[3])));
Game1.getCharacterFromName(debugSplit[1], false).faceDirection(Convert.ToInt32(debugSplit[4]));
Game1.getCharacterFromName(debugSplit[1], false).controller = (PathFindController) null;
Game1.getCharacterFromName(debugSplit[1], false).Halt();
break;
}
break;
case "warpHome":
case "warphome":
case "wh":
Game1.warpHome();
break;
case "water":
using (IEnumerator<TerrainFeature> enumerator = Game1.currentLocation.terrainFeatures.Values.GetEnumerator())
{
while (enumerator.MoveNext())
{
TerrainFeature current = enumerator.Current;
if (current is HoeDirt)
(current as HoeDirt).state.Value = 1;
}
break;
}
case "waterColor":
Game1.currentLocation.waterColor.Value = new Color(Convert.ToInt32(debugSplit[1]), Convert.ToInt32(debugSplit[2]), Convert.ToInt32(debugSplit[3])) * 0.5f;
break;
case "weapon":
Game1.player.addItemToInventoryBool((Item) new MeleeWeapon(Convert.ToInt32(debugSplit[1])), false);
break;
case "wedding":
Game1.player.spouse = debugSplit[1];
Game1.prepareSpouseForWedding();
Game1.checkForWedding();
break;
case "where":
case "whereis":
Game1.debugOutput = debugSplit[1] + " is at " + Utility.getGameLocationOfCharacter(Game1.getCharacterFromName(debugSplit[1], false)).Name + ", " + (object) Game1.getCharacterFromName(debugSplit[1], false).getTileX() + "," + (object) Game1.getCharacterFromName(debugSplit[1], false).getTileY();
break;
case "whereore":
Game1.debugOutput = Convert.ToString((object) Game1.currentLocation.orePanPoint.Value);
break;
case "year":
Game1.year = Convert.ToInt32(debugSplit[1]);
break;
case "zl":
case "zoomLevel":
Game1.options.zoomLevel = (float) Convert.ToInt32(debugSplit[1]) / 100f;
this.Window_ClientSizeChanged((object) null, (EventArgs) null);
break;
default:
return false;
}
return true;
}
catch (Exception ex)
{
Game1.debugOutput = ex.Message;
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment