Glee Club fix (#860)

* gleeclub

* Add shorter instantiation and better C offset

---------

Co-authored-by: EpicGamer2469 <epicgamer5694@gmail.com>
This commit is contained in:
フマジメ 2024-04-12 10:40:19 +09:00 committed by GitHub
parent 7a773d02ad
commit c4445fef91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 14 deletions

View file

@ -26,17 +26,17 @@ namespace HeavenStudio.Games.Loaders
resizable = true,
parameters = new List<Param>()
{
new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -5, 4, 5, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 2, 4, 5, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones", new EntityTypes.Note(-5, 11, 4, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones1", new EntityTypes.Note(-1, 11, 4, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesPlayer", new EntityTypes.Note(2, 11, 4, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
new Param("close", GleeClub.MouthOpenClose.Both, "Close/Open Mouth", "Choose if the chorus kids should close or open their mouth."),
new Param("repeat", false, "Repeating", "Toggle if the left and middle chorus kid should repeat this singing cue.", new List<Param.CollapseParam>()
{
new Param.CollapseParam((x, _) => (bool)x, new string[] { "semiTonesLeft2", "semiTonesLeft3", "semiTonesMiddle2" })
}),
new Param("semiTonesLeft2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Repeat Left First)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesLeft3", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Repeat Left Last)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesMiddle2", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Repeat Middle)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesLeft2", new EntityTypes.Note(0, 11, 4, "gleeClub/WailLoop"), "Semitones (Repeat Left First)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesLeft3", new EntityTypes.Note(0, 11, 4, "gleeClub/WailLoop"), "Semitones (Repeat Left Last)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesMiddle2", new EntityTypes.Note(0, 11, 4, "gleeClub/WailLoop"), "Semitones (Repeat Middle)", "Set the number of semitones up or down this note should be pitched."),
}
},
new GameAction("baton", "Baton")
@ -50,9 +50,9 @@ namespace HeavenStudio.Games.Loaders
defaultLength = 4f,
parameters = new List<Param>()
{
new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, -1, 4, 5, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 4, 4, 5, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 10, 4, 5, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones", new EntityTypes.Note(-1, 11, 4, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones1", new EntityTypes.Note(4, 11, 4, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesPlayer", new EntityTypes.Note(10, 11, 4, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
new Param("pitch", new EntityTypes.Float(0f, 5f, 1f), "Conductor Voice Pitch", "Choose the pitch of the conductor's voice. 1 is normal pitch.")
}
},
@ -62,9 +62,9 @@ namespace HeavenStudio.Games.Loaders
defaultLength = 0.5f,
parameters = new List<Param>()
{
new Param("semiTones", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones1", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesPlayer", new EntityTypes.Note(-EntityTypes.Note.maxSemitones, EntityTypes.Note.maxSemitones, 0, 4, 5, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones", new EntityTypes.Note(0, 11, 4, "gleeClub/WailLoop"), "Semitones", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTones1", new EntityTypes.Note(0, 11, 4, "gleeClub/WailLoop"), "Semitones (Next)", "Set the number of semitones up or down this note should be pitched."),
new Param("semiTonesPlayer", new EntityTypes.Note(0, 11, 4, "gleeClub/WailLoop"), "Semitones (Player)", "Set the number of semitones up or down this note should be pitched."),
}
},
new GameAction("presence", "Toggle Chorus Kids")

View file

@ -83,8 +83,11 @@ public class NotePropertyPrefab : NumberPropertyPrefab
slider.wholeNumbers = true;
offsetFromC = 0;
if(note.offsetToC)
offsetFromC = 3 - note.sampleNote;
if (note.offsetToC) {
int sameC = 3 - note.sampleNote;
int upperC = 15 - note.sampleNote;
offsetFromC = Mathf.Abs(sameC) < Mathf.Abs(upperC) ? sameC : upperC;
}
int lastValue = (int)slider.value;
slider.value = Convert.ToSingle(parameterManager.entity[propertyName]) - offsetFromC;