This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$diff = New-Object System.Xml.XmlDocument | |
$diff.AppendChild($diff.CreateXmlDeclaration("1.0", "UTF-8", $null)) | |
$diffRoot = $diff.CreateElement("diff") | |
$diff.AppendChild($diffRoot) | |
$inputFiles = Get-ChildItem -Path "C:\Temp\X4" -Filter "wares.xml" -Recurse | |
foreach ($file in $inputFiles) { | |
[xml]$xml = Get-Content $file.FullName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// var affiliateSpoofing = new Dummy.AffiliateSpoofingHttpCallHandler(); | |
// api = new TwitchAPI(http: affiliateSpoofing); | |
// affiliateSpoofing.OnRewardRedeemed += OnRewardRedeemed; | |
// | |
// Then add/remove rewards via the normal API. | |
// Test redemption like: | |
// affiliateSpoofing.FakeRedeem("My Reward Title", "fake_user_name", "text"); | |
using System; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Drop this into a custom Shader Graph node, then output it to Unlit master Color and Alpha. | |
// If you want the point light to also behave as a directional light then instead of passing | |
// the Vertex world position pass the last column of the model Transformation matrix (Transformation node) | |
// instead. | |
// NOTE: this function removes GI feature entirely, as it wasn't necessary for my purpose. | |
void PBR_ZeroAttenuation_half(half3 Albedo, | |
half Metallic, | |
half3 Specular, | |
half Smoothness, | |
half3 Emission, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Util | |
{ | |
struct PriceInflation | |
{ | |
public int UpdatedDay; | |
public bool NeedsUpdate => (int)Campaign.Current.CampaignStartTime.ElapsedDaysUntilNow > UpdatedDay; | |
public float Inflation; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style x:Key="VerticalScrollViewer" TargetType="{x:Type ScrollViewer}"> | |
<Setter Property="OverridesDefaultStyle" Value="True" /> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="{x:Type ScrollViewer}"> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition /> | |
<ColumnDefinition Width="Auto" /> | |
</Grid.ColumnDefinitions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <unordered_map> | |
#include <chrono> | |
#include <cstdlib> | |
#include <algorithm> | |
#define USE_STD_STR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Reveal all cave sites after embark | |
-- by billw | |
--[====[ | |
reveal-caves | |
========= | |
Reveal all undiscovered cave sites. | |
]====] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Usage: unzip Masterwork zip to Masterwork folder, and Meph tileset zip to Meph Tileset folder, put this script next to them and run it! | |
pause | |
cd /D "%~dp0" | |
if NOT exist Masterwork ( | |
echo "Masterwork" directory not found! | |
goto fail_exit | |
) | |
if NOT exist "Meph Tileset" ( |