finish essential property work

- fix minor bug related to karate man flow bar sounds
This commit is contained in:
minenice55 2022-09-03 23:17:17 -04:00
parent 6f7719d4e7
commit 3a9c0db871
5 changed files with 118 additions and 72 deletions

View file

@ -6702,7 +6702,7 @@ MonoBehaviour:
m_Right: 20
m_Top: 10
m_Bottom: 5
m_ChildAlignment: 0
m_ChildAlignment: 1
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
@ -16598,10 +16598,26 @@ MonoBehaviour:
m_GameObject: {fileID: 621827468}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4dcd15958462e4e488a04ef094e7ffcb, type: 3}
m_Script: {fileID: 11500000, guid: 4567e0acf98a9ef48b747da3b836a1a2, type: 3}
m_Name:
m_EditorClassIdentifier:
cursorCheckbox: {fileID: 0}
propertyHolder: {fileID: 231450549}
IntegerP: {fileID: 797336683}
FloatP: {fileID: 797336683}
BooleanP: {fileID: 2083473857}
DropdownP: {fileID: 728113665}
ColorP: {fileID: 1651196874}
StringP: {fileID: 937032842}
DividerP: {fileID: 1503364107}
HeaderP: {fileID: 934666994}
SubHeaderP: {fileID: 1172723234}
tags:
- tag: header
label: Rating Screen Text
isReadOnly: 0
- tag: subheader
label: Coming Soon!
isReadOnly: 0
--- !u!114 &621827471
MonoBehaviour:
m_ObjectHideFlags: 0
@ -23213,7 +23229,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1589389271}
m_Direction: 2
m_Value: 1
m_Size: 0.9996455
m_Size: 0.9999803
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@ -30035,7 +30051,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 129.91107}
m_AnchoredPosition: {x: 0, y: 129.91109}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1154875944
@ -30540,6 +30556,49 @@ MonoBehaviour:
DividerP: {fileID: 1503364107}
HeaderP: {fileID: 934666994}
SubHeaderP: {fileID: 1172723234}
tags:
- tag: header
label: Remix Information
isReadOnly: 0
- tag: subheader
label: Enter information about your remix here.
isReadOnly: 0
- tag: remixtitle
label: Remix Title
isReadOnly: 0
- tag: remixauthor
label: Remix Author
isReadOnly: 0
- tag: remixdesc
label: Description
isReadOnly: 0
- tag: remixtags
label: Tags
isReadOnly: 0
- tag: subheader
label: <alpha=#CC>(split tags using commas ",")
isReadOnly: 0
- tag: divider
label: Divider Chart
isReadOnly: 0
- tag: header
label: Song Information
isReadOnly: 0
- tag: subheader
label: Enter information about your remix's song here.
isReadOnly: 0
- tag: idolsong
label: Song Name
isReadOnly: 0
- tag: idolcredit
label: Song Artist
isReadOnly: 0
- tag: idolgenre
label: Song Genre
isReadOnly: 0
- tag: divider
label: Divider Idol
isReadOnly: 0
--- !u!114 &1177777400
MonoBehaviour:
m_ObjectHideFlags: 0
@ -35603,42 +35662,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
dialog: {fileID: 1336470761}
tabsManager: {fileID: 1523610372}
infoTags:
- tag: header
label: Remix Information
isReadOnly: 0
- tag: subheader
label: Enter information about your remix here.
isReadOnly: 0
- tag: remixtitle
label: Remix Title
isReadOnly: 0
- tag: remixauthor
label: Remix Author
isReadOnly: 0
- tag: divider
label: Divider Chart
isReadOnly: 0
- tag: header
label: Song Information
isReadOnly: 0
- tag: subheader
label: Enter information about your remix's song here.
isReadOnly: 0
- tag: idolgenre
label: Song Genre
isReadOnly: 0
- tag: idolsong
label: Song Name
isReadOnly: 0
- tag: idolcredit
label: Song Artist
isReadOnly: 0
- tag: divider
label: Divider Idol
isReadOnly: 0
flavourTags: []
infoContainer: {fileID: 1177777399}
containers:
- {fileID: 1177777399}
- {fileID: 621827470}
chart:
bpm: 0
musicVolume: 0

