-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3186 from CombatExtended-Continued/RenderChanges
Render changes
- Loading branch information
Showing
11 changed files
with
195 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Source/CombatExtended/CombatExtended/Render/PawnRenderNodeWorker_Drafted.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.Remoting.Messaging; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Verse; | ||
|
||
namespace CombatExtended | ||
{ | ||
public class PawnRenderNodeWorker_Drafted : PawnRenderNodeWorker | ||
{ | ||
public override bool CanDrawNow(PawnRenderNode node, PawnDrawParms parms) | ||
{ | ||
var pawn = node.tree.pawn; | ||
return pawn != null && pawn.Spawned && (pawn.Drafted || (pawn.CurJob?.def.alwaysShowWeapon ?? false) || (pawn.mindState?.duty?.def.alwaysShowWeapon ?? false)) && base.CanDrawNow(node, parms); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Source/CombatExtended/CombatExtended/Render/PawnRenderNode_Apparel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using RimWorld; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
using Verse; | ||
|
||
namespace CombatExtended | ||
{ | ||
public class PawnRenderNode_Apparel : Verse.PawnRenderNode_Apparel | ||
{ | ||
public PawnRenderNode_Apparel(Pawn pawn, PawnRenderNodeProperties props, PawnRenderTree tree) : base(pawn, props, tree) | ||
{ | ||
} | ||
public PawnRenderNode_Apparel(Pawn pawn, PawnRenderNodeProperties props, PawnRenderTree tree, Apparel apparel) : base(pawn, props, tree) | ||
{ | ||
} | ||
public PawnRenderNode_Apparel(Pawn pawn, PawnRenderNodeProperties props, PawnRenderTree tree, Apparel apparel, bool useHeadMesh) : base(pawn, props, tree) | ||
{ | ||
} | ||
public override IEnumerable<Graphic> GraphicsFor(Pawn pawn) | ||
{ | ||
yield return GraphicDatabase.Get((apparel.def.graphicData?.graphicClass ?? typeof(Graphic_Multi)), TexPathFor(pawn), ShaderFor(pawn), apparel.def.graphicData.drawSize, apparel.DrawColor, apparel.DrawColorTwo); | ||
} | ||
public override string ToString() | ||
{ | ||
return apparel?.ToString() ?? base.ToString(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.