rheirman / WhatTheHack

Mechanoid hacking
16 stars 18 forks source link

"Fraction" Shader with outline in 1.4 (with solution). #69

Open MAGGen-hub opened 1 year ago

MAGGen-hub commented 1 year ago

In 1.4 when hacked mechanoid cell (texture square) change color into "Fraction color" because of changes (<shaderType>CutoutWithOverlay</shaderType>) in game code. This patch fixes the problem:

<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationSequence">
  <operations>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_Scyther"]/lifeStages/li[2]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_Pikeman"]/lifeStages/li[2]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_Lancer"]/lifeStages/li[2]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_CentipedeBurner"]/lifeStages/li[2]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_CentipedeGunner"]/lifeStages/li[2]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[@Name="MechCentipedeBase"]/lifeStages/li[2]/bodyGraphicData/shaderType</xpath>
    </li>
  </operations>
</Operation>

<Operation Class="PatchOperationSequence" MayRequire="Ludeon.RimWorld.Biotech">
  <operations>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_Scyther"]/lifeStages/li[1]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_Pikeman"]/lifeStages/li[1]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_Lancer"]/lifeStages/li[1]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_CentipedeBurner"]/lifeStages/li[1]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[defName="Mech_CentipedeGunner"]/lifeStages/li[1]/bodyGraphicData/shaderType</xpath>
    </li>
    <li Class="PatchOperationRemove">
        <xpath>Defs/PawnKindDef[@Name="MechCentipedeBase"]/lifeStages/li[1]/bodyGraphicData/shaderType</xpath>
    </li>
  </operations>
</Operation>
</Patch>