Skip to content

Commit

Permalink
v2.5 introduces healer zombies
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Sep 2, 2021
1 parent 9bc5de3 commit 58c500f
Show file tree
Hide file tree
Showing 25 changed files with 215 additions and 55 deletions.
Binary file modified 1.3/Assemblies/ZombieLand.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>net.pardeike.rimworld.mod.zombieland</identifier>
<version>2.4.3.0</version>
<version>2.5.0.0</version>
<targetVersions>
<li>1.0.0</li>
<li>1.1.0</li>
Expand Down
1 change: 1 addition & 0 deletions Languages/ChineseSimplified/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<ElectrifierChance>电动僵尸</ElectrifierChance>
<AlbinoChance>白化僵尸</AlbinoChance>
<DarkSlimerChance>黑暗黏糊糊的僵尸</DarkSlimerChance>
<HealerChance>治疗僵尸</HealerChance>
<NormalZombieChance>普通丧尸: {0}</NormalZombieChance>

<ZombieMiscTitle>其他</ZombieMiscTitle>
Expand Down
1 change: 1 addition & 0 deletions Languages/ChineseTraditional/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<ElectrifierChance>電動殭屍</ElectrifierChance>
<AlbinoChance>白化殭屍</AlbinoChance>
<DarkSlimerChance>黑暗黏糊糊的殭屍</DarkSlimerChance>
<HealerChance>治療殭屍</HealerChance>
<NormalZombieChance>普通殭屍: {0}</NormalZombieChance>

<ZombieMiscTitle>其他</ZombieMiscTitle>
Expand Down
1 change: 1 addition & 0 deletions Languages/English/Keyed/Help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<ElectrifierChance_Help>Electrifying zombies don't bite so you can melee them. In fact, their electric force field will protect them from any damage except melee. They will interfer and break anything electric, electronic or anything build with components including powered things, armor and weapons.</ElectrifierChance_Help>
<AlbinoChance_Help>Albino zombies don't attack you. Instead, they sabotage your base and scream so you get stunned and vomit.</AlbinoChance_Help>
<DarkSlimerChance_Help>Dark slimer zombies leave a ultra sticky tar like slime trail behind them. It is hard to clean (rain will wash it away though) and only zombies will pass it easily.</DarkSlimerChance_Help>
<HealerChance_Help>Healer zombies heal all zombies within a certain distance to full health. They can be identified by their cyan skin color and they otherwise act like normal standard zombies.</HealerChance_Help>
<NormalZombieChance_Help>Ordinary zombies come in different body sizes. That defines their strength but also their speed! They often wear any apparel that is available in the game and in any mods you have installed.</NormalZombieChance_Help>

<!-- -->
Expand Down
1 change: 1 addition & 0 deletions Languages/English/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<ElectrifierChance>Electrifying zombies</ElectrifierChance>
<AlbinoChance>Albino zombies</AlbinoChance>
<DarkSlimerChance>Dark slimer zombies</DarkSlimerChance>
<HealerChance>Healer zombies</HealerChance>
<NormalZombieChance>Ordinary zombies: {0}</NormalZombieChance>

<ZombieMiscTitle>Miscellaneous</ZombieMiscTitle>
Expand Down
1 change: 1 addition & 0 deletions Languages/French/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<ElectrifierChance>Zombies électrisants</ElectrifierChance>
<AlbinoChance>Zombies albinos</AlbinoChance>
<DarkSlimerChance>Zombies gluants sombres</DarkSlimerChance>
<HealerChance>Zombies guérisseurs</HealerChance>
<NormalZombieChance>Zombies ordinaires: {0}</NormalZombieChance>

<ZombieMiscTitle>Divers</ZombieMiscTitle>
Expand Down
3 changes: 2 additions & 1 deletion Languages/German/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
<MinerChance>Grabende Zombies</MinerChance>
<ElectrifierChance>Elektrische Zombies</ElectrifierChance>
<AlbinoChance>Albino Zombies</AlbinoChance>
<DarkSlimerChance>Dunkle Schleimer zombies</DarkSlimerChance>
<DarkSlimerChance>Dunkle Schleimer Zombies</DarkSlimerChance>
<HealerChance>Heilende Zombies</HealerChance>
<NormalZombieChance>Normale Zombies: {0}</NormalZombieChance>

