Skip to content

Instantly share code, notes, and snippets.

View emptyrivers's full-sized avatar
💚

Allen Faure emptyrivers

💚
View GitHub Profile
@emptyrivers
emptyrivers / PKGBUILD
Created September 6, 2021 19:27
satisfactory-mod-manager 2.5.0-1
# Maintainer: Laurin Neff <laurin at laurinneff dot ch>
pkgname=satisfactory-mod-manager
pkgver=2.5.0
pkgrel=1
pkgdesc="A mod manager for easy installation of mods and modloader for Satisfactory"
arch=(x86_64)
url="https://github.com/satisfactorymodding/SatisfactoryModManager"
license=('GPL3')
depends=('electron')
makedepends=('yarn' 'python2' 'node-gyp')
@emptyrivers
emptyrivers / sf_ratio.py
Last active August 26, 2021 22:04
Satisfactory splitter pattern generator
#!/usr/bin/python
from re import sub
from sys import argv
# script that generates splitter pattern for satisfactory
# call with 2 numbers that defines the ratio of the outputs
# e.g. if you want a 3:2 ratio, then run:
# > python sf_ratio.py 3 2
@emptyrivers
emptyrivers / GUI.lua
Last active March 9, 2018 09:42
GUI_layer
--[[
Abstraction layer for factorio GUI api, intended to extend the normal
functionality and simplify the process of handling GUI events.
How it works:
at the top of control.lua, write
local GUI = require "GUI"
edit the require path as necessary
@emptyrivers
emptyrivers / PocketWatch.lua
Last active March 18, 2018 03:52
task spreader for factorio
--[[
General Purpose Tick Spreader for Factorio. Completely agnostic about *what* it's doing,
and should be compatible with any project that can use some distribution of code across ticks.
Usage:
local PocketWatch = require"path.to.PocketWatch"
-- defines the PocketWatch class. The path is relative, as always with require.
PocketWatch.taskMap[id] = <function>
-- teach PocketWatch how to perform a task. Since functions with upvalues cannot be serialized currently, we can't simply drop function objects (especially closures) into the global table.
-- NB: with Dragonflight, this is now obsolete - simply use UnitTokenFromGUID
-- unit searcher for WoW. Give this thing a GUID, and it will find a unitID if it exists
-- can tune to ignore certain kinds of units that are unlikely to be useful for you
-- code is released into public domain by Allen Faure
-- please feel free to use however you like
local commonUnits = {'player', 'target', 'mouseover', 'focus', 'pet'}
local partyUnits = {'player', 'party1', 'party2', 'party3', 'party4'}
local partyPetUnits = {'pet', 'partypet1', 'partypet2', 'partypet3', 'partypet4'}