Misc Release 1 Customization (#945)

* Add files via upload

* Recolorable Dazzles

idk how github works lol

* Fork Lifter - new gradients + extra customization

Currently doesn't have proper support for old charts, those will be made to default to the Classic gradient at some point in the future

* Fork Lifter - Megamix Floor + Backwards Compat

also includes better gradients

* oops

new gradients start as version = 1 now lol. my bad

* oops part 2

fork lifter lines can be toggled off properly now lol

* Recolorable Fireworks

note to self - make sure everything new is actually in the bundles before PRing all this because im realizing i forgot to do that for the bg gradient here

* Recolorable Space Soccer Kicker/Platform (+ assbunning things)

just dazzles easing + a doublecheck of everything left and i'm pr-ing

* Dazzles BG Color Easing

pr soon™️

* Proper Space Soccer sheet + minor text rewrites

can prolly pr now. lemme figure that out

* removing unused stuff + fixing space soccer

i downloaded github desktop and wow this is so much easier lol

also apparently i did an oopsie with space soccer so. fixed that

* removing my settings stuff

oopsy

* small fork lifter fix

for some reason the flicking guy's shadow peeked out of the viewcircle so here's an incredibly lazy fix for that. should work fine enough

* i thought i got rid of these earlier

oopsie

* Update TheDazzles.cs

i love minor text errors!!!!!

* Update SpaceSoccer.cs

forgot to update a thing while changing the star colors, oops
This commit is contained in:
MiiKEmblem
2024-05-19 16:14:39 -05:00
committed by minenice55
parent 370d0e7ca2
commit c812ed215c
33 changed files with 2957 additions and 570 deletions

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using UnityEngine;
using NaughtyBezierCurves;
using DG.Tweening;
using Jukebox;
namespace HeavenStudio.Games.Loaders
{
@ -11,6 +12,30 @@ namespace HeavenStudio.Games.Loaders
public static class AgbFireworkLoader
{
public static Minigame AddGame(EventCaller eventCaller) {
RiqEntity fwBGUpdater(string datamodel, RiqEntity e)
{
if (datamodel == "fireworks/altBG")
{
e.CreateProperty("stars", (!e["toggle"]));
e.CreateProperty("faces", (e["toggle"]));
e.CreateProperty("startTop", new Color(0f, 8/255f, 32/255f));
e.CreateProperty("endTop", new Color(0f, 8/255f, 32/255f));
e.CreateProperty("startBot", new Color(0f, 51/255f, 119/255f));
e.CreateProperty("endBot", new Color(0f, 51/255f, 119/255f));
e.CreateProperty("startCity", new Color(0f, 8/255f, 32/255f));
e.CreateProperty("endCity", new Color(0f, 8/255f, 32/255f));
e.CreateProperty("ease", 0);
e.dynamicData.Remove("toggle");
e.datamodel = "fireworks/changeBG";
return e;
}
return null;
}
RiqBeatmap.OnUpdateEntity += fwBGUpdater;
return new Minigame("fireworks", "Fireworks \n<color=#adadad>(Hanabi)</color>", "000820", false, false, new List<GameAction>()
{
new GameAction("firework", "Firework")
@ -58,13 +83,35 @@ namespace HeavenStudio.Games.Loaders
new Param("count", Fireworks.CountInType.CountOne, "Type", "Set the number to be said.")
}
},
new GameAction("altBG", "Background Appearance")
new GameAction("changeBG", "Background Appearance")
{
function = delegate {
var e = eventCaller.currentEntity;
Fireworks.instance.BackgroundColor(e.beat, e.length, e["stars"], e["faces"], e["startTop"], e["endTop"], e["startBot"], e["endBot"], e["startCity"], e["endCity"], e["ease"]);
},
resizable = true,
parameters = new List<Param>()
{
new Param("stars", true, "Stars", "Toggle if the stars should appear."),
new Param("faces", false, "Remix 5", "Toggle if the faces from Remix 5 (GBA) should appear."),
new Param("startTop", new Color(0f, 8/255f, 32/255f), "Gradient Top Start", "Set the color at the start of the event."),
new Param("endTop", new Color(0f, 8/255f, 32/255f), "Gradient Top End", "Set the color at the end of the event."),
new Param("startBot", new Color(0f, 51/255f, 119/255f), "Gradient Bottom Start", "Set the color at the start of the event."),
new Param("endBot", new Color(0f, 51/255f, 119/255f), "Gradient Bottom End", "Set the color at the end of the event."),
new Param("startCity", new Color(0f, 8/255f, 32/255f), "City Start", "Set the color at the start of the event."),
new Param("endCity", new Color(0f, 8/255f, 32/255f), "City End", "Set the color at the end of the event."),
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Set the easing of the action.")
}
},
new GameAction("altBG", "Background Appearance (OLD)")
{
function = delegate {var e = eventCaller.currentEntity; Fireworks.instance.ChangeBackgroundAppearance(e["toggle"]); },
defaultLength = 0.5f,
hidden = true,
parameters = new List<Param>()
{
new Param("toggle", true, "Remix 5", "Togle if the background from Remix 5 (GBA) should appear.")
new Param("toggle", true, "Remix 5", "Toggle fi ze bckgrond frum realix 5 (GFA) shool aper. (You should never see this.)")
}
}
},
@ -121,11 +168,18 @@ namespace HeavenStudio.Games
[SerializeField] FireworksBomb bomb;
[SerializeField] BezierCurve3D bombCurve;
[SerializeField] SpriteRenderer flashWhite;
[SerializeField] SpriteRenderer gradientTop;
[SerializeField] SpriteRenderer gradientBottom;
[SerializeField] SpriteRenderer city;
[SerializeField] GameObject faces;
[SerializeField] GameObject stars;
[Header("Properties")]
Tween flashTween;
public static List<QueuedFirework> queuedFireworks = new List<QueuedFirework>();
private ColorEase topColorEase = new(new Color(0f, 8/255f, 32/255f));
private ColorEase botColorEase = new(new Color(0f, 51/255f, 119/255f));
private ColorEase cityColorEase = new(new Color(0f, 8/255f, 32/255f));
public static Fireworks instance;
@ -142,6 +196,11 @@ namespace HeavenStudio.Games
{
instance = this;
}
public override void OnPlay(double beat)
{
PersistColor(beat);
}
void Update()
{
@ -158,12 +217,14 @@ namespace HeavenStudio.Games
queuedFireworks.Clear();
}
}
BackgroundColorUpdate();
}
public void ChangeBackgroundAppearance(bool doIt)
{
faces.SetActive(doIt);
stars.SetActive(!doIt);
//faces.SetActive(doIt);
//stars.SetActive(!doIt);
}
public static void CountIn(double beat, int count)
@ -313,6 +374,39 @@ namespace HeavenStudio.Games
{
ChangeFlashColor(start, 0f);
ChangeFlashColor(end, beats);
}
private void BackgroundColorUpdate()
{
gradientTop.color = topColorEase.GetColor();
gradientBottom.color = botColorEase.GetColor();
city.color = cityColorEase.GetColor();
}
public void BackgroundColor(double beat, float length, bool dostars, bool dormx5, Color topStart, Color topEnd, Color botStart, Color botEnd, Color cityStart, Color cityEnd, int ease)
{
topColorEase = new ColorEase(beat, length, topStart, topEnd, ease);
botColorEase = new ColorEase(beat, length, botStart, botEnd, ease);
cityColorEase = new ColorEase(beat, length, cityStart, cityEnd, ease);
faces.SetActive(dormx5);
stars.SetActive(dostars);
}
private void PersistColor(double beat)
{
var allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("fireworks", new string[] { "changeBG" }).FindAll(x => x.beat < beat);
if (allEventsBeforeBeat.Count > 0)
{
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case
var lastEvent = allEventsBeforeBeat[^1];
BackgroundColor(lastEvent.beat, lastEvent.length, lastEvent["stars"], lastEvent["faces"], lastEvent["startTop"], lastEvent["endTop"], lastEvent["startBot"], lastEvent["endBot"], lastEvent["startCity"], lastEvent["endCity"], lastEvent["ease"]);
}
}
public override void OnGameSwitch(double beat)
{
PersistColor(beat);
}
}
}