<ZombieMiscTitle>Verschiedenes</ZombieMiscTitle>
Expand Down
1 change: 1 addition & 0 deletions Languages/Russian/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<ElectrifierChance>Электрические зомби</ElectrifierChance>
<AlbinoChance>альбинос зомби</AlbinoChance>
<DarkSlimerChance>Темные слизистые зомби</DarkSlimerChance>
<HealerChance>Целители зомби</HealerChance>
<NormalZombieChance>Обычные зомби: {0}</NormalZombieChance>

<ZombieMiscTitle>Разное</ZombieMiscTitle>
Expand Down
1 change: 1 addition & 0 deletions Languages/Turkish/Keyed/Text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<ElectrifierChance>Elektrikli zombiler</ElectrifierChance>
<AlbinoChance>Albino zombiler</AlbinoChance>
<DarkSlimerChance>Karanlık sümüksü zombiler</DarkSlimerChance>
<HealerChance>Şifacı zombiler</HealerChance>
<NormalZombieChance>Sıradan zombiler: {0}</NormalZombieChance>

<ZombieMiscTitle>Çeşitli</ZombieMiscTitle>
Expand Down
2 changes: 2 additions & 0 deletions Source/CameraPlusSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ static Color[] GetCameraPlusColors(Pawn pawn)
innerColor = Color.cyan;
else if (zombie.isAlbino)
innerColor = Color.white;
else if (zombie.isHealer)
innerColor = Color.cyan;
else if (zombie.isDarkSlimer)
innerColor = darkColor;
else if (zombie.isMiner)
Expand Down
32 changes: 32 additions & 0 deletions Source/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,42 @@ static Constants()
MaterialPool.MatFrom("TarSlime/TarSlime7", ShaderDatabase.Mote, new Color(1,1,1,1)),
},
};
public static readonly Material HEAL = MaterialPool.MatFrom("Heal", ShaderDatabase.Mote);
public static Material[] healingMaterials = new[]
{
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.00f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.05f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.1f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.1f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.15f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.2f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.25f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.3f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.3f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.3f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.5f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.7f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.8f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.9f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 1.0f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 1.0f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 1.0f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.8f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.5f) },
new Material(HEAL) { color = new Color(1f, 1f, 1f, 0.25f) },
};
public static readonly Material[] BEING_HEALED = new Material[] {
MaterialPool.MatFrom("BeingHealed", ShaderDatabase.Mote, new Color(1f, 1f, 1f, 0.3f)),
MaterialPool.MatFrom("BeingHealed", ShaderDatabase.Mote, new Color(1f, 1f, 1f, 0.5f)),
MaterialPool.MatFrom("BeingHealed", ShaderDatabase.Mote, new Color(1f, 1f, 1f, 0.7f)),
MaterialPool.MatFrom("BeingHealed", ShaderDatabase.Mote, new Color(1f, 1f, 1f, 0.9f)),
MaterialPool.MatFrom("BeingHealed", ShaderDatabase.Mote, new Color(1f, 1f, 1f, 1.0f))
};

public static readonly System.Random random = new System.Random();

public static readonly Mesh screamMesh = MeshMakerPlanes.NewPlaneMesh(8f);
public static readonly Mesh healMesh = MeshMakerPlanes.NewPlaneMesh(4f);

public static Texture2D dot = new Texture2D(3, 3);
}
Expand Down
44 changes: 24 additions & 20 deletions Source/Dialog_ZombieDebugActionMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,43 +41,47 @@ public override void DoListingItems()

// TODO: use Dialog_DebugOptionLister.DebugToolMap(string label, Action toolAction, bool highlight) ?

