Skip to content

Instantly share code, notes, and snippets.

View InvisibleCopies.cpp
struct FWidget
{
FWidget() : Name() {}
FWidget(FString Name) : Name(Name) {}
FWidget(const FWidget& Other) : Name(Other.Name) {}
void ProcessIntensity(float Intensity) { /** **/ }
FString Name;
}
View InvisibleCopies.cpp
struct FWidget
{
FWidget() : Name() {}
FWidget(FString Name) : Name(Name) {}
FWidget(FWidget Other) : Name(Other.Name) {}
void ProcessIntensity(float Intensity) { /** **/ }
FString Name;
}
@tenpn
tenpn / output_log.txt
Created September 1, 2023 11:40 — forked from HugsLibRecordKeeper/output_log.txt
Rimworld output log published using HugsLib
View output_log.txt
Log uploaded on Friday, September 1, 2023, 4:36:55 AM
Loaded mods:
Prepatcher(zetrith.prepatcher): 0DataAssembly(1.0.0), 0Harmony(2.2.2), 0PrepatcherAPI(1.1.1), PrepatcherImpl(1.0.0), Prestarter(1.0.0)
Harmony(brrainz.harmony)[mv:1.5.0.0]: 0Harmony(2.2.2), HarmonyMod(1.5.0)
Fishery - Modding Library(bs.fishery): 1Fishery(0.3.800.85), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Core(Ludeon.RimWorld): (no assemblies)
Performance Fish(bs.performance): 0PrepatcherAPI(1.1.1), 1Fishery(0.3.800.85), PerformanceFish(0.3.800.85), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Startup impact 1.4(automatic.startupimpact): 0Harmony(2.2.2), Assembly-CSharp-firstpass(0.0.0), StartupImpact(1.1.8369.39377), UnityEngine.SubsystemsModule(0.0.0)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
@tenpn
tenpn / LogSeverityTracker.cs
Created September 12, 2020 19:57
Unity Test Framework provides LogAsset to validate the output of the log, but at this time it only lets you prescribe what should appear. We don't care about Debug.Log() output, but want to know if there was anything worse than that. Particularly, in our case, we'd like to fail for warnings as well as errors. Too many "benign" warnings can hide …
View LogSeverityTracker.cs
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Linq;
namespace Roll7
{
/// <summary>
/// This tracker will assert for both warnings and errors.
@tenpn
tenpn / execute-shell-command-on-buffer
Created April 12, 2012 14:03
emacs function to execute a shell command with the current buffer filename as an argument
View execute-shell-command-on-buffer
;; eg when in a text file, (execute-shell-command-on-buffer "p4 edit %s") will check out the file in perforce
(defun execute-shell-command-on-buffer (shell-command-text)
(interactive "MShell command:")
(shell-command (format shell-command-text (shell-quote-argument buffer-file-name)))
)
@tenpn
tenpn / CustomSingleContextFactory.cs
Created November 22, 2017 10:33
fixed CustomSingleContextFactory
View CustomSingleContextFactory.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TenPN.DecisionFlex;
using System;
public class CustomSingleContextFactory : SingleContextFactory
{
public override IContext SingleContext(Logging loggingSetting)
View NewTree.yaml
tree:
model: special_treasure
harvestable:
for: players
reward: coins
canBeDepletedPerPlayer:
health: 1
View NewFisherman.yaml
npc_fisherman_recipe:
model: npc_fisherman
needsToBeCrafted:
recipe:
- [biome2_plant_ingredient, 2]
replacedBy: npc_fisherman
isAnNPC:
clickSpeech: NPCCrafting_npc_fisherman
@tenpn
tenpn / SymbolicationEnabler.cs
Last active January 11, 2016 06:31 — forked from capyvara/gist:5230032
SymolicationEnabler unity post-processor
View SymbolicationEnabler.cs
/*
The MIT License (MIT)
Copyright (c) 2014 Andrew Fray, Marcelo Oliveira
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tenpn
tenpn / MersenneTwister.cs
Last active December 25, 2015 14:19
A C# Mersenne Twister that is serialisable. A bitch of a copyright field.
View MersenneTwister.cs
/////////////////////////////////////////////////////////////////////////////
// C# Version Copyright (c) 2003 CenterSpace Software, LLC //
// & Spry Fox LLC (c) 2013 //
// //
// This code is free software under the Artistic license. //
// //
// CenterSpace Software //
// 2098 NW Myrtlewood Way //
// Corvallis, Oregon, 97330 //
// USA //