Skip to content

Commit 1f5b0b8

Browse files
committed
first round of 1.5 fixes
1 parent 51987d5 commit 1f5b0b8

15 files changed

+66
-63
lines changed

Source/Chainsaw.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void Slaughter(Pawn victim)
361361

362362
var part2 = (Hediff_MissingPart)HediffMaker.MakeHediff(HediffDefOf.MissingBodyPart, victim, null);
363363
part2.IsFresh = true;
364-
part2.lastInjury = HediffDefOf.Shredded;
364+
part2.lastInjury = HediffDefOf.ExecutionCut;
365365
part2.Part = head;
366366
victim.health.hediffSet.AddDirect(part2, null, null);
367367
}

Source/CompActivatable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void Activate()
2727
SoundDefOf.FlickSwitch.PlayOneShot(new TargetInfo(parent.Position, parent.Map, false));
2828
parent.BroadcastCompSignal("Activate");
2929
if (parent.Spawned)
30-
parent.Map.mapDrawer.MapMeshDirty(parent.Position, MapMeshFlag.Things | MapMeshFlag.Buildings);
30+
parent.Map.mapDrawer.MapMeshDirty(parent.Position, MapMeshFlagDefOf.Things | MapMeshFlagDefOf.Buildings);
3131
}
3232

3333
/*

Source/CompBreakable.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using RimWorld;
1+
using LudeonTK;
2+
using RimWorld;
23
using Verse;
34

45
namespace ZombieLand
@@ -65,7 +66,7 @@ public override string CompInspectStringExtra()
6566
return null;
6667
}
6768

68-
[DebugAction("General", "Break...", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
69+
[DebugAction("General", "Break...")]
6970
private static void BreakDown()
7071
{
7172
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))

Source/ContaminationPatchesFilth.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static class Filth_MakeThing_Patch
218218
static IEnumerable<MethodBase> TargetMethods()
219219
{
220220
yield return SymbolExtensions.GetMethodInfo((Pawn_FilthTracker tracker) => tracker.GainFilth(default, default));
221-
yield return SymbolExtensions.GetMethodInfo(() => FilthMaker.TryMakeFilth(default, default, default, (IEnumerable<string>)default, default, default));
221+
yield return SymbolExtensions.GetMethodInfo((Filth outFilth) => FilthMaker.TryMakeFilth(default, default, default, default, default, out outFilth, default));
222222
}
223223

224224
static readonly HashSet<ThingDef> nastyFilths = new()

Source/Dialog_ContaminationDebugSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public override void DoWindowContents(Rect inRect)
5858
list.Gap();
5959

6060
var rect = list.GetRect(20);
61-
factor = Widgets.HorizontalSlider_NewTemp(rect, factor, 0f, 1f, true, null, "Factor", $"{factor:P0}", 0.01f);
61+
factor = Widgets.HorizontalSlider(rect, factor, 0f, 1f, true, null, "Factor", $"{factor:P0}", 0.01f);
6262
list.Gap();
6363

6464
if (list.ButtonText("Apply"))

Source/Dialog_ThumperSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public override void DoWindowContents(Rect inRect)
2929
inRect.yMin += 5f;
3030

3131
Rect rect2 = inRect.TopPartPixels(30f);
32-
thumper.intensity = Widgets.HorizontalSlider_NewTemp(rect2, thumper.intensity, 0f, 1f, true, null, "Intensity".Translate(), $"{thumper.intensity:P0}", 0.01f);
32+
thumper.intensity = Widgets.HorizontalSlider(rect2, thumper.intensity, 0f, 1f, true, null, "Intensity".Translate(), $"{thumper.intensity:P0}", 0.01f);
3333

3434
rect2.y += 40f;
3535
var thumpsPerHour = Tools.Boxed(Mathf.FloorToInt((float)GenDate.TicksPerHour / thumper.intervalTicks + 0.5f), 1, 25);
3636
var label = $"{thumpsPerHour}x per hour";
37-
thumpsPerHour = (int)Widgets.HorizontalSlider_NewTemp(rect2, thumpsPerHour, 1, 25, true, null, "Interval".Translate(), label, 1f);
37+
thumpsPerHour = (int)Widgets.HorizontalSlider(rect2, thumpsPerHour, 1, 25, true, null, "Interval".Translate(), label, 1f);
3838
thumper.intervalTicks = Mathf.FloorToInt((float)GenDate.TicksPerHour / thumpsPerHour + 0.5f);
3939

4040
rect2 = new Rect(inRect.x + inRect.width / 2f, inRect.yMax - 30f, inRect.width / 2f, 30f);

Source/Dialog_ZombieDebugActionMenu.cs

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using HarmonyLib;
2+
using LudeonTK;
23
using RimWorld;
34
using System.Collections.Generic;
45
using System.Linq;
@@ -33,73 +34,73 @@ static void SpawnZombie(ZombieType type, bool appearDirectly)
3334
_ = tickManager.allZombiesCached.Add(zombie);
3435
}
3536

36-
[DebugAction("Zombieland", "Spawn: Zombie (dig out)", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
37+
[DebugAction("Zombieland", "Spawn: Zombie (dig out)")]
3738
private static void SpawnZombieDigOut()
3839
{
3940
SpawnZombie(ZombieType.Normal, false);
4041
}
4142

42-
[DebugAction("Zombieland", "Spawn: Zombie (standing)", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
43+
[DebugAction("Zombieland", "Spawn: Zombie (standing)")]
4344
private static void SpawnZombieStanding()
4445
{
4546
SpawnZombie(ZombieType.Normal, true);
4647
}
4748

48-
[DebugAction("Zombieland", "Spawn: Suicide bomber", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
49+
[DebugAction("Zombieland", "Spawn: Suicide bomber")]
4950
private static void SpawnSuicideBomber()
5051
{
5152
SpawnZombie(ZombieType.SuicideBomber, true);
5253
}
5354

54-
[DebugAction("Zombieland", "Spawn: Toxic Splasher", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
55+
[DebugAction("Zombieland", "Spawn: Toxic Splasher")]
5556
private static void SpawnToxicSplasher()
5657
{
5758
SpawnZombie(ZombieType.ToxicSplasher, true);
5859
}
5960

60-
[DebugAction("Zombieland", "Spawn: Tanky Operator", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
61+
[DebugAction("Zombieland", "Spawn: Tanky Operator")]
6162
private static void SpawnTankyOperator()
6263
{
6364
SpawnZombie(ZombieType.TankyOperator, true);
6465
}
6566

66-
[DebugAction("Zombieland", "Spawn: Miner", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
67+
[DebugAction("Zombieland", "Spawn: Miner")]
6768
private static void SpawnMiner()
6869
{
6970
SpawnZombie(ZombieType.Miner, true);
7071
}
7172

72-
[DebugAction("Zombieland", "Spawn: Electrifier", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
73+
[DebugAction("Zombieland", "Spawn: Electrifier")]
7374
private static void SpawnElectrifier()
7475
{
7576
SpawnZombie(ZombieType.Electrifier, true);
7677
}
7778

78-
[DebugAction("Zombieland", "Spawn: Albino", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
79+
[DebugAction("Zombieland", "Spawn: Albino")]
7980
private static void SpawnAlbino()
8081
{
8182
SpawnZombie(ZombieType.Albino, true);
8283
}
8384

84-
[DebugAction("Zombieland", "Spawn: Dark Slimer", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
85+
[DebugAction("Zombieland", "Spawn: Dark Slimer")]
8586
private static void SpawnDarkSlimer()
8687
{
8788
SpawnZombie(ZombieType.DarkSlimer, true);
8889
}
8990

90-
[DebugAction("Zombieland", "Spawn: Healer", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
91+
[DebugAction("Zombieland", "Spawn: Healer")]
9192
private static void SpawnHealer()
9293
{
9394
SpawnZombie(ZombieType.Healer, true);
9495
}
9596

96-
[DebugAction("Zombieland", "Spawn: Random zombie", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
97+
[DebugAction("Zombieland", "Spawn: Random zombie")]
9798
private static void SpawnRandomZombie()
9899
{
99100
SpawnZombie(ZombieType.Random, true);
100101
}
101102

102-
[DebugAction("Zombieland", "Trigger: Incident", false, false, false, 0, false, allowedGameStates = AllowedGameStates.PlayingOnMap)]
103+
[DebugAction("Zombieland", "Trigger: Incident")]
103104
private static void TriggerZombieIncident()
104105
{
105106
var tm = Find.CurrentMap.GetComponent<TickManager>();
@@ -112,55 +113,55 @@ private static void TriggerZombieIncident()
112113
}
113114
}
114115

115-
[DebugAction("Zombieland", "Trigger: Spitter Event", false, false, false, 0, false, allowedGameStates = AllowedGameStates.PlayingOnMap)]
116+
[DebugAction("Zombieland", "Trigger: Spitter Event")]
116117
private static void SpawnZombieSpitterEvent()
117118
{
118119
ZombieSpitter.Spawn(Find.CurrentMap);
119120
}
120121

121-
[DebugAction("Zombieland", "Spawn: Incident (4)", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
122+
[DebugAction("Zombieland", "Spawn: Incident (4)")]
122123
private static void SpawnZombieIncident_4()
123124
{
124125
_ = ZombiesRising.TryExecute(Find.CurrentMap, 4, UI.MouseCell(), false, true);
125126
}
126127

127-
[DebugAction("Zombieland", "Spawn: Incident (25)", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
128+
[DebugAction("Zombieland", "Spawn: Incident (25)")]
128129
private static void SpawnZombieIncident_25()
129130
{
130131
_ = ZombiesRising.TryExecute(Find.CurrentMap, 25, UI.MouseCell(), false, true);
131132
}
132133

133-
[DebugAction("Zombieland", "Spawn: Incident (100)", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
134+
[DebugAction("Zombieland", "Spawn: Incident (100)")]
134135
private static void SpawnZombieIncident_100()
135136
{
136137
_ = ZombiesRising.TryExecute(Find.CurrentMap, 100, UI.MouseCell(), false, true);
137138
}
138139

139-
[DebugAction("Zombieland", "Spawn: Incident (200)", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
140+
[DebugAction("Zombieland", "Spawn: Incident (200)")]
140141
private static void SpawnZombieIncident_200()
141142
{
142143
_ = ZombiesRising.TryExecute(Find.CurrentMap, 200, UI.MouseCell(), false, true);
143144
}
144145

145-
[DebugAction("Zombieland", "Spawn: Zombie Blob", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
146+
[DebugAction("Zombieland", "Spawn: Zombie Blob")]
146147
private static void SpawnZombieBlob()
147148
{
148149
ZombieBlob.Spawn(Find.CurrentMap, UI.MouseCell());
149150
}
150151

151-
[DebugAction("Zombieland", "Spawn: Add Blob Cell", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
152+
[DebugAction("Zombieland", "Spawn: Add Blob Cell")]
152153
private static void AddBlobCell()
153154
{
154155
ZombieBlob.AddCell(Find.CurrentMap, UI.MouseCell());
155156
}
156157

157-
[DebugAction("Zombieland", "Spawn: Zombie Spitter", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
158+
[DebugAction("Zombieland", "Spawn: Zombie Spitter")]
158159
private static void SpawnZombieSpitterOnCell()
159160
{
160161
ZombieSpitter.Spawn(Find.CurrentMap, UI.MouseCell());
161162
}
162163

163-
[DebugAction("Zombieland", "Remove: All Zombies", false, false, false, 0, false, allowedGameStates = AllowedGameStates.PlayingOnMap)]
164+
[DebugAction("Zombieland", "Remove: All Zombies")]
164165
private static void RemoveAllZombies()
165166
{
166167
var things = Find.CurrentMap.listerThings.AllThings.ToArray();
@@ -171,7 +172,7 @@ private static void RemoveAllZombies()
171172
}
172173
}
173174

174-
[DebugAction("Zombieland", "Convert: Make Zombie", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
175+
[DebugAction("Zombieland", "Convert: Make Zombie")]
175176
private static void ConvertToZombie()
176177
{
177178
var map = Find.CurrentMap;
@@ -183,7 +184,7 @@ private static void ConvertToZombie()
183184
}
184185
}
185186

186-
[DebugAction("Zombieland", "Apply: Trigger rotting", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
187+
[DebugAction("Zombieland", "Apply: Trigger rotting")]
187188
private static void ApplyTriggerRotting()
188189
{
189190
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
@@ -194,7 +195,7 @@ private static void ApplyTriggerRotting()
194195
}
195196
}
196197

197-
[DebugAction("Zombieland", "Apply: Add zombie bite", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
198+
[DebugAction("Zombieland", "Apply: Add zombie bite")]
198199
private static void ApplyAddZombieBite()
199200
{
200201
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
@@ -221,7 +222,7 @@ private static void ApplyAddZombieBite()
221222
}
222223
}
223224

224-
[DebugAction("Zombieland", "Apply: Remove infections", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
225+
[DebugAction("Zombieland", "Apply: Remove infections")]
225226
private static void ApplyRemoveInfections()
226227
{
227228
var tmpHediffInjuryZombieBites = new List<Hediff_Injury_ZombieBite>();
@@ -242,7 +243,7 @@ private static void ApplyRemoveInfections()
242243
}
243244
}
244245

245-
[DebugAction("Zombieland", "Apply: Zombie raging", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
246+
[DebugAction("Zombieland", "Apply: Zombie raging")]
246247
private static void ApplyZombieRaging()
247248
{
248249
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
@@ -253,7 +254,7 @@ private static void ApplyZombieRaging()
253254
}
254255
}
255256

256-
[DebugAction("Zombieland", "Apply: Add 1% bloodloss", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
257+
[DebugAction("Zombieland", "Apply: Add 1% bloodloss")]
257258
private static void ApplyHalfConsciousness()
258259
{
259260
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
@@ -270,7 +271,7 @@ private static void ApplyHalfConsciousness()
270271
}
271272
}
272273

273-
[DebugAction("Zombieland", "Create Decontamination Quest", false, false, false, 0, false, allowedGameStates = AllowedGameStates.PlayingOnMap)]
274+
[DebugAction("Zombieland", "Create Decontamination Quest")]
274275
private static void CreateDecontaminationQuest()
275276
{
276277
ContaminationManager.Instance.DecontaminationQuest();
@@ -309,25 +310,25 @@ void contaminate(IntVec3 cell)
309310
}
310311
}
311312

312-
[DebugAction("Zombieland", "Apply: Add 0.01 contamination", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
313+
[DebugAction("Zombieland", "Apply: Add 0.01 contamination")]
313314
private static void AddVeryLittleContamination()
314315
{
315316
FloodFillContamination(UI.MouseCell(), 0.01f, 500);
316317
}
317318

318-
[DebugAction("Zombieland", "Apply: Add 0.1 contamination", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
319+
[DebugAction("Zombieland", "Apply: Add 0.1 contamination")]
319320
private static void AddLittleContamination()
320321
{
321322
FloodFillContamination(UI.MouseCell(), 0.1f, 500);
322323
}
323324

324-
[DebugAction("Zombieland", "Apply: Add 1.0 contamination", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
325+
[DebugAction("Zombieland", "Apply: Add 1.0 contamination")]
325326
private static void AddSomeContamination()
326327
{
327328
FloodFillContamination(UI.MouseCell(), 1f, 500);
328329
}
329330

330-
[DebugAction("Zombieland", "Apply: Clear contamination", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
331+
[DebugAction("Zombieland", "Apply: Clear contamination")]
331332
private static void ClearContamination()
332333
{
333334
var cell = UI.MouseCell();
@@ -336,7 +337,7 @@ private static void ClearContamination()
336337
map.thingGrid.ThingsAt(cell).Do(thing => thing.ClearContamination());
337338
}
338339

339-
[DebugAction("Zombieland", "Apply: Add 0.1 floor contamination", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
340+
[DebugAction("Zombieland", "Apply: Add 0.1 floor contamination")]
340341
private static void AddSomeFloorContamination()
341342
{
342343
var cell = UI.MouseCell();
@@ -348,7 +349,7 @@ private static void AddSomeFloorContamination()
348349
}
349350
}
350351

351-
[DebugAction("Zombieland", "Apply: Clear floor contamination", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
352+
[DebugAction("Zombieland", "Apply: Clear floor contamination")]
352353
private static void ClearFloorContamination()
353354
{
354355
var cell = UI.MouseCell();
@@ -357,7 +358,7 @@ private static void ClearFloorContamination()
357358
map.SetContamination(cell, 0);
358359
}
359360

360-
[DebugAction("Zombieland", "Apply: Contamination effect", false, false, false, 0, false, actionType = DebugActionType.ToolMap, allowedGameStates = AllowedGameStates.PlayingOnMap)]
361+
[DebugAction("Zombieland", "Apply: Contamination effect")]
361362
private static void ContaminationEffect()
362363
{
363364
var map = Find.CurrentMap;

Source/JobDriver_DoubleTap.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public override IEnumerable<Toil> MakeNewToils()
8686
{
8787
var part1 = (Hediff_MissingPart)HediffMaker.MakeHediff(HediffDefOf.MissingBodyPart, deadPawn, null);
8888
part1.IsFresh = true;
89-
part1.lastInjury = HediffDefOf.Shredded;
89+
part1.lastInjury = HediffDefOf.Misc;
9090
part1.Part = brain;
9191
deadPawn.health.hediffSet.AddDirect(part1, null, null);
9292

@@ -95,7 +95,7 @@ public override IEnumerable<Toil> MakeNewToils()
9595
{
9696
var part2 = (Hediff_MissingPart)HediffMaker.MakeHediff(HediffDefOf.MissingBodyPart, deadPawn, null);
9797
part2.IsFresh = true;
98-
part2.lastInjury = HediffDefOf.Shredded;
98+
part2.lastInjury = HediffDefOf.Misc;
9999
part2.Part = head;
100100
deadPawn.health.hediffSet.AddDirect(part2, null, null);
101101
}

0 commit comments

Comments
 (0)