reworking effects, turning them into their own scene for replicability

This commit is contained in:
2026-02-03 03:37:58 -05:00
parent 36b934b200
commit 435fbc7ba2
32 changed files with 321 additions and 172 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Godot;
public static partial class Globals
@@ -8,32 +9,6 @@ public static partial class Globals
public static Random _rng = new();
public static List<string> _addressTranslation = new(){"NW","N","NE","W","C","E","SW","S","SE"};
public static List<T> ShiftList<T>(List<T> LIST, int SHIFT_BY)
{
if (LIST.Count <= SHIFT_BY || LIST.Count == 0 || SHIFT_BY ==0)
{
return LIST;
}
int getRangeStart = SHIFT_BY < 0 ? -SHIFT_BY : LIST.Count - SHIFT_BY;
int getRangeEnd = SHIFT_BY < 0 ? LIST.Count + SHIFT_BY : SHIFT_BY;
int addRangeEnd = SHIFT_BY < 0 ? -SHIFT_BY : LIST.Count - SHIFT_BY;
var result = LIST.GetRange(getRangeStart, getRangeEnd);
result.AddRange(LIST.GetRange(0, addRangeEnd));
return result;
}
public static void Shuffle<T>(IList<T> LIST)
{
int n = LIST.Count;
while (n > 1) {
n--;
int k = _rng.Next(n + 1);
T value = LIST[k];
LIST[k] = LIST[n];
LIST[n] = value;
}
}
public static void LoadSeed(int SEED)
{
_rng = new(SEED);