Skip to content

Instantly share code, notes, and snippets.

View StollD's full-sized avatar
:shipit:
Roses are red, violets are blue, unexpected '}' on line 32

Dorian Stoll StollD

:shipit:
Roses are red, violets are blue, unexpected '}' on line 32
View GitHub Profile
@StollD
StollD / Kopernicus-Pictures.md
Last active December 20, 2018 23:09
Cool pictures from Kopernicus planets - http://git.io/vWAFE

Asteroids with VertexPlanet (@ThomasKerman): Asteroids with VertexPlanet

Triangular Rings (@ThomasKerman): Triangular Rings

Asteroid with VertexPlanet and custom PQSMod (@ThomasKerman): Asteroid with VertexPlanet and custom PQSMod

Mini-Minmus (GregroxMun):

@StollD
StollD / CompatibleModuleManager.cs
Created December 6, 2015 18:28
Plugin that makes ConfigNodes temporary compatible with ModuleManager
/**
* Compatible Module Manager
* Copyright (c) 2015 Thomas P.
* License: MIT
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Linq;
using UnityEngine;
using KSP.UI.Screens;
/// <summary>
/// Makes the funds you get from a recovered vessel negative
/// </summary>
public class FundsHaxxor : MonoBehaviour
{
## Funny quotes from people who use Kopernicus
## or are in it's IRC channel. No kerbals were
## injured while laughing about theese words.
------
<Amarius1> Not bought, just downloaded a new keyboard.
------
<GregroxMun> I deleted the recycling bin. Now I can't delete anything.
------
<@KillAshley> <username>: s/^.*$/meow
/// <summary>
/// Adds a basefield to a part dynamically. Supports custom Attributes, but only if they have a constructor without arguments.
/// </summary>
/// <typeparam name="T">The field type of the generated field, i.e. float, int, string...</typeparam>
/// <param name="host">The part that holds the new base field</param>
/// <param name="name">The name of the generated base field</param>
/// <param name="value">The default value of the generated base field.</param>
/// <param name="attributes">Attribute objects that should get added to the created field.</param>
/// <returns></returns>
public static BaseField CreateBaseField<T>(Part host, String name, T value, params System.Object[] attributes)
@StollD
StollD / ProtoVector3d.cs
Created May 21, 2016 17:11
Unity datatypes, serializeable with Protobuf
[ProtoContract]
public struct ProtoVector3d
{
// Vector3 definitions
[ProtoMember(1)] public Double x;
[ProtoMember(2)] public Double y;
[ProtoMember(3)] public Double z;
// Convert Vector3d to ProtoVector3d
public static implicit operator ProtoVector3(Vector3d input)
@StollD
StollD / unibot.js
Created July 18, 2016 16:52
Node.js Unicode IRC Bot. Requires the node irc library.
// Unibot - IRC Bot that enforces non Unicode communication in #NoBasicLatin on Esper.NET
// Copyright (c) 2016 Dorian Stoll
// Licensed as MIT
// Messages for kicking
var messages = [
'This channel is Unicode only.',
'No basic Latin here!',
'Learn your Unicode.',
'Down with American Mainstream!'
@StollD
StollD / Kopernicus-Bugreport.md
Last active October 7, 2017 16:52
When you have a problem with Kopernicus and need support here's what you should do

When you have a problem with Kopernicus and need support here's what you should do:

Find the files requested down here, put all of them into a zip archive and upload that to dropbox/googledrive (then share the link with the person you are asking for support)

NOTE:

  • Use the minimum amount of mods necessary
  • If you have extra mods please remove them

The files you will need to upload are the following:

  1. KSP.log
  2. ModuleManager.ConfigCache (you can find that file in GameData, otherwise specify you didn't find one)
@StollD
StollD / StyleCache.cs
Created May 17, 2018 23:15
Converting GUISkin to UISkinDef
using UnityEngine;
namespace UI
{
/// <summary>
/// The unity default style can only be accessed inside of an OnGUI method
/// </summary>
[KSPAddon(KSPAddon.Startup.Instantly, true)]
public class StyleCache : MonoBehaviour
{
using System;
using System.Linq;
using System.Reflection;
using UnityEngine;
using Object = System.Object;
// Provides Access to Kopernicus ScaledSpace OnDemand loading without referencing it
public class ScaledSpaceODWrapper
{
// Cached fields