Skip to content

Commit

Permalink
[SVS] Add more character cheats; Reorganize chara cheat list
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Sep 25, 2024
1 parent 9ad7f9d commit c22315d
Showing 1 changed file with 51 additions and 28 deletions.
79 changes: 51 additions & 28 deletions SVS_CheatTools/CheatToolsWindowInit.SVS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,42 +255,35 @@ private static void DrawSingleCharaCheats(Actor currentAdvChara, CheatToolsWindo
{
GUILayout.BeginHorizontal();
{
GUILayout.Label("Selected chara name: " + GetCharaName(currentAdvChara));
GUILayout.Label("Selected:", IMGUIUtils.LayoutOptionsExpandWidthFalse);
GUILayout.FlexibleSpace();
if (GUILayout.Button("_")) _currentVisibleChara = null;
GUILayout.Label(GetCharaName(currentAdvChara), IMGUIUtils.LayoutOptionsExpandWidthFalse);
GUILayout.FlexibleSpace();
if (GUILayout.Button("Close", IMGUIUtils.LayoutOptionsExpandWidthFalse)) _currentVisibleChara = null;
}
GUILayout.EndHorizontal();

GUILayout.Space(6);

var gameParam = currentAdvChara.charFile.GameParameter;
if (gameParam != null)
var charasGameParam = currentAdvChara.charasGameParam;
if (charasGameParam != null)
{
DrawUtils.DrawStrings("Job", new[] { "None", "Lifeguard", "Cafe", "Shrine" }, () => gameParam.job, b => gameParam.job = b);
DrawUtils.DrawNums("Gayness", 5, () => gameParam.sexualTarget, b => gameParam.sexualTarget = b);
DrawUtils.DrawNums(nameof(gameParam.lvChastity), 5, () => gameParam.lvChastity, b => gameParam.lvChastity = b);
DrawUtils.DrawNums(nameof(gameParam.lvSociability), 5, () => gameParam.lvSociability, b => gameParam.lvSociability = b);
DrawUtils.DrawNums(nameof(gameParam.lvTalk), 5, () => gameParam.lvTalk, b => gameParam.lvTalk = b);
DrawUtils.DrawNums(nameof(gameParam.lvStudy), 5, () => gameParam.lvStudy, b => gameParam.lvStudy = b);
DrawUtils.DrawNums(nameof(gameParam.lvLiving), 5, () => gameParam.lvLiving, b => gameParam.lvLiving = b);
DrawUtils.DrawNums(nameof(gameParam.lvPhysical), 5, () => gameParam.lvPhysical, b => gameParam.lvPhysical = b);
DrawUtils.DrawNums("Fighting style", 3, () => gameParam.lvDefeat, b => gameParam.lvDefeat = b);

DrawUtils.DrawBool(nameof(gameParam.isVirgin), () => gameParam.isVirgin, b => gameParam.isVirgin = b);
DrawUtils.DrawBool(nameof(gameParam.isAnalVirgin), () => gameParam.isAnalVirgin, b => gameParam.isAnalVirgin = b);
DrawUtils.DrawBool(nameof(gameParam.isMaleVirgin), () => gameParam.isMaleVirgin, b => gameParam.isMaleVirgin = b);
DrawUtils.DrawBool(nameof(gameParam.isMaleAnalVirgin), () => gameParam.isMaleAnalVirgin, b => gameParam.isMaleAnalVirgin = b);
var baseParameter = currentAdvChara.charasGameParam.baseParameter;
if (baseParameter != null)
{
GUILayout.Label("In-game stats");

GUILayout.Space(6);
DrawUtils.DrawSlider(nameof(baseParameter.NowStamina), 0, baseParameter.Stamina + 100, () => baseParameter.NowStamina, val => baseParameter.NowStamina = val,
"If character is controlled by player this is used for determining how long until the period ends. Initial value is equal to 'Stamina + 100'.");
DrawUtils.DrawSlider(nameof(baseParameter.Stamina), 0, 1000, () => baseParameter.Stamina, val => baseParameter.Stamina = val);
DrawUtils.DrawSlider(nameof(baseParameter.Conversation), 0, 1000, () => baseParameter.Conversation, val => baseParameter.Conversation = val);
DrawUtils.DrawSlider(nameof(baseParameter.Study), 0, 1000, () => baseParameter.Study, val => baseParameter.Study = val);
DrawUtils.DrawSlider(nameof(baseParameter.Living), 0, 1000, () => baseParameter.Living, val => baseParameter.Living = val);
DrawUtils.DrawSlider(nameof(baseParameter.Job), 0, 1000, () => baseParameter.Job, val => baseParameter.Job = val, "Doesn't seem to work, changes get overwritten.");

DrawBelongingsPicker(gameParam, comboboxMaxY);
DrawTargetAnswersPicker(_hPreferenceDropdown, "H Preference", gameParam, sv => sv.preferenceH, comboboxMaxY);
DrawTargetAnswersPicker(_traitsDropdown, "Trait", gameParam, sv => sv.individuality, comboboxMaxY);
}
GUILayout.Space(6);
}

var charasGameParam = currentAdvChara.charasGameParam;
if (charasGameParam != null)
{
GUILayout.BeginVertical(GUI.skin.box);
{
var menstruationsLength = charasGameParam.menstruations.Length;
Expand Down Expand Up @@ -334,11 +327,11 @@ private static void DrawSingleCharaCheats(Actor currentAdvChara, CheatToolsWindo
GUILayout.EndHorizontal();

void SetMenstruationForDay(int index, int newMens) => charasGameParam.menstruations[index] = newMens;

GUILayout.Space(6);
}
GUILayout.EndVertical();

GUILayout.Space(6);

GUILayout.BeginVertical(GUI.skin.box);
{
// DarkSoldier27: Ok I figure it out:
Expand Down Expand Up @@ -384,6 +377,36 @@ private static void DrawSingleCharaCheats(Actor currentAdvChara, CheatToolsWindo
GUILayout.Space(6);
}

var gameParam = currentAdvChara.charFile.GameParameter;
if (gameParam != null)
{
GUILayout.BeginVertical(GUI.skin.box);
{
GUILayout.Label("Card stats (same as in maker)");

DrawUtils.DrawStrings("Job", new[] { "None", "Lifeguard", "Cafe", "Shrine" }, () => gameParam.job, b => gameParam.job = b);
DrawUtils.DrawNums("Gayness", 5, () => gameParam.sexualTarget, b => gameParam.sexualTarget = b);
DrawUtils.DrawNums(nameof(gameParam.lvChastity), 5, () => gameParam.lvChastity, b => gameParam.lvChastity = b);
DrawUtils.DrawNums(nameof(gameParam.lvSociability), 5, () => gameParam.lvSociability, b => gameParam.lvSociability = b);
DrawUtils.DrawNums(nameof(gameParam.lvTalk), 5, () => gameParam.lvTalk, b => gameParam.lvTalk = b);
DrawUtils.DrawNums(nameof(gameParam.lvStudy), 5, () => gameParam.lvStudy, b => gameParam.lvStudy = b);
DrawUtils.DrawNums(nameof(gameParam.lvLiving), 5, () => gameParam.lvLiving, b => gameParam.lvLiving = b);
DrawUtils.DrawNums(nameof(gameParam.lvPhysical), 5, () => gameParam.lvPhysical, b => gameParam.lvPhysical = b);
DrawUtils.DrawNums("Fighting style", 3, () => gameParam.lvDefeat, b => gameParam.lvDefeat = b);

DrawUtils.DrawBool(nameof(gameParam.isVirgin), () => gameParam.isVirgin, b => gameParam.isVirgin = b);
DrawUtils.DrawBool(nameof(gameParam.isAnalVirgin), () => gameParam.isAnalVirgin, b => gameParam.isAnalVirgin = b);
DrawUtils.DrawBool(nameof(gameParam.isMaleVirgin), () => gameParam.isMaleVirgin, b => gameParam.isMaleVirgin = b);
DrawUtils.DrawBool(nameof(gameParam.isMaleAnalVirgin), () => gameParam.isMaleAnalVirgin, b => gameParam.isMaleAnalVirgin = b);
}
GUILayout.EndVertical();

GUILayout.Space(6);

DrawBelongingsPicker(gameParam, comboboxMaxY);
DrawTargetAnswersPicker(_hPreferenceDropdown, "H Preference", gameParam, sv => sv.preferenceH, comboboxMaxY);
DrawTargetAnswersPicker(_traitsDropdown, "Trait", gameParam, sv => sv.individuality, comboboxMaxY);
}

if (gameParam != null && GUILayout.Button("Inspect GameParameter"))
Inspector.Instance.Push(new InstanceStackEntry(gameParam, "GameParam " + GetCharaName(currentAdvChara)), true);
Expand Down

0 comments on commit c22315d

Please sign in to comment.