Skip to content

Commit

Permalink
Update Code
Browse files Browse the repository at this point in the history
  • Loading branch information
Awbugl committed Nov 8, 2024
1 parent cc533be commit a1727b4
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
- v3.0.7
+ 调整了制造复合矩阵时的工作颜色(感谢karki)
+ 修复了研究非矩阵科技时的可能出现的报错问题

+ Adjusted working colors when making composite matrices (thanks karki)
+ Fixed a bug that could occur when researching non-matrix technologies


<details>
<summary>点击展开日志 | Click to view all </summary>


- v3.0.6
+ 移除了黑雾掉落中的`齿轮`
+ 调整了部分科技的研究需求、前置科技
Expand All @@ -6,10 +18,6 @@
+ Adjusted research requirements and pre-requisite technologies for some technologies


<details>
<summary>点击展开日志 | Click to view all </summary>


- v3.0.5
+ 移除了物品`齿轮`,调整了相关配方
+ 调整了部分科技的研究需求、前置科技
Expand Down
2 changes: 2 additions & 0 deletions ProjectGenesis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@
<Copy SourceFiles="$(TargetPath)" DestinationFiles="$(BepinExPath)plugins\$(DebugModDir)\$(TargetName).dll"/>
<Copy SourceFiles="$(SolutionDir)assets\texpack" DestinationFiles="$(BepinExPath)plugins\$(DebugModDir)\texpack"/>
<Copy SourceFiles="$(SolutionDir)assets\genesis-models" DestinationFiles="$(BepinExPath)plugins\$(DebugModDir)\genesis-models"/>
<Copy SourceFiles="$(SolutionDir)assets\genesis-models-lab" DestinationFiles="$(BepinExPath)plugins\$(DebugModDir)\genesis-models-lab"/>
<Copy SourceFiles="$(TargetPath)" DestinationFiles="$(ReleasePath)plugins\$(TargetName).dll"/>
<Copy SourceFiles="README.md" DestinationFiles="$(ReleasePath)README.md"/>
<Copy SourceFiles="CHANGELOG.md" DestinationFiles="$(ReleasePath)CHANGELOG.md"/>
<Copy SourceFiles="$(SolutionDir)assets\icon.png" DestinationFiles="$(ReleasePath)icon.png"/>
<Copy SourceFiles="$(SolutionDir)assets\texpack" DestinationFiles="$(ReleasePath)plugins\texpack"/>
<Copy SourceFiles="$(SolutionDir)assets\genesis-models" DestinationFiles="$(ReleasePath)plugins\genesis-models"/>
<Copy SourceFiles="$(SolutionDir)assets\genesis-models-lab" DestinationFiles="$(ReleasePath)plugins\genesis-models-lab"/>
<Copy SourceFiles="$(SolutionDir)lib\Newtonsoft.Json.dll" DestinationFiles="$(ReleasePath)plugins\Newtonsoft.Json.dll"/>
</Target>
</Project>
Binary file added assets/genesis-models-lab
Binary file not shown.
4 changes: 2 additions & 2 deletions data/techs.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"MaxLevel": 0,
"LevelCoef1": 0,
"LevelCoef2": 0,
"IsLabTech": true,
"IsLabTech": false,
"PreTechsMax": false,
"AddItems": [
1401
Expand Down Expand Up @@ -507,7 +507,7 @@
"MaxLevel": 0,
"LevelCoef1": 0,
"LevelCoef2": 0,
"IsLabTech": true,
"IsLabTech": false,
"PreTechsMax": false,
"AddItems": [
2106
Expand Down
7 changes: 0 additions & 7 deletions src/Patches/UI/ResearchLabPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ public static void UILabWindow_OnUpdate_Postfix(UILabWindow __instance)
}
}

[HarmonyPatch(typeof(LabComponent), nameof(LabComponent.InternalUpdateAssemble))]
[HarmonyPostfix]
public static void LabComponent_InternalUpdateAssemble_Postfix(ref LabComponent __instance, ref uint __result)
{
if (__result > 6) __result = 6;
}

[HarmonyPatch(typeof(UILabWindow), nameof(UILabWindow._OnUpdate))]
[HarmonyTranspiler]
public static IEnumerable<CodeInstruction> UILabWindow_OnUpdate_Transpiler(IEnumerable<CodeInstruction> instructions)
Expand Down
10 changes: 9 additions & 1 deletion src/ProjectGenesis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class ProjectGenesis : BaseUnityPlugin, IModCanSave, IMultiplayerMod
{
public const string MODGUID = "org.LoShin.GenesisBook";
public const string MODNAME = "GenesisBook";
public const string VERSION = "3.0.6";
public const string VERSION = "3.0.7";
public const string DEBUGVERSION = "";

public static bool LoadCompleted;
Expand Down Expand Up @@ -122,6 +122,10 @@ public void Awake()
resources_models.LoadAssetBundle("genesis-models");
ProtoRegistry.AddResource(resources_models);

var resources_lab = new ResourceData("org.LoShin.GenesisBook", "genesis-models-lab", ModPath);
resources_lab.LoadAssetBundle("genesis-models-lab");
ProtoRegistry.AddResource(resources_lab);

Shader stoneVeinShader =
resources_models.bundle.LoadAsset<Shader>("Assets/genesis-models/shaders/PBR Standard Vein Stone COLOR.shader");
SwapShaderPatches.AddSwapShaderMapping("VF Shaders/Forward/PBR Standard Vein Stone", stoneVeinShader);
Expand All @@ -130,6 +134,10 @@ public void Awake()
resources_models.bundle.LoadAsset<Shader>("Assets/genesis-models/shaders/PBR Standard Vein Metal COLOR.shader");
SwapShaderPatches.AddSwapShaderMapping("VF Shaders/Forward/PBR Standard Vein Metal", metalVeinShader);

Shader labToggleShader =
resources_lab.bundle.LoadAsset<Shader>("Assets/genesis-models/shaders/PBR Standard Vertex Toggle Lab REPLACE.shader");
SwapShaderPatches.AddSwapShaderMapping("VF Shaders/Forward/PBR Standard Vertex Toggle Lab", labToggleShader);

#endregion ResourceData

#region NebulaModAPI
Expand Down

0 comments on commit a1727b4

Please sign in to comment.