@@ -205,7 +205,7 @@
10
- 21
+ 2586.28252
diff --git a/Languages/English/Keyed/ModMenu.xml b/Languages/English/Keyed/ModMenu.xml
index eb1ea953f0..aed75eff17 100644
--- a/Languages/English/Keyed/ModMenu.xml
+++ b/Languages/English/Keyed/ModMenu.xml
@@ -16,6 +16,9 @@
Allow hunting with melee weaponsHunters will still be allowed to hunt if they have a melee weapon equipped.
+
+ Smoke effects
+ Fire generates dangerous black smoke clouds, causing health complications to anyone not wearing protective gear.
diff --git a/Patches/Core/Stats/Stats.xml b/Patches/Core/Stats/Stats.xml
index 1c8e3ebac1..e5602863c5 100644
--- a/Patches/Core/Stats/Stats.xml
+++ b/Patches/Core/Stats/Stats.xml
@@ -91,14 +91,14 @@
Defs/StatDef[defName = "ArmorRating_Sharp"]/description
- The chance to affect sharp damage like bullets, knife stabs, explosions, and animal bites.\n\nUpon taking damage, the attack's armor penetration value is compared against this armor rating.\n\nDamage is scaled based on the ratio of penetration to armor, where post-armor damage is 50% if both values are equal, 0% if penetration is half or less of armor and 100% if it is twice the value of armor.\n\nArmor penetration is scaled by the same factor, making it harder to penetrate subsequent layers of armor.\n\nAfterwards, the attack has to pass a deflection check, where the remaining armor penetration is randomized by +-0.05 and compared against the armor. If the randomized penetration value is higher than the armor value it will penetrate, else it will be converted into blunt damage and checked again against this apparel's blunt armor.
+ Mitigation effect on sharp damage such as bullets, knife stabs, and animal bites.\n\nThis armor rating is compared against an attack's armor penetration, with deflection occurring if armor is the higher stat. Otherwise, armor penetration has the armor rating subtracted from it, and damage is reduced by the ratio of modified to initial AP, as follows:\n\nModifiedAP = InitialAP - ArmorRating\nModifiedDamage = InitialDamage * (ModifiedAP / InitialAP)\n\nThese reductions apply for each layer the attack goes through, lowering its ability to penetrate and damage subsequent layers. If an attack is deflected, it's converted to blunt, and checked against the apparel's blunt armor rating.Defs/StatDef[defName = "ArmorRating_Blunt"]/description
- The chance to affect sharp damage like bullets, knife stabs, explosions, and animal bites.\n\nUpon taking damage, the attack's armor penetration value is compared against this armor rating.\n\nDamage is scaled based on the ratio of penetration to armor, where post-armor damage is 50% if both values are equal, 0% if penetration is half or less of armor and 100% if it is twice the value of armor.\n\nArmor penetration is scaled by the same factor, making it harder to penetrate subsequent layers of armor.
+ Mitigation effect on blunt-force damage such as maces, explosions, and animal hoofs.\n\nThis armor rating is compared against an attack's armor penetration, with no damage occurring if armor is the higher stat. Otherwise, armor penetration has the armor rating subtracted from it, and damage is reduced by the ratio of modified to initial AP, as follows:\n\nModifiedAP = InitialAP - ArmorRating\nModifiedDamage = InitialDamage * (ModifiedAP / InitialAP)\n\nThese reductions apply for each layer the attack goes through, lowering its ability to penetrate and damage subsequent layers.
diff --git a/Source/CombatExtended/CombatExtended.csproj b/Source/CombatExtended/CombatExtended.csproj
index 5bed96ffb5..6fcf588b27 100644
--- a/Source/CombatExtended/CombatExtended.csproj
+++ b/Source/CombatExtended/CombatExtended.csproj
@@ -302,6 +302,7 @@
+
@@ -311,6 +312,7 @@
+
diff --git a/Source/CombatExtended/CombatExtended/Settings.cs b/Source/CombatExtended/CombatExtended/Settings.cs
index c277801384..f42b778ba3 100644
--- a/Source/CombatExtended/CombatExtended/Settings.cs
+++ b/Source/CombatExtended/CombatExtended/Settings.cs
@@ -16,10 +16,12 @@ public class Settings : ModSettings
private bool showCasings = true;
private bool showTaunts = true;
private bool allowMeleeHunting = false;
+ private bool smokeEffects = true;
public bool ShowCasings => showCasings;
public bool ShowTaunts => showTaunts;
public bool AllowMeleeHunting => allowMeleeHunting;
+ public bool SmokeEffects => smokeEffects;
public bool ShowTutorialPopup = true;
@@ -67,6 +69,7 @@ public override void ExposeData()
Scribe_Values.Look(ref showCasings, "showCasings", true);
Scribe_Values.Look(ref showTaunts, "showTaunts", true);
Scribe_Values.Look(ref allowMeleeHunting, "allowMeleeHunting", false);
+ Scribe_Values.Look(ref smokeEffects, "smokeEffects", true);
#if DEBUG
// Debug settings
@@ -107,6 +110,7 @@ public void DoWindowContents(Rect canvas)
list.CheckboxLabeled("CE_Settings_ShowCasings_Title".Translate(), ref showCasings, "CE_Settings_ShowCasings_Desc".Translate());
list.CheckboxLabeled("CE_Settings_ShowTaunts_Title".Translate(), ref showTaunts, "CE_Settings_ShowTaunts_Desc".Translate());
list.CheckboxLabeled("CE_Settings_AllowMeleeHunting_Title".Translate(), ref allowMeleeHunting, "CE_Settings_AllowMeleeHunting_Desc".Translate());
+ list.CheckboxLabeled("CE_Settings_SmokeEffects_Title".Translate(), ref smokeEffects, "CE_Settings_SmokeEffects_Desc".Translate());
#if DEBUG
// Do Debug settings
diff --git a/Source/CombatExtended/CombatExtended/Things/Smoke.cs b/Source/CombatExtended/CombatExtended/Things/Smoke.cs
index a7970a4eb5..72457b45ae 100644
--- a/Source/CombatExtended/CombatExtended/Things/Smoke.cs
+++ b/Source/CombatExtended/CombatExtended/Things/Smoke.cs
@@ -11,7 +11,7 @@ public class Smoke : Gas
private int _ticksUntilMove;
private const int BaseTicksUntilMove = 40;
private const int TicksUntilMoveDelta = 20;
- private const float InhalationPerSec = 0.0075f / GenTicks.TicksPerRealSecond;
+ private const float InhalationPerSec = 0.0150f / GenTicks.TicksPerRealSecond;
public override void ExposeData()
{
@@ -84,12 +84,12 @@ private void ApplyHediffs()
return;
var pawns = Position.GetThingList(Map).Where(t => t is Pawn).ToList();
- foreach (var cell in GenAdjFast.AdjacentCells8Way(Position))
- {
- if (!cell.InBounds(Map))
- continue;
- pawns.AddRange(cell.GetThingList(Map).Where(t => t is Pawn));
- }
+ //foreach (var cell in GenAdjFast.AdjacentCells8Way(Position))
+ //{
+ // if (!cell.InBounds(Map))
+ // continue;
+ // pawns.AddRange(cell.GetThingList(Map).Where(t => t is Pawn));
+ //}
foreach (Pawn pawn in pawns)
{
diff --git a/Source/CombatExtended/Harmony/Harmony-Fire.cs b/Source/CombatExtended/Harmony/Harmony-Fire.cs
index 84d612e4ac..c6b5aa4174 100644
--- a/Source/CombatExtended/Harmony/Harmony-Fire.cs
+++ b/Source/CombatExtended/Harmony/Harmony-Fire.cs
@@ -84,6 +84,7 @@ internal static IEnumerable Transpiler(IEnumerable 0)
+ {
+ int smokeCount = __instance?.ListerThings?.AllThings?.Where(t => t is Smoke)?.Count() ?? 0;
+ if (smokeCount > 0)
+ {
+ __result = Danger.Deadly;
+ }
+ }
+ }
+ }
+}