Skip to content

Instantly share code, notes, and snippets.

View spacechase0's full-sized avatar

Casey W spacechase0

View GitHub Profile
@spacechase0
spacechase0 / NodeGraph.cpp
Last active August 24, 2024 16:06
ImGui node graph
#include <any>
#include <cmath>
#include <imgui.h>
#include <imgui_internal.h>
#include "NodeGraph.hpp"
namespace
{
@spacechase0
spacechase0 / .cs
Created November 5, 2017 20:19
Custom NPCs Spouse Room
private void locChanged( object sender, EventArgsCurrentLocationChanged args )
{
if ( args.NewLocation.name == "FarmHouse" )
{
var house = args.NewLocation as FarmHouse;
var displayingSpouseRoom = Helper.Reflection.GetPrivateField<bool>(house, "displayingSpouseRoom");
if (displayingSpouseRoom.GetValue() && Game1.player.isMarried() )
{
var data = CustomNpcData.get(Game1.player.getSpouse().name);
Many commands that ask for an NPC (such as faceDirection) can take 'farmer' as well.
removeObjects - Clears all objects from the current location.
cmenu, customize, customizeMenu - Opens the character menu (new game, not wizard).
mainMenu, mainmenu, removeDebris - Removes all debris (such as dropped items).
pick, pickax, pickaxe - Adds a new basic pickaxe to your inventory.
where, whereis <S:NPC> - Prints the location and coordinates of <NPC>.
bloomDay - The game's bloom. Doesn't work.
cat <I:X> <I:Y> - Adds a cat at (<X>, <Y>) in the current location.
museumloot - Marks artifacts as found and adds minerals to inventory. Stops when the inventory is full.
@spacechase0
spacechase0 / xnb.cpp
Last active June 23, 2017 20:18
Xnb tool
#include <boost/filesystem.hpp>
#include <SFML/Graphics/Image.hpp>
#include <util/File.hpp>
#include <xnb/File.hpp>
namespace fs = boost::filesystem;
void extract( xnb::File& file, const std::string& output )
{
}
@spacechase0
spacechase0 / Content.cs
Created May 8, 2017 03:20
Stardew Valley: Load a Tiled map file directly
// You will need "TiledNet" from NuGet. (Also found here: https://github.com/napen123/Tiled.Net)
using Tiled;
private class TileMapping
{
public TileSheet tileSheet = null;
public int tileId = 0;
public TileMapping() { }
public TileMapping( TileSheet ts, int id )