Skip to content

Commit

Permalink
添加了永恒之光
Browse files Browse the repository at this point in the history
  • Loading branch information
MCXGK3 committed Jan 17, 2024
1 parent ea27e77 commit 63b61b3
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 338 deletions.
23 changes: 16 additions & 7 deletions ManyRadiances/ManyRadiances.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ManyRadiances : Mod,IGlobalSettings<Settings>,IMenuMod,ITogglableMo
"",
"",
"ForgottenLight",
"永燃之光"};
"永远不变,也永远变化;永远熄灭,也永远在燃烧"};
public string[] grs = {"Ok.",
"Ok.",
"",
Expand All @@ -50,7 +50,7 @@ public class ManyRadiances : Mod,IGlobalSettings<Settings>,IMenuMod,ITogglableMo
"",
"",
"",
"不会......熄灭......"};
"不会······消失·····"};


public ManyRadiances() : base("ManyRadiances")
Expand All @@ -60,7 +60,7 @@ public ManyRadiances() : base("ManyRadiances")

public override string GetVersion()
{
return "m.x.0.6";
return "0.0.1.0";
}

public override void Initialize(Dictionary<string, Dictionary<string, GameObject>> preloadedObjects)
Expand All @@ -80,7 +80,7 @@ private string langet(string key, string sheetTitle, string orig)
switch (key)
{
case "ABSOLUTE_RADIANCE_SUPER": if (Pri(s_) == -1) return orig; return ars[Pri(s_)];
case "ABSOLUTE_RADIANCE_MAIN": if (Pri(s_) == -1) return orig; if (Pri(s_) == 2) return s_.main; else return orig;
case "ABSOLUTE_RADIANCE_MAIN": if (Pri(s_) == -1) return orig; if (Pri(s_) == 2) return s_.main; else if(Pri(s_)==10) return OtherLanguage("永恒之光", "ImmortalLight");else return orig;
case "GG_S_RADIANCE": if (Pri(s_) == -1) return orig; return gg[Pri(s_)];
case "GODSEEKER_RADIANCE_STATUE": if (Pri(s_) == -1) return orig; return grs[Pri(s_)];
default: return orig;
Expand All @@ -107,7 +107,7 @@ private void mod_rad(On.PlayMakerFSM.orig_OnEnable orig, PlayMakerFSM self)
if (s_.IronHead) { self.gameObject.AddComponent<ironhead>(); }
if (s_.forgottenlight) { self.gameObject.AddComponent<forgottenlight>(); }
if (s_.immortalLight) { self.gameObject.AddComponent<immortallight>(); }
if (s_.test) { self.gameObject.AddComponent<radiancetest>(); }
//if (s_.test) { self.gameObject.AddComponent<radiancetest>(); }
}
}
}
Expand Down Expand Up @@ -286,7 +286,7 @@ Settings IGlobalSettings<Settings>.OnSaveGlobal()
Loader = () => s_.immortalLight ? 0 : 1,
Saver = i => s_.immortalLight = i == 0
});
menu.Add(
/*menu.Add(
new()
{
Name = "test",
Expand All @@ -298,7 +298,7 @@ Settings IGlobalSettings<Settings>.OnSaveGlobal()
},
Loader = () => s_.test ? 0 : 1,
Saver = i => s_.test = i == 0
});
});*/



Expand All @@ -320,6 +320,15 @@ private int Pri(Settings s)
else return -1;
}

private string OtherLanguage(string chinese, string english)
{
if (Language.Language.CurrentLanguage() == Language.LanguageCode.ZH)
{
return chinese;
}
else return english;
}

public void Unload()
{
On.PlayMakerFSM.OnEnable -= mod_rad;
Expand Down
4 changes: 3 additions & 1 deletion ManyRadiances/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ public class Settings
public bool forgottenlight=false;
public bool inPat=false;
public bool immortalLight = false;
public bool test=false;
public string super = "我去";
public string main = "原神";
public string gg = "原初之神";
public string grs = "恭喜";
[NonSerialized]
public bool test=false;


}
}
Loading

0 comments on commit 63b61b3

Please sign in to comment.