Skip to content

Commit

Permalink
Remove quality degradation, increase xp gain
Browse files Browse the repository at this point in the history
  • Loading branch information
notfood committed Jan 4, 2017
1 parent c98cc94 commit d63821f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Binary file modified Assemblies/Mending.dll
Binary file not shown.
5 changes: 1 addition & 4 deletions Source/JobDriver_Mend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class JobDriver_Mend : JobDriver_DoBill
private float workCycleProgress;
private ChanceDef failChance;

private FieldInfo compQualityInt = typeof(CompQuality).GetField ("qualityInt", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
private FieldInfo ApparelWornByCorpseInt = typeof(Apparel).GetField("wornByCorpseInt", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);

protected override Toil DoBill()
Expand Down Expand Up @@ -65,7 +64,7 @@ protected override Toil DoBill()

float skillPerc = (float) skill.Level / 20f;

skill.Learn (0.11f);
skill.Learn (0.33f);

CompQuality qualityComponent = objectThing.TryGetComp<CompQuality>();
if (qualityComponent != null && qualityComponent.Quality > QualityCategory.Awful) {
Expand All @@ -74,8 +73,6 @@ protected override Toil DoBill()
float skillFactor = Mathf.Lerp(1.5f, 0f, skillPerc);

if (failChance != null && Rand.Value < failChance.Chance(qc) * skillFactor) {
compQualityInt.SetValue(qualityComponent, qualityComponent.Quality - 1);

objectThing.HitPoints -= fixedFailedDamage;

MoteMaker.ThrowText(actor.DrawPos, actor.Map, "Failed");
Expand Down
2 changes: 1 addition & 1 deletion Source/JobDriver_Recycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected override Toil DoBill()

float skillPerc = (float) skill.Level / 20f;

skill.Learn (0.11f);
skill.Learn (0.33f);

if (qualityComponent != null && qualityComponent.Quality > QualityCategory.Awful) {
QualityCategory qc = qualityComponent.Quality;
Expand Down

0 comments on commit d63821f

Please sign in to comment.