View file

@ -26,28 +26,29 @@ namespace HeavenStudio
{"productsubversion", 0},
// file format version
{"riqversion", CurrentRiqVersion},
// mapper set properties? (use this to flash the button)
// mapper set properties? (future: use this to flash the button)
{"propertiesmodified", false},
////// CATEGORY 1: SONG INFO
// general chart info
{"remixtitle", "New Remix"}, // chart name
{"remixauthor", "Your Name"}, // charter's name
{"remixlevel", 1}, // chart difficulty (maybe offer a suggestion but still have the mapper determine it)
{"remixtempo", 120f}, // avg. chart tempo
{"remixtags", ""}, // chart tags
{"icontype", 0}, // chart icon (presets, custom - future)
{"iconurl", ""}, // custom icon location (future)
{"remixtitle", "New Remix"}, // chart name
{"remixauthor", "Your Name"}, // charter's name
{"remixdesc", "Remix Description"}, // chart description
{"remixlevel", 1}, // chart difficulty (maybe offer a suggestion but still have the mapper determine it)
{"remixtempo", 120f}, // avg. chart tempo
{"remixtags", ""}, // chart tags
{"icontype", 0}, // chart icon (presets, custom - future)
{"iconurl", ""}, // custom icon location (future)
// chart song info
{"idolgenre", "Song Genre"}, // song genre
{"idolsong", "Song Name"}, // song name
{"idolcredit", "Artist"}, // song artist
{"idolgenre", "Song Genre"}, // song genre
{"idolsong", "Song Name"}, // song name
{"idolcredit", "Artist"}, // song artist
////// CATEGORY 2: PROLOGUE AND EPILOGUE
// chart prologue
{"prologuetype", 0}, // prologue card animation (future)
{"prologuecaption", "Remix"}, // prologue card sub-title (future)
{"prologuetype", 0}, // prologue card animation (future)
{"prologuecaption", "Remix"}, // prologue card sub-title (future)
// chart results screen messages
{"resultcaption", "Rhythm League Notes"}, // result screen header
@ -331,6 +332,7 @@ namespace HeavenStudio
/// </summary>
public void PostProcess()
{
DynamicBeatmap beatmapModel = new DynamicBeatmap();
Minigames.Minigame game;
Minigames.GameAction action;
System.Type type, pType;
@ -376,6 +378,14 @@ namespace HeavenStudio
}
e.DynamicData = dynamicData;
}
//go thru each property of the model beatmap and add any missing keyvalue pair
foreach (var prop in beatmapModel.properties)
{
if (!properties.ContainsKey(prop.Key))
{
properties.Add(prop.Key, prop.Value);
}
}
}
}
}

View file

