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
Hazzardous
rjw
Commits
e7013e86
Commit
e7013e86
authored
2 years ago
by
a flock of birds
Browse files
Options
Downloads
Patches
Plain Diff
Fixed error spam when displaying a child's work tab entry without biotech installed
parent
e3b926d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
1.4/Source/Harmony/BiotechPatches.cs
+19
-1
19 additions, 1 deletion
1.4/Source/Harmony/BiotechPatches.cs
with
19 additions
and
1 deletion
1.4/Source/Harmony/BiotechPatches.cs
+
19
−
1
View file @
e7013e86
...
...
@@ -6,6 +6,7 @@ using System.Reflection.Emit;
using
HarmonyLib
;
using
Verse
;
using
RimWorld
;
using
UnityEngine
;
// Non-pregnancy Biotech-related patches
namespace
rjw
...
...
@@ -20,7 +21,8 @@ namespace rjw
yield
return
AccessTools
.
Method
(
typeof
(
LifeStageWorker_HumanlikeAdult
),
lifeStageStarted
);
}
// Fixes an error caused by trying to spawn a biotech-only effector when a child starts a new lifestage
// Fixes errors caused by trying to spawn a biotech-only effector when a child starts a new lifestage
// and by trying to send a biotech-only letter when a child turns three
[
HarmonyTranspiler
]
static
IEnumerable
<
CodeInstruction
>
FixLifeStageStartError
(
IEnumerable
<
CodeInstruction
>
instructions
,
MethodBase
original
)
{
...
...
@@ -48,4 +50,20 @@ namespace rjw
}
}
}
[
HarmonyPatch
(
typeof
(
WidgetsWork
),
"get_WorkBoxBGTex_AgeDisabled"
)]
class
WidgetsWork_WorkBoxBGTex_AgeDisabled
{
[
HarmonyPrefix
]
static
bool
DontLoadMissingTexture
(
ref
Texture2D
__result
)
{
if
(!
ModsConfig
.
BiotechActive
)
{
__result
=
WidgetsWork
.
WorkBoxBGTex_Awful
;
return
false
;
}
return
true
;
}
}
}
\ No newline at end of file
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