Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rjw
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
Container Registry
Model registry
Operate
Environments
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
Nebuchadnezzer2
rjw
Commits
aea910d3
Commit
aea910d3
authored
5 years ago
by
Ed86
Browse files
Options
Downloads
Patches
Plain Diff
hidded restraints/cocoon operation if those hediffs not present
parent
8844c45c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Defs/RecipeDefs/Recipes_RemoveEnemyImplants.xml
+3
-3
3 additions, 3 deletions
Defs/RecipeDefs/Recipes_RemoveEnemyImplants.xml
Source/Recipes/Recipe_Restraints.cs
+32
-0
32 additions, 0 deletions
Source/Recipes/Recipe_Restraints.cs
with
35 additions
and
3 deletions
Defs/RecipeDefs/Recipes_RemoveEnemyImplants.xml
+
3
−
3
View file @
aea910d3
...
...
@@ -20,7 +20,7 @@
<workSkill>
Medicine
</workSkill>
<workSkillLearnFactor>
1
</workSkillLearnFactor>
<hideBodyPartNames>
true
</hideBodyPartNames>
<targetsBodyPart>
fals
e
</targetsBodyPart>
<targetsBodyPart>
tru
e
</targetsBodyPart>
</RecipeDef>
<RecipeDef
Abstract=
"True"
ParentName=
"RJW_RemoveEnemyImplants"
Name=
"RJW_RemoveInsectEgg"
>
...
...
@@ -153,7 +153,7 @@
<defName>
RJW_RemoveRestraints
</defName>
<label>
remove restraints
</label>
<description>
Removes restraints.
</description>
<workerClass>
Recipe_Remove
Hediff
</workerClass>
<workerClass>
rjw.
Recipe_Remove
Restraints
</workerClass>
<jobString>
Removing restraints.
</jobString>
<workAmount>
1000
</workAmount>
<removesHediff>
RJW_Restraints
</removesHediff>
...
...
@@ -178,7 +178,7 @@
<defName>
RJW_RemoveCocoon
</defName>
<label>
remove cocoon
</label>
<description>
Removes cocoon.
</description>
<workerClass>
Recipe_Remove
Hediff
</workerClass>
<workerClass>
rjw.
Recipe_Remove
Restraints
</workerClass>
<jobString>
Removing cocoon.
</jobString>
<workAmount>
1000
</workAmount>
<removesHediff>
RJW_Cocoon
</removesHediff>
...
...
This diff is collapsed.
Click to expand it.
Source/Recipes/Recipe_Restraints.cs
0 → 100644
+
32
−
0
View file @
aea910d3
using
RimWorld
;
using
System.Collections.Generic
;
using
Verse
;
namespace
rjw
{
/// <summary>
/// Removes heddifs (restraints/cocoon)
/// </summary>
public
class
Recipe_RemoveRestraints
:
Recipe_RemoveHediff
{
public
override
IEnumerable
<
BodyPartRecord
>
GetPartsToApplyOn
(
Pawn
pawn
,
RecipeDef
recipe
)
{
List
<
Hediff
>
allHediffs
=
pawn
.
health
.
hediffSet
.
hediffs
;
int
i
=
0
;
while
(
true
)
{
if
(
i
>=
allHediffs
.
Count
)
{
yield
break
;
}
if
(
allHediffs
[
i
].
def
==
recipe
.
removesHediff
&&
allHediffs
[
i
].
Visible
)
{
break
;
}
i
++;
}
yield
return
allHediffs
[
i
].
Part
;
}
}
}
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