@ -37,6 +37,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
static float PeriodHigh = 15 / 60f;
int noriMode = (int)KarateMan.NoriMode.None;
bool playedJust = false;
int inputsToSwitch = 0;
//takes 12% of inputs to fill the nori bar
@ -69,6 +70,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
NoriHolder = NoriHolderTengoku;
NoriManiaInk00.SetActive(false);
NoriManiaInk01.SetActive(false);
playedJust = false;
break;
case (int) KarateMan.NoriMode.Mania:
MaxNori = 10;
@ -77,6 +79,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
NoriHolder = NoriHolderMania00;
NoriManiaInk00.SetActive(true);
NoriManiaInk01.SetActive(false);
playedJust = false;
inputsToSwitch = KarateMan.CountHitsToEnd(fromBeat);
break;
@ -85,6 +88,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
Nori = 0;
NoriManiaInk00.SetActive(false);
NoriManiaInk01.SetActive(false);
playedJust = false;
return;
}
@ -136,8 +140,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
NoriHeartAnimators[i].Play("NoriFull", -1, (Time.time * PeriodHigh) % 1f);
}
}
if (KarateMan.instance.NoriPerformance >= 0.6f && oldNori / MaxNori < 0.6f)
if (KarateMan.instance.NoriPerformance >= 0.6f && oldNori / MaxNori < 0.6f && !playedJust)
{
playedJust = true;
Jukebox.PlayOneShotGame("karateman/nori_just");
}
UpdateHeartColours();
@ -176,6 +181,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
}
if (KarateMan.instance.NoriPerformance < 0.6f && oldNori / MaxNori >= 0.6f)
{
playedJust = false;
Jukebox.PlayOneShotGame("karateman/nori_ng");
}
UpdateHeartColours();
@ -189,6 +195,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
{
if (Nori >= MaxNori)
Jukebox.PlayOneShotGame("karateman/nori_through");
playedJust = false;
Nori = 0;
foreach (Animator anim in NoriHeartAnimators)
{
@ -215,6 +222,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
}
}
}
if (KarateMan.instance.NoriPerformance < 0.6f)
playedJust = false;
UpdateHeartColours();
}

View file

@ -13,13 +13,8 @@ namespace HeavenStudio.Editor
[Header("General References")]
[SerializeField] TabsManager tabsManager;
[Header("Editable Properties")]
[SerializeField] PropertyTag[] infoTags;
[SerializeField] PropertyTag[] flavourTags;
[Header("Containers")]
[SerializeField] ChartInfoProperties infoContainer;
// [SerializeField] ChartFlavourProperties flavourContainer;
[SerializeField] ChartInfoProperties[] containers;
public DynamicBeatmap chart;
@ -38,48 +33,51 @@ namespace HeavenStudio.Editor
{
ResetAllDialogs();
infoContainer.Init(this);
//flavourContainer.Init(this);
foreach (var container in containers)
{
container.Init(this);
}
tabsManager.OpenContent();
Editor.instance.canSelect = false;
Editor.instance.inAuthorativeMenu = true;
dialog.SetActive(true);
chart = GameManager.instance.Beatmap;
chart["propertiesmodified"] = true;
}
}
public void SetupDialog()
public void SetupDialog(PropertyTag[] tags, ChartInfoProperties container)
{
chart = GameManager.instance.Beatmap;
PropertyTag[] tags = infoTags;
int i = 0;
chart["propertiesmodified"] = true;
foreach (PropertyTag property in tags)
{
if (chart.properties.ContainsKey(property.tag))
{
infoContainer.AddParam(this, property.tag, chart.properties[property.tag], property.label, property.isReadOnly);
container.AddParam(this, property.tag, chart.properties[property.tag], property.label, property.isReadOnly);
}
else
{
if (property.tag == "divider")
{
infoContainer.AddDivider(this);
container.AddDivider(this);
}
else if (property.tag == "header")
{
infoContainer.AddHeader(this, property.label);
container.AddHeader(this, property.label);
}
else if (property.tag == "subheader")
{
infoContainer.AddSubHeader(this, property.label);
container.AddSubHeader(this, property.label);
}
else
{
Debug.LogWarning("Property Menu generation Warning: Property " + property.tag + " not found, skipping...");
}
}
i++;
}
}

View file

@ -23,6 +23,9 @@ namespace HeavenStudio.Editor
[SerializeField] private GameObject HeaderP;
[SerializeField] private GameObject SubHeaderP;
[Header("Editable Properties")]
[SerializeField] RemixPropertiesDialog.PropertyTag[] tags;
public void Init(RemixPropertiesDialog diag)
{
dialog = diag;
@ -116,7 +119,7 @@ namespace HeavenStudio.Editor
public override void OnOpenTab()
{
dialog.SetupDialog();
dialog.SetupDialog(tags, this);
}
public override void OnCloseTab()