base.DebugToolMap("Spawn: Zombie (dig out)", delegate
DebugToolMap("Spawn: Zombie (dig out)", delegate
{
SpawnZombie(ZombieType.Normal, false);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Zombie (standing)", delegate
DebugToolMap("Spawn: Zombie (standing)", delegate
{
SpawnZombie(ZombieType.Normal, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Suicide bomber", delegate
DebugToolMap("Spawn: Suicide bomber", delegate
{
SpawnZombie(ZombieType.SuicideBomber, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Toxic Splasher", delegate
DebugToolMap("Spawn: Toxic Splasher", delegate
{
SpawnZombie(ZombieType.ToxicSplasher, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Tanky Operator", delegate
DebugToolMap("Spawn: Tanky Operator", delegate
{
SpawnZombie(ZombieType.TankyOperator, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Miner", delegate
DebugToolMap("Spawn: Miner", delegate
{
SpawnZombie(ZombieType.Miner, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Electrifier", delegate
DebugToolMap("Spawn: Electrifier", delegate
{
SpawnZombie(ZombieType.Electrifier, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Albino", delegate
DebugToolMap("Spawn: Albino", delegate
{
SpawnZombie(ZombieType.Albino, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Dark Slimer", delegate
DebugToolMap("Spawn: Dark Slimer", delegate
{
SpawnZombie(ZombieType.DarkSlimer, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Random zombie", delegate
DebugToolMap("Spawn: Healer", delegate
{
SpawnZombie(ZombieType.Healer, true);
}, highlightedIndex == i++);
DebugToolMap("Spawn: Random zombie", delegate
{
SpawnZombie(ZombieType.Random, true);
}, highlightedIndex == i++);
Expand All @@ -87,39 +91,39 @@ public override void DoListingItems()
var size = tm.incidentInfo.parameters.incidentSize;
if (size > 0)
{
base.DebugToolMap($"Trigger: Zombie incident ({size})", delegate
DebugToolMap($"Trigger: Zombie incident ({size})", delegate
{
var success = ZombiesRising.TryExecute(map, size, IntVec3.Invalid, false, false);
if (success == false)
Log.Error("Incident creation failed. Most likely no valid spawn point found.");
}, highlightedIndex == i++);
}
}
base.DebugToolMap("Spawn: Zombie incident (4)", delegate
DebugToolMap("Spawn: Zombie incident (4)", delegate
{
_ = ZombiesRising.TryExecute(map, 4, UI.MouseCell(), false, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Zombie incident (25)", delegate
DebugToolMap("Spawn: Zombie incident (25)", delegate
{
_ = ZombiesRising.TryExecute(map, 25, UI.MouseCell(), false, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Zombie incident (100)", delegate
DebugToolMap("Spawn: Zombie incident (100)", delegate
{
_ = ZombiesRising.TryExecute(map, 100, UI.MouseCell(), false, true);
}, highlightedIndex == i++);
base.DebugToolMap("Spawn: Zombie incident (200)", delegate
DebugToolMap("Spawn: Zombie incident (200)", delegate
{
_ = ZombiesRising.TryExecute(map, 200, UI.MouseCell(), false, true);
}, highlightedIndex == i++);
base.DebugToolMap("Convert: Make Zombie", delegate
DebugToolMap("Convert: Make Zombie", delegate
{
foreach (var thing in map.thingGrid.ThingsAt(UI.MouseCell()))
{
if (!(thing is Pawn pawn) || pawn is Zombie) continue;
Tools.ConvertToZombie(pawn, map, true);
}
}, highlightedIndex == i++);
base.DebugToolMap("Apply: Trigger rotting", delegate
DebugToolMap("Apply: Trigger rotting", delegate
{
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
{
Expand All @@ -128,7 +132,7 @@ public override void DoListingItems()
compRottable.RotProgress = compRottable.PropsRot.TicksToRotStart;
}
}, highlightedIndex == i++);
base.DebugToolMap("Apply: Add zombie bite", delegate
DebugToolMap("Apply: Add zombie bite", delegate
{
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
{
Expand Down Expand Up @@ -158,7 +162,7 @@ public override void DoListingItems()
pawn.health.AddHediff(bite, bodyPart, damageInfo);
}
}, highlightedIndex == i++);
base.DebugToolMap("Apply: Remove infections", delegate
DebugToolMap("Apply: Remove infections", delegate
{
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
{
Expand All @@ -175,7 +179,7 @@ public override void DoListingItems()
_ = pawn.health.hediffSet.hediffs.RemoveAll(hediff => hediff is Hediff_ZombieInfection);
}
}, highlightedIndex == i++);
base.DebugToolMap("Apply: Zombie raging", delegate
DebugToolMap("Apply: Zombie raging", delegate
{
foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
{
Expand Down
19 changes: 10 additions & 9 deletions Source/Dialogs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,15 @@ public static void DoWindowContentsInternal(ref SettingsGroup settings, Rect inR
// Types
list.Dialog_Label("SpecialZombiesTitle", headerColor);
list.Gap(8f);
list.Dialog_FloatSlider("SuicideBomberChance", "0%", ref settings.suicideBomberChance, 0f, 1f - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance);
list.Dialog_FloatSlider("ToxicSplasherChance", "0%", ref settings.toxicSplasherChance, 0f, 1f - settings.suicideBomberChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance);
list.Dialog_FloatSlider("TankyOperatorChance", "0%", ref settings.tankyOperatorChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance);
list.Dialog_FloatSlider("MinerChance", "0%", ref settings.minerChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance);
list.Dialog_FloatSlider("ElectrifierChance", "0%", ref settings.electrifierChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.albinoChance - settings.darkSlimerChance);
list.Dialog_FloatSlider("AlbinoChance", "0%", ref settings.albinoChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.darkSlimerChance);
list.Dialog_FloatSlider("DarkSlimerChance", "0%", ref settings.darkSlimerChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance);
var normalChance = 1 - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance;
list.Dialog_FloatSlider("SuicideBomberChance", "0%", ref settings.suicideBomberChance, 0f, 1f - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance - settings.healerChance);
list.Dialog_FloatSlider("ToxicSplasherChance", "0%", ref settings.toxicSplasherChance, 0f, 1f - settings.suicideBomberChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance - settings.healerChance);
list.Dialog_FloatSlider("TankyOperatorChance", "0%", ref settings.tankyOperatorChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance - settings.healerChance);
list.Dialog_FloatSlider("MinerChance", "0%", ref settings.minerChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance - settings.healerChance);
list.Dialog_FloatSlider("ElectrifierChance", "0%", ref settings.electrifierChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.albinoChance - settings.darkSlimerChance - settings.healerChance);
list.Dialog_FloatSlider("AlbinoChance", "0%", ref settings.albinoChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.darkSlimerChance - settings.healerChance);
list.Dialog_FloatSlider("DarkSlimerChance", "0%", ref settings.darkSlimerChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.healerChance);
list.Dialog_FloatSlider("HealerChance", "0%", ref settings.healerChance, 0f, 1f - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance);
var normalChance = 1 - settings.suicideBomberChance - settings.toxicSplasherChance - settings.tankyOperatorChance - settings.minerChance - settings.electrifierChance - settings.albinoChance - settings.darkSlimerChance - settings.healerChance;
list.Gap(-6f);
list.Dialog_Text(GameFont.Tiny, "NormalZombieChance", string.Format("{0:0%}", normalChance));
list.Gap(30f);
Expand Down Expand Up @@ -590,7 +591,7 @@ public static void DoWindowContentsInternal(ref SettingsGroup settings, Rect inR
list.Dialog_Checkbox("AnyTreatmentStopsInfection", ref settings.anyTreatmentStopsInfection);
list.Gap(22f);
static string hoursTranslator(int n) => n == -1 ? "Off".Translate() : (n == 0 ? "Immediately".Translate() : null);
list.Dialog_TimeSlider("HoursAfterDeathToBecomeZombie", ref settings.hoursAfterDeathToBecomeZombie, -1, 24, hoursTranslator, false);
list.Dialog_TimeSlider("HoursAfterDeathToBecomeZombie", ref settings.hoursAfterDeathToBecomeZombie, -1, 6 * 24, hoursTranslator, false);
list.Gap(30f);

// Serum
Expand Down
Binary file added Source/Graphics/BeingHealed.afphoto
Binary file not shown.
Binary file added Source/Graphics/Heal.afphoto
Binary file not shown.
6 changes: 6 additions & 0 deletions Source/GraphicsDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ static GraphicsDatabase()
var data = new ColorData(width, height, pixels);
colorDataDatabase.Add(path + "#dark", data);
}

// add healer cyan
{
var data = GetColoredData(originalPixels, Color.cyan, width, height);
colorDataDatabase.Add(path + "#healer", data);
}
}
else
{
Expand Down
Loading

0 comments on commit 58c500f

Please sign in to comment.