mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 20:47:39 +02:00
Misc. Tweaks the tweakquel (#540)
* seesaw fix + stretchable pass turn revival * lockstep fixes * PLEASE FUCKING WORK * fixed it * some * more * quiz show input improvement
This commit is contained in:
@ -17,11 +17,14 @@ namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
preFunction = delegate { var e = eventCaller.currentEntity; QuizShow.PreInterval(e.beat, e.length,
|
||||
e["auto"], e["sound"], e["con"], e["visual"], e["audio"]); },
|
||||
defaultLength = 8f,
|
||||
defaultLength = 7f,
|
||||
resizable = true,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("auto", true, "Auto Pass Turn"),
|
||||
new Param("auto", true, "Auto Pass Turn", "", new List<Param.CollapseParam>()
|
||||
{
|
||||
new Param.CollapseParam(x => (bool)x, new string[] { "sound", "con", "visual", "audio" })
|
||||
}),
|
||||
new Param("sound", true, "Play Time-Up Sound?", "Should the Time-Up sound play at the end of the interval?"),
|
||||
new Param("con", false, "Consecutive", "Disables everything that happens at the end of the interval if ticked on."),
|
||||
new Param("visual", true, "Stopwatch (Visual)", "Should the stopwatch visually appear?"),
|
||||
@ -60,7 +63,8 @@ namespace HeavenStudio.Games.Loaders
|
||||
new Param("con", false, "Consecutive", "Disables everything that happens at the end of the interval if ticked on."),
|
||||
new Param("visual", true, "Stopwatch (Visual)", "Should the stopwatch visually appear?"),
|
||||
new Param("audio", QuizShow.ClockAudio.Both, "Stopwatch (Audio)", "Should the sounds of the stopwatch play?")
|
||||
}
|
||||
},
|
||||
resizable = true
|
||||
},
|
||||
new GameAction("revealAnswer", "Reveal Answer")
|
||||
{
|
||||
@ -471,7 +475,7 @@ namespace HeavenStudio.Games
|
||||
|
||||
if (autoPassTurn)
|
||||
{
|
||||
PassTurn(beat + interval, beat, interval, timeUpSound, consecutive, visualClock, audioClock);
|
||||
PassTurn(beat + interval, beat, interval, timeUpSound, consecutive, visualClock, audioClock, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -508,16 +512,17 @@ namespace HeavenStudio.Games
|
||||
private void PassTurnStandalone(double beat, bool timeUpSound, bool consecutive, bool visualClock, int audioClock)
|
||||
{
|
||||
var lastInterval = GetLastIntervalBeforeBeat(beat);
|
||||
float length = EventCaller.GetAllInGameManagerList("quizShow", new string[] { "passTurn" }).Find(x => x.beat == beat).length;
|
||||
if (lastInterval != null)
|
||||
{
|
||||
PassTurn(beat, lastInterval.beat, lastInterval.length, timeUpSound, consecutive, visualClock, audioClock);
|
||||
PassTurn(beat, lastInterval.beat, lastInterval.length, timeUpSound, consecutive, visualClock, audioClock, length);
|
||||
}
|
||||
}
|
||||
|
||||
private void PassTurn(double beat, double intervalBeat, float intervalLength, bool timeUpSound, bool consecutive, bool visualClock, int audioClock)
|
||||
private void PassTurn(double beat, double intervalBeat, float intervalLength, bool timeUpSound, bool consecutive, bool visualClock, int audioClock, float length)
|
||||
{
|
||||
playerStartBeat = beat + 1;
|
||||
playerLength = intervalLength;
|
||||
playerStartBeat = beat + length - Conductor.instance.SecsToBeats(ngEarlyTime, Conductor.instance.GetBpmAtBeat(beat + length));
|
||||
playerLength = intervalLength + (float)Conductor.instance.SecsToBeats(ngEarlyTime, Conductor.instance.GetBpmAtBeat(beat + length));
|
||||
var relevantInputs = GetInputsBetweenBeat(intervalBeat, intervalBeat + intervalLength);
|
||||
relevantInputs.Sort((x, y) => x.beat.CompareTo(y.beat));
|
||||
|
||||
@ -527,11 +532,11 @@ namespace HeavenStudio.Games
|
||||
bool isDpad = relevantInputs[i].datamodel == "quizShow/dPad";
|
||||
if (isDpad)
|
||||
{
|
||||
ScheduleAutoplayInput(beat, 1 + inputBeat, InputType.DIRECTION_DOWN, AutoplayDPad, Nothing, Nothing);
|
||||
ScheduleAutoplayInput(beat, length + inputBeat, InputType.DIRECTION_DOWN, AutoplayDPad, Nothing, Nothing);
|
||||
}
|
||||
else
|
||||
{
|
||||
ScheduleAutoplayInput(beat, 1 + inputBeat, InputType.STANDARD_DOWN, AutoplayAButton, Nothing, Nothing);
|
||||
ScheduleAutoplayInput(beat, length + inputBeat, InputType.STANDARD_DOWN, AutoplayAButton, Nothing, Nothing);
|
||||
}
|
||||
}
|
||||
|
||||
@ -573,10 +578,10 @@ namespace HeavenStudio.Games
|
||||
if (visualClock)
|
||||
{
|
||||
spawnedTimer.gameObject.SetActive(true);
|
||||
spawnedTimer.Init(beat + 1, intervalLength);
|
||||
spawnedTimer.Init(beat + length, intervalLength);
|
||||
}
|
||||
}),
|
||||
new BeatAction.Action(beat + 1 + intervalLength, delegate
|
||||
new BeatAction.Action(beat + length + intervalLength, delegate
|
||||
{
|
||||
if (!consecutive)
|
||||
{
|
||||
@ -588,7 +593,7 @@ namespace HeavenStudio.Games
|
||||
if (visualClock) Destroy(spawnedTimer.gameObject);
|
||||
}
|
||||
),
|
||||
new BeatAction.Action(beat + 1 + intervalLength + timeUpBeat, delegate { if (timeUpSound && !consecutive) SoundByte.PlayOneShotGame("quizShow/timeUp"); }),
|
||||
new BeatAction.Action(beat + length + intervalLength + timeUpBeat, delegate { if (timeUpSound && !consecutive) SoundByte.PlayOneShotGame("quizShow/timeUp"); }),
|
||||
};
|
||||
BeatAction.New(instance.gameObject, actions);
|
||||
}
|
||||
|
Reference in New Issue
Block a user