Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
v20.03.05.2 KK_COBOC KK_SCLO
Browse files Browse the repository at this point in the history
KK_COBOC:
修正: Maker Change Coordinate時如果選到同一邊會顯示異常
KK_SCLO:
新增: 對已選擇人物新增檢查
  • Loading branch information
jim60105 committed Mar 6, 2020
1 parent 78dd6f3 commit fdd4e0b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace KK_CharaOverlaysBasedOnCoordinate {
class KK_CharaOverlaysBasedOnCoordinate : BaseUnityPlugin {
internal const string PLUGIN_NAME = "Chara Overlays Based On Coordinate";
internal const string GUID = "com.jim60105.kk.charaoverlaysbasedoncoordinate";
internal const string PLUGIN_VERSION = "20.03.05.1";
internal const string PLUGIN_VERSION = "20.03.05.2";
internal const string PLUGIN_RELEASE_VERSION = "1.3.0";

internal static new ManualLogSource Logger;
Expand Down Expand Up @@ -413,9 +413,11 @@ protected override void OnCoordinateBeingLoaded(ChaFileCoordinate coordinate, bo
} else {
if (null == data) {
Logger.LogInfo("No PluginData Existed");
CurrentOverlay = GetOverlayLoaded();
} else if ((!data.data.TryGetValue("CharaOverlayTable", out object tmpOverlayTable) || tmpOverlayTable == null) ||
(!data.data.TryGetValue("CharaResources", out object tmpResources) || null == tmpResources)) {
Logger.LogInfo("No Exist Data found from Coordinate.");
CurrentOverlay = GetOverlayLoaded();
} else {
Dictionary<TexType, byte[]> coordinateData = new Dictionary<TexType, byte[]>();
Dictionary<int, byte[]> resourceList = tmpResources.ToDictionary<int, byte[]>();
Expand Down Expand Up @@ -777,11 +779,14 @@ internal void ChangeIrisDisplayside(int side) {
}

internal void UpdateInterface() {
if (MakerAPI.InsideMaker && null != KK_CharaOverlaysBasedOnCoordinate.IrisSideRadioBtn) {
if (MakerAPI.InsideMaker &&
null != KK_CharaOverlaysBasedOnCoordinate.IrisSideRadioBtn &&
KK_CharaOverlaysBasedOnCoordinate.IrisSideRadioBtn.Value != IrisDisplaySide[(int)CurrentCoordinate.Value]
) {
KK_CharaOverlaysBasedOnCoordinate.IrisSideRadioBtn.Value = IrisDisplaySide[(int)CurrentCoordinate.Value];
return;
} else {
ChangeIrisDisplayside(IrisDisplaySide[(int)CurrentCoordinate.Value]);
}
ChangeIrisDisplayside(IrisDisplaySide[(int)CurrentCoordinate.Value]);
}
#endregion
}
Expand Down
Binary file not shown.
13 changes: 8 additions & 5 deletions KK_StudioCoordinateLoadOption/KK_StudioCoordinateLoadOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ namespace KK_StudioCoordinateLoadOption {
public class KK_StudioCoordinateLoadOption : BaseUnityPlugin {
internal const string PLUGIN_NAME = "Studio Coordinate Load Option";
internal const string GUID = "com.jim60105.kk.studiocoordinateloadoption";
internal const string PLUGIN_VERSION = "20.03.05.0";
internal const string PLUGIN_RELEASE_VERSION = "3.1.0.1";
internal const string PLUGIN_VERSION = "20.03.05.2";
internal const string PLUGIN_RELEASE_VERSION = "3.1.1";

internal static new ManualLogSource Logger;
public void Awake() {
Expand Down Expand Up @@ -402,14 +402,17 @@ internal static bool OnClickLoadPrefix() {
}

OCIChar[] array = (from v in Singleton<GuideObjectManager>.Instance.selectObjectKey
select Studio.Studio.GetCtrlInfo(v) as OCIChar into v
where v != null
select v).ToArray();
select Studio.Studio.GetCtrlInfo(v) into v
where v is OCIChar
select v as OCIChar).ToArray();
if (isAllTrueFlag && !lockHairAcc && !addAccModeFlag) {
Logger.LogInfo("Toggle all true, use original game function");
foreach (var ocichar in array) {
ocichar.LoadClothesFile(charaFileSort.selectPath);
}
}else if (array.Length == 0) {
Logger.LogMessage("No available characters selected");
Logger.LogDebug("Studio Coordinate Load Option Finish");
} else {
//建立tmpChara並等待載入完成
//然後再呼叫換衣
Expand Down
Binary file not shown.

0 comments on commit fdd4e0b

Please sign in to comment.