Skip to content

Instantly share code, notes, and snippets.

View Silverfeelin's full-sized avatar
💭
Why do they keep breaking?

Silverfeelin

💭
Why do they keep breaking?
View GitHub Profile
@Silverfeelin
Silverfeelin / README.md
Last active April 27, 2019 14:23
Starbound include

Defining Modules

A module simply exports variables to a global module.

If your module includes other modules, make sure you include them before exporting.

/scripts/shapes.lua

local shapes = {}
@Silverfeelin
Silverfeelin / animator.md
Last active August 13, 2019 16:25
Starbound 1.4 new Lua functions

Json animator.transformPoint(String partName, Vec2F point)

Applies the specified part's transformation on the given point.


Json animator.transformPoly(String partName, PolyF poly)

Applies the specified part's transformation on the given poly.

@Silverfeelin
Silverfeelin / scriptHooks.lua
Last active December 12, 2022 15:31
Starbound hook function
--- UNLICENSED: FEEL FREE TO USE THIS CODE WITH OR WITHOUT THIS HEADER.
-- https://gist.github.com/Silverfeelin/3a6286d443d829eed58fa781790e2de5
-- Usage: hook("init", myTable.myInit)
-- Prevent loading if another scriptHooks has been loaded (i.e. same script in a different folder)
if hook then return end
local hooks = {}
--- Loops over all functions in hook.
@Silverfeelin
Silverfeelin / Comparison.md
Last active November 18, 2017 01:09
NFS: Payback - Farm mission comparison

Need for Speed Payback Farming Comparison

These statistics are based on me playing the game. They reflect my gains, and yours might differ.
You might be better or worse at the game, you might have a better or worse car. Take these statistics with a grain of salt, and don't get mad if they don't match your earnings.

These calculations are based on REP and Bank gain after the 17/11 patch that increased mission rewards.

Quick Jump

@Silverfeelin
Silverfeelin / BindingsUsingMutators.md
Last active May 23, 2021 22:34
Bindings using Mutators in A Hat in Time

Bindings using Mutators

Creating custom key bindings for A Hat in Time

This guide demonstrates how you can use the Mutator class UDK offers to implement custom key bindings. I personally don't know if there is a better way to accomplish this, and I do know this isn't how you're normally supposed to use mutators. Either way, let us begin to create a custom key binding.

This guide does not cover how to create a mod, where to put files, how to compile and other similar tasks. If you do not know this information yet, please refer to different guides first (I.e. Your First Skin Mod).

1. Creating the Mutator

@Silverfeelin
Silverfeelin / Main.cs
Created July 30, 2017 14:39
Crops a tile out of Starbound's tile frames. Requires Newtonsoft.JSON
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SBMaterialFramesToButton