Skip to content

Instantly share code, notes, and snippets.

@wispborne
wispborne / SystemFinder.kt
Last active October 6, 2022 14:43
SystemFinder - A Starsector class to find systems using vanilla's code but without requiring a BaseHubMission.
import com.fs.starfarer.api.campaign.*
import com.fs.starfarer.api.campaign.econ.CommodityOnMarketAPI
import com.fs.starfarer.api.campaign.econ.MarketAPI
import com.fs.starfarer.api.impl.campaign.missions.cb.BaseCustomBounty
import com.fs.starfarer.api.impl.campaign.missions.hub.HubMissionWithSearch
import com.fs.starfarer.api.impl.campaign.missions.hub.ReqMode
import org.lwjgl.util.vector.Vector2f
class SystemFinder
@JvmOverloads constructor(val mission: HubMissionWithSearch = BaseCustomBounty()) {
@wispborne
wispborne / StringUtils.java
Created May 18, 2022 06:10
Typo correction code for Starsector, based upon the CommandUtils class of LazyWizard's Console Commands.
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.FactionAPI;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class StringUtils {
@wispborne
wispborne / Toaster.kt
Created December 18, 2021 20:31
Toaster, a Jetbrains Compose Desktop composable to displayed stacked toast notifications with an optional timer
package smol_app
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.items
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.currentRecomposeScope
import androidx.compose.runtime.rememberCoroutineScope
package main
import (
"bufio"
"fmt"
"image"
"image/color"
_ "image/jpeg"
_ "image/png"
"io/ioutil"
// ==UserScript==
// @name Inara Engineer Tweaks
// @namespace reddit.com/r/EliteDangerous
// @match https://inara.cz/galaxy-engineers/
// @grant GM_addStyle
// @version 1.1 (Dec 2020)
// @author /u/Locust377
// @description - G5s are highlighted - Engineers that are more than 10,000ly away from me are "hidden"
// ==/UserScript==
@wispborne
wispborne / Calculate_VRAM.py
Last active March 13, 2020 13:58
Roughly calculates VRAM used by starsector mods
import os
import math
from scipy import ndimage
from PIL import Image
dirPath = os.path.dirname(os.path.realpath(__file__))
debug = False
# Instructions for use:
# Place in Starsector/mods directory.
@wispborne
wispborne / Easing.kt
Created March 10, 2020 19:52
Easing functions, converted to Kotlin
/**
* Taken from <a href="https://github.com/mattdesl/cisc226game/blob/master/SpaceGame/src/space/engine/easing/Easing.java">Github</a>
*
* @author Robert Penner (functions)
* @author davedes (java port)
* @author Wisp (kotlin port)
*/
object Easing {
object Quadratic {
/**
@wispborne
wispborne / _Starsector_CI.md
Last active January 21, 2021 22:08
CI setup to create ready-to-eat Starsector mods

CircleCI

Description

This setup will automate Github releases by creating a new release with a ready-for-users zipfile of your mod every time a git tag is pushed to your GitHub repository.

Steps

  1. Create a folder called .circleci in your mod directory. Add the files config.yml, zipMod.sh, and blacklist.txt to it.
  2. Open .circleci/zipmod.sh with a text editor (e.g. VS Code, Notepad++). Change the value for modFolderName. This will be the name of the mod folder.
/* ==UserStyle==
@name Bitbucket Blue Reskin by dwhitman
@namespace github.com/openstyles/stylus
@version 1.0.2
@description A blue userstyle
@author Dwhitman
==/UserStyle== */
@-moz-document domain("stash.mywebgrocer.com") {
.look-and-feel-custom-theme .aui-header {
/* ==UserStyle==
@name JIRA Blue Reskin dwhitman
@namespace github.com/openstyles/stylus
@version 1.0.1
@description A blue userstyle
@author David Whitman
==/UserStyle== */
@-moz-document domain("jira.mywebgrocer.com") {
.aui-header {
background-color: #333333 !important;