-
Notifications
You must be signed in to change notification settings - Fork 27
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 #101 from RimWorldCCLTeam/development
API Additions & Bugs Bashed
- Loading branch information
Showing
28 changed files
with
345 additions
and
228 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Xml; | ||
|
||
namespace CommunityCoreLibrary | ||
{ | ||
|
||
public static class XML_Helper | ||
{ | ||
|
||
// TODO: Move this method to an extension class (question, under what though?) | ||
public static bool HasChildNode( this XmlNode xmlNode, string childNode ) | ||
{ | ||
var xmlEnumerator = xmlNode.ChildNodes.GetEnumerator(); | ||
while( xmlEnumerator.MoveNext() ) | ||
{ | ||
var node = (XmlNode) xmlEnumerator.Current; | ||
if( node.Name == childNode ) | ||
{ // Node exists | ||
return true; | ||
} | ||
} | ||
// Node doesn't exist | ||
return false; | ||
} | ||
|
||
} | ||
|
||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
|
||
using RimWorld; | ||
using Verse; | ||
|
||
namespace CommunityCoreLibrary.Detour | ||
{ | ||
|
||
internal static class _SocialProperness | ||
{ | ||
|
||
internal static bool _IsSociallyProper( this Thing t, Pawn p, bool forPrisoner, bool animalsCare = false ) | ||
{ | ||
if( | ||
( !animalsCare )&& | ||
( !p.RaceProps.Humanlike )|| | ||
( !t.def.socialPropernessMatters ) | ||
) | ||
{ | ||
return true; | ||
} | ||
var intVec3 = !t.def.hasInteractionCell ? t.Position : t.InteractionCell; | ||
return( forPrisoner == intVec3.IsInPrisonCell() ); | ||
} | ||
|
||
} | ||
|
||
} |
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.