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
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
Eggs
rjw
Commits
85bbeeea
Commit
85bbeeea
authored
4 years ago
by
Ed86
Browse files
Options
Downloads
Patches
Plain Diff
set miscarry, abort, kill, to discard babies before removing pregnancy hediff
parent
d5b1687d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Modules/Pregnancy/Hediffs/Hediff_BasePregnancy.cs
+11
-4
11 additions, 4 deletions
Source/Modules/Pregnancy/Hediffs/Hediff_BasePregnancy.cs
with
11 additions
and
4 deletions
Source/Modules/Pregnancy/Hediffs/Hediff_BasePregnancy.cs
+
11
−
4
View file @
85bbeeea
...
...
@@ -107,7 +107,7 @@ namespace rjw
//(debug->add heddif)
//init empty preg, instabirth, cause error during birthing
//Initialize(pawn,
father
);
//Initialize(pawn,
Trytogetfather(ref pawn)
);
}
public
override
bool
Visible
=>
is_discovered
;
...
...
@@ -160,23 +160,30 @@ namespace rjw
public
virtual
void
Miscarry
()
{
if
(!
babies
.
NullOrEmpty
())
foreach
(
Pawn
baby
in
babies
)
{
baby
.
Discard
();
}
pawn
.
health
?.
RemoveHediff
(
this
);
}
/// <summary>
/// Called on abortion (noy implemented yet)
/// </summary>
public
virtual
void
Abort
()
{
}
public
virtual
void
Abort
()
{
Miscarry
();
}
/// <summary>
/// Mechanoids can remove pregnancy
/// </summary>
public
virtual
void
Kill
()
{
pawn
.
health
?.
RemoveHediff
(
this
);
Miscarry
(
);
}
[
SyncMethod
]
public
Pawn
partstospawn
(
Pawn
baby
,
Pawn
mother
,
Pawn
dad
)
{
...
...
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