Skip to content

Commit 5917070

Browse files
committed
v7.04
1 parent 1528972 commit 5917070

File tree

10 files changed

+34
-2
lines changed

10 files changed

+34
-2
lines changed

1.5/Assemblies/RimBees.dll

0 Bytes
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Defs>
3+
<VSE.Expertise.ExpertiseDef>
4+
<defName>AB_Combsmithing</defName>
5+
<label>Combsmithing</label>
6+
<description>An expertise in harvesting bee combs to get more products out of them.</description>
7+
<skill>Animals</skill>
8+
<statOffsets>
9+
<AB_CombYieldFactor>0.05</AB_CombYieldFactor>
10+
</statOffsets>
11+
</VSE.Expertise.ExpertiseDef>
12+
13+
14+
</Defs>

1.5/Defs/StatDefs/Stats.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Defs>
2+
<StatDef>
3+
<defName>AB_CombYieldFactor</defName>
4+
<label>bee comb yield</label>
5+
<description>The amount of items harvested from a bee comb is multiplied by this factor.</description>
6+
<category>PawnWork</category>
7+
<defaultBaseValue>1</defaultBaseValue>
8+
<hideAtValue>1</hideAtValue>
9+
<minValue>0</minValue>
10+
<toStringStyle>PercentZero</toStringStyle>
11+
<displayPriorityInCategory>10000</displayPriorityInCategory>
12+
<showDevelopmentalStageFilter>Adult</showDevelopmentalStageFilter>
13+
</StatDef>
14+
15+
</Defs>
Binary file not shown.
Binary file not shown.
58 KB
Binary file not shown.

1.5/Source/RimBees/RimBees/DefOfs/InternalDefOf.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public static class InternalDefOf
1717
public static JobDef RB_TakeThingsOutOfBroodChamberJob;
1818
public static JobDef RB_TakeThingsOutOfHybridizationChamberJob;
1919

20+
public static StatDef AB_CombYieldFactor;
21+
2022
public static ThingDef RB_BroodChamber;
2123
public static ThingDef RB_HybridizationChamber;
2224

1.5/Source/RimBees/RimBees/Harmony/GenRecipe_PostProcessProduct.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using AlphaImplants;
22
using HarmonyLib;
3+
using RimWorld;
34
using UnityEngine;
45
using Verse;
56

@@ -9,12 +10,12 @@ namespace RimBees
910
public class AlphaBees_GenRecipe_PostProcessProduct_Patch
1011
{
1112
[HarmonyPostfix]
12-
private static void PostFix(RecipeDef recipeDef, ref Thing __result)
13+
private static void PostFix(Pawn worker, RecipeDef recipeDef, ref Thing __result)
1314
{
1415
if(recipeDef.GetModExtension<OutputMultiplierRecipe>() != null)
1516
{
1617
float multiplier = recipeDef.GetModExtension<OutputMultiplierRecipe>().multiplier;
17-
int resultingStack = (int)(__result.stackCount * multiplier * RimBees_Settings.beeProductionMultiplier);
18+
int resultingStack = (int)(__result.stackCount * multiplier * RimBees_Settings.beeProductionMultiplier * worker.GetStatValue(InternalDefOf.AB_CombYieldFactor));
1819
if(resultingStack == 0)
1920
{
2021
resultingStack = 1;
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)