Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RJW Sexperience Ideology
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Myphicbowser
RJW Sexperience Ideology
Commits
d483924c
Commit
d483924c
authored
2 years ago
by
amevarashi
Browse files
Options
Downloads
Patches
Plain Diff
Fixed #1: Submissive gender can't be marked for comfort
parent
36f879e0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/IdeologyAddon/IdeologyAddon.csproj
+1
-1
1 addition, 1 deletion
Source/IdeologyAddon/IdeologyAddon.csproj
Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs
+23
-3
23 additions, 3 deletions
Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs
with
24 additions
and
4 deletions
Source/IdeologyAddon/IdeologyAddon.csproj
+
1
−
1
View file @
d483924c
...
...
@@ -94,7 +94,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"Krafs.Rimworld.Ref"
>
<Version>
1.4.35
24
</Version>
<Version>
1.4.35
30
</Version>
</PackageReference>
<PackageReference
Include=
"Lib.Harmony"
>
<Version>
2.2.2
</Version>
...
...
This diff is collapsed.
Click to expand it.
Source/IdeologyAddon/Patches/RJW_Patch_Ideo.cs
+
23
−
3
View file @
d483924c
...
...
@@ -156,10 +156,11 @@ namespace RJWSexperience.Ideology.Patches
}
}
[
HarmonyPatch
(
typeof
(
PawnDesignations_Comfort
)
,
nameof
(
PawnDesignations_Comfort
.
UpdateCanDesignateComfort
)
)]
public
static
class
RJW_Patch
UpdateCa
nDesignat
e
Comfort
[
HarmonyPatch
(
typeof
(
PawnDesignations_Comfort
))]
public
static
class
RJW_Patch
_Paw
nDesignat
ions_
Comfort
_Submissive
{
public
static
void
Postfix
(
Pawn
pawn
,
ref
bool
__result
)
[
HarmonyPostfix
,
HarmonyPatch
(
nameof
(
PawnDesignations_Comfort
.
UpdateCanDesignateComfort
))]
public
static
void
UpdateCanDesignateComfort
(
Pawn
pawn
,
ref
bool
__result
)
{
if
(
pawn
.
IsSubmissive
())
{
...
...
@@ -167,6 +168,25 @@ namespace RJWSexperience.Ideology.Patches
__result
=
true
;
}
}
/// <summary>
/// RJW undesignates if it thinks that the pawn can't be a comfort pawn.
/// Why the hell checker method changes the state?
/// </summary>
/// <param name="pawn">Pawn to check</param>
/// <param name="__result">Is pawn currenlty designated as comfort</param>
/// <returns>Run the original method</returns>
[
HarmonyPrefix
,
HarmonyPatch
(
nameof
(
PawnDesignations_Comfort
.
IsDesignatedComfort
))]
public
static
bool
IsDesignatedComfort
(
Pawn
pawn
,
ref
bool
__result
)
{
if
(
pawn
.
IsSubmissive
()
&&
!
pawn
.
Dead
)
{
__result
=
pawn
.
GetRJWPawnData
().
Comfort
;
return
false
;
}
return
true
;
}
}
[
HarmonyPatch
(
typeof
(
Hediff_BasePregnancy
),
nameof
(
Hediff_BasePregnancy
.
PostBirth
))]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment