Skip to content

Instantly share code, notes, and snippets.

View LemonInTheDark's full-sized avatar
🥔
Vibin it out

LemonInTheDark

🥔
Vibin it out
  • 16:22 (UTC -12:00)
View GitHub Profile
@LemonInTheDark
LemonInTheDark / overtime_reduction.md
Last active May 24, 2025 05:36
True Overtime Reduction Notes

Verb Hell

We need to autoschedule verbs, tracking their high/low points. They can cause so much overtime for basically no reason. []

This does risk fully consuming the tick, especially combined with normal input. Perhaps we should attempt to spread them out across ticks? unsure. []

MC Soul Death

I need to drill down into where "Internal" time is being spent. I can't help but feel something is wrong, it could be my graphing software? I am unsure. Honestly just fucking line by line this shit dude []

I am concerned about how much there is and how it seems to align with usage spikes. My gut is it's queuing/dequeuing but that doesn't inherently line up. Might be worth moving loop() to an inner proc so we can account for cost better? unsure

@LemonInTheDark
LemonInTheDark / filter_recursive.dm
Last active December 2, 2024 08:55
Sample code to recursively apply a color filter to an appearance, respecting appearance flags/rendering rules
/*
Problem statment:
We want to apply color filters AS IF they were a color var
this means they need to be recursively applied
fortunately KEEP_TOGETHER removes the need to apply a filter and thus modify the appearance,
UP UNTIL we hit something that cannot be KEPT_TOGETHER (KEEP_APART, on a different plane, etc)
if this happens we need to recursively modify up the list. life is pain
*/
@LemonInTheDark
LemonInTheDark / gen.py
Last active November 2, 2023 05:37
Tool for generating lighting overlays with variable sizes and colors involved. Can be kinda fineky I am sorry
# Based off the script found in https://github.com/goonstation/goonstation/pull/14322 by Mister-Moriarty
# Modified by LemonInTheDark to make copy pasting segments easier
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image, ImageOps
# Modify this to create slices that you can stitch together later
array_width = 32
array_height = 32

FEA/LINDA, flow rework

Key Idea

Ditch excited groups. They work amazing at rest, but if doors are opening and closing and players are about they're not workable

Instead, implement FEA air groups.

Group tiles with SIMILAR mixes together. There's no timers here or anything, if you attempt to mod to a group'd mix too much, you instead modify just one tile, and that tile is pulled out of the group

@LemonInTheDark
LemonInTheDark / share.py
Created January 12, 2022 05:50
Python implementation of share(), both versions
import math
big_grid = [
[1000, 0, 0, 0, 0],
[0, 0, "S", 0, 0],
["S", 0, 0, 0, 200,]
]
small_base = [0, 0, 0, 0, 0]
small_grid = [
small_base.copy(),
small_base.copy(),
@LemonInTheDark
LemonInTheDark / todo.MD
Last active March 2, 2026 02:19
Lemon's TODO (stolen wholecloth from dominion)

QOL:

Add support for "moving" sound listeners, apply it just to longer sounds. Will need a management system on clients, and to use spatial grids or someodd. See also tgstation/tgstation#79135

Look into updating spaceman dmm to support smart pipe rendering

Make hitting someone who's moving away from you a bit nicer, using a system to track gliding duration and direction (SWINGBAT MELBERT SAVE ME)

Performance:

@LemonInTheDark
LemonInTheDark / atmos.md
Last active December 7, 2020 07:02 — forked from duncathan/atmos.md
work in progress

Atmospherics

1. Preamble

Hello, my name is Lemon. I am a maintainer at /tg/, and I have taken it on myself to document/update the atmos subsystem. I have been supported in this goal by Dunc and Aranclanos, the atmos maintainers who came before me.

I have stolen adapted this document from the work of Duncathan, an off and on maintainer who is responsible for the majority of the quality of the current atmos system. He pushed through several code cleanliness and sanity refactors to the system, and wrote the rundown of gas mixtures you'll find in this document. See the original for his draft.

Now then, onto the purpose of this document.