diff --git a/Assemblies/CombatRealism.dll b/Assemblies/CombatRealism.dll
index d86e911..f359289 100644
Binary files a/Assemblies/CombatRealism.dll and b/Assemblies/CombatRealism.dll differ
diff --git a/Defs/AmmoCategoryDefs/AmmoCategories_Grenades.xml b/Defs/AmmoCategoryDefs/AmmoCategories_Grenades.xml
index faa3c24..8b0fb51 100644
--- a/Defs/AmmoCategoryDefs/AmmoCategories_Grenades.xml
+++ b/Defs/AmmoCategoryDefs/AmmoCategories_Grenades.xml
@@ -13,5 +13,12 @@
Creates an electro-magnetic burst on impact, temporarily disrupting electronic systems and Mechanoids.
true
+
+
+ GrenadeIncendiary
+ Incendiary
+ Filled with incendiary agent. The agent is dispersed on impact, covering the area in flames.
+ true
+
\ No newline at end of file
diff --git a/Defs/AmmoCategoryDefs/AmmoCategories_Neolithic.xml b/Defs/AmmoCategoryDefs/AmmoCategories_Neolithic.xml
index eedbd46..1c9ad6b 100644
--- a/Defs/AmmoCategoryDefs/AmmoCategories_Neolithic.xml
+++ b/Defs/AmmoCategoryDefs/AmmoCategories_Neolithic.xml
@@ -6,5 +6,19 @@
stone arrow
A sharpened stone is attached as an arrow head. Cuts exposed tissue fairly well but is ineffective against any kind of armor.
+
+
+ SteelArrow
+ steel arrow
+ The arrow head is made from steel to enhance armor penetration.
+ true
+
+
+
+ PlasteelArrow
+ plasteel arrow
+ Fitted with a plasteel head to maximize armor penetration.
+ true
+
\ No newline at end of file
diff --git a/Defs/AmmoSetDefs/AmmoSets_HighCaliber.xml b/Defs/AmmoSetDefs/AmmoSets_HighCaliber.xml
index b1b3973..a6c91dd 100644
--- a/Defs/AmmoSetDefs/AmmoSets_HighCaliber.xml
+++ b/Defs/AmmoSetDefs/AmmoSets_HighCaliber.xml
@@ -14,4 +14,16 @@
+
+
+
+ AmmoSet_145x114mm
+ 14.5x114mm
+
+ Ammo_145x114mm_FMJ
+ Ammo_145x114mm_HE
+ Ammo_145x114mm_Incendiary
+
+
+
\ No newline at end of file
diff --git a/Defs/AmmoSetDefs/AmmoSets_Neolithic.xml b/Defs/AmmoSetDefs/AmmoSets_Neolithic.xml
index c769b8c..8d32178 100644
--- a/Defs/AmmoSetDefs/AmmoSets_Neolithic.xml
+++ b/Defs/AmmoSetDefs/AmmoSets_Neolithic.xml
@@ -6,9 +6,11 @@
AmmoSet_Arrow
arrows
-
- Ammo_Arrow
-
+
+ Ammo_Arrow_Stone
+ Ammo_Arrow_Steel
+ Ammo_Arrow_Plasteel
+
@@ -16,9 +18,11 @@
AmmoSet_GreatArrow
great arrows
-
- Ammo_GreatArrow
-
+
+ Ammo_GreatArrow_Stone
+ Ammo_GreatArrow_Steel
+ Ammo_GreatArrow_Plasteel
+
\ No newline at end of file
diff --git a/Defs/AmmoSetDefs/AmmoSets_Shells.xml b/Defs/AmmoSetDefs/AmmoSets_Shells.xml
new file mode 100644
index 0000000..16363cb
--- /dev/null
+++ b/Defs/AmmoSetDefs/AmmoSets_Shells.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ AmmoSet_81mmMortarShell
+ 81mm mortar shells
+
+ ArtilleryShell
+ Ammo_81mmMortarShell_Incendiary
+ Ammo_81mmMortarShell_EMP
+
+
+
+
+
+
+ AmmoSet_90mmCannonShell
+ 90mm cannon shells
+
+ Ammo_90mmCannonShell_HEAT
+ Ammo_90mmCannonShell_HE
+ Ammo_90mmCannonShell_EMP
+
+
+
+
\ No newline at end of file
diff --git a/Defs/BodyPartDefs/BodyParts_Humanoid.xml b/Defs/BodyPartDefs/BodyParts_Humanoid.xml
new file mode 100644
index 0000000..fcfa06d
--- /dev/null
+++ b/Defs/BodyPartDefs/BodyParts_Humanoid.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ Torso
+ torso
+ 50
+ 0.08
+ true
+ true
+
+
+
\ No newline at end of file
diff --git a/Defs/BodyPartDefs/BodyParts_Mechanoid.xml b/Defs/BodyPartDefs/BodyParts_Mechanoid.xml
index fb1a9a3..badd788 100644
--- a/Defs/BodyPartDefs/BodyParts_Mechanoid.xml
+++ b/Defs/BodyPartDefs/BodyParts_Mechanoid.xml
@@ -1,6 +1,16 @@
+
+ MechanicalThorax
+ thorax
+ 50
+ 0
+ false
+ true
+ false
+
+
LeftBlade
left blade
diff --git a/Defs/DamageDefs/Damages_LocalInjury.xml b/Defs/DamageDefs/Damages_LocalInjury.xml
index 3e1ad73..cdbf39d 100644
--- a/Defs/DamageDefs/Damages_LocalInjury.xml
+++ b/Defs/DamageDefs/Damages_LocalInjury.xml
@@ -16,7 +16,7 @@
true
Slice
Sharp
- true
+ true
@@ -30,7 +30,7 @@
true
Blunt
Blunt
- true
+ true
@@ -46,7 +46,7 @@
true
Blunt
Blunt
- true
+ true
@@ -56,11 +56,10 @@
MuscleSpasms
- 0.035
+ 0.07
Blunt
- true
@@ -74,7 +73,7 @@
true
Slice
Sharp
- true
+ true
@@ -87,7 +86,7 @@
true
Bullet
Sharp
- true
+ true
@@ -124,8 +123,9 @@
true
Slice
Sharp
- true
- true
+ true
+ true
+ true
@@ -139,7 +139,7 @@
true
Slice
Sharp
- true
+ true
@@ -151,8 +151,8 @@
0.001
- true
- true
+ true
+ true
@@ -180,7 +180,7 @@
Bomb_Secondary
false
false
- true
+ true
@@ -206,13 +206,14 @@
15
Mote_BlastFlame
Explosion_Flame
+ true
Flame_Secondary
false
false
- true
+ true
diff --git a/Defs/FactionDefs/Factions.xml b/Defs/FactionDefs/Factions.xml
index 7e79f0e..27d04f0 100644
--- a/Defs/FactionDefs/Factions.xml
+++ b/Defs/FactionDefs/Factions.xml
@@ -2,6 +2,89 @@
+
+
+ Tribe
+ tribe
+ These people have been here a very long time. Maybe their ancestors crashed here a thousand years ago. Maybe they survived some cataclysm that destroyed a technological civilization here. In any case, the tribals are mostly nomadic people who live off the land using primitive tools and weapons.\n\nSome tribes are more aggressive than others; many are open to trade and alliances, even with strange peoples like yourselves. Close cooperation or recruitment will be very difficult because of the vast sociotechnological and linguistic gap between the tribals and yourselves.\n\nDespite their apparent technological weakness, the tribals can be dangerous enemies and valuable friends because of their skill with low-tech warfare, their numbers, and their hardiness.
+ tribespeople
+ 1
+ true
+ 100
+ true
+
+ -50
+ 30
+
+ true
+ NamerFactionTribal
+ NamerPersonTribal
+ Neolithic
+ Tribal
+ Chief
+
+ Tribal
+
+
+ -100
+ 10
+
+
+ Caravan_Neolithic_BulkGoods
+ Caravan_Neolithic_CombatSupplier
+ Caravan_Neolithic_SlavesMerchant
+
+
+
+
+
+
+ 60
+ TribalWarrior
+
+
+ 100
+ TribalArcher
+
+
+ 70
+ TribalChief
+
+
+
+
+
+
+ 1
+ TribalTrader
+
+
+
+
+ 1
+ PackMuffalo
+
+
+
+
+ 60
+ TribalWarrior
+
+
+ 100
+ TribalArcher
+
+
+
+
+ World/FactionHomes/DefaultHome
+ (50,200,50)
+
+
Outlander
outlander town
@@ -206,7 +289,7 @@
true
false
Ultra
- 45
+ 60
-100
-100
diff --git a/Defs/HediffDefs/Hediffs_GlobalMisc.xml b/Defs/HediffDefs/Hediffs_GlobalMisc.xml
index 1292775..194e050 100644
--- a/Defs/HediffDefs/Hediffs_GlobalMisc.xml
+++ b/Defs/HediffDefs/Hediffs_GlobalMisc.xml
@@ -58,6 +58,16 @@
MuscleSpasms
muscle spasms
+ HediffWithComps
+
+
+ HediffComp_Disappears
+
+ 1200
+ 1800
+
+
+
trivial
diff --git a/Defs/JobDefs/Jobs_CR.xml b/Defs/JobDefs/Jobs_CR.xml
index d113b37..d64f371 100644
--- a/Defs/JobDefs/Jobs_CR.xml
+++ b/Defs/JobDefs/Jobs_CR.xml
@@ -3,11 +3,11 @@
-
- ReloadWeapon
- Combat_Realism.JobDriver_Reload
- Reloading weapon.
-
+
+ ReloadWeapon
+ Combat_Realism.JobDriver_Reload
+ Reloading weapon.
+
RunForCover
@@ -16,7 +16,7 @@
false
false
true
- false
+ false
@@ -26,7 +26,13 @@
false
false
true
- false
+ false
+
+
+
+ ReloadTurret
+ Combat_Realism.JobDriver_ReloadTurret
+ Reloading turret.
diff --git a/Defs/ModHelperDefs/ModHelper.xml b/Defs/ModHelperDefs/ModHelper.xml
index d62826a..4a72a52 100644
--- a/Defs/ModHelperDefs/ModHelper.xml
+++ b/Defs/ModHelperDefs/ModHelper.xml
@@ -49,6 +49,18 @@
Boomalope
+
+
+
+ Boomrat
+
+
@@ -57,14 +69,21 @@
CR_Ammo
- 500
- 1000
+ 200
+ 5000
-1
4
+
+ Ammo
+
+ 0
+ 0
+
+
@@ -73,14 +92,21 @@
CR_Ammo
- 100
- 200
+ 50
+ 100
-1
2
+
+ Ammo
+
+ 0
+ 0
+
+
@@ -89,8 +115,8 @@
CR_Ammo
- 2000
- 5000
+ 500
+ 2000
Cheap
@@ -98,6 +124,31 @@
9
+
+ Ammo
+
+ 0
+ 0
+
+
+
+ CR_Turret
+
+ -2
+ 4
+
+
+ 1
+ 2
+
+
+
+ WeaponsTurrets
+
+ 0
+ 0
+
+
@@ -106,8 +157,8 @@
CR_Ammo
- 500
- 2000
+ 200
+ 1000
Cheap
@@ -115,6 +166,31 @@
5
+
+ Ammo
+
+ 0
+ 0
+
+
+
+ CR_Turret
+
+ -4
+ 2
+
+
+ 1
+ 1
+
+
+
+ WeaponsTurrets
+
+ 0
+ 0
+
+
diff --git a/Defs/PawnKindDefs/PawnKinds_Mercenary.xml b/Defs/PawnKindDefs/PawnKinds_Mercenary.xml
index fea9c3d..1fcac8d 100644
--- a/Defs/PawnKindDefs/PawnKinds_Mercenary.xml
+++ b/Defs/PawnKindDefs/PawnKinds_Mercenary.xml
@@ -240,15 +240,15 @@
AdvancedGun
- 5000
- 8400
+ 10000
+ 16800
-
- 1
- 1
- 1
- 1
-
+
+ 1
+ 1
+ 1
+ 1
+
@@ -259,12 +259,12 @@
AdvancedGun
-
- 1
- 1
- 1
- 1
-
+
+ 1
+ 1
+ 1
+ 1
+
@@ -275,10 +275,10 @@
CR_MachineGun
-
- 1
- 1
-
+
+ 1
+ 1
+
diff --git a/Defs/RecipeDefs/Recipes_Turret.xml.disabled b/Defs/RecipeDefs/Recipes_Turret.xml.disabled
deleted file mode 100644
index da66e87..0000000
--- a/Defs/RecipeDefs/Recipes_Turret.xml.disabled
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
- MakeTurretGun
- make improvised turret
- Craft an improvised turret.
- Making improvised turret.
- SmithingSpeed
- Cook
- Recipe_Machining
- true
- 2500
- 5
-
-
-
-
- Steel
-
-
- 75
-
-
-
-
- Steel
-
-
-
- 1
-
- Crafting
-
- TableMachining
-
-
-
-
\ No newline at end of file
diff --git a/Defs/RecipeDefs_Ammo/Recipes_AmmoAdvanced.xml b/Defs/RecipeDefs_Ammo/Recipes_AmmoAdvanced.xml
index c2179d8..d46b400 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_AmmoAdvanced.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_AmmoAdvanced.xml
@@ -28,7 +28,7 @@
Steel
- 9
+ 12
@@ -36,7 +36,7 @@
Prometheum
- 5
+ 7
@@ -62,7 +62,7 @@
Steel
- 9
+ 12
@@ -70,7 +70,7 @@
FSX
- 5
+ 7
@@ -96,7 +96,7 @@
Steel
- 9
+ 12
@@ -124,8 +124,8 @@
MakeAmmo_6x24mmCharged
- make 6x24mm Charged cartridge x500
- Craft 500 6x24mm Charged cartridges.
+ make 6x24mm Charged cartridge x100
+ Craft 100 6x24mm Charged cartridges.
Making 6x24mm Charged cartridges.
@@ -134,7 +134,7 @@
Plasteel
- 5
+ 2
@@ -142,7 +142,7 @@
Components
- 5
+ 2
@@ -152,14 +152,14 @@
- 500
+ 100
MakeAmmo_6x24mmCharged_AP
- make 6x24mm Charged (Conc.) cartridge x500
- Craft 500 6x24mm Charged (Conc.) cartridges.
+ make 6x24mm Charged (Conc.) cartridge x100
+ Craft 100 6x24mm Charged (Conc.) cartridges.
Making 6x24mm Charged (Conc.) cartridges.
@@ -168,7 +168,7 @@
Plasteel
- 5
+ 2
@@ -176,7 +176,7 @@
Components
- 5
+ 2
@@ -186,14 +186,14 @@
- 500
+ 100
MakeAmmo_6x24mmCharged_Ion
- make 6x24mm Charged (Ion) cartridge x500
- Craft 500 6x24mm Charged (Ion) cartridges.
+ make 6x24mm Charged (Ion) cartridge x100
+ Craft 100 6x24mm Charged (Ion) cartridges.
Making 6x24mm Charged (Ion) cartridges.
@@ -202,7 +202,7 @@
Plasteel
- 5
+ 2
@@ -210,7 +210,7 @@
Components
- 5
+ 2
@@ -220,7 +220,7 @@
- 500
+ 100
diff --git a/Defs/RecipeDefs_Ammo/Recipes_AmmoHighCaliber.xml b/Defs/RecipeDefs_Ammo/Recipes_AmmoHighCaliber.xml
index 2481d24..3b0c2f5 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_AmmoHighCaliber.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_AmmoHighCaliber.xml
@@ -5,8 +5,8 @@
MakeAmmo_50BMG_FMJ
- make .50 BMG (FMJ) cartridge x100
- Craft 100 .50 BMG (FMJ) cartridges.
+ make .50 BMG (FMJ) cartridge x200
+ Craft 200 .50 BMG (FMJ) cartridges.
Making .50 BMG (FMJ) cartridges.
@@ -15,7 +15,7 @@
Steel
- 17
+ 44
@@ -24,14 +24,14 @@
- 100
+ 200
MakeAmmo_50BMG_AP
- make .50 BMG (Sabot) cartridge x100
- Craft 100 .50 BMG (Sabot) cartridges.
+ make .50 BMG (Sabot) cartridge x200
+ Craft 200 .50 BMG (Sabot) cartridges.
Making .50 BMG (Sabot) cartridges.
@@ -40,7 +40,7 @@
Steel
- 12
+ 32
@@ -48,7 +48,7 @@
Uranium
- 2
+ 4
@@ -58,14 +58,14 @@
- 100
+ 200
MakeAmmo_50BMG_HE
- make .50 BMG (HE) cartridge x100
- Craft 100 .50 BMG (HE) cartridges.
+ make .50 BMG (HE) cartridge x200
+ Craft 200 .50 BMG (HE) cartridges.
Making .50 BMG (HE) cartridges.
@@ -74,7 +74,7 @@
Steel
- 12
+ 32
@@ -82,7 +82,7 @@
FSX
- 2
+ 6
@@ -92,14 +92,14 @@
- 100
+ 200
MakeAmmo_50BMG_Incendiary
- make .50 BMG (AP-I) cartridge x100
- Craft 100 .50 BMG (AP-I) cartridges.
+ make .50 BMG (AP-I) cartridge x200
+ Craft 200 .50 BMG (AP-I) cartridges.
Making .50 BMG (AP-I) cartridges.
@@ -108,7 +108,7 @@
Steel
- 14
+ 40
@@ -116,7 +116,7 @@
Prometheum
- 2
+ 6
@@ -126,7 +126,102 @@
- 100
+ 200
+
+
+
+
+
+
+ MakeAmmo_145x114mm_FMJ
+ make 14.5x114mm (FMJ) cartridge x200
+ Craft 200 14.5x114mm (FMJ) cartridges.
+ Making 14.5x114mm (FMJ) cartridges.
+
+
+
+
+ Steel
+
+
+ 80
+
+
+
+
+ Steel
+
+
+
+ 200
+
+
+
+
+ MakeAmmo_145x114mm_HE
+ make 14.5x114mm (HE) cartridge x200
+ Craft 200 14.5x114mm (HE) cartridges.
+ Making 14.5x114mm (HE) cartridges.
+
+
+
+
+ Steel
+
+
+ 58
+
+
+
+
+ FSX
+
+
+ 8
+
+
+
+
+ Steel
+ FSX
+
+
+
+ 200
+
+
+
+
+ MakeAmmo_145x114mm_Incendiary
+ make 14.5x114mm (AP-I) cartridge x200
+ Craft 200 14.5x114mm (AP-I) cartridges.
+ Making 14.5x114mm (AP-I) cartridges.
+
+
+
+
+ Steel
+
+
+ 68
+
+
+
+
+ Prometheum
+
+
+ 8
+
+
+
+
+ Steel
+ Prometheum
+
+
+
+ 200
diff --git a/Defs/RecipeDefs_Ammo/Recipes_AmmoNeolithic.xml b/Defs/RecipeDefs_Ammo/Recipes_AmmoNeolithic.xml
index 6507fda..7f3f442 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_AmmoNeolithic.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_AmmoNeolithic.xml
@@ -9,19 +9,19 @@
2000
Crafting
500
-
- ElectricSmithy
- FueledSmithy
-
+
+ ElectricSmithy
+ FueledSmithy
+
- MakeArrows
- make arrows x10
- Craft 10 arrows.
- Making arrows.
+ MakeArrow_Stone
+ make stone arrows x10
+ Craft 10 stone arrows.
+ Making stone arrows.
@@ -38,22 +38,90 @@
- 10
+ 10
-
+
ElectricSmithy
FueledSmithy
CraftingSpot
-
+
+
+
+
+ MakeArrow_Steel
+ make steel arrows x10
+ Craft 10 steel arrows.
+ Making steel arrows.
+
+
+
+
+ WoodLog
+
+
+ 1
+
+
+
+
+ Steel
+
+
+ 1
+
+
+
+
+ WoodLog
+ Steel
+
+
+
+ 10
+
+
+
+
+ MakeArrow_Plasteel
+ make plasteel arrows x10
+ Craft 10 plasteel arrows.
+ Making plasteel arrows.
+
+
+
+
+ WoodLog
+
+
+ 1
+
+
+
+
+ Plasteel
+
+
+ 1
+
+
+
+
+ WoodLog
+ Plasteel
+
+
+
+ 10
+
- MakeGreatArrows
- make great arrows x10
- Craft 10 great arrows.
- Making great arrows.
+ MakeGreatArrow_Stone
+ make stone great arrows x10
+ Craft 10 stone great arrows.
+ Making stone great arrows.
@@ -70,7 +138,80 @@
- 10
+ 10
+
+
+ ElectricSmithy
+ FueledSmithy
+ CraftingSpot
+
+
+
+
+ MakeGreatArrow_Steel
+ make steel great arrows x10
+ Craft 10 steel great arrows.
+ Making steel great arrows.
+
+
+
+
+ WoodLog
+
+
+ 2
+
+
+
+
+ Steel
+
+
+ 1
+
+
+
+
+ WoodLog
+ Steel
+
+
+
+ 10
+
+
+
+
+ MakeGreatArrow_Plasteel
+ make plasteel great arrows x10
+ Craft 10 plasteel great arrows.
+ Making plasteel great arrows.
+
+
+
+
+ WoodLog
+
+
+ 2
+
+
+
+
+ Plasteel
+
+
+ 1
+
+
+
+
+ WoodLog
+ Plasteel
+
+
+
+ 10
diff --git a/Defs/RecipeDefs_Ammo/Recipes_AmmoPistols.xml b/Defs/RecipeDefs_Ammo/Recipes_AmmoPistols.xml
index c903865..c5f2b12 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_AmmoPistols.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_AmmoPistols.xml
@@ -15,7 +15,7 @@
Steel
- 4
+ 5
@@ -42,7 +42,7 @@
Steel
- 5
+ 10
@@ -69,7 +69,7 @@
Steel
- 5
+ 10
@@ -94,7 +94,7 @@
Steel
- 6
+ 12
@@ -119,7 +119,7 @@
Steel
- 6
+ 12
@@ -146,7 +146,7 @@
Steel
- 9
+ 12
@@ -171,7 +171,7 @@
Steel
- 11
+ 14
@@ -196,7 +196,7 @@
Steel
- 11
+ 14
@@ -223,7 +223,7 @@
Steel
- 10
+ 20
@@ -248,7 +248,7 @@
Steel
- 14
+ 22
@@ -273,7 +273,7 @@
Steel
- 14
+ 22
@@ -300,7 +300,7 @@
Steel
- 10
+ 20
@@ -325,7 +325,7 @@
Steel
- 14
+ 22
@@ -350,7 +350,7 @@
Steel
- 14
+ 22
diff --git a/Defs/RecipeDefs_Ammo/Recipes_AmmoRifles.xml b/Defs/RecipeDefs_Ammo/Recipes_AmmoRifles.xml
index e94cc6a..0f2962f 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_AmmoRifles.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_AmmoRifles.xml
@@ -15,7 +15,7 @@
Steel
- 9
+ 12
@@ -40,7 +40,7 @@
Steel
- 11
+ 14
@@ -65,7 +65,7 @@
Steel
- 11
+ 14
@@ -92,7 +92,7 @@
Steel
- 12
+ 16
@@ -117,7 +117,7 @@
Steel
- 15
+ 18
@@ -142,7 +142,7 @@
Steel
- 15
+ 18
@@ -169,7 +169,7 @@
Steel
- 17
+ 22
@@ -194,7 +194,7 @@
Steel
- 21
+ 24
@@ -219,7 +219,7 @@
Steel
- 21
+ 24
@@ -246,7 +246,7 @@
Steel
- 19
+ 25
@@ -271,7 +271,7 @@
Steel
- 24
+ 27
@@ -296,7 +296,7 @@
Steel
- 24
+ 27
@@ -323,7 +323,7 @@
Steel
- 17
+ 22
@@ -348,7 +348,7 @@
Steel
- 21
+ 24
@@ -373,7 +373,7 @@
Steel
- 21
+ 24
diff --git a/Defs/RecipeDefs_Ammo/Recipes_AmmoShotgun.xml b/Defs/RecipeDefs_Ammo/Recipes_AmmoShotgun.xml
index 8d090d0..6cbe768 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_AmmoShotgun.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_AmmoShotgun.xml
@@ -5,8 +5,8 @@
MakeAmmo_410Bore_Buck
- make .410 Bore (Buck) shell x100
- Craft 100 .410 Bore (Buck) shells.
+ make .410 Bore (Buck) shell x200
+ Craft 200 .410 Bore (Buck) shells.
Making .410 Bore (Buck) shells.
@@ -15,7 +15,7 @@
Steel
- 6
+ 12
@@ -24,7 +24,7 @@
- 100
+ 200
@@ -32,8 +32,8 @@
MakeAmmo_12Gauge_Buck
- make 12 gauge (Buck) shell x100
- Craft 100 12 gauge (Buck) shells.
+ make 12 gauge (Buck) shell x200
+ Craft 200 12 gauge (Buck) shells.
Making 12 gauge (Buck) shells.
@@ -42,7 +42,7 @@
Steel
- 8
+ 20
@@ -51,14 +51,14 @@
- 100
+ 200
MakeAmmo_12Gauge_Bird
- make 12 gauge (Bird) shell x100
- Craft 100 12 gauge (Bird) shells.
+ make 12 gauge (Bird) shell x200
+ Craft 200 12 gauge (Bird) shells.
Making 12 gauge (Bird) shells.
@@ -67,7 +67,7 @@
Steel
- 8
+ 20
@@ -76,14 +76,14 @@
- 100
+ 200
MakeAmmo_12Gauge_Slug
- make 12 gauge (Slug) shell x100
- Craft 100 12 gauge (Slug) shells.
+ make 12 gauge (Slug) shell x200
+ Craft 200 12 gauge (Slug) shells.
Making 12 gauge (Slug) shells.
@@ -92,7 +92,7 @@
Steel
- 10
+ 26
@@ -101,14 +101,14 @@
- 100
+ 200
MakeAmmo_12Gauge_Beanbag
- make 12 gauge (Beanbag) shell x100
- Craft 100 12 gauge (Beanbag) shells.
+ make 12 gauge (Beanbag) shell x200
+ Craft 200 12 gauge (Beanbag) shells.
Making 12 gauge (Beanbag) shells.
@@ -117,7 +117,7 @@
Steel
- 5
+ 12
@@ -125,7 +125,7 @@
Cloth
- 3
+ 6
@@ -135,14 +135,14 @@
- 100
+ 200
MakeAmmo_12Gauge_ElectroSlug
- make 12 gauge (EMP) shell x100
- Craft 100 12 gauge (EMP) shells.
+ make 12 gauge (EMP) shell x200
+ Craft 200 12 gauge (EMP) shells.
Making 12 gauge (EMP) shells.
@@ -151,7 +151,7 @@
Steel
- 50
+ 12
@@ -159,7 +159,7 @@
Components
- 2
+ 4
@@ -169,7 +169,7 @@
- 100
+ 200
diff --git a/Defs/RecipeDefs_Ammo/Recipes_Grenades.xml b/Defs/RecipeDefs_Ammo/Recipes_Grenades.xml
index d999df7..ff46511 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_Grenades.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_Grenades.xml
@@ -5,8 +5,8 @@
MakeAmmo_30x29mmGrenade_HE
- make 30x29mm HE grenades x10
- Craft 10 30x29mm HE grenades.
+ make 30x29mm HE grenades x50
+ Craft 50 30x29mm HE grenades.
Making 30x29mm HE grenades.
@@ -15,7 +15,7 @@
Steel
- 18
+ 15
@@ -23,7 +23,7 @@
FSX
- 4
+ 3
@@ -42,14 +42,14 @@
- 10
+ 50
MakeAmmo_30x29mmGrenade_EMP
- make 30x29mm EMP grenades x10
- Craft 10 30x29mm EMP grenades.
+ make 30x29mm EMP grenades x50
+ Craft 50 30x29mm EMP grenades.
Making 30x29mm EMP grenades.
@@ -58,7 +58,7 @@
Steel
- 18
+ 15
@@ -66,7 +66,7 @@
Components
- 6
+ 4
@@ -76,7 +76,7 @@
- 10
+ 50
@@ -84,8 +84,8 @@
MakeAmmo_40x46mmGrenade_HE
- make 40x46mm HE grenades x10
- Craft 10 40x46mm HE grenades.
+ make 40x46mm HE grenades x50
+ Craft 50 40x46mm HE grenades.
Making 40x46mm HE grenades.
@@ -94,7 +94,7 @@
Steel
- 26
+ 20
@@ -102,7 +102,7 @@
FSX
- 6
+ 4
@@ -121,14 +121,14 @@
- 10
+ 50
MakeAmmo_40x46mmGrenade_EMP
- make 40x46mm EMP grenades x10
- Craft 10 40x46mm EMP grenades.
+ make 40x46mm EMP grenades x50
+ Craft 50 40x46mm EMP grenades.
Making 40x46mm EMP grenades.
@@ -137,7 +137,7 @@
Steel
- 26
+ 20
@@ -145,7 +145,7 @@
Components
- 8
+ 5
@@ -155,7 +155,7 @@
- 10
+ 50
diff --git a/Defs/RecipeDefs_Ammo/Recipes_HandGrenades.xml b/Defs/RecipeDefs_Ammo/Recipes_HandGrenades.xml
index 3107a06..18cccd1 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_HandGrenades.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_HandGrenades.xml
@@ -2,9 +2,9 @@
-
- TableMachining
-
+
+ TableMachining
+
diff --git a/Defs/RecipeDefs_Ammo/Recipes_Rockets.xml b/Defs/RecipeDefs_Ammo/Recipes_Rockets.xml
index c720d42..0e71164 100644
--- a/Defs/RecipeDefs_Ammo/Recipes_Rockets.xml
+++ b/Defs/RecipeDefs_Ammo/Recipes_Rockets.xml
@@ -8,7 +8,7 @@
make RPG-7 HEAT grenades x5
Craft 5 RPG-7 HEAT grenades.
Making RPG-7 HEAT grenades.
- 30000
+ 15000
@@ -16,7 +16,7 @@
Steel
- 10
+ 13
@@ -24,7 +24,7 @@
FSX
- 2
+ 3
@@ -32,7 +32,7 @@
Components
- 2
+ 3
@@ -52,7 +52,7 @@
make RPG-7 thermobaric grenades x5
Craft 5 RPG-7 thermobaric grenades.
Making RPG-7 thermobaric grenades.
- 30000
+ 15000
@@ -60,7 +60,7 @@
Steel
- 10
+ 13
@@ -68,7 +68,7 @@
FSX
- 7
+ 9
@@ -76,7 +76,7 @@
Components
- 2
+ 3
@@ -96,7 +96,7 @@
make RPG-7 frag grenades x5
Craft 5 RPG-7 frag grenades.
Making RPG-7 frag grenades.
- 30000
+ 15000
@@ -104,7 +104,7 @@
Steel
- 5
+ 7
@@ -112,7 +112,7 @@
FSX
- 1
+ 2
@@ -120,7 +120,7 @@
Components
- 2
+ 3
diff --git a/Defs/RecipeDefs_Ammo/Recipes_Shells.xml b/Defs/RecipeDefs_Ammo/Recipes_Shells.xml
new file mode 100644
index 0000000..85f7e9b
--- /dev/null
+++ b/Defs/RecipeDefs_Ammo/Recipes_Shells.xml
@@ -0,0 +1,248 @@
+
+
+
+
+
+
+ MakeArtilleryShell
+ make 81mm HE mortar shells x5
+ Craft 5 81mm HE mortar shells.
+ Making 81mm HE mortar shells.
+
+
+
+
+ Steel
+
+
+ 22
+
+
+
+
+ FSX
+
+
+ 5
+
+
+
+
+ Components
+
+
+ 2
+
+
+
+
+ Steel
+ FSX
+ Components
+
+
+
+ 5
+
+
+
+
+ MakeAmmo_81mmMortarShell_Incendiary
+ make 81mm incendiary mortar shells x5
+ Craft 5 81mm incendiary mortar shells.
+ Making 81mm incendiary mortar shells.
+
+
+
+
+ Steel
+
+
+ 22
+
+
+
+
+ Prometheum
+
+
+ 5
+
+
+
+
+ Components
+
+
+ 2
+
+
+
+
+ Steel
+ Prometheum
+ Components
+
+
+
+ 5
+
+
+
+
+ MakeAmmo_81mmMortarShell_EMP
+ make 81mm EMP mortar shells x5
+ Craft 5 81mm EMP mortar shells.
+ Making 81mm EMP mortar shells.
+
+
+
+
+ Steel
+
+
+ 22
+
+
+
+
+ Components
+
+
+ 7
+
+
+
+
+ Steel
+ Components
+
+
+
+ 5
+
+
+
+
+
+
+ MakeAmmo_90mmCannonShell_HEAT
+ make 90mm HEAT cannon shells x5
+ Craft 5 90mm HEAT cannon shells.
+ Making 90mm HEAT cannon shells.
+
+
+
+
+ Steel
+
+
+ 23
+
+
+
+
+ FSX
+
+
+ 3
+
+
+
+
+ Components
+
+
+ 3
+
+
+
+
+ Steel
+ FSX
+ Components
+
+
+
+ 5
+
+
+
+
+ MakeAmmo_90mmCannonShell_HE
+ make 90mm HE cannon shells x5
+ Craft 5 90mm HE cannon shells.
+ Making 90mm HE cannon shells.
+
+
+
+
+ Steel
+
+
+ 23
+
+
+
+
+ FSX
+
+
+ 5
+
+
+
+
+ Components
+
+
+ 2
+
+
+
+
+ Steel
+ FSX
+ Components
+
+
+
+ 5
+
+
+
+
+ MakeAmmo_90mmCannonShell_EMP
+ make 90mm EMP cannon shells x5
+ Craft 5 90mm EMP cannon shells.
+ Making 90mm EMP cannon shells.
+
+
+
+
+ Steel
+
+
+ 23
+
+
+
+
+ Components
+
+
+ 7
+
+
+
+
+ Steel
+ Components
+
+
+
+ 5
+
+
+
+
\ No newline at end of file
diff --git a/Defs/ResearchProjectDefs/ResearchProjects_Tier2_Misc.xml b/Defs/ResearchProjectDefs/ResearchProjects_Tier2_Misc.xml
index c8859a2..303302d 100644
--- a/Defs/ResearchProjectDefs/ResearchProjects_Tier2_Misc.xml
+++ b/Defs/ResearchProjectDefs/ResearchProjects_Tier2_Misc.xml
@@ -3,7 +3,7 @@
LargeRockets
- largerockets
+ large rockets
Allows you to build doomsday rocket launchers and triple rocket launchers, one-shot assault weapons that pack a massive punch.
2200
@@ -14,5 +14,20 @@
MultiAnalyzer
+
+
+ CR_TurretAI
+ automated turrets
+ Learn to construct and program basic auto-turrets.
+ 3000
+
+ Machining
+ MicroelectronicsBasics
+
+ HiTechResearchBench
+
+ MultiAnalyzer
+
+
\ No newline at end of file
diff --git a/Defs/StatDefs/Stats_Weapons_Ranged.xml b/Defs/StatDefs/Stats_Weapons_Ranged.xml
index 26d811a..53536a5 100644
--- a/Defs/StatDefs/Stats_Weapons_Ranged.xml
+++ b/Defs/StatDefs/Stats_Weapons_Ranged.xml
@@ -72,7 +72,7 @@
SwayFactor
weapon sway
- How difficult the gun is to keep steady. \n\nThe total sway is calculated as:\n(4.5 - shooting accuracy) * weapon sway factor\n\nAiming accuracy influences the the sway reduction during aimed shots. For example, at 75% aiming accuracy sway will be reduced to 25%.
+ How difficult the gun is to keep steady. \n\nThe total sway is calculated as:\n(4.5 - shooting accuracy) * weapon sway factor\n\nAiming accuracy influences the sway reduction during aimed shots. For example, at 75% aiming accuracy sway will be reduced to 25%.
Weapon
0
0
diff --git a/Defs/ThingCategoryDefs/ThingCategories_HighCaliber.xml b/Defs/ThingCategoryDefs/ThingCategories_HighCaliber.xml
index 68076ec..ed41395 100644
--- a/Defs/ThingCategoryDefs/ThingCategories_HighCaliber.xml
+++ b/Defs/ThingCategoryDefs/ThingCategories_HighCaliber.xml
@@ -13,4 +13,10 @@
AmmoHighCaliber
+
+ Ammo145x114mm
+ 14.5x114mm
+ AmmoHighCaliber
+
+
\ No newline at end of file
diff --git a/Defs/ThingCategoryDefs/ThingCategories_Shells.xml b/Defs/ThingCategoryDefs/ThingCategories_Shells.xml
new file mode 100644
index 0000000..fcf2949
--- /dev/null
+++ b/Defs/ThingCategoryDefs/ThingCategories_Shells.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ AmmoShells
+ shell
+ Ammo
+
+
+
+ Ammo81mmMortarShells
+ 81mm mortar shell
+ AmmoShells
+
+
+
+ Ammo90mmCannonShells
+ 90mm cannon shell
+ AmmoShells
+
+
+
\ No newline at end of file
diff --git a/Defs/ThingDefs/Apparel_Carrying.xml b/Defs/ThingDefs/Apparel_Carrying.xml
index ff02f39..eedbcca 100644
--- a/Defs/ThingDefs/Apparel_Carrying.xml
+++ b/Defs/ThingDefs/Apparel_Carrying.xml
@@ -70,7 +70,6 @@
0.1
- 1
60
@@ -122,7 +121,6 @@
30
- 1
60
diff --git a/Defs/ThingDefs/Apparel_Hats.xml b/Defs/ThingDefs/Apparel_Hats.xml
index 7e603fb..36017a5 100644
--- a/Defs/ThingDefs/Apparel_Hats.xml
+++ b/Defs/ThingDefs/Apparel_Hats.xml
@@ -172,10 +172,10 @@
100
0.1
0.30
- 2
- 4
- 2
- 0
+ 2
+ 4
+ 2
+ 0
-0.10
diff --git a/Defs/ThingDefs/Apparel_Shield.xml b/Defs/ThingDefs/Apparel_Shield.xml
index 0715252..f1c7dff 100644
--- a/Defs/ThingDefs/Apparel_Shield.xml
+++ b/Defs/ThingDefs/Apparel_Shield.xml
@@ -10,6 +10,7 @@
Things/Pawn/Humanlike/Apparel/PersonalShield/PersonalShield
Graphic_Single
+ Spacer
Normal
1200
diff --git a/Defs/ThingDefs/Apparel_Various.xml b/Defs/ThingDefs/Apparel_Various.xml
index 1d8b7c7..85a25ea 100644
--- a/Defs/ThingDefs/Apparel_Various.xml
+++ b/Defs/ThingDefs/Apparel_Various.xml
@@ -53,26 +53,23 @@
armor vest
A vest with armor plates inserted on the chest and back. Protects against gunfire.
Midworld
-
- UnfinishedTechArmor
-
Things/Pawn/Humanlike/Apparel/VestPlate/VestPlate
Graphic_Single
80
- Steeled
+ Steeled
9500
200
0.20
0.55
- 13
- 5
- 13
- 5
+ 13
+ 5
+ 13
+ 5
Apparel
diff --git a/Defs/ThingDefs/Kits_Turrets.xml b/Defs/ThingDefs/Kits_Turrets.xml
deleted file mode 100644
index 0041e12..0000000
--- a/Defs/ThingDefs/Kits_Turrets.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- MinifiedThing
- Item
- true
- true
- Item
-
- RealtimeOnly
-
-
-
- true
- false
- 15
-
-
-
- unspecified resource
-
- WeaponsTurrets
-
-
-
-
- TurretGun_Kit
- improvised turret
-
-
-
\ No newline at end of file
diff --git a/Defs/ThingDefs/Races_Mechanoid.xml b/Defs/ThingDefs/Races_Mechanoid.xml
index 9ff1337..220e731 100644
--- a/Defs/ThingDefs/Races_Mechanoid.xml
+++ b/Defs/ThingDefs/Races_Mechanoid.xml
@@ -58,11 +58,11 @@
Heavy combat mechanoids that glide on dozens of tiny legs. Their heavy armor and firepower makes them very effective against bunched-up static defenders. They are somewhat vulnerable to mobile hit-and-run tactics.
1.33
- 0.35
- 0.85
+ 0.40
+ 0.95
0
- 500
- 100
+ 200
+ 80
0.9
diff --git a/Defs/ThingDefs/Weapons_Artillery.xml b/Defs/ThingDefs/Weapons_Artillery.xml
index cdaf362..7207264 100644
--- a/Defs/ThingDefs/Weapons_Artillery.xml
+++ b/Defs/ThingDefs/Weapons_Artillery.xml
@@ -7,50 +7,72 @@
ThingWithComps
artillery error
Primary
+
+ Things/Item/Equipment/WeaponRanged/ChargeRifle
+ Graphic_Single
+
Never
Midworld
+ ArtilleryShellLoaded
CompEquippable
-
-
- (29,85)
- (72,300)
- (92,660)
-
+
+
+ (29,85)
+ (72,300)
+ (92,660)
+
+
+ 1
+ 150
+ true
+ AmmoSet_81mmMortarShell
+
+
+
+ Artillery_81mmMortar
+ 81mm mortar
+ Lobs mortar shells on a high arc. Very inaccurate but long-ranged and capable of indirect fire.
+ Spacer
+ True
+ True
+ Never
+
+ 1500
+ 0.5
+ 34
+
+
+ Artillery
+ Artillery_BaseDestroyer
+
+
+
+ Combat_Realism.Verb_ShootMortarCR
+ false
+ true
+ Bullet_81mmMortarShell_HE
+ 300
+ 32
+ 700
+ 1
+ Mortar_LaunchA
+ 16
+ 0.2
+
+
+
-
- Bullet_MortarIncendiary
- incendiary mortar shell
-
- Things/Projectile/ShellIncendiary
- Graphic_Single
- TransparentPostLight
-
- Projectile_Explosive
-
- Flame
- 50
- 100
- 4.5
- Puddle_Fuel
- 0.5
- true
- ArtilleryHitThickRoof
- MortarIncendiary_Explode
- MortarRound_PreImpact
- MortarRound_Ambient
-
-
Artillery_MortarIncendiary
incendiary mortar
@@ -61,7 +83,7 @@
Never
1500
- 0.5
+ 0.5
10
@@ -73,10 +95,10 @@
Combat_Realism.Verb_ShootMortarCR
false
true
- Bullet_MortarIncendiary
+ Bullet_81mmMortarShell_Incendiary
10
true
- 500
+ 300
32
700
1
@@ -90,40 +112,6 @@
-
- Bullet_MortarBomb
- explosive mortar shell
-
- Things/Projectile/ShellBomb
- Graphic_Single
- TransparentPostLight
-
- Combat_Realism.ProjectileCR_Explosive
-
- Bomb
- 150
- 100
- 1
- true
- ArtilleryHitThickRoof
- MortarRound_PreImpact
- MortarRound_Ambient
-
-
-
- 100
- Bomb
- 3
- MortarBomb_Explode
-
- 450
- 270
- 90
-
- 10
-
-
-
Artillery_MortarBomb
explosive mortar
@@ -134,7 +122,7 @@
Never
1500
- 0.5
+ 0.5
34
@@ -146,9 +134,9 @@
Combat_Realism.Verb_ShootMortarCR
false
true
- Bullet_MortarBomb
+ Bullet_81mmMortarShell_HE
10
- 500
+ 300
32
700
1
@@ -161,34 +149,6 @@
-
- Bullet_MortarEMP
- EMP mortar bomb
-
- Things/Projectile/ShellEMP
- Graphic_Single
- TransparentPostLight
-
- Projectile_Explosive
-
- EMP
- 80
- 100
- 6
- true
- ArtilleryHitThickRoof
- MortarRound_PreImpact
- MortarRound_Ambient
-
-
-
- 20
- Electrical
- 8.5
- MortarEMP_Explode
-
-
-
Artillery_MortarEMP
EMP mortar
@@ -199,7 +159,7 @@
Never
1500
- 0.5
+ 0.5
34
@@ -210,9 +170,9 @@
Combat_Realism.Verb_ShootMortarCR
false
true
- Bullet_MortarEMP
+ Bullet_81mmMortarShell_EMP
10
- 500
+ 300
32
700
1
diff --git a/Defs/ThingDefs/Weapons_Grenades.xml b/Defs/ThingDefs/Weapons_Grenades.xml
index dd84035..a2dfa64 100644
--- a/Defs/ThingDefs/Weapons_Grenades.xml
+++ b/Defs/ThingDefs/Weapons_Grenades.xml
@@ -67,16 +67,16 @@
80
60
-
+
4.0
-
- 225
- 150
- 45
-
+
+ 225
+ 150
+ 45
+
-
+
@@ -107,7 +107,7 @@
Combat_Realism.Verb_ShootCROneUse
true
10.0
- 90
+ 60
4
true
ThrowGrenade
@@ -170,7 +170,7 @@
Combat_Realism.Verb_ShootCROneUse
true
10
- 90
+ 60
4
true
true
@@ -237,7 +237,7 @@
Combat_Realism.Verb_ShootCROneUse
true
10
- 90
+ 60
4
false
ThrowGrenade
@@ -275,7 +275,7 @@
Weapon_GrenadeFlashbang
Primary
flashbang grenade
- Electromagnetic pulse grenades damaging to electronic equipment.
+ Pyrotechnic charge designed to produce a blinding flash of light and loud noise, temporarily blinding and disorienting anyone nearby.
Things/Ammo/HandGrenades/Flashbang
Graphic_StackCount
@@ -299,7 +299,7 @@
Combat_Realism.Verb_ShootCROneUse
true
10
- 90
+ 60
4
false
ThrowGrenade
diff --git a/Defs/ThingDefs/Weapons_Guns.xml b/Defs/ThingDefs/Weapons_Guns.xml
index 8962f9e..07cda62 100644
--- a/Defs/ThingDefs/Weapons_Guns.xml
+++ b/Defs/ThingDefs/Weapons_Guns.xml
@@ -105,8 +105,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_45ACP_FMJ
@@ -156,8 +154,6 @@
- (0.0, 0.0)
- (0.0, 0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_12Gauge_Buck
@@ -210,8 +206,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_303British_FMJ
@@ -262,8 +256,8 @@
- (0.0, 0.32)
- (0.0, 0.96)
+ Regular
+ 0.96
Combat_Realism.Verb_ShootCR
true
Bullet_556x45mmNATO_FMJ
@@ -317,8 +311,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_762x51mmNATO_FMJ
@@ -372,8 +364,8 @@
- (0.0, 0.10)
- (0.0, 0.29)
+ Regular
+ 0.19
Combat_Realism.Verb_ShootCR
true
Bullet_9x19mmPara_FMJ
@@ -386,18 +378,21 @@
9
-
-
- 32
- 240
- AmmoSet_9x19mmPara
-
-
- 3
- FALSE
- FALSE
-
-
+
+
+ 32
+ 240
+ AmmoSet_9x19mmPara
+
+
+ 3
+ FALSE
+ FALSE
+
+
+
+ CR_SMG
+
@@ -428,8 +423,8 @@
- (0.0, 0.23)
- (0.0, 0.70)
+ Regular
+ 0.47
Combat_Realism.Verb_ShootCR
true
Bullet_45ACP_FMJ
@@ -442,18 +437,21 @@
9
-
-
- 20
- 240
- AmmoSet_45ACP
-
-
- 3
- FALSE
- FALSE
-
-
+
+
+ 20
+ 240
+ AmmoSet_45ACP
+
+
+ 3
+ FALSE
+ FALSE
+
+
+
+ CR_SMG
+
@@ -483,8 +481,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_30x64mmFuel_Incendiary
@@ -531,9 +527,9 @@
1600
0.50
0.08
- 2.60
- 11.00
- 9.00
+ 3.42
+ 13.97
+ 9.12
1
@@ -545,25 +541,28 @@
- (-0.07,0.22)
- (-0.22,0.67)
+ Mounted
+ 0.36
Combat_Realism.Verb_ShootCR
true
- Bullet_762x51mmNATO_FMJ
- 180
+ Bullet_762x54mmR_FMJ
+ 95
113
- 5
- 20
+ 7
+ 10
ShotMinigun
GunTail_Medium
9
+
+ true
+
- 100
- 600
- AmmoSet_762x51mmNATO
+ 47
+ 420
+ AmmoSet_762x54mmR
5
@@ -590,7 +589,7 @@
1600
0.50
0.05
- 1.20
+ 1.40
11.00
3.50
0.4
@@ -609,8 +608,8 @@
- (0.0, 0.25)
- (0.0, 0.75)
+ Regular
+ 0.59
Combat_Realism.Verb_ShootCR
true
Bullet_6x24mmCharged
@@ -631,8 +630,8 @@
3
- TRUE
- TRUE
+ TRUE
+ TRUE
@@ -644,7 +643,6 @@
-
@@ -719,13 +730,13 @@
- (-0.30,0.30)
- (-0.30,0.90)
+ Mounted
+ 0.90
Combat_Realism.Verb_ShootCR
true
Bullet_762x51mmNATO_FMJ
2.4
- 180
+ 240
107
300
1
@@ -734,17 +745,17 @@
9
-
-
- 600
- 60
- AmmoSet_762x51mmNATO
-
-
- FALSE
- TRUE
-
-
+
+
+ 600
+ 300
+ AmmoSet_762x51mmNATO
+
+
+ FALSE
+ TRUE
+
+
@@ -801,8 +812,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCROneUse
true
Bullet_DoomsdayRocket
@@ -881,8 +890,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCROneUse
true
Bullet_Rocket
@@ -904,9 +911,9 @@
1
- FALSE
- TRUE
- true
+ FALSE
+ TRUE
+ true
@@ -942,13 +949,13 @@
- (-0.18,0.18)
- (-0.18,0.54)
+ Mounted
+ 0.54
Combat_Realism.Verb_ShootCR
true
Bullet_12x64mmCharged
2.9
- 120
+ 180
93
5
20
@@ -960,7 +967,7 @@
100
- 60
+ 300
AmmoSet_12x64mmCharged
@@ -998,14 +1005,12 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_80x256mmFuel_Thermobaric
3.5
true
- 180
+ 240
80
1
InfernoCannon_Fire
@@ -1015,12 +1020,13 @@
- 0
- AmmoSet_80x256mmFuel
+ 1
+ 270
+ AmmoSet_80x256mmFuel
- FALSE
- TRUE
+ FALSE
+ TRUE
@@ -1052,8 +1058,6 @@
- (0.0,0.0)
- (0.0,0.0)
Combat_Realism.Verb_ShootCR
true
Bullet_5x35mmCharged
@@ -1068,11 +1072,11 @@
0
- AmmoSet_5x35mmCharged
+ AmmoSet_5x35mmCharged
- FALSE
- TRUE
+ FALSE
+ TRUE
diff --git a/Defs/ThingDefs/Weapons_RangedNeolithic.xml b/Defs/ThingDefs/Weapons_RangedNeolithic.xml
index aa18625..b361b67 100644
--- a/Defs/ThingDefs/Weapons_RangedNeolithic.xml
+++ b/Defs/ThingDefs/Weapons_RangedNeolithic.xml
@@ -73,21 +73,6 @@
-
- Arrow_Short
- shortbow arrow
-
- Things/Projectile/Arrow_Small
- Graphic_Single
-
-
- false
- Arrow
- 10
- 44
- 0.15
-
-
Bow_Short
short bow
@@ -104,8 +89,8 @@
1200
60
0.35
- 2
- 1
+ 1
+ 2
3.00
2.00
1
@@ -125,18 +110,15 @@
Combat_Realism.Verb_ShootCR
true
- Projectile_Arrow
+ Projectile_Arrow_Stone
60
- 27
+ 23
BowSmall
- 1
- 30
AmmoSet_Arrow
- false
false
@@ -146,21 +128,6 @@
-
- Pilum_Thrown
- pilum (thrown)
-
- Things/Projectile/Pilum
- Graphic_Single
-
-
- false
- Stab
- 16
- 26
- 0.25
-
-
Pila
pilum
@@ -177,7 +144,7 @@
1400
- 90
+ 3.7
0.25
2.5
2
@@ -202,24 +169,10 @@
-
-
-
-
- Arrow_Great
- greatbow arrow
-
- Things/Projectile/Arrow_Small
- Graphic_Single
-
-
- false
- Arrow
- 13
- 49
- 0.2
-
-
+
+
+
+
Bow_Great
great bow
@@ -236,8 +189,8 @@
1700
110
0.35
- 2
- 1
+ 1
+ 2
5.00
2.00
1
@@ -250,22 +203,19 @@
Combat_Realism.Verb_ShootCR
true
- Projectile_GreatArrow
+ Projectile_GreatArrow_Stone
80
- 27
+ 30
BowGreat
- 1
- 30
- AmmoSet_GreatArrow
- false
+ AmmoSet_GreatArrow
- false
- false
+ false
+ false
diff --git a/Defs/ThingDefs/Weapons_Spotting.xml b/Defs/ThingDefs/Weapons_Spotting.xml
index d98c469..82087d7 100644
--- a/Defs/ThingDefs/Weapons_Spotting.xml
+++ b/Defs/ThingDefs/Weapons_Spotting.xml
@@ -29,8 +29,10 @@
10500
650
- 1.25
+ 1.25
0.5
+ 1.5
+ 3.00
100
@@ -44,10 +46,10 @@
600
107
0
- true
-
- true
-
+ true
+
+ true
+
diff --git a/Defs/ThingDefs_Ammo/Ammo_Advanced.xml b/Defs/ThingDefs_Ammo/Ammo_Advanced.xml
index ec41ebe..08335c8 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Advanced.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Advanced.xml
@@ -19,15 +19,19 @@
true
false
15
-
- CR_Ammo
-
- Sellable
+
+ CR_Ammo
+
+ Sellable
+
+
+ true
+
-
+
Container holding fuel for incendiary shot firearms.
0.3
@@ -40,6 +44,7 @@
Ammo30x64mmFuelCell
+ 75
@@ -50,7 +55,7 @@
Graphic_StackCount
- 1.13
+ 1.52
Bullet_30x64mmFuel_Incendiary
IncendiaryFuel
@@ -64,7 +69,7 @@
Graphic_StackCount
- 1.6
+ 2.16
Bullet_30x64mmFuel_Thermobaric
ThermobaricFuel
@@ -78,7 +83,7 @@
Graphic_StackCount
- 0.52
+ 0.61
Bullet_30x64mmFuel_Foam
FoamFuel
@@ -87,7 +92,7 @@
-
+
Large fuel container for incendiary shot cannons.
3.0
@@ -96,6 +101,7 @@
Ammo80x128mmFuelCell
+ 25
@@ -106,7 +112,7 @@
Graphic_StackCount
- 10.88
+ 28.98
Bullet_80x256mmFuel_Thermobaric
ThermobaricFuel
@@ -114,7 +120,7 @@
-
+
Charged shot ammo used by advanced assault rifle designs.
0.01
@@ -137,7 +143,7 @@
Graphic_StackCount
- 0.49
+ 0.97
Bullet_6x24mmCharged
Charged
@@ -151,7 +157,7 @@
Graphic_StackCount
- 0.49
+ 0.97
Bullet_6x24mmCharged_AP
ChargedAP
@@ -165,7 +171,7 @@
Graphic_StackCount
- 0.49
+ 0.97
Bullet_6x24mmCharged_Ion
Ionized
@@ -174,7 +180,7 @@
-
+
Mechanoid-built charged shot ammo designed for high-velocity fire and armor penetration.
0.012
@@ -193,7 +199,7 @@
Graphic_StackCount
- 0.59
+ 1.28
Bullet_5x35mmCharged
Charged
@@ -201,15 +207,16 @@
-
+
Mechanoid-built high-caliber charged shot ammo used in heavy weapons.
0.1
- 0.1
+ 0.14
Ammo12x64mmCharged
+ 200
@@ -220,7 +227,7 @@
Graphic_StackCount
- 2.96
+ 3.09
Bullet_12x64mmCharged
Charged
diff --git a/Defs/ThingDefs_Ammo/Ammo_Grenades.xml b/Defs/ThingDefs_Ammo/Ammo_Grenades.xml
index fb884a4..1443ba9 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Grenades.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Grenades.xml
@@ -16,6 +16,7 @@
Ammo30x29mmGrenades
+ 75
@@ -26,7 +27,7 @@
Graphic_StackCount
- 1.07
+ 1.73
Bullet_30x29mmGrenade_HE
GrenadeHE
@@ -40,7 +41,7 @@
Graphic_StackCount
- 1.07
+ 2.07
Bullet_30x29mmGrenade_EMP
GrenadeEMP
@@ -61,6 +62,7 @@
Ammo40x46mmGrenades
+ 75
@@ -71,7 +73,7 @@
Graphic_StackCount
- 1.49
+ 2.19
Bullet_40x46mmGrenade_HE
GrenadeHE
@@ -85,7 +87,7 @@
Graphic_StackCount
- 2.02
+ 2.65
Bullet_40x46mmGrenade_EMP
GrenadeEMP
diff --git a/Defs/ThingDefs_Ammo/Ammo_HighCaliber.xml b/Defs/ThingDefs_Ammo/Ammo_HighCaliber.xml
index 4fdb7c6..5fb6d93 100644
--- a/Defs/ThingDefs_Ammo/Ammo_HighCaliber.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_HighCaliber.xml
@@ -3,19 +3,20 @@
-
+
Large caliber bullet used by many heavy machine guns and anti-materiel rifles.
0.11
- 0.1
+ 0.15
-
- CR_AutoEnableTrade
- CR_AutoEnableCrafting
-
+
+ CR_AutoEnableTrade
+ CR_AutoEnableCrafting
+
Ammo50BMG
+ 200
@@ -26,7 +27,7 @@
Graphic_StackCount
- 0.40
+ 0.51
Bullet_50BMG_FMJ
FullMetalJacket
@@ -40,7 +41,7 @@
Graphic_StackCount
- 0.40
+ 0.48
Bullet_50BMG_Sabot
Sabot
@@ -54,7 +55,7 @@
Graphic_StackCount
- 0.52
+ 0.71
Bullet_50BMG_HE
ExplosiveAP
@@ -68,10 +69,70 @@
Graphic_StackCount
- 0.47
+ 0.67
Bullet_50BMG_Incendiary
IncendiaryAP
+
+
+
+
+ Old-school anti-tank cartridge originally designed for AT rifles, it is also used by a number of heavy machine guns.
+
+ 0.2
+ 0.25
+
+
+ CR_AutoEnableTrade
+ CR_AutoEnableCrafting
+
+
+ Ammo145x114mm
+
+ 200
+
+
+
+ Ammo_145x114mm_FMJ
+ 14.5x114mm cartridge (FMJ)
+
+ Things/Ammo/HighCaliber/FMJ
+ Graphic_StackCount
+
+
+ 0.92
+
+ Bullet_145x114mm_FMJ
+ FullMetalJacket
+
+
+
+ Ammo_145x114mm_HE
+ 14.5x114mm cartridge (HE)
+
+ Things/Ammo/HighCaliber/HE
+ Graphic_StackCount
+
+
+ 1.13
+
+ Bullet_145x114mm_HE
+ ExplosiveAP
+
+
+
+ Ammo_145x114mm_Incendiary
+ 14.5x114mm cartridge (AP-I)
+
+ Things/Ammo/HighCaliber/Incendiary
+ Graphic_StackCount
+
+
+ 1.06
+
+ Bullet_145x114mm_Incendiary
+ IncendiaryAP
+
\ No newline at end of file
diff --git a/Defs/ThingDefs_Ammo/Ammo_Neolithic.xml b/Defs/ThingDefs_Ammo/Ammo_Neolithic.xml
index 9e57b9a..acd7160 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Neolithic.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Neolithic.xml
@@ -9,26 +9,53 @@
0.11
0.11
-
- CR_AutoEnableTrade
-
AmmoArrows
+ 200
- Ammo_Arrow
- arrow
+ Ammo_Arrow_Stone
+ arrow (stone)
- Things/Ammo/Neolithic/Arrow
+ Things/Ammo/Neolithic/Arrow/Stone
Graphic_StackCount
- 0.07
+ 0.17
- Projectile_Arrow
- StoneArrow
+ Projectile_Arrow_Stone
+ StoneArrow
+
+
+
+ Ammo_Arrow_Steel
+ arrow (steel)
+
+ Things/Ammo/Neolithic/Arrow/Steel
+ Graphic_StackCount
+
+
+ 0.38
+
+ Projectile_Arrow_Steel
+ SteelArrow
+
+
+
+ Ammo_Arrow_Plasteel
+ arrow (plasteel)
+
+ Things/Ammo/Neolithic/Arrow/Plasteel
+ Graphic_StackCount
+
+
+ 3.32
+
+ Projectile_Arrow_Plasteel
+ PlasteelArrow
+ false
@@ -39,26 +66,53 @@
0.17
0.17
-
- CR_AutoEnableTrade
-
AmmoGreatArrows
+ 200
- Ammo_GreatArrow
+ Ammo_GreatArrow_Stone
great arrow
- Things/Ammo/Neolithic/Arrow
+ Things/Ammo/Neolithic/Arrow/Stone
Graphic_StackCount
0.11
- Projectile_GreatArrow
+ Projectile_GreatArrow_Stone
StoneArrow
+
+ Ammo_GreatArrow_Steel
+ great arrow (steel)
+
+ Things/Ammo/Neolithic/Arrow/Steel
+ Graphic_StackCount
+
+
+ 0.52
+
+ Projectile_GreatArrow_Steel
+ SteelArrow
+
+
+
+ Ammo_GreatArrow_Plasteel
+ great arrow (plasteel)
+
+ Things/Ammo/Neolithic/Arrow/Plasteel
+ Graphic_StackCount
+
+
+ 3.46
+
+ Projectile_GreatArrow_Plasteel
+ PlasteelArrow
+ false
+
+
\ No newline at end of file
diff --git a/Defs/ThingDefs_Ammo/Ammo_Pistols.xml b/Defs/ThingDefs_Ammo/Ammo_Pistols.xml
index 971d605..3cf6aae 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Pistols.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Pistols.xml
@@ -3,7 +3,7 @@
-
+
Ammo_40Rimfire
.40 Rimfire cartridge
Ultra-light cartridge for use in derringer pistols.
@@ -19,7 +19,7 @@
Graphic_StackCount
- 0.01
+ 0.02
0.012
0.01
@@ -29,16 +29,16 @@
-
+
Low caliber handgun cartridge lacking in stopping power.
0.01
0.02
-
- CR_AutoEnableTrade
- CR_AutoEnableCrafting
-
+
+ CR_AutoEnableTrade
+ CR_AutoEnableCrafting
+
Ammo32ACP
@@ -52,7 +52,7 @@
Graphic_StackCount
- 0.02
+ 0.05
Bullet_32ACP_FMJ
FullMetalJacket
@@ -88,7 +88,7 @@
-
+
Common pistol cartridge used by a variety of handguns and SMGs.
0.01
@@ -111,7 +111,7 @@
Graphic_StackCount
- 0.02
+ 0.05
Bullet_762x25mmTokarev_FMJ
FullMetalJacket
@@ -125,7 +125,7 @@
Graphic_StackCount
- 0.03
+ 0.06
Bullet_762x25mmTokarev_AP
ArmorPiercing
@@ -139,7 +139,7 @@
Graphic_StackCount
- 0.03
+ 0.06
Bullet_762x25mmTokarev_HP
HollowPoint
@@ -147,7 +147,7 @@
-
+
Common pistol cartridge used by a variety of handguns and SMGs.
0.012
@@ -170,7 +170,7 @@
Graphic_StackCount
- 0.04
+ 0.06
Bullet_9x19mmPara_FMJ
FullMetalJacket
@@ -184,7 +184,7 @@
Graphic_StackCount
- 0.05
+ 0.07
Bullet_9x19mmPara_AP
ArmorPiercing
@@ -198,7 +198,7 @@
Graphic_StackCount
- 0.05
+ 0.07
Bullet_9x19mmPara_HP
HollowPoint
@@ -206,7 +206,7 @@
-
+
Pistol cartridge favoured for its above average stopping power.
0.02
@@ -229,7 +229,7 @@
Graphic_StackCount
- 0.07
+ 0.09
Bullet_45ACP_FMJ
FullMetalJacket
@@ -243,7 +243,7 @@
Graphic_StackCount
- 0.09
+ 0.10
Bullet_45ACP_AP
ArmorPiercing
@@ -257,7 +257,7 @@
Graphic_StackCount
- 0.09
+ 0.10
Bullet_45ACP_HP
HollowPoint
@@ -265,7 +265,7 @@
-
+
Ancient pistol cartridge originally designed for revolvers.
0.02
@@ -288,7 +288,7 @@
Graphic_StackCount
- 0.07
+ 0.09
Bullet_45Colt_FMJ
FullMetalJacket
@@ -302,7 +302,7 @@
Graphic_StackCount
- 0.09
+ 0.10
Bullet_45Colt_AP
ArmorPiercing
@@ -316,7 +316,7 @@
Graphic_StackCount
- 0.09
+ 0.10
Bullet_45Colt_HP
HollowPoint
diff --git a/Defs/ThingDefs_Ammo/Ammo_Rifles.xml b/Defs/ThingDefs_Ammo/Ammo_Rifles.xml
index 90f177e..8961fac 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Rifles.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Rifles.xml
@@ -3,7 +3,7 @@
-
+
Small, high-velocity rifle bullet used in a variety of assault rifles.
0.012
@@ -26,7 +26,7 @@
Graphic_StackCount
- 0.04
+ 0.06
Bullet_556x45mmNATO_FMJ
FullMetalJacket
@@ -40,7 +40,7 @@
Graphic_StackCount
- 0.05
+ 0.07
Bullet_556x45mmNATO_AP
ArmorPiercing
@@ -54,7 +54,7 @@
Graphic_StackCount
- 0.05
+ 0.07
Bullet_556x45mmNATO_HP
HollowPoint
@@ -62,7 +62,7 @@
-
+
Intermediate rifle cartridge used by certain older assault rifles.
0.016
@@ -85,7 +85,7 @@
Graphic_StackCount
- 0.06
+ 0.07
Bullet_762x39mmSoviet_FMJ
FullMetalJacket
@@ -121,7 +121,7 @@
-
+
Large rifle bullet found mostly in outdated bolt-action firearms.
0.022
@@ -144,7 +144,7 @@
Graphic_StackCount
- 0.08
+ 0.10
Bullet_303British_FMJ
FullMetalJacket
@@ -158,7 +158,7 @@
Graphic_StackCount
- 0.10
+ 0.11
Bullet_303British_AP
ArmorPiercing
@@ -172,7 +172,7 @@
Graphic_StackCount
- 0.10
+ 0.11
Bullet_303British_HP
HollowPoint
@@ -180,7 +180,7 @@
-
+
Large rifle bullet used in machine guns, sniper rifles and the occasional assault rifle.
0.025
@@ -203,7 +203,7 @@
Graphic_StackCount
- 0.09
+ 0.12
Bullet_762x51mmNATO_FMJ
FullMetalJacket
@@ -217,7 +217,7 @@
Graphic_StackCount
- 0.11
+ 0.13
Bullet_762x51mmNATO_AP
ArmorPiercing
@@ -231,7 +231,7 @@
Graphic_StackCount
- 0.11
+ 0.13
Bullet_762x51mmNATO_HP
HollowPoint
@@ -239,7 +239,7 @@
-
+
Rimmed rifle cartridge used by many machine guns, bolt-action and sniper rifles.
0.022
@@ -262,7 +262,7 @@
Graphic_StackCount
- 0.08
+ 0.10
Bullet_762x54mmR_FMJ
FullMetalJacket
@@ -276,7 +276,7 @@
Graphic_StackCount
- 0.10
+ 0.11
Bullet_762x54mmR_AP
ArmorPiercing
@@ -290,7 +290,7 @@
Graphic_StackCount
- 0.10
+ 0.11
Bullet_762x54mmR_HP
HollowPoint
diff --git a/Defs/ThingDefs_Ammo/Ammo_Rockets.xml b/Defs/ThingDefs_Ammo/Ammo_Rockets.xml
index a6e91d7..754730d 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Rockets.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Rockets.xml
@@ -4,7 +4,7 @@
- Relatively small, low velocity grenade for use in grenade launchers.
+ Rocket-propelled grenade designed for the RPG-7 launcher. After being fired a rocket motor kicks in to propel the grenade further.
CR_AutoEnableTrade
CR_AutoEnableCrafting
@@ -23,7 +23,7 @@
Graphic_StackCount
- 12.94
+ 23.23
2.6
4
@@ -39,7 +39,7 @@
Graphic_StackCount
- 24.70
+ 37.03
4.5
6
@@ -55,7 +55,7 @@
Graphic_StackCount
- 24.70
+ 18.17
4.5
6
diff --git a/Defs/ThingDefs_Ammo/Ammo_Shells.xml b/Defs/ThingDefs_Ammo/Ammo_Shells.xml
new file mode 100644
index 0000000..289289f
--- /dev/null
+++ b/Defs/ThingDefs_Ammo/Ammo_Shells.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+ Low-velocity shell designed to be fired from a mortar.
+
+ Ammo81mmMortarShells
+
+ 25
+ Stockable
+
+
+
+ ArtilleryShell
+ 81mm mortar shell (HE)
+
+ Things/Ammo/Mortar/HE
+ Graphic_Single
+
+
+ 28.52
+ 4.24
+ 5
+
+ Bullet_81mmMortarShell_HE
+ GrenadeHE
+
+
+
+ Ammo_81mmMortarShell_Incendiary
+ 81mm mortar shell (Incendiary)
+
+ Things/Ammo/Mortar/Incendiary
+ Graphic_Single
+
+
+ 23.92
+ 4.1
+ 5.5
+
+ Bullet_81mmMortarShell_Incendiary
+ GrenadeIncendiary
+
+
+
+ Ammo_81mmMortarShell_EMP
+ 81mm mortar shell (EMP)
+
+ Things/Ammo/Mortar/EMP
+ Graphic_Single
+
+
+ 19.78
+ 4.5
+ 6
+
+ Bullet_81mmMortarShell_EMP
+ GrenadeEMP
+
+
+
+
+
+ Relatively small cannon shell.
+
+ Ammo90mmCannonShells
+
+ 25
+
+ CR_AutoEnableTrade
+ CR_AutoEnableCrafting
+
+
+ 4.6
+ 7
+
+
+
+
+ Ammo_90mmCannonShell_HEAT
+ 90mm cannon shell (HEAT)
+
+ Things/Ammo/Cannon/HEAT
+ Graphic_Single
+
+
+ 27.83
+
+ Bullet_90mmCannonShell_HEAT
+ RocketHEAT
+
+
+
+ Ammo_90mmCannonShell_HE
+ 90mm cannon shell (HE)
+
+ Things/Ammo/Cannon/HE
+ Graphic_Single
+
+
+ 28.98
+
+ Bullet_90mmCannonShell_HE
+ GrenadeHE
+
+
+
+ Ammo_90mmCannonShell_EMP
+ 90mm cannon shell (EMP)
+
+ Things/Ammo/Cannon/EMP
+ Graphic_Single
+
+
+ 34.73
+
+ Bullet_90mmCannonShell_EMP
+ GrenadeEMP
+
+
+
\ No newline at end of file
diff --git a/Defs/ThingDefs_Ammo/Ammo_Shells.xml.todo b/Defs/ThingDefs_Ammo/Ammo_Shells.xml.todo
deleted file mode 100644
index fbb25df..0000000
--- a/Defs/ThingDefs_Ammo/Ammo_Shells.xml.todo
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Defs/ThingDefs_Ammo/Ammo_Shotgun.xml b/Defs/ThingDefs_Ammo/Ammo_Shotgun.xml
index f6944ca..46a397b 100644
--- a/Defs/ThingDefs_Ammo/Ammo_Shotgun.xml
+++ b/Defs/ThingDefs_Ammo/Ammo_Shotgun.xml
@@ -3,7 +3,7 @@
-
+
Low caliber shotgun shell. Its small diameter allows it to be fired from many of the same firearms as the .45 Colt cartridge.
0.06
@@ -16,6 +16,7 @@
Ammo410Bore
+ 200
@@ -34,7 +35,7 @@
-
+
Extremely common shotgun caliber used in almost every application, from hunting over riot control to military firearms.
0.08
@@ -47,6 +48,7 @@
Ammo12Gauge
+ 200
@@ -57,7 +59,7 @@
Graphic_StackCount
- 0.19
+ 0.23
Bullet_12Gauge_Buck
BuckShot
@@ -71,7 +73,7 @@
Graphic_StackCount
- 0.19
+ 0.23
Bullet_12Gauge_Bird
BirdShot
@@ -86,7 +88,7 @@
0.1
- 0.24
+ 0.30
Bullet_12Gauge_Slug
Slug
@@ -101,7 +103,7 @@
Graphic_StackCount
- 0.16
+ 0.18
Bullet_12Gauge_Beanbag
Beanbag
@@ -115,7 +117,7 @@
Graphic_StackCount
- 0.47
+ 0.48
Bullet_12Gauge_ElectroSlug
ElectroSlug
diff --git a/Defs/ThingDefs_Ammo/Projectiles_Advanced.xml b/Defs/ThingDefs_Ammo/Projectiles_Advanced.xml
index ae2fd4a..e579074 100644
--- a/Defs/ThingDefs_Ammo/Projectiles_Advanced.xml
+++ b/Defs/ThingDefs_Ammo/Projectiles_Advanced.xml
@@ -117,7 +117,7 @@
Bullet_6x24mmCharged
charge shot
- 15
+ 11
Bomb_Secondary
@@ -132,7 +132,7 @@
Bullet_6x24mmCharged_AP
charge shot (Conc.)
- 15
+ 11
Bomb_Secondary
@@ -147,7 +147,7 @@
Bullet_6x24mmCharged_Ion
charge shot (Ion)
- 15
+ 11
Electrical
@@ -175,7 +175,7 @@
Bullet
- 14
+ 10
260
@@ -183,7 +183,7 @@
3
- 1.0
+ 0.95
@@ -199,12 +199,12 @@
Bullet
- 30
+ 25
220
Bomb_Secondary
- 25
+ 15
1.2
diff --git a/Defs/ThingDefs_Ammo/Projectiles_Grenades.xml b/Defs/ThingDefs_Ammo/Projectiles_Grenades.xml
index 40a7d05..cc8f54a 100644
--- a/Defs/ThingDefs_Ammo/Projectiles_Grenades.xml
+++ b/Defs/ThingDefs_Ammo/Projectiles_Grenades.xml
@@ -4,6 +4,7 @@
+ Combat_Realism.ProjectileCR_Explosive
Things/Projectile/Bullet_Big
Graphic_Single
@@ -54,6 +55,7 @@
+ Combat_Realism.ProjectileCR_Explosive
Things/Projectile/Bullet_Big
Graphic_Single
diff --git a/Defs/ThingDefs_Ammo/Projectiles_HighCaliber.xml b/Defs/ThingDefs_Ammo/Projectiles_HighCaliber.xml
index 8e2df6d..84b5f03 100644
--- a/Defs/ThingDefs_Ammo/Projectiles_HighCaliber.xml
+++ b/Defs/ThingDefs_Ammo/Projectiles_HighCaliber.xml
@@ -64,6 +64,59 @@
+
+
+
+
+
+
+ Things/Projectile/Bullet_Big
+ Graphic_Single
+
+
+ Bullet
+ 186
+
+
+
+
+ Bullet_145x114mm_FMJ
+ 14.5x114mm bullet (FMJ)
+
+ 50
+ 1.1
+
+
+
+
+ Bullet_145x114mm_HE
+ 14.5x114mm bullet (HE)
+
+ 30
+ 1.1
+
+
+ Bomb_Secondary
+ 30
+
+
+
+
+
+
+ Bullet_145x114mm_Incendiary
+ 14.5x114mm bullet (AP-I)
+
+ 45
+ 1.3
+
+
+ Flame_Secondary
+ 5
+
+
+
+
diff --git a/Defs/ThingDefs_Ammo/Projectiles_Neolithic.xml b/Defs/ThingDefs_Ammo/Projectiles_Neolithic.xml
index 0f625b8..bff906a 100644
--- a/Defs/ThingDefs_Ammo/Projectiles_Neolithic.xml
+++ b/Defs/ThingDefs_Ammo/Projectiles_Neolithic.xml
@@ -12,16 +12,34 @@
Arrow
- 88
+ 44
- Projectile_Arrow
- arrow
+ Projectile_Arrow_Stone
+ arrow (stone)
- 10
- 0.1
+ 11
+ 0.15
+
+
+
+
+ Projectile_Arrow_Steel
+ arrow (steel)
+
+ 11
+ 0.20
+
+
+
+
+ Projectile_Arrow_Plasteel
+ arrow (plasteel)
+
+ 11
+ 0.25
@@ -34,16 +52,34 @@
Arrow
- 98
+ 49
+
+
+
+
+ Projectile_GreatArrow_Stone
+ great arrow (stone)
+
+ 15
+ 0.2
+
+
+
+
+ Projectile_GreatArrow_Steel
+ great arrow (steel)
+
+ 15
+ 0.275
- Projectile_GreatArrow
- arrow
+ Projectile_GreatArrow_Plasteel
+ great arrow (plasteel)
- 12
- 0.15
+ 15
+ 0.35
@@ -58,9 +94,9 @@
Stab
- 14
- 52
- 0.20
+ 16
+ 26
+ 0.3
diff --git a/Defs/ThingDefs_Ammo/Projectiles_Rockets.xml b/Defs/ThingDefs_Ammo/Projectiles_Rockets.xml
index 0bdd19d..e428167 100644
--- a/Defs/ThingDefs_Ammo/Projectiles_Rockets.xml
+++ b/Defs/ThingDefs_Ammo/Projectiles_Rockets.xml
@@ -13,13 +13,13 @@
Bullet_RPG7Grenade_HEAT
RPG-7 grenade (HEAT)
- Things/Projectile/RPG/HEAT
- Graphic_Single
-
+ Things/Projectile/RPG/HEAT
+ Graphic_Single
+
Bullet
150
- 10
+ 10
@@ -35,9 +35,9 @@
Bullet_RPG7Grenade_Thermobaric
RPG-7 grenade (Thermobaric)
- Things/Projectile/RPG/Thermobaric
- Graphic_Single
-
+ Things/Projectile/RPG/Thermobaric
+ Graphic_Single
+
Thermobaric
200
diff --git a/Defs/ThingDefs_Ammo/Projectiles_Shells.xml b/Defs/ThingDefs_Ammo/Projectiles_Shells.xml
new file mode 100644
index 0000000..f8ec824
--- /dev/null
+++ b/Defs/ThingDefs_Ammo/Projectiles_Shells.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+ Combat_Realism.ProjectileCR_Explosive
+
+ TransparentPostLight
+
+
+ 100
+ ArtilleryHitThickRoof
+ MortarRound_PreImpact
+ MortarRound_Ambient
+ true
+
+
+
+
+ Bullet_81mmMortarShell_HE
+ 81mm mortar shell (HE)
+
+ Things/Projectile/Mortar/HE
+ Graphic_Single
+
+
+ Bomb
+ 150
+ 100
+ 1
+ MortarBomb_Explode
+
+
+
+ 100
+ Bomb
+ 2.5
+
+ 450
+ 270
+ 90
+
+ 10
+
+
+
+
+
+ Bullet_81mmMortarShell_Incendiary
+ 81mm mortar shell (Incendiary)
+
+ Things/Projectile/Mortar/Incendiary
+ Graphic_Single
+
+
+ Flame
+ 50
+ 100
+ 3.5
+ Puddle_Fuel
+ 0.5
+ MortarIncendiary_Explode
+
+
+
+
+ Bullet_81mmMortarShell_EMP
+ 81mm mortar shell (EMP)
+
+ Things/Projectile/Mortar/EMP
+ Graphic_Single
+
+
+ EMP
+ 80
+ 5
+
+
+
+ 20
+ Electrical
+ 5
+ MortarEMP_Explode
+
+
+
+
+
+
+
+
+ TransparentPostLight
+
+
+ 160
+ MortarBomb_Explode
+
+
+
+
+ Bullet_90mmCannonShell_HEAT
+ 90mm cannon shell (HEAT)
+
+ Things/Projectile/Cannon/HEAT
+ Graphic_Single
+
+
+ Bullet
+ 200
+
+
+
+ 50
+ Bomb
+ 1.5
+
+ 50
+ 25
+ 10
+
+ 7.5
+ MortarBomb_Explode
+
+
+
+
+
+ Bullet_90mmCannonShell_HE
+ 90mm cannon shell (HE)
+ Combat_Realism.ProjectileCR_Explosive
+
+ Things/Projectile/Cannon/HE
+ Graphic_Single
+
+
+ Bomb
+ 150
+ 1
+
+
+
+ 100
+ Bomb
+ 2.5
+
+ 350
+ 300
+ 100
+
+ 10
+ MortarBomb_Explode
+
+
+
+
+
+ Bullet_90mmCannonShell_EMP
+ 90mm cannon shell (EMP)
+ Combat_Realism.ProjectileCR_Explosive
+
+ Things/Projectile/Cannon/EMP
+ Graphic_Single
+
+
+ EMP
+ 80
+ 5
+
+
+
+ 20
+ Electrical
+ 5
+ MortarEMP_Explode
+
+
+
+
+
+
diff --git a/Defs/ThingDefs_Buildings/Buildings_Exotic.xml b/Defs/ThingDefs_Buildings/Buildings_Exotic.xml
index 1cede3e..0a482b1 100644
--- a/Defs/ThingDefs_Buildings/Buildings_Exotic.xml
+++ b/Defs/ThingDefs_Buildings/Buildings_Exotic.xml
@@ -18,7 +18,7 @@
Thermobaric
- 5
+ 2.5
Bullet
diff --git a/Defs/ThingDefs_Buildings/Buildings_Natural.xml b/Defs/ThingDefs_Buildings/Buildings_Natural.xml
index d5e5748..ea9594b 100644
--- a/Defs/ThingDefs_Buildings/Buildings_Natural.xml
+++ b/Defs/ThingDefs_Buildings/Buildings_Natural.xml
@@ -9,7 +9,11 @@
Bomb
- 2
+ 2.5
+
+
+ Thermobaric
+ 2.5
Bullet
diff --git a/Defs/ThingDefs_Buildings/Buildings_Production.xml b/Defs/ThingDefs_Buildings/Buildings_Production.xml
new file mode 100644
index 0000000..ca2efb5
--- /dev/null
+++ b/Defs/ThingDefs_Buildings/Buildings_Production.xml
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+ true
+ 0.20
+
+
+
+ AmmoBench
+ loading bench
+ Building_WorkTable
+ A workstation for handloading ammo.
+
+ Things/Building/AmmoBench/ammobench
+ Graphic_Multi
+ CutoutComplex
+ (3.5,1.5)
+
+ Damage/Corner
+ Damage/Corner
+ Damage/Corner
+ Damage/Corner
+
+
+
+ Metallic
+ Woody
+
+ 100
+
+ 50
+ 5
+
+ Waist
+ 0.5
+ True
+
+ 3000
+ 180
+ 1.0
+ -2
+
+ (3,1)
+ Production
+ PassThroughOnly
+ 70
+ True
+ (0,0,-1)
+ Item
+
+ ITab_Bills
+
+
+
+
+ ToolCabinet
+
+
+
+
+ BillsTab
+
+ Machining
+
+ PlaceWorker_ShowFacilitiesConnections
+
+
+
+
+ TableMachining
+ machining table
+ Building_WorkTable
+ A work station for assembling and disassembling machinery such as guns or mechanoid corpses.
+
+ Things/Building/Production/TableMachining
+ Graphic_Multi
+ (3.5,1.5)
+
+ Damage/Corner
+ Damage/Corner
+ Damage/Corner
+ Damage/Corner
+
+
+
+ 150
+ 5
+
+ Waist
+ 0.5
+ True
+
+ 3000
+ 180
+ 1.0
+ -2
+
+ (3,1)
+ Production
+ PassThroughOnly
+ 70
+ True
+ (0,0,-1)
+ Item
+
+ ButcherCorpseMechanoid
+
+
+ ITab_Bills
+
+
+
+ CompPowerTrader
+ true
+ 350
+
+
+
+ 5
+ (73,123,138,0)
+
+
+
+ ToolCabinet
+
+
+
+
+
+ BillsTab
+
+ ConstructMetal
+ Machining
+ I
+
+ PlaceWorker_ShowFacilitiesConnections
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Defs/ThingDefs_Buildings/Buildings_Security.xml b/Defs/ThingDefs_Buildings/Buildings_Security.xml
index cb003d5..18923e4 100644
--- a/Defs/ThingDefs_Buildings/Buildings_Security.xml
+++ b/Defs/ThingDefs_Buildings/Buildings_Security.xml
@@ -54,8 +54,8 @@
TurretGun
- improvised turret
- Building_TurretGun
+ auto-turret
+ Combat_Realism.Building_TurretGunCR
Things/Building/Security/TurretImprovised
Graphic_Single
@@ -64,20 +64,20 @@
(0.2,0.2,0.6,0.6)
+ Stockable
Waist
100
1.0
- 2500
+ 20000
-60
+ 16
+ 20
Normal
- TurretGun_Kit
+ MinifiedTurretGun
-
- 3.9
- Bomb
-
+
CompPowerTrader
@@ -86,37 +86,57 @@
- An improvised turret that automatically fires at nearby enemies. Explodes when damaged. Its hacked-together AI brain isn't very smart, and can't be directly controlled, so beware of friendly fire.
+ An AI-controlled turret that automatically fires at nearby enemies.
PassThroughOnly
50
- 0.4
+ 0.75
true
true
- Metallic
+ Steeled
75
100
- 3
+ 10
+
+ SmithingSpeed
+ Crafting
+ Smith
+ Recipe_Smith
+
+ TableMachining
+
+ UnfinishedTurretGun
+ CR_TurretAI
+
+
+ Crafting
+ 10
+
+
+
Light
- 25.9
+ 27
true
Gun_TurretImprovised
- 410
+ 90
Things/Building/Security/TurretImprovised_Top
U
+
+ CR_Turret
+
-
-
-
- Turret_MortarBomb
- mortar
- Building_TurretGun
+
+
+
+ 81mm mortar
+ A mortar that launches explosive shells. Must be manned.
+ Combat_Realism.Building_TurretGunCR
Things/Building/Security/TurretMortarBase
Graphic_Single
@@ -142,7 +162,6 @@
Violent
- A mortar that launches explosive shells. Must be manned. Explodes when damaged.
(2,2)
PassThroughOnly
50
@@ -156,151 +175,63 @@
150
Light
- Security
- Artillery_MortarBomb
+ Artillery_81mmMortar
ArtilleryShell
300
- 450
+ 300
Things/Building/Security/TurretMortarBomb_Top
+
+
+ PlaceWorker_NotUnderRoof
+
+ Mortars
+ Security
+
+
+
+
+
+ Turret_MortarBomb
+
Artillery
Artillery_BaseDestroyer
I
-
- PlaceWorker_NotUnderRoof
-
- Mortars
-
+
+
Turret_MortarIncendiary
- incendiary mortar
- Building_TurretGun
-
- Things/Building/Security/TurretMortarBase
- Graphic_Single
- (4,4)
-
- (0.38,0.2,0.56375,0.8)
- Damage/Corner
-
-
- Waist
- True
- (0,0,-1)
-
- 180
- 1.0
- 2700
- -60
-
- Normal
-
-
-
- Violent
-
-
- A mortar that launches incendiary shells. Must be manned. Explodes when damaged.
- (2,2)
- PassThroughOnly
- 50
- 0.4
- true
-
- Metallic
-
- 100
-
- 150
-
- Light
- Security
- Artillery_MortarIncendiary
- ArtilleryShell
- 300
- 450
- Things/Building/Security/TurretMortarIncendiary_Top
+ Artillery_81mmMortar
Artillery
Artillery_BaseDestroyer
- O
-
- PlaceWorker_NotUnderRoof
-
- Mortars
+ true
+ CommunityCoreLibraryResearchLocker
-
+
+
Turret_MortarEMP
- EMP mortar
- Building_TurretGun
-
- Things/Building/Security/TurretMortarBase
- Graphic_Single
- (4,4)
-
- (0.38,0.2,0.56375,0.8)
- Damage/Corner
-
-
- Waist
- True
- (0,0,-1)
-
- 180
- 1.0
- 2700
- -60
-
- Normal
-
-
-
- Violent
-
-
- A mortar that launches EMP bombs. Must be manned. Explodes when damaged.
- (2,2)
- PassThroughOnly
- 50
- 0.4
- true
-
- Metallic
-
- 100
-
- 150
-
- Light
- Security
- Artillery_MortarEMP
- ArtilleryShell
- 300
- 450
- Things/Building/Security/TurretMortarEMP_Top
+ Artillery_81mmMortar
Artillery
- P
-
- PlaceWorker_NotUnderRoof
-
- Mortars
+ true
+ CommunityCoreLibraryResearchLocker
diff --git a/Defs/ThingDefs_Items/Items_Resource_Manufactured.xml b/Defs/ThingDefs_Items/Items_Resource_Manufactured.xml
index 1d8fd7a..a14add5 100644
--- a/Defs/ThingDefs_Items/Items_Resource_Manufactured.xml
+++ b/Defs/ThingDefs_Items/Items_Resource_Manufactured.xml
@@ -91,6 +91,7 @@
+
diff --git a/Defs/ThingDefs_Items/Items_Unfinished.xml b/Defs/ThingDefs_Items/Items_Unfinished.xml
new file mode 100644
index 0000000..67b2cee
--- /dev/null
+++ b/Defs/ThingDefs_Items/Items_Unfinished.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+ UnfinishedThing
+ Item
+ Unfinished thing
+
+ Things/Item/Unfinished/UnfinishedSculpture
+ Graphic_Single
+
+ Item
+ true
+ true
+ true
+ Never
+ RealtimeOnly
+
+
+ 50
+
+
+
+
+ true
+ false
+ 15
+
+ Unfinished
+
+
+ Metallic
+ Woody
+ Stony
+
+
+
+
+ UnfinishedTurretGun
+ Unfinished turret gun
+
+ Things/Item/Unfinished/UnfinishedGun
+ Graphic_Single
+
+
+ Metallic
+
+
+
+
+
+
+
+ MinifiedThing
+ Item
+ true
+ true
+ Item
+
+ RealtimeOnly
+
+
+
+ true
+ false
+ 15
+
+
+
+ MinifiedTurretGun
+ improvised turret
+
+ WeaponsTurrets
+
+
+ 16
+ 20
+
+
+
+
+
\ No newline at end of file
diff --git a/Defs/ThingDefs_LoadoutGen/LoadoutGen_Mercenary.xml b/Defs/ThingDefs_LoadoutGen/LoadoutGen_Mercenary.xml
index b7396a1..a2257f4 100644
--- a/Defs/ThingDefs_LoadoutGen/LoadoutGen_Mercenary.xml
+++ b/Defs/ThingDefs_LoadoutGen/LoadoutGen_Mercenary.xml
@@ -6,8 +6,8 @@
Loadout Generator - Merc ammo
0
- 150
- 300
+ 60
+ 120
0
@@ -17,8 +17,8 @@
Loadout Generator - Merc ammo double
0
- 300
- 600
+ 120
+ 240
0
@@ -29,7 +29,7 @@
0
6
- 30
+ 24
40
@@ -88,7 +88,7 @@
0
15
- 40
+ 30
20
@@ -98,8 +98,8 @@
Loadout Generator - Merc sidearm SMG ammo
0
- 100
- 200
+ 50
+ 100
20
diff --git a/Defs/ThingDefs_LoadoutGen/LoadoutGen_Outlander.xml b/Defs/ThingDefs_LoadoutGen/LoadoutGen_Outlander.xml
index bfbc379..076cc77 100644
--- a/Defs/ThingDefs_LoadoutGen/LoadoutGen_Outlander.xml
+++ b/Defs/ThingDefs_LoadoutGen/LoadoutGen_Outlander.xml
@@ -6,8 +6,8 @@
Loadout Generator - Outlander ammo
0
- 50
- 100
+ 20
+ 40
0
diff --git a/Defs/ThingDefs_LoadoutGen/LoadoutGen_Tribal.xml b/Defs/ThingDefs_LoadoutGen/LoadoutGen_Tribal.xml
index 12fc88e..f1881de 100644
--- a/Defs/ThingDefs_LoadoutGen/LoadoutGen_Tribal.xml
+++ b/Defs/ThingDefs_LoadoutGen/LoadoutGen_Tribal.xml
@@ -6,8 +6,8 @@
Loadout Generator - Tribal ammo
0
- 50
- 150
+ 30
+ 100
10
@@ -18,8 +18,8 @@
0
Pila
- 2
- 5
+ 1
+ 3
10
diff --git a/Defs/ThinkTreeDefs/Humanlike.xml b/Defs/ThinkTreeDefs/Humanlike.xml
new file mode 100644
index 0000000..bc7f66b
--- /dev/null
+++ b/Defs/ThinkTreeDefs/Humanlike.xml
@@ -0,0 +1,229 @@
+
+
+
+
+ Humanlike
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Downed
+
+
+ BurningResponse
+
+
+ MentalStateCritical
+
+
+
+
+
+
+
+ MentalStateNonCritical
+
+
+
+
+ Humanlike_PostMentalState
+
+
+
+
+
+
+
+
+
+
+
+ HighPriority
+
+
+ LordDuty
+
+
+
+
+
+
+ Humanlike_PostDuty
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Walk
+
+
+
+
+ Deadly
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ MediumPriority
+
+
+ LordDuty
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ Humanlike_PreMain
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Humanlike_PostMain
+
+
+
+
+
+
+ Idle
+
+
+ None
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+ Walk
+
+
+
+
+
+
+
+ Deadly
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Defs/ThinkTreeDefs/SubTrees_CR.xml b/Defs/ThinkTreeDefs/SubTrees_CR.xml
index 2aaf369..f6df0dc 100644
--- a/Defs/ThinkTreeDefs/SubTrees_CR.xml
+++ b/Defs/ThinkTreeDefs/SubTrees_CR.xml
@@ -31,6 +31,7 @@
+
diff --git a/Defs/WorkGiverDefs/WorkGivers.xml b/Defs/WorkGiverDefs/WorkGivers.xml
new file mode 100644
index 0000000..1398431
--- /dev/null
+++ b/Defs/WorkGiverDefs/WorkGivers.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ ReloadTurrets
+ reload turrets
+ Combat_Realism.WorkGiver_ReloadTurret
+ Hauling
+ reload
+ reloading
+ 500
+
+ Manipulation
+
+
+
+
+ DoBillsAmmoBench
+ make ammo
+ WorkGiver_DoBill
+ Smithing
+ 60
+
+ AmmoBench
+
+ produce ammo
+ producing ammo at
+
+ Manipulation
+
+
+
+
\ No newline at end of file
diff --git a/Languages/English/Keyed/Keys.xml b/Languages/English/Keyed/Keys.xml
index 3fef2f7..0f0bb05 100644
--- a/Languages/English/Keyed/Keys.xml
+++ b/Languages/English/Keyed/Keys.xml
@@ -8,6 +8,7 @@
Reloaded!
Suppressed!
+ Reloading
Auto
Burst
diff --git a/Source/CombatRealism/Combat_Realism.csproj b/Source/CombatRealism/Combat_Realism.csproj
index a34362b..9f12d0e 100644
--- a/Source/CombatRealism/Combat_Realism.csproj
+++ b/Source/CombatRealism/Combat_Realism.csproj
@@ -68,16 +68,21 @@
+
+
+
+
+
@@ -111,6 +116,7 @@
+
@@ -144,7 +150,8 @@
-
+
+
diff --git a/Source/CombatRealism/Combat_Realism/AmmoInjector.cs b/Source/CombatRealism/Combat_Realism/AmmoInjector.cs
index 29a335f..cddd727 100644
--- a/Source/CombatRealism/Combat_Realism/AmmoInjector.cs
+++ b/Source/CombatRealism/Combat_Realism/AmmoInjector.cs
@@ -19,7 +19,7 @@ private static ThingDef ammoCraftingStation
get
{
if (ammoCraftingStationInt == null)
- ammoCraftingStationInt = ThingDef.Named("TableMachining");
+ ammoCraftingStationInt = ThingDef.Named("AmmoBench");
return ammoCraftingStationInt;
}
}
@@ -30,7 +30,7 @@ public override bool Inject()
Utility.allWeaponDefs.Clear();
foreach (ThingDef def in DefDatabase.AllDefsListForReading)
{
- if (def.IsWeapon && (def.canBeSpawningInventory || def.tradeability == Tradeability.Stockable))
+ if (def.IsWeapon && (def.canBeSpawningInventory || def.tradeability == Tradeability.Stockable || def.weaponTags.Contains("TurretGun")))
Utility.allWeaponDefs.Add(def);
}
if (Utility.allWeaponDefs.NullOrEmpty())
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompAmmoUser.cs b/Source/CombatRealism/Combat_Realism/Comps/CompAmmoUser.cs
index 2f0f170..dc2f7ad 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompAmmoUser.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompAmmoUser.cs
@@ -20,6 +20,8 @@ public class CompAmmoUser : CommunityCoreLibrary.CompRangedGizmoGiver
private AmmoDef currentAmmoInt = null;
public AmmoDef selectedAmmo;
+ public Building_TurretGunCR turret; // Cross-linked from CR turret
+
#endregion
#region Properties
@@ -45,7 +47,14 @@ public CompEquippable compEquippable
}
public Pawn wielder
{
- get { return compEquippable.PrimaryVerb.CasterPawn; }
+ get
+ {
+ if (compEquippable == null || compEquippable.PrimaryVerb == null)
+ {
+ return null;
+ }
+ return compEquippable.PrimaryVerb.CasterPawn;
+ }
}
public bool useAmmo
{
@@ -78,6 +87,15 @@ public CompInventory compInventory
return wielder.TryGetComp();
}
}
+ private IntVec3 position
+ {
+ get
+ {
+ if (wielder != null) return wielder.Position;
+ else if (turret != null) return turret.Position;
+ else return parent.Position;
+ }
+ }
#endregion
@@ -87,7 +105,7 @@ public override void Initialize(CompProperties vprops)
{
base.Initialize(vprops);
- curMagCountInt = Props.magazineSize;
+ curMagCountInt = Props.spawnUnloaded ? 0 : Props.magazineSize;
// Initialize ammo with default if none is set
if (useAmmo)
@@ -98,7 +116,7 @@ public override void Initialize(CompProperties vprops)
}
else
{
- if(currentAmmoInt == null)
+ if (currentAmmoInt == null)
currentAmmoInt = (AmmoDef)Props.ammoSet.ammoTypes[0];
if (selectedAmmo == null)
selectedAmmo = currentAmmoInt;
@@ -109,7 +127,6 @@ public override void Initialize(CompProperties vprops)
public override void PostExposeData()
{
base.PostExposeData();
-
Scribe_Values.LookValue(ref curMagCountInt, "count", 0);
Scribe_Defs.LookDef(ref currentAmmoInt, "currentAmmo");
Scribe_Defs.LookDef(ref selectedAmmo, "selectedAmmo");
@@ -132,9 +149,9 @@ private void AssignJobToWielder(Job job)
///
public bool TryReduceAmmoCount()
{
- if (wielder == null)
+ if (wielder == null && turret == null)
{
- return false;
+ Log.Error(parent.ToString() + " tried reducing its ammo count without a wielder");
}
// Mag-less weapons feed directly from inventory
@@ -154,6 +171,7 @@ public bool TryReduceAmmoCount()
ammo.Destroy();
compInventory.UpdateInventory();
+ if (!hasAmmo) DoOutOfAmmoAction();
}
return true;
}
@@ -169,21 +187,26 @@ public bool TryReduceAmmoCount()
{
compInventory.UpdateInventory();
}
+ if (curMagCountInt <= 0) TryStartReload();
return true;
}
- public void StartReload()
+ public void TryStartReload()
{
- if (wielder == null)
+ if (!hasMagazine)
{
- Log.ErrorOnce("Wielder of " + parent + " is null!", 7381889);
- FinishReload();
return;
}
-
- if (!hasMagazine)
+ IntVec3 position;
+ if (wielder == null)
{
- return;
+ if (turret == null) return;
+ turret.isReloading = true;
+ position = turret.Position;
+ }
+ else
+ {
+ position = wielder.Position;
}
if (useAmmo)
@@ -197,17 +220,16 @@ public void StartReload()
if (compInventory != null)
{
- compInventory.UpdateInventory();
compInventory.container.TryAdd(ammoThing, ammoThing.stackCount);
}
else
{
Thing outThing;
- GenThing.TryDropAndSetForbidden(ammoThing, wielder.Position, ThingPlaceMode.Near, out outThing, true);
+ GenThing.TryDropAndSetForbidden(ammoThing, position, ThingPlaceMode.Near, out outThing, turret.Faction != Faction.OfColony);
}
}
// Check for ammo
- if (!hasAmmo)
+ if (wielder != null && !hasAmmo)
{
this.DoOutOfAmmoAction();
return;
@@ -217,85 +239,97 @@ public void StartReload()
// Throw mote
if (Props.throwMote)
{
- MoteThrower.ThrowText(wielder.Position.ToVector3Shifted(), "CR_ReloadingMote".Translate());
+ MoteThrower.ThrowText(position.ToVector3Shifted(), "CR_ReloadingMote".Translate());
}
// Issue reload job
- var reloadJob = new Job(DefDatabase.GetNamed("ReloadWeapon"), wielder, parent)
+ if (wielder != null)
{
- playerForced = true
- };
+ var reloadJob = new Job(DefDatabase.GetNamed("ReloadWeapon"), wielder, parent)
+ {
+ playerForced = true
+ };
- // Store the current job so we can reassign it later
- if (this.wielder.Faction == Faction.OfColony
- && this.wielder.CurJob != null
- && (this.wielder.CurJob.def == JobDefOf.AttackStatic || this.wielder.CurJob.def == JobDefOf.Goto || wielder.CurJob.def == JobDefOf.Hunt))
- {
- this.storedTarget = this.wielder.CurJob.targetA.HasThing ? new TargetInfo(this.wielder.CurJob.targetA.Thing) : new TargetInfo(this.wielder.CurJob.targetA.Cell);
- this.storedJobDef = this.wielder.CurJob.def;
- }
- else
- {
- storedTarget = null;
- storedJobDef = null;
+ // Store the current job so we can reassign it later
+ if (this.wielder.Faction == Faction.OfColony
+ && this.wielder.CurJob != null
+ && (this.wielder.CurJob.def == JobDefOf.AttackStatic || this.wielder.CurJob.def == JobDefOf.Goto || wielder.CurJob.def == JobDefOf.Hunt))
+ {
+ this.storedTarget = this.wielder.CurJob.targetA.HasThing ? new TargetInfo(this.wielder.CurJob.targetA.Thing) : new TargetInfo(this.wielder.CurJob.targetA.Cell);
+ this.storedJobDef = this.wielder.CurJob.def;
+ }
+ else
+ {
+ storedTarget = null;
+ storedJobDef = null;
+ }
+ this.AssignJobToWielder(reloadJob);
}
- this.AssignJobToWielder(reloadJob);
}
private void DoOutOfAmmoAction()
{
- if(Props.throwMote)
- MoteThrower.ThrowText(wielder.Position.ToVector3Shifted(), "CR_OutOfAmmo".Translate() + "!");
- if (compInventory != null)
- compInventory.SwitchToNextViableWeapon();
- if (wielder != null && wielder.jobs != null)
- wielder.jobs.StopAll();
+ if (Props.throwMote)
+ {
+ MoteThrower.ThrowText(position.ToVector3Shifted(), "CR_OutOfAmmo".Translate() + "!");
+ }
+ if (wielder != null && compInventory != null && (wielder.jobs == null || wielder.CurJob.def != JobDefOf.Hunt)) compInventory.SwitchToNextViableWeapon();
}
- public void FinishReload()
+ public void LoadAmmo(Thing ammo = null)
{
- if (wielder == null)
+ if (wielder == null && turret == null)
{
+ Log.Error(parent.ToString() + " tried loading ammo with no owner");
return;
}
+ int newMagCount;
if (useAmmo)
{
- // Check for inventory
- if (compInventory != null)
+ Thing ammoThing;
+ bool ammoFromInventory = false;
+ if (ammo == null)
{
- Thing ammoThing;
- this.TryFindAmmoInInventory(out ammoThing);
-
- if (ammoThing == null)
+ if (!TryFindAmmoInInventory(out ammoThing))
{
this.DoOutOfAmmoAction();
return;
}
- currentAmmoInt = (AmmoDef)ammoThing.def;
- if (Props.magazineSize < ammoThing.stackCount)
+ ammoFromInventory = true;
+ }
+ else
+ {
+ ammoThing = ammo;
+ }
+ currentAmmoInt = (AmmoDef)ammoThing.def;
+ if (Props.magazineSize < ammoThing.stackCount)
+ {
+ newMagCount = Props.magazineSize;
+ ammoThing.stackCount -= Props.magazineSize;
+ if(compInventory != null) compInventory.UpdateInventory();
+ }
+ else
+ {
+ newMagCount = ammoThing.stackCount;
+ if (ammoFromInventory)
{
- curMagCountInt = Props.magazineSize;
- ammoThing.stackCount -= Props.magazineSize;
- compInventory.UpdateInventory();
+ compInventory.container.Remove(ammoThing);
}
- else
+ else if (!ammoThing.Destroyed)
{
- curMagCountInt = ammoThing.stackCount;
- compInventory.container.Remove(ammoThing);
+ ammoThing.Destroy();
}
}
}
else
{
- curMagCountInt = Props.magazineSize;
- }
- if (parent.def.soundInteract != null)
- parent.def.soundInteract.PlayOneShot(SoundInfo.InWorld(wielder.Position));
- if (Props.throwMote)
- {
- MoteThrower.ThrowText(wielder.Position.ToVector3Shifted(), "CR_ReloadedMote".Translate());
+ newMagCount = Props.magazineSize;
}
+ curMagCountInt = newMagCount;
+ if (turret != null) turret.isReloading = false;
+ if (parent.def.soundInteract != null) parent.def.soundInteract.PlayOneShot(SoundInfo.InWorld(position));
+ if (Props.throwMote) MoteThrower.ThrowText(position.ToVector3Shifted(), "CR_ReloadedMote".Translate());
}
private bool TryFindAmmoInInventory(out Thing ammoThing)
@@ -344,12 +378,16 @@ public override IEnumerable CompGetGizmosExtra()
var ammoStatusGizmo = new GizmoAmmoStatus { compAmmo = this };
yield return ammoStatusGizmo;
- if (this.wielder != null)
+ if ((this.wielder != null && wielder.Faction == Faction.OfColony) || (turret != null && turret.Faction == Faction.OfColony))
{
+ Action action = null;
+ if (wielder != null) action = TryStartReload;
+ else if (turret != null && turret.GetMannableComp() != null) action = turret.OrderReload;
+
var reloadCommandGizmo = new Command_Reload
{
compAmmo = this,
- action = this.StartReload,
+ action = action,
defaultLabel = hasMagazine ? "CR_ReloadLabel".Translate() : "",
defaultDesc = "CR_ReloadDesc".Translate(),
icon = this.currentAmmo == null ? ContentFinder.Get("UI/Buttons/Reload", true) : CommunityCoreLibrary.Def_Extensions.IconTexture(this.selectedAmmo)
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompExplosiveCR.cs b/Source/CombatRealism/Combat_Realism/Comps/CompExplosiveCR.cs
index c625479..41bf37a 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompExplosiveCR.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompExplosiveCR.cs
@@ -31,18 +31,20 @@ public virtual void Explode(Thing instigator)
{
// Regular explosion stuff
if(this.Props.explosionRadius > 0 && this.Props.explosionDamage > 0)
- GenExplosion.DoExplosion(this.parent.Position,
- Props.explosionRadius,
- Props.explosionDamageDef,
- this.parent,
- Props.soundExplode == null ? Props.explosionDamageDef.soundExplosion : Props.soundExplode,
- this.parent.def,
- this.parent.def,
- Props.postExplosionSpawnThingDef,
- Props.explosionSpawnChance,
- Props.damageAdjacentTiles,
- Props.preExplosionSpawnThingDef,
- Props.explosionSpawnChance);
+ {
+ Explosion explosion = (Explosion)GenSpawn.Spawn(ThingDefOf.Explosion, parent.Position);
+ explosion.radius = Props.explosionRadius;
+ explosion.damType = Props.explosionDamageDef;
+ explosion.instigator = instigator;
+ explosion.damAmount = GenMath.RoundRandom(Props.explosionDamage);
+ explosion.source = parent.def;
+ explosion.preExplosionSpawnThingDef = Props.preExplosionSpawnThingDef;
+ explosion.preExplosionSpawnChance = Props.explosionSpawnChance;
+ explosion.postExplosionSpawnThingDef = Props.postExplosionSpawnThingDef;
+ explosion.postExplosionSpawnChance = Props.explosionSpawnChance;
+ explosion.applyDamageToExplosionCellsNeighbors = Props.damageAdjacentTiles;
+ explosion.ExplosionStart(Props.soundExplode == null ? Props.explosionDamageDef.soundExplosion : Props.soundExplode);
+ }
// Fragmentation stuff
if (!Props.fragments.NullOrEmpty())
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompFireModes.cs b/Source/CombatRealism/Combat_Realism/Comps/CompFireModes.cs
index e2a4b66..6267e22 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompFireModes.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompFireModes.cs
@@ -108,9 +108,10 @@ private void InitAvailableFireModes()
{
this.availableFireModes.Add(FireMode.SingleFire);
}
+ if (Props.noSnapshot) availableAimModes.Remove(AimMode.Snapshot);
// Sanity check in case def changed
- if (!this.availableFireModes.Contains(this.currentFireModeInt))
+ if (!this.availableFireModes.Contains(this.currentFireModeInt) || !availableAimModes.Contains(currentAimMode))
{
this.ResetModes();
}
@@ -146,26 +147,34 @@ public override IEnumerable CompGetGizmosExtra()
{
if (this.casterPawn != null && this.casterPawn.Faction.Equals(Faction.OfColony))
{
- var toggleFireModeGizmo = new Command_Action
+ foreach(Command com in GenerateGizmos())
{
- action = this.ToggleFireMode,
- defaultLabel = ("CR_" + this.currentFireMode.ToString() + "Label").Translate(),
- defaultDesc = "CR_ToggleFireModeDesc".Translate(),
- icon = ContentFinder.Get(("UI/Buttons/" + this.currentFireMode.ToString()), true)
- };
- yield return toggleFireModeGizmo;
-
- var toggleAimModeGizmo = new Command_Action
- {
- action = this.ToggleAimMode,
- defaultLabel = ("CR_" + this.currentAimMode.ToString() + "Label").Translate(),
- defaultDesc = "CR_ToggleAimModeDesc".Translate(),
- icon = ContentFinder.Get(("UI/Buttons/" + this.currentAimMode.ToString()), true)
- };
- yield return toggleAimModeGizmo;
+ yield return com;
+ }
}
}
+ public IEnumerable GenerateGizmos()
+ {
+ var toggleFireModeGizmo = new Command_Action
+ {
+ action = this.ToggleFireMode,
+ defaultLabel = ("CR_" + this.currentFireMode.ToString() + "Label").Translate(),
+ defaultDesc = "CR_ToggleFireModeDesc".Translate(),
+ icon = ContentFinder.Get(("UI/Buttons/" + this.currentFireMode.ToString()), true)
+ };
+ yield return toggleFireModeGizmo;
+
+ var toggleAimModeGizmo = new Command_Action
+ {
+ action = this.ToggleAimMode,
+ defaultLabel = ("CR_" + this.currentAimMode.ToString() + "Label").Translate(),
+ defaultDesc = "CR_ToggleAimModeDesc".Translate(),
+ icon = ContentFinder.Get(("UI/Buttons/" + this.currentAimMode.ToString()), true)
+ };
+ yield return toggleAimModeGizmo;
+ }
+
public override string GetDescriptionPart()
{
StringBuilder stringBuilder = new StringBuilder();
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompInventory.cs b/Source/CombatRealism/Combat_Realism/Comps/CompInventory.cs
index 4886073..493ff08 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompInventory.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompInventory.cs
@@ -255,7 +255,7 @@ public bool CanFitInInventory(Thing thing, out int count, bool ignoreEquipment =
return count > 0;
}
- private void GetEquipmentStats(ThingWithComps eq, out float weight, out float bulk)
+ public static void GetEquipmentStats(ThingWithComps eq, out float weight, out float bulk)
{
weight = eq.GetStatValue(StatDef.Named("Weight"));
bulk = eq.GetStatValue(StatDef.Named("Bulk"));
@@ -282,14 +282,17 @@ public void SwitchToNextViableWeapon(bool useFists = true)
// Cycle through available ranged weapons
foreach(ThingWithComps gun in rangedWeaponListCached)
{
- CompAmmoUser compAmmo = gun.TryGetComp();
- if (compAmmo == null
- || !compAmmo.useAmmo
- || compAmmo.curMagCount > 0
- || compAmmo.hasAmmo)
+ if(parentPawn.equipment == null || parentPawn.equipment.Primary != gun)
{
- newEq = gun;
- break;
+ CompAmmoUser compAmmo = gun.TryGetComp();
+ if (compAmmo == null
+ || !compAmmo.useAmmo
+ || compAmmo.curMagCount > 0
+ || compAmmo.hasAmmo)
+ {
+ newEq = gun;
+ break;
+ }
}
}
// If no ranged weapon was found, use first available melee weapons
@@ -401,21 +404,6 @@ public override void CompTick()
container.Remove(container.Last());
}
}
- /*
-#if DEBUG
- // Debug validation - checks to make sure the inventory cache is being refreshed properly
- if(ticksToInitLoadout <= 2)
- {
- float lastWeight = this.currentWeightCached;
- float lastBulk = this.currentBulkCached;
- this.UpdateInventory();
- if (lastWeight != this.currentWeightCached || lastBulk != this.currentBulkCached)
- {
- Log.Error(this.parent.ToString() + " failed inventory validation");
- }
- }
-#endif
-*/
}
}
}
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompProperties_AmmoUser.cs b/Source/CombatRealism/Combat_Realism/Comps/CompProperties_AmmoUser.cs
index 9b4179f..9fa7ee1 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompProperties_AmmoUser.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompProperties_AmmoUser.cs
@@ -14,6 +14,7 @@ public class CompProperties_AmmoUser : CompProperties
public int reloadTicks = 300;
public bool throwMote = true;
public AmmoSetDef ammoSet = null;
+ public bool spawnUnloaded = false;
public CompProperties_AmmoUser()
{
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompProperties_FireModes.cs b/Source/CombatRealism/Combat_Realism/Comps/CompProperties_FireModes.cs
index 5490710..3f96475 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompProperties_FireModes.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompProperties_FireModes.cs
@@ -14,6 +14,7 @@ public class CompProperties_FireModes : CompProperties
public bool aiUseAimMode = false;
public bool aiUseBurstMode = false;
public bool noSingleShot = false;
+ public bool noSnapshot = false;
public CompProperties_FireModes()
{
diff --git a/Source/CombatRealism/Combat_Realism/Comps/CompTurretInit.cs b/Source/CombatRealism/Combat_Realism/Comps/CompTurretInit.cs
index d52f7fd..54cd086 100644
--- a/Source/CombatRealism/Combat_Realism/Comps/CompTurretInit.cs
+++ b/Source/CombatRealism/Combat_Realism/Comps/CompTurretInit.cs
@@ -19,10 +19,15 @@ public CompProperties_TurretInit Props
}
public Thing gun;
- public override void Initialize(Verse.CompProperties props)
+ public override void Initialize(CompProperties props)
{
base.Initialize(props);
- Building_TurretGun turret = parent as Building_TurretGun;
+ LongEventHandler.ExecuteWhenFinished(InitTurret);
+ }
+
+ private void InitTurret()
+ {
+ Building_TurretGunCR turret = parent as Building_TurretGunCR;
if (turret != null && turret.gun == null)
{
gun = (Thing)ThingMaker.MakeThing(parent.def.building.turretGunDef);
@@ -30,7 +35,7 @@ public override void Initialize(Verse.CompProperties props)
}
}
- public override void PostSpawnSetup()
+ /*public override void PostSpawnSetup()
{
base.PostSpawnSetup();
//It just needed first time.
@@ -39,6 +44,6 @@ public override void PostSpawnSetup()
gun.Destroy();
gun = null;
}
- }
+ }*/
}
}
diff --git a/Source/CombatRealism/Combat_Realism/DamageWorkers/DamageWorker_FlameCR.cs b/Source/CombatRealism/Combat_Realism/DamageWorkers/DamageWorker_FlameCR.cs
index d27bd5b..dca7af8 100644
--- a/Source/CombatRealism/Combat_Realism/DamageWorkers/DamageWorker_FlameCR.cs
+++ b/Source/CombatRealism/Combat_Realism/DamageWorkers/DamageWorker_FlameCR.cs
@@ -10,29 +10,26 @@ namespace Combat_Realism
// Cloned from vanilla DamageWorker_Flame, only change is inheritance from DamageWorker_AddInjuryCR so we can have the new armor system apply to this as well
public class DamageWorker_FlameCR : DamageWorker_AddInjuryCR
{
- public class DamageWorker_Flame : DamageWorker_AddInjury
+ public override float Apply(DamageInfo dinfo, Thing victim)
{
- public override float Apply(DamageInfo dinfo, Thing victim)
+ if (!dinfo.InstantOldInjury)
{
- if (!dinfo.InstantOldInjury)
- {
- victim.TryAttachFire(Rand.Range(0.15f, 0.25f));
- }
- Pawn pawn = victim as Pawn;
- if (pawn != null && pawn.Faction == Faction.OfColony)
- {
- Find.TickManager.slower.SignalForceNormalSpeedShort();
- }
- return base.Apply(dinfo, victim);
+ victim.TryAttachFire(Rand.Range(0.15f, 0.25f));
}
+ Pawn pawn = victim as Pawn;
+ if (pawn != null && pawn.Faction == Faction.OfColony)
+ {
+ Find.TickManager.slower.SignalForceNormalSpeedShort();
+ }
+ return base.Apply(dinfo, victim);
+ }
- public override void ExplosionAffectCell(Explosion explosion, IntVec3 c, List damagedThings, bool canThrowMotes)
+ public override void ExplosionAffectCell(Explosion explosion, IntVec3 c, List damagedThings, bool canThrowMotes)
+ {
+ base.ExplosionAffectCell(explosion, c, damagedThings, canThrowMotes);
+ if (this.def == DamageDefOf.Flame)
{
- base.ExplosionAffectCell(explosion, c, damagedThings, canThrowMotes);
- if (this.def == DamageDefOf.Flame)
- {
- FireUtility.TryStartFireIn(c, Rand.Range(0.2f, 0.6f));
- }
+ FireUtility.TryStartFireIn(c, Rand.Range(0.2f, 0.6f));
}
}
}
diff --git a/Source/CombatRealism/Combat_Realism/Defs/DamageDef_CR.cs b/Source/CombatRealism/Combat_Realism/Defs/DamageDef_CR.cs
index 82ff5a9..b3c232b 100644
--- a/Source/CombatRealism/Combat_Realism/Defs/DamageDef_CR.cs
+++ b/Source/CombatRealism/Combat_Realism/Defs/DamageDef_CR.cs
@@ -12,5 +12,6 @@ public class DamageDef_CR : DamageDef
{
public bool deflectable = false;
public bool absorbable = false;
+ public bool harmOnlyOutsideLayers = false;
}
}
diff --git a/Source/CombatRealism/Combat_Realism/Gizmos/Command_Reload.cs b/Source/CombatRealism/Combat_Realism/Gizmos/Command_Reload.cs
index 48b74c2..75fdaef 100644
--- a/Source/CombatRealism/Combat_Realism/Gizmos/Command_Reload.cs
+++ b/Source/CombatRealism/Combat_Realism/Gizmos/Command_Reload.cs
@@ -15,7 +15,13 @@ public class Command_Reload : Command_Action
public override void ProcessInput(Event ev)
{
- if (ev.button == 1 && compAmmo.useAmmo && compAmmo.compInventory != null)
+ if (compAmmo == null)
+ {
+ Log.Error("Command_Reload without ammo comp");
+ return;
+ }
+ if ((ev.button == 1 && compAmmo.useAmmo && (compAmmo.compInventory != null || compAmmo.turret != null))
+ || action == null)
Find.WindowStack.Add(MakeAmmoMenu());
else
base.ProcessInput(ev);
@@ -24,7 +30,7 @@ public override void ProcessInput(Event ev)
private FloatMenu MakeAmmoMenu()
{
List ammoList = new List(); // List of all ammo types the gun can use and the pawn has in his inventory
- if (compAmmo.compInventory == null)
+ if (compAmmo.turret != null)
{
// If we have no inventory available (e.g. manned turret), add all possible ammo types to the selection
ammoList.AddRange(compAmmo.Props.ammoSet.ammoTypes);
diff --git a/Source/CombatRealism/Combat_Realism/Gizmos/Command_VerbTarget.cs b/Source/CombatRealism/Combat_Realism/Gizmos/Command_VerbTarget.cs
new file mode 100644
index 0000000..f2dfa55
--- /dev/null
+++ b/Source/CombatRealism/Combat_Realism/Gizmos/Command_VerbTarget.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RimWorld;
+using Verse;
+using UnityEngine;
+using Verse.Sound;
+
+namespace Combat_Realism
+{
+ // Cloned from Verse.Command_VerbTarget which is internal for no goddamn reason
+ public class Command_VerbTarget : Command
+ {
+ public Verb verb;
+
+ protected override Color IconDrawColor
+ {
+ get
+ {
+ if (this.verb.ownerEquipment != null)
+ {
+ return this.verb.ownerEquipment.DrawColor;
+ }
+ return base.IconDrawColor;
+ }
+ }
+
+ public override void ProcessInput(Event ev)
+ {
+ base.ProcessInput(ev);
+ SoundDefOf.TickTiny.PlayOneShotOnCamera();
+ Targeter targeter = Find.Targeter;
+ if (this.verb.CasterIsPawn && targeter.targetingVerb != null && targeter.targetingVerb.verbProps == this.verb.verbProps)
+ {
+ Pawn casterPawn = this.verb.CasterPawn;
+ if (!targeter.IsPawnTargeting(casterPawn))
+ {
+ targeter.targetingVerbAdditionalPawns.Add(casterPawn);
+ }
+ }
+ else
+ {
+ Find.Targeter.BeginTargeting(this.verb);
+ }
+ }
+ }
+}
diff --git a/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_Reload.cs b/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_Reload.cs
index 3e614c5..f5c739d 100644
--- a/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_Reload.cs
+++ b/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_Reload.cs
@@ -48,7 +48,7 @@ protected override IEnumerable< Toil > MakeNewToils()
//Actual reloader
var reloadToil = new Toil();
- reloadToil.AddFinishAction( compReloader.FinishReload );
+ reloadToil.AddFinishAction( () => compReloader.LoadAmmo() );
yield return reloadToil;
//Continue previous job if possible
diff --git a/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_ReloadTurret.cs b/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_ReloadTurret.cs
new file mode 100644
index 0000000..a269ed5
--- /dev/null
+++ b/Source/CombatRealism/Combat_Realism/Jobs/JobDriver_ReloadTurret.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using RimWorld;
+using Verse;
+using Verse.AI;
+using UnityEngine;
+
+namespace Combat_Realism
+{
+ public class JobDriver_ReloadTurret : JobDriver
+ {
+ private CompAmmoUser _compReloader;
+ private CompAmmoUser compReloader
+ {
+ get
+ {
+ if (_compReloader == null)
+ {
+ Building_TurretGunCR turret = TargetThingA as Building_TurretGunCR;
+ if (turret != null)
+ {
+ _compReloader = turret.compAmmo;
+ }
+ }
+ return _compReloader;
+ }
+ }
+
+ protected override IEnumerable MakeNewToils()
+ {
+ this.FailOnDestroyedNullOrForbidden(TargetIndex.A);
+ this.FailOnDestroyedNullOrForbidden(TargetIndex.B);
+
+
+ // Haul ammo
+ yield return Toils_Reserve.Reserve(TargetIndex.A, 1);
+ yield return Toils_Reserve.Reserve(TargetIndex.B, 1);
+ yield return Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.ClosestTouch);
+ yield return Toils_Haul.StartCarryThing(TargetIndex.B);
+ yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.ClosestTouch);
+ yield return Toils_Haul.PlaceHauledThingInCell(TargetIndex.A, null, false);
+
+ // Wait in place
+ var waitToil = new Toil();
+ waitToil.initAction = new Action(delegate
+ {
+ waitToil.actor.pather.StopDead();
+ compReloader.TryStartReload();
+ });
+ waitToil.defaultCompleteMode = ToilCompleteMode.Delay;
+ waitToil.defaultDuration = Mathf.CeilToInt(compReloader.Props.reloadTicks / pawn.GetStatValue(StatDef.Named("ReloadSpeed")));
+ yield return waitToil.WithProgressBarToilDelay(TargetIndex.A);
+
+ //Actual reloader
+ var reloadToil = new Toil();
+ reloadToil.defaultCompleteMode = ToilCompleteMode.Instant;
+ reloadToil.initAction = new Action(delegate
+ {
+ Building_TurretGunCR turret = TargetThingA as Building_TurretGunCR;
+ if (compReloader != null && turret.compAmmo != null)
+ {
+ compReloader.LoadAmmo(TargetThingB);
+ }
+ });
+ reloadToil.EndOnDespawnedOrNull(TargetIndex.B);
+ yield return reloadToil;
+ }
+ }
+}
diff --git a/Source/CombatRealism/Combat_Realism/Jobs/JobGiver_UpdateLoadout.cs b/Source/CombatRealism/Combat_Realism/Jobs/JobGiver_UpdateLoadout.cs
index 12fb1fa..956a6a9 100644
--- a/Source/CombatRealism/Combat_Realism/Jobs/JobGiver_UpdateLoadout.cs
+++ b/Source/CombatRealism/Combat_Realism/Jobs/JobGiver_UpdateLoadout.cs
@@ -11,17 +11,170 @@ namespace Combat_Realism
{
public class JobGiver_UpdateLoadout : ThinkNode_JobGiver
{
+ private enum ItemPriority : byte
+ {
+ None,
+ Low,
+ LowStock,
+ Proximity
+ }
+
+ private const int proximitySearchRadius = 20;
+ private const int maximumSearchRadius = 80;
+ private const int ticksBeforeDropRaw = 7200;
+
+ public override float GetPriority(Pawn pawn)
+ {
+ if (CheckForExcessItems(pawn))
+ {
+ return 9.2f;
+ }
+ ItemPriority priority;
+ Thing unused;
+ int i;
+ LoadoutSlot slot = GetPrioritySlot(pawn, out priority, out unused, out i);
+ if (slot == null)
+ {
+ return 0f;
+ }
+ if (priority == ItemPriority.Low) return 3f;
+
+ TimeAssignmentDef assignment = (pawn.timetable != null) ? pawn.timetable.CurrentAssignment : TimeAssignmentDefOf.Anything;
+ if (assignment == TimeAssignmentDefOf.Sleep) return 3f;
+
+ return 9.2f;
+ }
+
+ private LoadoutSlot GetPrioritySlot(Pawn pawn, out ItemPriority priority, out Thing closestThing, out int count)
+ {
+ priority = ItemPriority.None;
+ LoadoutSlot slot = null;
+ closestThing = null;
+ count = 0;
+
+ CompInventory inventory = pawn.TryGetComp();
+ if (inventory != null && inventory.container != null)
+ {
+ Loadout loadout = pawn.GetLoadout();
+ if (loadout != null && !loadout.Slots.NullOrEmpty())
+ {
+ foreach(LoadoutSlot curSlot in loadout.Slots)
+ {
+ ItemPriority curPriority = ItemPriority.None;
+ Thing curThing = null;
+ int numCarried = inventory.container.NumContained(curSlot.Def);
+
+ // Add currently equipped gun
+ if (pawn.equipment != null && pawn.equipment.Primary != null)
+ {
+ if (pawn.equipment.Primary.def == curSlot.Def) numCarried++;
+ }
+ if (numCarried < curSlot.Count)
+ {
+ curThing = GenClosest.ClosestThingReachable(
+ pawn.Position,
+ ThingRequest.ForDef(curSlot.Def),
+ PathEndMode.ClosestTouch,
+ TraverseParms.For(pawn, Danger.None, TraverseMode.ByPawn),
+ proximitySearchRadius,
+ x => !x.IsForbidden(pawn) && pawn.CanReserve(x));
+ if (curThing != null) curPriority = ItemPriority.Proximity;
+ else
+ {
+ curThing = GenClosest.ClosestThingReachable(
+ pawn.Position,
+ ThingRequest.ForDef(curSlot.Def),
+ PathEndMode.ClosestTouch,
+ TraverseParms.For(pawn, Danger.None, TraverseMode.ByPawn),
+ maximumSearchRadius,
+ x => !x.IsForbidden(pawn) && pawn.CanReserve(x));
+ if (curThing != null)
+ {
+ if (!curSlot.Def.IsNutritionSource && numCarried / curSlot.Count <= 0.5f) curPriority = ItemPriority.LowStock;
+ else curPriority = ItemPriority.Low;
+ }
+ }
+ }
+ if (curPriority > priority && curThing != null && inventory.CanFitInInventory(curThing, out count))
+ {
+ priority = curPriority;
+ slot = curSlot;
+ closestThing = curThing;
+ }
+ if (priority >= ItemPriority.LowStock)
+ {
+ break;
+ }
+ }
+ }
+ }
+
+ return slot;
+ }
+
+ private bool CheckForExcessItems(Pawn pawn)
+ {
+ //if (pawn.CurJob != null && pawn.CurJob.def == JobDefOf.Tame) return false;
+ CompInventory inventory = pawn.TryGetComp();
+ Loadout loadout = pawn.GetLoadout();
+ if (inventory == null || inventory.container == null || loadout == null || loadout.Slots.NullOrEmpty())
+ {
+ return false;
+ }
+ if (inventory.container.Count > loadout.SlotCount + 1)
+ {
+ return true;
+ }
+ // Check to see if there is at least one loadout slot specifying currently equipped weapon
+ ThingWithComps equipment = pawn.equipment?.Primary ?? null;
+ if (equipment != null && !loadout.Slots.Any(slot => slot.Def == equipment.def && slot.Count >= 1))
+ {
+ return true;
+ }
+
+ // Go through each item in the inventory and see if its part of our loadout
+ bool allowDropRaw = Find.TickManager.TicksGame > pawn.mindState.lastInventoryRawFoodUseTick + ticksBeforeDropRaw;
+ foreach (Thing thing in inventory.container)
+ {
+ if(allowDropRaw || !thing.def.IsNutritionSource || thing.def.ingestible.preferability > FoodPreferability.Raw)
+ {
+ LoadoutSlot slot = loadout.Slots.FirstOrDefault(x => x.Def == thing.def);
+ if (slot == null)
+ {
+ return true;
+ }
+ else
+ {
+ int numContained = inventory.container.NumContained(thing.def);
+
+ // Add currently equipped gun
+ if (pawn.equipment != null && pawn.equipment.Primary != null)
+ {
+ if (pawn.equipment.Primary.def == slot.Def)
+ {
+ numContained++;
+ }
+ }
+ if (slot.Count < numContained)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
protected override Job TryGiveTerminalJob(Pawn pawn)
{
// Get inventory
CompInventory inventory = pawn.TryGetComp();
- if (inventory == null)
- return null;
+ if (inventory == null) return null;
- // Find missing items
Loadout loadout = pawn.GetLoadout();
if (loadout != null)
{
+ // Find and drop excess items
foreach (LoadoutSlot slot in loadout.Slots)
{
int numContained = inventory.container.NumContained(slot.Def);
@@ -30,28 +183,78 @@ protected override Job TryGiveTerminalJob(Pawn pawn)
if (pawn.equipment != null && pawn.equipment.Primary != null)
{
if (pawn.equipment.Primary.def == slot.Def)
+ {
numContained++;
+ }
}
-
- // Find closest thing to pick up
- if (numContained < slot.Count)
+ // Drop excess items
+ if(numContained > slot.Count)
{
- Thing thing = GenClosest.ClosestThingReachable(pawn.Position,
- ThingRequest.ForDef(slot.Def),
- PathEndMode.ClosestTouch,
- TraverseParms.For(pawn, Danger.None, TraverseMode.ByPawn),
- 80,
- x => !x.IsForbidden(pawn) && pawn.CanReserve(x));
+ Thing thing = inventory.container.FirstOrDefault(x => x.def == slot.Def);
if (thing != null)
{
- int maxFit;
- if (inventory.CanFitInInventory(thing, out maxFit))
+ Thing droppedThing;
+ if (inventory.container.TryDrop(thing, pawn.Position, ThingPlaceMode.Near, numContained - slot.Count, out droppedThing))
{
- return new Job(JobDefOf.TakeInventory, thing) { maxNumToCarry = Mathf.Min(thing.stackCount, slot.Count - numContained, maxFit) };
+ if (droppedThing != null)
+ {
+ return HaulAIUtility.HaulToStorageJob(pawn, droppedThing);
+ }
+ else
+ {
+ Log.Error(pawn.ToString() + " tried dropping " + thing.ToString() + " from loadout but resulting thing is null");
+ }
}
}
}
}
+
+ // Try drop currently equipped weapon
+ if (pawn.equipment != null && pawn.equipment.Primary != null && !loadout.Slots.Any(slot => slot.Def == pawn.equipment.Primary.def && slot.Count >= 1))
+ {
+ ThingWithComps droppedEq;
+ if (pawn.equipment.TryDropEquipment(pawn.equipment.Primary, out droppedEq, pawn.Position, false))
+ {
+ return HaulAIUtility.HaulToStorageJob(pawn, droppedEq);
+ }
+ }
+
+ // Find excess items in inventory that are not part of our loadout
+ bool allowDropRaw = Find.TickManager.TicksGame > pawn.mindState.lastInventoryRawFoodUseTick + ticksBeforeDropRaw;
+ Thing thingToRemove = inventory.container.FirstOrDefault(t =>
+ (allowDropRaw || !t.def.IsNutritionSource || t.def.ingestible.preferability > FoodPreferability.Raw)
+ && !loadout.Slots.Any(s => s.Def == t.def));
+ if (thingToRemove != null)
+ {
+ Thing droppedThing;
+ if (inventory.container.TryDrop(thingToRemove, pawn.Position, ThingPlaceMode.Near, thingToRemove.stackCount, out droppedThing))
+ {
+ return HaulAIUtility.HaulToStorageJob(pawn, droppedThing);
+ }
+ else
+ {
+ Log.Error(pawn.ToString() + " tried dropping " + thingToRemove.ToString() + " from inventory but resulting thing is null");
+ }
+ }
+
+ // Find missing items
+ ItemPriority priority;
+ Thing closestThing;
+ int count;
+ LoadoutSlot prioritySlot = GetPrioritySlot(pawn, out priority, out closestThing, out count);
+ if (closestThing != null)
+ {
+ // Equip gun if unarmed or current gun is not in loadout
+ if (closestThing.TryGetComp() != null
+ && (pawn.health != null && pawn.health.capacities.CapableOf(PawnCapacityDefOf.Manipulation))
+ && (pawn.equipment == null || pawn.equipment.Primary == null || !loadout.Slots.Any(s => s.Def == pawn.equipment.Primary.def)))
+ {
+ return new Job(JobDefOf.Equip, closestThing);
+ }
+ // Take items into inventory if needed
+ int numContained = inventory.container.NumContained(prioritySlot.Def);
+ return new Job(JobDefOf.TakeInventory, closestThing) { maxNumToCarry = Mathf.Min(closestThing.stackCount, prioritySlot.Count - numContained, count) };
+ }
}
return null;
}
diff --git a/Source/CombatRealism/Combat_Realism/Jobs/WorkGiver_ReloadTurret.cs b/Source/CombatRealism/Combat_Realism/Jobs/WorkGiver_ReloadTurret.cs
new file mode 100644
index 0000000..01258c8
--- /dev/null
+++ b/Source/CombatRealism/Combat_Realism/Jobs/WorkGiver_ReloadTurret.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RimWorld;
+using Verse;
+using Verse.AI;
+using UnityEngine;
+
+namespace Combat_Realism
+{
+ public class WorkGiver_ReloadTurret : WorkGiver_Scanner
+ {
+ public override ThingRequest PotentialWorkThingRequest
+ {
+ get
+ {
+ return ThingRequest.ForGroup(ThingRequestGroup.BuildingArtificial); ;
+ }
+ }
+
+ public override bool HasJobOnThingForced(Pawn pawn, Thing t)
+ {
+ Building_TurretGunCR turret = t as Building_TurretGunCR;
+ if (turret == null || !turret.needsReload || !pawn.CanReserveAndReach(turret, PathEndMode.ClosestTouch, Danger.Deadly) || turret.IsForbidden(pawn.Faction)) return false;
+ Thing ammo = GenClosest.ClosestThingReachable(pawn.Position,
+ ThingRequest.ForDef(turret.compAmmo.selectedAmmo),
+ PathEndMode.ClosestTouch,
+ TraverseParms.For(pawn, Danger.Deadly, TraverseMode.ByPawn),
+ 80,
+ x => !x.IsForbidden(pawn) && pawn.CanReserve(x));
+ return ammo != null;
+ }
+
+ public override bool HasJobOnThing(Pawn pawn, Thing t)
+ {
+ Building_TurretGunCR turret = t as Building_TurretGunCR;
+ if (turret == null || !turret.allowAutomaticReload) return false;
+ return HasJobOnThingForced(pawn, t);
+ }
+
+ public override Job JobOnThing(Pawn pawn, Thing t)
+ {
+ Building_TurretGunCR turret = t as Building_TurretGunCR;
+ if (turret == null) return null;
+
+ Thing ammo = GenClosest.ClosestThingReachable(pawn.Position,
+ ThingRequest.ForDef(turret.compAmmo.selectedAmmo),
+ PathEndMode.ClosestTouch,
+ TraverseParms.For(pawn, Danger.Deadly, TraverseMode.ByPawn),
+ 80,
+ x => !x.IsForbidden(pawn) && pawn.CanReserve(x));
+
+ if (ammo == null) return null;
+ int amountNeeded = turret.compAmmo.Props.magazineSize;
+ if (turret.compAmmo.currentAmmo == turret.compAmmo.selectedAmmo) amountNeeded -= turret.compAmmo.curMagCount;
+ return new Job(DefDatabase.GetNamed("ReloadTurret"), t, ammo) { maxNumToCarry = Mathf.Min(amountNeeded, ammo.stackCount) };
+ }
+
+
+ }
+}
diff --git a/Source/CombatRealism/Combat_Realism/Loadouts/MainTabWindow_OutfitsAndLoadouts.cs b/Source/CombatRealism/Combat_Realism/Loadouts/MainTabWindow_OutfitsAndLoadouts.cs
index cbad4a9..d47eb23 100644
--- a/Source/CombatRealism/Combat_Realism/Loadouts/MainTabWindow_OutfitsAndLoadouts.cs
+++ b/Source/CombatRealism/Combat_Realism/Loadouts/MainTabWindow_OutfitsAndLoadouts.cs
@@ -192,7 +192,7 @@ protected override void DrawPawnRow( Rect rect, Pawn p )
// clear forced button
if ( p.outfits.forcedHandler.SomethingIsForced )
{
- TooltipHandler.TipRegion( forcedOutfitRect, "CR.ClearForced".Translate() );
+ TooltipHandler.TipRegion( forcedOutfitRect, "ClearForcedApparel".Translate() );
if ( Widgets.ImageButton( forcedOutfitRect, _iconClearForced ) )
{
p.outfits.forcedHandler.Reset();
diff --git a/Source/CombatRealism/Combat_Realism/Projectiles/BulletCR.cs b/Source/CombatRealism/Combat_Realism/Projectiles/BulletCR.cs
index edd1bc1..2eb77c2 100644
--- a/Source/CombatRealism/Combat_Realism/Projectiles/BulletCR.cs
+++ b/Source/CombatRealism/Combat_Realism/Projectiles/BulletCR.cs
@@ -17,7 +17,12 @@ protected override void Impact(Thing hitThing)
if (hitThing != null)
{
int damageAmountBase = this.def.projectile.damageAmountBase;
- BodyPartDamageInfo value = new BodyPartDamageInfo(null, null);
+
+ BodyPartDamageInfo value;
+ DamageDef_CR damDefCR = def.projectile.damageDef as DamageDef_CR;
+ if (damDefCR != null && damDefCR.harmOnlyOutsideLayers) value = new BodyPartDamageInfo(null, BodyPartDepth.Outside);
+ else value = new BodyPartDamageInfo(null, null);
+
DamageInfo dinfo = new DamageInfo(this.def.projectile.damageDef, damageAmountBase, this.launcher, this.ExactRotation.eulerAngles.y, new BodyPartDamageInfo?(value), this.def);
ProjectilePropertiesCR propsCR = def.projectile as ProjectilePropertiesCR;
diff --git a/Source/CombatRealism/Combat_Realism/RecoilPattern.cs b/Source/CombatRealism/Combat_Realism/RecoilPattern.cs
new file mode 100644
index 0000000..8a397a4
--- /dev/null
+++ b/Source/CombatRealism/Combat_Realism/RecoilPattern.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Combat_Realism
+{
+ public enum RecoilPattern : byte
+ {
+ None,
+ Regular,
+ Mounted
+ }
+}
diff --git a/Source/CombatRealism/Combat_Realism/Things/AmmoThing.cs b/Source/CombatRealism/Combat_Realism/Things/AmmoThing.cs
index f7819c2..b835a3b 100644
--- a/Source/CombatRealism/Combat_Realism/Things/AmmoThing.cs
+++ b/Source/CombatRealism/Combat_Realism/Things/AmmoThing.cs
@@ -55,7 +55,7 @@ public override string GetDescription()
GenText.ToStringByStyle(secExpProps.explosionDamage, ToStringStyle.Integer) + " (" + secExpProps.explosionDamageDef.LabelCap + ")");
}
if (secExpProps.fragRange > 0)
- stringBuilder.AppendLine("CR_DescFragRange".Translate() + GenText.ToStringByStyle(secExpProps.fragRange, ToStringStyle.FloatTwo));
+ stringBuilder.AppendLine("CR_DescFragRange".Translate() + ": " + GenText.ToStringByStyle(secExpProps.fragRange, ToStringStyle.FloatTwo));
}
// CR stats
diff --git a/Source/CombatRealism/Combat_Realism/Things/Apparel_VisibleAccessory.cs b/Source/CombatRealism/Combat_Realism/Things/Apparel_VisibleAccessory.cs
index ee25c56..056efb5 100644
--- a/Source/CombatRealism/Combat_Realism/Things/Apparel_VisibleAccessory.cs
+++ b/Source/CombatRealism/Combat_Realism/Things/Apparel_VisibleAccessory.cs
@@ -13,13 +13,19 @@ public abstract class Apparel_VisibleAccessory : Apparel
public override void DrawWornExtras()
{
if (wearer == null || !wearer.Spawned) return;
+ Vector3 drawVec = this.wearer.Drawer.DrawPos;
// Check if wearer is in a bed
Building_Bed bed = wearer.CurrentBed();
- if (bed != null && !bed.def.building.bed_showSleeperBody) return;
-
- Vector3 drawVec = this.wearer.Drawer.DrawPos;
- drawVec.y = Altitudes.AltitudeFor(AltitudeLayer.Pawn);
+ if (bed != null)
+ {
+ if (!bed.def.building.bed_showSleeperBody) return;
+ drawVec.y = Altitudes.AltitudeFor(bed.def.altitudeLayer);
+ }
+ else
+ {
+ drawVec.y = Altitudes.AltitudeFor(AltitudeLayer.Pawn);
+ }
Vector3 s = new Vector3(1.5f, 1.5f, 1.5f);
// Get the graphic path
diff --git a/Source/CombatRealism/Combat_Realism/Things/Building_TurretGunCR.cs b/Source/CombatRealism/Combat_Realism/Things/Building_TurretGunCR.cs
new file mode 100644
index 0000000..bee1c1f
--- /dev/null
+++ b/Source/CombatRealism/Combat_Realism/Things/Building_TurretGunCR.cs
@@ -0,0 +1,483 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RimWorld;
+using Verse;
+using Verse.AI;
+using Verse.Sound;
+using UnityEngine;
+
+namespace Combat_Realism
+{
+ // Class is cloned from Building_TurretGun with various changes made to support fire modes and ammo
+ public class Building_TurretGunCR : Building_Turret
+ {
+ private const int minTicksBeforeAutoReload = 1800; // This much time must pass before haulers will try to automatically reload an auto-turret
+
+ #region Fields
+
+ protected int burstCooldownTicksLeft;
+ public int burstWarmupTicksLeft; // Need this public so aim mode can modify it
+ protected TargetInfo currentTargetInt = TargetInfo.Invalid;
+ public Thing gun;
+ public bool loaded = true;
+ protected CompMannable mannableComp;
+ protected CompPowerTrader powerComp;
+ protected TurretTopCR top;
+
+ // New fields
+ private CompAmmoUser _compAmmo = null;
+ private CompFireModes _compFireModes = null;
+ public bool isReloading = false;
+ private int ticksSinceLastBurst = minTicksBeforeAutoReload;
+
+ #endregion
+
+ #region Properties
+
+ public override Verb AttackVerb
+ {
+ get
+ {
+ if (this.gun == null)
+ {
+ return null;
+ }
+ return this.GunCompEq.verbTracker.PrimaryVerb;
+ }
+ }
+ public override TargetInfo CurrentTarget
+ {
+ get
+ {
+ return this.currentTargetInt;
+ }
+ }
+ public CompEquippable GunCompEq
+ {
+ get
+ {
+ return this.gun.TryGetComp();
+ }
+ }
+ private bool WarmingUp
+ {
+ get
+ {
+ return this.burstWarmupTicksLeft > 0;
+ }
+ }
+
+ // New properties
+ public CompAmmoUser compAmmo
+ {
+ get
+ {
+ if (_compAmmo == null && gun != null) _compAmmo = gun.TryGetComp();
+ return _compAmmo;
+ }
+ }
+ public CompFireModes compFireModes
+ {
+ get
+ {
+ if (_compFireModes == null && gun != null) _compFireModes = gun.TryGetComp();
+ return _compFireModes;
+ }
+ }
+ public bool needsReload
+ {
+ get
+ {
+ return mannableComp == null
+ && compAmmo != null
+ && (compAmmo.curMagCount < compAmmo.Props.magazineSize || compAmmo.selectedAmmo != compAmmo.currentAmmo);
+ }
+ }
+ public bool allowAutomaticReload
+ {
+ get
+ {
+ return mannableComp == null && compAmmo != null
+ && (ticksSinceLastBurst >= minTicksBeforeAutoReload || compAmmo.curMagCount <= Mathf.CeilToInt(compAmmo.Props.magazineSize / 6));
+ }
+ }
+
+ #endregion
+
+ #region Methods
+
+ protected void BeginBurst()
+ {
+ ticksSinceLastBurst = 0;
+ this.GunCompEq.PrimaryVerb.TryStartCastOn(this.CurrentTarget, false);
+ }
+
+ protected void BurstComplete()
+ {
+ if (this.def.building.turretBurstCooldownTicks >= 0)
+ {
+ this.burstCooldownTicksLeft = this.def.building.turretBurstCooldownTicks;
+ }
+ else
+ {
+ this.burstCooldownTicksLeft = this.GunCompEq.PrimaryVerb.verbProps.defaultCooldownTicks;
+ }
+ if (compAmmo != null && compAmmo.curMagCount <= 0)
+ {
+ OrderReload();
+ }
+ }
+
+ public override void Draw()
+ {
+ this.top.DrawTurret();
+ base.Draw();
+ }
+
+ public override void DrawExtraSelectionOverlays()
+ {
+ float range = this.GunCompEq.PrimaryVerb.verbProps.range;
+ if (range < 90f)
+ {
+ GenDraw.DrawRadiusRing(base.Position, range);
+ }
+ float minRange = this.GunCompEq.PrimaryVerb.verbProps.minRange;
+ if (minRange < 90f && minRange > 0.1f)
+ {
+ GenDraw.DrawRadiusRing(base.Position, minRange);
+ }
+ if (this.burstWarmupTicksLeft > 0)
+ {
+ int degreesWide = (int)((float)this.burstWarmupTicksLeft * 0.5f);
+ GenDraw.DrawAimPie(this, this.CurrentTarget, degreesWide, (float)this.def.size.x * 0.5f);
+ }
+ }
+
+ public override void ExposeData()
+ {
+ base.ExposeData();
+ Scribe_Values.LookValue(ref this.burstCooldownTicksLeft, "burstCooldownTicksLeft", 0, false);
+ Scribe_Values.LookValue(ref this.loaded, "loaded", false, false);
+
+ // Look new variables
+ Scribe_Values.LookValue(ref burstWarmupTicksLeft, "burstWarmupTicksLeft", 0);
+ Scribe_Values.LookValue(ref isReloading, "isReloading", false);
+ Scribe_Deep.LookDeep(ref gun, "gun");
+ }
+
+ public override string GetInspectString()
+ {
+ StringBuilder stringBuilder = new StringBuilder();
+ string inspectString = base.GetInspectString();
+ if (!inspectString.NullOrEmpty())
+ {
+ stringBuilder.AppendLine(inspectString);
+ }
+ stringBuilder.AppendLine("GunInstalled".Translate() + ": " + this.gun.LabelCap);
+ if (this.GunCompEq.PrimaryVerb.verbProps.minRange > 0f)
+ {
+ stringBuilder.AppendLine("MinimumRange".Translate() + ": " + this.GunCompEq.PrimaryVerb.verbProps.minRange.ToString("F0"));
+ }
+
+ if (isReloading)
+ {
+ stringBuilder.AppendLine("CR_TurretReloading".Translate());
+ }
+ else if (this.burstCooldownTicksLeft > 0)
+ {
+ stringBuilder.AppendLine("CanFireIn".Translate() + ": " + this.burstCooldownTicksLeft.TickstoSecondsString());
+ }
+
+ if (compAmmo != null && compAmmo.Props.ammoSet != null)
+ {
+ stringBuilder.AppendLine("CR_AmmoSet".Translate() + ": " + compAmmo.Props.ammoSet.LabelCap);
+ }
+ /*
+ if (this.def.building.turretShellDef != null)
+ {
+ if (this.loaded)
+ {
+ stringBuilder.AppendLine("ShellLoaded".Translate());
+ }
+ else
+ {
+ stringBuilder.AppendLine("ShellNotLoaded".Translate());
+ }
+ }
+ */
+ return stringBuilder.ToString();
+ }
+
+ private bool IsValidTarget(Thing t)
+ {
+ Pawn pawn = t as Pawn;
+ if (pawn != null)
+ {
+ if (this.GunCompEq.PrimaryVerb.verbProps.projectileDef.projectile.flyOverhead)
+ {
+ RoofDef roofDef = Find.RoofGrid.RoofAt(t.Position);
+ if (roofDef != null && roofDef.isThickRoof)
+ {
+ return false;
+ }
+ }
+ if (this.mannableComp == null)
+ {
+ return !GenAI.MachinesLike(base.Faction, pawn);
+ }
+ }
+ return true;
+ }
+
+ public override void OrderAttack(TargetInfo targ)
+ {
+ if ((targ.Cell - base.Position).LengthHorizontal < this.GunCompEq.PrimaryVerb.verbProps.minRange)
+ {
+ Messages.Message("MessageTargetBelowMinimumRange".Translate(), this, MessageSound.RejectInput);
+ return;
+ }
+ if ((targ.Cell - base.Position).LengthHorizontal > this.GunCompEq.PrimaryVerb.verbProps.range)
+ {
+ Messages.Message("MessageTargetBeyondMaximumRange".Translate(), this, MessageSound.RejectInput);
+ return;
+ }
+ this.forcedTarget = targ;
+ }
+
+ public override void SpawnSetup()
+ {
+ base.SpawnSetup();
+ this.powerComp = base.GetComp();
+ this.mannableComp = base.GetComp();
+ if (gun == null)
+ {
+ this.gun = ThingMaker.MakeThing(this.def.building.turretGunDef, null);
+ }
+ for (int i = 0; i < this.GunCompEq.AllVerbs.Count; i++)
+ {
+ Verb verb = this.GunCompEq.AllVerbs[i];
+ verb.caster = this;
+ verb.castCompleteCallback = new Action(this.BurstComplete);
+ }
+ this.top = new TurretTopCR(this);
+
+ // Callback for ammo comp
+ if (compAmmo != null)
+ {
+ compAmmo.turret = this;
+ if (def.building.turretShellDef != null && def.building.turretShellDef is AmmoDef) compAmmo.selectedAmmo = (AmmoDef)def.building.turretShellDef;
+ }
+ }
+
+ public override void Tick()
+ {
+ base.Tick();
+ ticksSinceLastBurst++;
+ if (this.powerComp != null && !this.powerComp.PowerOn)
+ {
+ return;
+ }
+ if (this.mannableComp != null && !this.mannableComp.MannedNow)
+ {
+ return;
+ }
+ this.GunCompEq.verbTracker.VerbsTick();
+ if (this.stunner.Stunned)
+ {
+ return;
+ }
+ if (this.GunCompEq.PrimaryVerb.state == VerbState.Bursting)
+ {
+ return;
+ }
+ if (this.WarmingUp)
+ {
+ this.burstWarmupTicksLeft--;
+ if (this.burstWarmupTicksLeft == 0)
+ {
+ this.BeginBurst();
+ }
+ }
+ else
+ {
+ if (this.burstCooldownTicksLeft > 0)
+ {
+ this.burstCooldownTicksLeft--;
+ }
+ if (this.burstCooldownTicksLeft == 0)
+ {
+ this.TryStartShootSomething();
+ }
+ }
+ this.top.TurretTopTick();
+ }
+
+ protected TargetInfo TryFindNewTarget()
+ {
+ Thing searcher;
+ Faction faction;
+ if (this.mannableComp != null && this.mannableComp.MannedNow)
+ {
+ searcher = this.mannableComp.ManningPawn;
+ faction = this.mannableComp.ManningPawn.Faction;
+ }
+ else
+ {
+ searcher = this;
+ faction = base.Faction;
+ }
+ if (this.GunCompEq.PrimaryVerb.verbProps.projectileDef.projectile.flyOverhead && faction.HostileTo(Faction.OfColony) && Rand.Value < 0.5f && Find.ListerBuildings.allBuildingsColonist.Count > 0)
+ {
+ return Find.ListerBuildings.allBuildingsColonist.RandomElement();
+ }
+ TargetScanFlags targetScanFlags = TargetScanFlags.NeedThreat;
+ if (!this.GunCompEq.PrimaryVerb.verbProps.projectileDef.projectile.flyOverhead)
+ {
+ targetScanFlags |= TargetScanFlags.NeedLOSToAll;
+ }
+ if (this.GunCompEq.PrimaryVerb.verbProps.ai_IsIncendiary)
+ {
+ targetScanFlags |= TargetScanFlags.NeedNonBurning;
+ }
+ return AttackTargetFinder.BestShootTargetFromCurrentPosition(searcher, new Predicate(this.IsValidTarget), this.GunCompEq.PrimaryVerb.verbProps.range, this.GunCompEq.PrimaryVerb.verbProps.minRange, targetScanFlags);
+ }
+
+ protected void TryStartShootSomething()
+ {
+ // Check for ammo first
+ if (compAmmo != null && (isReloading || (mannableComp == null && compAmmo.curMagCount <= 0))) return;
+
+ if (this.forcedTarget.ThingDestroyed)
+ {
+ this.forcedTarget = null;
+ }
+ if (this.GunCompEq.PrimaryVerb.verbProps.projectileDef.projectile.flyOverhead && Find.RoofGrid.Roofed(base.Position))
+ {
+ return;
+ }
+ bool isValid = this.currentTargetInt.IsValid;
+ if (this.forcedTarget.IsValid)
+ {
+ this.currentTargetInt = this.forcedTarget;
+ }
+ else
+ {
+ this.currentTargetInt = this.TryFindNewTarget();
+ }
+ if (!isValid && this.currentTargetInt.IsValid)
+ {
+ SoundDefOf.TurretAcquireTarget.PlayOneShot(base.Position);
+ }
+ if (this.currentTargetInt.IsValid)
+ {
+ if (AttackVerb.verbProps.warmupTicks > 0)
+ {
+ this.burstWarmupTicksLeft = AttackVerb.verbProps.warmupTicks;
+ }
+ else
+ {
+ this.BeginBurst();
+ }
+ }
+ }
+
+ // New methods
+
+ public void OrderReload()
+ {
+ if (mannableComp == null
+ || !mannableComp.MannedNow
+ || (compAmmo.currentAmmo == compAmmo.selectedAmmo && compAmmo.curMagCount == compAmmo.Props.magazineSize)) return;
+ Job reloadJob = null;
+ CompInventory inventory = mannableComp.ManningPawn.TryGetComp();
+ if (inventory != null)
+ {
+ Thing ammo = inventory.container.FirstOrDefault(x => x.def == compAmmo.selectedAmmo);
+ if (ammo != null)
+ {
+ Thing droppedAmmo;
+ int amount = compAmmo.Props.magazineSize;
+ if (compAmmo.currentAmmo == compAmmo.selectedAmmo) amount -= compAmmo.curMagCount;
+ if (inventory.container.TryDrop(ammo, this.Position, ThingPlaceMode.Direct, Mathf.Min(ammo.stackCount, amount), out droppedAmmo))
+ {
+ reloadJob = new Job(DefDatabase.GetNamed("ReloadTurret"), this, droppedAmmo) { maxNumToCarry = droppedAmmo.stackCount };
+ }
+ }
+ }
+ if (reloadJob == null)
+ {
+ reloadJob = new WorkGiver_ReloadTurret().JobOnThing(mannableComp.ManningPawn, this);
+ }
+ if (reloadJob != null)
+ {
+ mannableComp.ManningPawn.jobs.StartJob(reloadJob, JobCondition.Ongoing, null, true);
+ }
+ }
+
+ public CompMannable GetMannableComp()
+ {
+ return mannableComp;
+ }
+
+ public override IEnumerable GetGizmos()
+ {
+ // Ammo gizmos
+ if (compAmmo != null)
+ {
+ foreach (Command com in compAmmo.CompGetGizmosExtra())
+ {
+ yield return com;
+ }
+ }
+ // Fire mode gizmos
+ if (compFireModes != null)
+ {
+ foreach (Command com in compFireModes.GenerateGizmos())
+ {
+ yield return com;
+ }
+ }
+ if (Faction == Faction.OfColony)
+ {
+ // Stop forced attack gizmo
+ Gizmo stop = new Command_Action()
+ {
+ defaultLabel = "CommandStopForceAttack".Translate(),
+ defaultDesc = "CommandStopForceAttackDesc".Translate(),
+ icon = ContentFinder.Get("UI/Commands/Halt", true),
+ action = new Action(delegate
+ {
+ forcedTarget = TargetInfo.Invalid;
+ SoundDefOf.TickLow.PlayOneShotOnCamera();
+ }),
+ hotKey = KeyBindingDefOf.Misc5
+ };
+ yield return stop;
+ // Set forced target gizmo
+ if ((mannableComp != null && mannableComp.MannedNow && mannableComp.ManningPawn.Faction == Faction.OfColony)
+ || (mannableComp == null && Faction == Faction.OfColony))
+ {
+ Gizmo attack = new Command_VerbTarget()
+ {
+ defaultLabel = "CommandSetForceAttackTarget".Translate(),
+ defaultDesc = "CommandSetForceAttackTargetDesc".Translate(),
+ icon = ContentFinder.Get("UI/Commands/Attack", true),
+ verb = GunCompEq.PrimaryVerb,
+ hotKey = KeyBindingDefOf.Misc4
+ };
+ yield return attack;
+ }
+ }
+
+ foreach (Gizmo gizmo in base.GetGizmos())
+ {
+ yield return gizmo;
+ }
+ }
+
+ #endregion
+
+ }
+}
diff --git a/Source/CombatRealism/Combat_Realism/TurretTop.cs b/Source/CombatRealism/Combat_Realism/TurretTop.cs
new file mode 100644
index 0000000..75e8ce9
--- /dev/null
+++ b/Source/CombatRealism/Combat_Realism/TurretTop.cs
@@ -0,0 +1,111 @@
+using System;
+using RimWorld;
+using UnityEngine;
+using Verse;
+
+namespace Combat_Realism
+{
+ public class TurretTopCR
+ {
+ #region Constants
+
+ private const float IdleTurnDegreesPerTick = 0.26f;
+ private const int IdleTurnDuration = 140;
+ private const int IdleTurnIntervalMin = 150;
+ private const int IdleTurnIntervalMax = 350;
+
+ #endregion
+
+ #region Fields
+
+ private Building_Turret parentTurret;
+ private float curRotationInt;
+ private int ticksUntilIdleTurn;
+ private int idleTurnTicksLeft;
+ private bool idleTurnClockwise;
+
+ #endregion
+
+ private float CurRotation
+ {
+ get
+ {
+ return this.curRotationInt;
+ }
+ set
+ {
+ this.curRotationInt = value;
+ if (this.curRotationInt > 360f)
+ {
+ this.curRotationInt -= 360f;
+ }
+ if (this.curRotationInt < 0f)
+ {
+ this.curRotationInt += 360f;
+ }
+ }
+ }
+
+ public TurretTopCR(Building_Turret ParentTurret)
+ {
+ this.parentTurret = ParentTurret;
+ }
+
+ public void TurretTopTick()
+ {
+ TargetInfo currentTarget = this.parentTurret.CurrentTarget;
+ if (currentTarget.IsValid)
+ {
+ float curRotation = (currentTarget.Cell.ToVector3Shifted() - this.parentTurret.DrawPos).AngleFlat();
+ this.CurRotation = curRotation;
+ this.ticksUntilIdleTurn = Rand.RangeInclusive(150, 350);
+ }
+ else if (this.ticksUntilIdleTurn > 0)
+ {
+ this.ticksUntilIdleTurn--;
+ if (this.ticksUntilIdleTurn == 0)
+ {
+ if (Rand.Value < 0.5f)
+ {
+ this.idleTurnClockwise = true;
+ }
+ else
+ {
+ this.idleTurnClockwise = false;
+ }
+ this.idleTurnTicksLeft = 140;
+ }
+ }
+ else
+ {
+ if (this.idleTurnClockwise)
+ {
+ this.CurRotation += 0.26f;
+ }
+ else
+ {
+ this.CurRotation -= 0.26f;
+ }
+ this.idleTurnTicksLeft--;
+ if (this.idleTurnTicksLeft <= 0)
+ {
+ this.ticksUntilIdleTurn = Rand.RangeInclusive(150, 350);
+ }
+ }
+ }
+
+ public void DrawTurret()
+ {
+ Matrix4x4 matrix = default(Matrix4x4);
+ Vector3 vec = new Vector3(1, 1, 1);
+ Material topMat = parentTurret.def.building.turretTopMat;
+ if (topMat.mainTexture.height >= 256 || topMat.mainTexture.width >= 256)
+ {
+ vec.x = 2;
+ vec.z = 2;
+ }
+ matrix.SetTRS(parentTurret.DrawPos + Altitudes.AltIncVect, CurRotation.ToQuat(), vec);
+ Graphics.DrawMesh(MeshPool.plane20, matrix, parentTurret.def.building.turretTopMat, 0);
+ }
+ }
+}
diff --git a/Source/CombatRealism/Combat_Realism/Utility.cs b/Source/CombatRealism/Combat_Realism/Utility.cs
index 396b2bc..f271ac7 100644
--- a/Source/CombatRealism/Combat_Realism/Utility.cs
+++ b/Source/CombatRealism/Combat_Realism/Utility.cs
@@ -113,6 +113,7 @@ public static float GetCollisionHeight(Thing thing)
if (pawn != null)
{
float collisionHeight = pawn.BodySize;
+ if (!humanoidBodyList.Contains(pawn.def.race.body.defName)) collisionHeight *= 0.5f;
if (pawn.GetPosture() != PawnPosture.Standing)
{
collisionHeight = pawn.BodySize > 1 ? pawn.BodySize - 0.8f : 0.2f * pawn.BodySize;
diff --git a/Source/CombatRealism/Combat_Realism/Verbs/VerbPropertiesCR.cs b/Source/CombatRealism/Combat_Realism/Verbs/VerbPropertiesCR.cs
index e5c0161..3350bff 100644
--- a/Source/CombatRealism/Combat_Realism/Verbs/VerbPropertiesCR.cs
+++ b/Source/CombatRealism/Combat_Realism/Verbs/VerbPropertiesCR.cs
@@ -11,8 +11,8 @@ namespace Combat_Realism
{
public class VerbPropertiesCR : VerbProperties
{
- public Vector2 recoilOffsetX = new Vector2(0, 0); // Recoil will shift targeting on the x axis within this range
- public Vector2 recoilOffsetY = new Vector2(0, 0); // Recoil will shift targeting on the y axis within this range
+ public RecoilPattern recoilPattern = RecoilPattern.None;
+ public float recoilAmount = 0;
public float indirectFirePenalty = 0;
public float meleeArmorPenetration = 0;
}
diff --git a/Source/CombatRealism/Combat_Realism/Verbs/Verb_LaunchProjectileCR.cs b/Source/CombatRealism/Combat_Realism/Verbs/Verb_LaunchProjectileCR.cs
index 330ec39..802d87d 100644
--- a/Source/CombatRealism/Combat_Realism/Verbs/Verb_LaunchProjectileCR.cs
+++ b/Source/CombatRealism/Combat_Realism/Verbs/Verb_LaunchProjectileCR.cs
@@ -95,7 +95,7 @@ protected float shootingAccuracy
{
return this.CasterPawn.GetStatValue(StatDefOf.ShootingAccuracy, false);
}
- return 3;
+ return 2f;
}
}
protected float aimingAccuracy
@@ -281,10 +281,34 @@ protected virtual Vector3 ShiftTarget(ShiftVecReport report)
/// Vector by which to shift the target
private Vector2 GetRecoilVec()
{
- Vector2 recoilVec = new Vector2(0, 0);
- recoilVec.Set(UnityEngine.Random.Range(this.verbPropsCR.recoilOffsetX.x, this.verbPropsCR.recoilOffsetX.y), UnityEngine.Random.Range(this.verbPropsCR.recoilOffsetY.x, this.verbPropsCR.recoilOffsetY.y));
- recoilVec *= (float)Math.Sqrt((5 - shootingAccuracy) * Mathf.Min(15, this.numShotsFired));
- return recoilVec;
+ float minX = 0;
+ float maxX = 0;
+ float minY = 0;
+ float maxY = 0;
+ switch (verbPropsCR.recoilPattern)
+ {
+ case RecoilPattern.None:
+ return new Vector2(0, 0);
+ case RecoilPattern.Regular:
+ float num = verbPropsCR.recoilAmount / 3;
+ minX = -(num / 3);
+ maxX = num;
+ minY = -num;
+ maxY = verbPropsCR.recoilAmount;
+ break;
+ case RecoilPattern.Mounted:
+ float num2 = verbPropsCR.recoilAmount / 3;
+ minX = -num2;
+ maxX = num2;
+ minY = -num2;
+ maxX = verbPropsCR.recoilAmount;
+ break;
+ }
+ float recoilX = UnityEngine.Random.Range(minX, maxX);
+ float recoilY = UnityEngine.Random.Range(minY, maxY);
+
+ float recoilMagnitude = Mathf.Pow((5 - shootingAccuracy), (Mathf.Min(10, numShotsFired) / 6.25f));
+ return new Vector2(recoilX, recoilY) * recoilMagnitude;
}
///
diff --git a/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootCR.cs b/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootCR.cs
index e65c934..07c219b 100644
--- a/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootCR.cs
+++ b/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootCR.cs
@@ -46,22 +46,25 @@ private bool shouldAim
{
get
{
- if(this.CasterIsPawn)
+ if (compFireModes != null)
{
- // Check for hunting job
- if (CasterPawn.jobs != null && CasterPawn.jobs.curJob != null && CasterPawn.jobs.curJob.def == JobDefOf.Hunt)
- return true;
-
- // Check for suppression
- CompSuppressable comp = this.caster.TryGetComp();
- if (comp != null)
+ if (this.CasterIsPawn)
{
- if (comp.isSuppressed)
+ // Check for hunting job
+ if (CasterPawn.jobs != null && CasterPawn.jobs.curJob != null && CasterPawn.jobs.curJob.def == JobDefOf.Hunt)
+ return true;
+
+ // Check for suppression
+ CompSuppressable comp = this.caster.TryGetComp();
+ if (comp != null)
{
- return false;
+ if (comp.isSuppressed)
+ {
+ return false;
+ }
}
}
- return this.compFireModes != null && (this.compFireModes.currentAimMode == AimMode.AimedShot || (useDefaultModes && this.compFireModes.Props.aiUseAimMode));
+ return this.compFireModes.currentAimMode == AimMode.AimedShot || (useDefaultModes && this.compFireModes.Props.aiUseAimMode);
}
return false;
}
@@ -96,7 +99,7 @@ private bool useDefaultModes
{
get
{
- return !(CasterIsPawn && CasterPawn.Faction == Faction.OfColony);
+ return !(caster.Faction == Faction.OfColony);
}
}
@@ -112,9 +115,22 @@ public override void WarmupComplete()
{
float targetDist = (this.currentTarget.Cell - this.caster.Position).LengthHorizontal;
int aimTicks = (int)Mathf.Lerp(aimTicksMin, aimTicksMax, (targetDist / 100));
- this.CasterPawn.stances.SetStance(new Stance_Warmup(aimTicks, this.currentTarget, this));
- this.isAiming = true;
- return;
+ if (CasterIsPawn)
+ {
+ this.CasterPawn.stances.SetStance(new Stance_Warmup(aimTicks, this.currentTarget, this));
+ this.isAiming = true;
+ return;
+ }
+ else
+ {
+ Building_TurretGunCR turret = caster as Building_TurretGunCR;
+ if (turret != null)
+ {
+ turret.burstWarmupTicksLeft += aimTicks;
+ this.isAiming = true;
+ return;
+ }
+ }
}
// Shooty stuff
@@ -131,7 +147,7 @@ public override void VerbTickCR()
{
this.WarmupComplete();
}
- if (this.CasterPawn.stances.curStance.GetType() != typeof(Stance_Warmup))
+ if (CasterIsPawn && this.CasterPawn.stances.curStance.GetType() != typeof(Stance_Warmup))
{
this.isAiming = false;
}
@@ -183,7 +199,9 @@ public override void Notify_Dropped()
///
public override bool CanHitTargetFrom(IntVec3 root, TargetInfo targ)
{
- if (this.compFireModes != null && this.compFireModes.currentAimMode == AimMode.HoldFire)
+ if (CasterIsPawn && !CasterPawn.health.capacities.CapableOf(PawnCapacityDefOf.Sight)) return false;
+ if (this.compFireModes != null && this.compFireModes.currentAimMode == AimMode.HoldFire
+ && (!CasterIsPawn || CasterPawn.CurJob == null || CasterPawn.CurJob.def != JobDefOf.Hunt))
return false;
return base.CanHitTargetFrom(root, targ);
}
@@ -195,7 +213,7 @@ protected override bool TryCastShot()
if (!compAmmo.TryReduceAmmoCount())
{
if (compAmmo.hasMagazine)
- compAmmo.StartReload();
+ compAmmo.TryStartReload();
return false;
}
}
diff --git a/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootMortarCR.cs b/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootMortarCR.cs
index 15bb3be..90b39f6 100644
--- a/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootMortarCR.cs
+++ b/Source/CombatRealism/Combat_Realism/Verbs/Verb_ShootMortarCR.cs
@@ -3,16 +3,16 @@
using Verse;
namespace Combat_Realism
{
- public class Verb_ShootMortarCR : Verb_LaunchProjectileCR
+ public class Verb_ShootMortarCR : Verb_ShootCR
{
- public override void WarmupComplete()
+ /*public override void WarmupComplete()
{
base.WarmupComplete();
if (ShooterPawn != null && ShooterPawn.skills != null)
{
ShooterPawn.skills.Learn(SkillDefOf.Shooting, 100);
}
- }
+ }*/
public override ShiftVecReport ShiftVecReportFor(TargetInfo target)
{
diff --git a/Source/CombatRealism/Detours/DetourInjector.cs b/Source/CombatRealism/Detours/DetourInjector.cs
index 01dbb66..86e8db3 100644
--- a/Source/CombatRealism/Detours/DetourInjector.cs
+++ b/Source/CombatRealism/Detours/DetourInjector.cs
@@ -24,11 +24,6 @@ public override bool Inject()
typeof(Detours_TooltipUtility).GetMethod("ShotCalculationTipString", BindingFlags.Static | BindingFlags.NonPublic)))
return false;
- // Detour DrawTurret
- if (!CommunityCoreLibrary.Detours.TryDetourFromTo(typeof(TurretTop).GetMethod("DrawTurret", BindingFlags.Instance | BindingFlags.Public),
- typeof(Detours_TurretTop).GetMethod("DrawTurret", BindingFlags.Static | BindingFlags.NonPublic)))
- return false;
-
// Detour FloatMenuMaker
if(!CommunityCoreLibrary.Detours.TryDetourFromTo(typeof(FloatMenuMaker).GetMethod("ChoicesAtFor", BindingFlags.Static | BindingFlags.Public),
typeof(Detours_FloatMenuMaker).GetMethod("ChoicesAtFor", BindingFlags.Static | BindingFlags.NonPublic)))
@@ -128,6 +123,17 @@ public override bool Inject()
typeof(Detours_WorkGiver_HunterHunt).GetMethod("HasHuntingWeapon", BindingFlags.Static | BindingFlags.NonPublic)))
return false;
+ // Tradeable
+ if (!CommunityCoreLibrary.Detours.TryDetourFromTo(typeof(Tradeable).GetMethod("PriceFor", BindingFlags.Instance | BindingFlags.Public),
+ typeof(Detours_Tradeable).GetMethod("PriceFor", BindingFlags.Static | BindingFlags.NonPublic)))
+ return false;
+
+ // TradeDeal
+ if (!CommunityCoreLibrary.Detours.TryDetourFromTo(typeof(TradeDeal).GetMethod("UpdateCurrencyCount", BindingFlags.Instance | BindingFlags.Public),
+ typeof(Detours_TradeDeal).GetMethod("UpdateCurrencyCount", BindingFlags.Static | BindingFlags.NonPublic)))
+ return false;
+
+
return true;
}
}
diff --git a/Source/CombatRealism/Detours/Detours_Pawn_EquipmentTracker.cs b/Source/CombatRealism/Detours/Detours_Pawn_EquipmentTracker.cs
index e0ac238..1a84088 100644
--- a/Source/CombatRealism/Detours/Detours_Pawn_EquipmentTracker.cs
+++ b/Source/CombatRealism/Detours/Detours_Pawn_EquipmentTracker.cs
@@ -190,7 +190,7 @@ internal static bool TryStartAttack(this Pawn_EquipmentTracker _this, TargetInfo
}
else if(compAmmo.curMagCount <= 0)
{
- compAmmo.StartReload();
+ compAmmo.TryStartReload();
return false;
}
}
diff --git a/Source/CombatRealism/Detours/Detours_TradeDeal.cs b/Source/CombatRealism/Detours/Detours_TradeDeal.cs
new file mode 100644
index 0000000..a0ed19c
--- /dev/null
+++ b/Source/CombatRealism/Detours/Detours_TradeDeal.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Reflection;
+using RimWorld;
+using Verse;
+using UnityEngine;
+
+namespace Combat_Realism.Detours
+{
+ internal static class Detours_TradeDeal
+ {
+ private static readonly FieldInfo pawnFieldInfo = typeof(Pawn_EquipmentTracker).GetField("pawn", BindingFlags.Instance | BindingFlags.NonPublic);
+
+ internal static void UpdateCurrencyCount(this TradeDeal _this)
+ {
+ float silverCount = 0f;
+ FieldInfo tradeablesFieldInfo = typeof(TradeDeal).GetField("tradeables", BindingFlags.Instance | BindingFlags.NonPublic);
+ List tradeables = (List)tradeablesFieldInfo.GetValue(_this);
+ foreach (Tradeable current in tradeables)
+ {
+ if (!current.IsCurrency)
+ {
+ silverCount += current.CurTotalSilverCost;
+ }
+ }
+ _this.SilverTradeable.countToDrop = -Mathf.CeilToInt(silverCount);
+ }
+ }
+}
diff --git a/Source/CombatRealism/Detours/Detours_Tradeable.cs b/Source/CombatRealism/Detours/Detours_Tradeable.cs
new file mode 100644
index 0000000..9a7eef2
--- /dev/null
+++ b/Source/CombatRealism/Detours/Detours_Tradeable.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using RimWorld;
+using Verse;
+using UnityEngine;
+
+namespace Combat_Realism.Detours
+{
+ internal static class Detours_Tradeable
+ {
+ // Copy-pasted from Tradeable so we don't have to fetch it through reflection
+ private static readonly SimpleCurve LaunchPricePostFactorCurve = new SimpleCurve
+ {
+ new CurvePoint(2000f, 1f),
+ new CurvePoint(12000f, 0.5f),
+ new CurvePoint(200000f, 0.2f)
+ };
+
+ internal static float PriceFor(this Tradeable _this, TradeAction action)
+ {
+ float num = TradeSession.trader.TraderKind.PriceTypeFor(_this.ThingDef, action).PriceMultiplier();
+ float num2 = TradeUtility.RandomPriceFactorFor(TradeSession.trader, _this);
+ float num3 = 1f;
+ if (TradeSession.playerNegotiator != null)
+ {
+ float num4 = Mathf.Clamp01(TradeSession.playerNegotiator.health.capacities.GetEfficiency(PawnCapacityDefOf.Talking));
+ if (action == TradeAction.PlayerBuys)
+ {
+ num3 += 1f - num4;
+ }
+ else
+ {
+ num3 -= 0.5f * (1f - num4);
+ }
+ }
+ float num5;
+ if (action == TradeAction.PlayerBuys)
+ {
+ num5 = _this.BaseMarketValue * (1f - TradeSession.playerNegotiator.GetStatValue(StatDefOf.TradePriceImprovement, true)) * num3 * num * num2;
+ num5 = Mathf.Max(num5, 0.01f);
+ }
+ else
+ {
+ num5 = _this.BaseMarketValue * Find.Storyteller.difficulty.baseSellPriceFactor * _this.AnyThing.GetStatValue(StatDefOf.SellPriceFactor, true) * (1f + TradeSession.playerNegotiator.GetStatValue(StatDefOf.TradePriceImprovement, true)) * num3 * num * num2;
+ num5 *= Detours_Tradeable.LaunchPricePostFactorCurve.Evaluate(num5);
+ num5 = Mathf.Max(num5, 0.01f);
+ if (num5 >= _this.PriceFor(TradeAction.PlayerBuys))
+ {
+ Log.ErrorOnce("Skill of negotitator trying to put sell price above buy price.", 65387);
+ num5 = _this.PriceFor(TradeAction.PlayerBuys);
+ }
+ }
+ if (num5 > 99.5f)
+ {
+ num5 = Mathf.Round(num5);
+ }
+ return num5;
+ }
+ }
+}
diff --git a/Source/CombatRealism/Detours/Detours_TurretTop.cs b/Source/CombatRealism/Detours/Detours_TurretTop.cs
deleted file mode 100644
index 83df325..0000000
--- a/Source/CombatRealism/Detours/Detours_TurretTop.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Reflection;
-using RimWorld;
-using Verse;
-using UnityEngine;
-
-namespace Combat_Realism.Detours
-{
- internal static class Detours_TurretTop
- {
- // *** Turret rendering ***
-
- private static readonly FieldInfo parentTurretFieldInfo = typeof(TurretTop).GetField("parentTurret", BindingFlags.Instance | BindingFlags.NonPublic);
- private static readonly PropertyInfo curRotationPropertyInfo = typeof(TurretTop).GetProperty("CurRotation", BindingFlags.Instance | BindingFlags.NonPublic);
-
- internal static void DrawTurret(this TurretTop _this)
- {
- Matrix4x4 matrix = default(Matrix4x4);
- Vector3 vec = new Vector3(1, 1, 1);
- Building_Turret parentTurret = (Building_Turret)parentTurretFieldInfo.GetValue(_this);
- float curRotation = (float)curRotationPropertyInfo.GetValue(_this, null);
- Material topMat = parentTurret.def.building.turretTopMat;
- if (topMat.mainTexture.height >= 256 || topMat.mainTexture.width >= 256)
- {
- vec.x = 2;
- vec.z = 2;
- }
- matrix.SetTRS(parentTurret.DrawPos + Altitudes.AltIncVect, curRotation.ToQuat(), vec);
- Graphics.DrawMesh(MeshPool.plane20, matrix, parentTurret.def.building.turretTopMat, 0);
- }
- }
-}
diff --git a/Textures/Things/Ammo/Cannon/EMP.png b/Textures/Things/Ammo/Cannon/EMP.png
new file mode 100644
index 0000000..a95ec35
Binary files /dev/null and b/Textures/Things/Ammo/Cannon/EMP.png differ
diff --git a/Textures/Things/Ammo/Cannon/HE.png b/Textures/Things/Ammo/Cannon/HE.png
new file mode 100644
index 0000000..aaf0fc6
Binary files /dev/null and b/Textures/Things/Ammo/Cannon/HE.png differ
diff --git a/Textures/Things/Ammo/Cannon/HEAT.png b/Textures/Things/Ammo/Cannon/HEAT.png
new file mode 100644
index 0000000..de7e608
Binary files /dev/null and b/Textures/Things/Ammo/Cannon/HEAT.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_a.png b/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_a.png
new file mode 100644
index 0000000..1e11de8
Binary files /dev/null and b/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_a.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_b.png b/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_b.png
new file mode 100644
index 0000000..f288a84
Binary files /dev/null and b/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_b.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_c.png b/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_c.png
new file mode 100644
index 0000000..53c028f
Binary files /dev/null and b/Textures/Things/Ammo/Neolithic/Arrow/Plasteel/Plasteel_c.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_a.png b/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_a.png
new file mode 100644
index 0000000..8d10aa8
Binary files /dev/null and b/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_a.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_b.png b/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_b.png
new file mode 100644
index 0000000..5633f53
Binary files /dev/null and b/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_b.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_c.png b/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_c.png
new file mode 100644
index 0000000..424a934
Binary files /dev/null and b/Textures/Things/Ammo/Neolithic/Arrow/Steel/Steel_c.png differ
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Arrow_a.png b/Textures/Things/Ammo/Neolithic/Arrow/Stone/Stone_a.png
similarity index 100%
rename from Textures/Things/Ammo/Neolithic/Arrow/Arrow_a.png
rename to Textures/Things/Ammo/Neolithic/Arrow/Stone/Stone_a.png
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Arrow_b.png b/Textures/Things/Ammo/Neolithic/Arrow/Stone/Stone_b.png
similarity index 100%
rename from Textures/Things/Ammo/Neolithic/Arrow/Arrow_b.png
rename to Textures/Things/Ammo/Neolithic/Arrow/Stone/Stone_b.png
diff --git a/Textures/Things/Ammo/Neolithic/Arrow/Arrow_c.png b/Textures/Things/Ammo/Neolithic/Arrow/Stone/Stone_c.png
similarity index 100%
rename from Textures/Things/Ammo/Neolithic/Arrow/Arrow_c.png
rename to Textures/Things/Ammo/Neolithic/Arrow/Stone/Stone_c.png
diff --git a/Textures/Things/Building/AmmoBench/ammobench_back.png b/Textures/Things/Building/AmmoBench/ammobench_back.png
new file mode 100644
index 0000000..6b9d86f
Binary files /dev/null and b/Textures/Things/Building/AmmoBench/ammobench_back.png differ
diff --git a/Textures/Things/Building/AmmoBench/ammobench_backm.png b/Textures/Things/Building/AmmoBench/ammobench_backm.png
new file mode 100644
index 0000000..85e404a
Binary files /dev/null and b/Textures/Things/Building/AmmoBench/ammobench_backm.png differ
diff --git a/Textures/Things/Building/AmmoBench/ammobench_front.png b/Textures/Things/Building/AmmoBench/ammobench_front.png
new file mode 100644
index 0000000..d7e9bf2
Binary files /dev/null and b/Textures/Things/Building/AmmoBench/ammobench_front.png differ
diff --git a/Textures/Things/Building/AmmoBench/ammobench_frontm.png b/Textures/Things/Building/AmmoBench/ammobench_frontm.png
new file mode 100644
index 0000000..0438f21
Binary files /dev/null and b/Textures/Things/Building/AmmoBench/ammobench_frontm.png differ
diff --git a/Textures/Things/Building/AmmoBench/ammobench_side.png b/Textures/Things/Building/AmmoBench/ammobench_side.png
new file mode 100644
index 0000000..0042e6b
Binary files /dev/null and b/Textures/Things/Building/AmmoBench/ammobench_side.png differ
diff --git a/Textures/Things/Building/AmmoBench/ammobench_sidem.png b/Textures/Things/Building/AmmoBench/ammobench_sidem.png
new file mode 100644
index 0000000..0002e42
Binary files /dev/null and b/Textures/Things/Building/AmmoBench/ammobench_sidem.png differ
diff --git a/Textures/Things/Building/Nanoforge/Nanoforge_back.png b/Textures/Things/Building/Nanoforge/Nanoforge_back.png
new file mode 100644
index 0000000..642e3c4
Binary files /dev/null and b/Textures/Things/Building/Nanoforge/Nanoforge_back.png differ
diff --git a/Textures/Things/Building/Nanoforge/Nanoforge_back_m.png b/Textures/Things/Building/Nanoforge/Nanoforge_back_m.png
new file mode 100644
index 0000000..695c4f0
Binary files /dev/null and b/Textures/Things/Building/Nanoforge/Nanoforge_back_m.png differ
diff --git a/Textures/Things/Building/Nanoforge/Nanoforge_front.png b/Textures/Things/Building/Nanoforge/Nanoforge_front.png
new file mode 100644
index 0000000..4790367
Binary files /dev/null and b/Textures/Things/Building/Nanoforge/Nanoforge_front.png differ
diff --git a/Textures/Things/Building/Nanoforge/Nanoforge_front_m.png b/Textures/Things/Building/Nanoforge/Nanoforge_front_m.png
new file mode 100644
index 0000000..172adfb
Binary files /dev/null and b/Textures/Things/Building/Nanoforge/Nanoforge_front_m.png differ
diff --git a/Textures/Things/Building/Nanoforge/Nanoforge_side.png b/Textures/Things/Building/Nanoforge/Nanoforge_side.png
new file mode 100644
index 0000000..d09db83
Binary files /dev/null and b/Textures/Things/Building/Nanoforge/Nanoforge_side.png differ
diff --git a/Textures/Things/Building/Nanoforge/Nanoforge_side_m.png b/Textures/Things/Building/Nanoforge/Nanoforge_side_m.png
new file mode 100644
index 0000000..3590087
Binary files /dev/null and b/Textures/Things/Building/Nanoforge/Nanoforge_side_m.png differ
diff --git a/Textures/Things/Projectile/Cannon/EMP.png b/Textures/Things/Projectile/Cannon/EMP.png
new file mode 100644
index 0000000..2c7692d
Binary files /dev/null and b/Textures/Things/Projectile/Cannon/EMP.png differ
diff --git a/Textures/Things/Projectile/Cannon/HE.png b/Textures/Things/Projectile/Cannon/HE.png
new file mode 100644
index 0000000..d7bb30e
Binary files /dev/null and b/Textures/Things/Projectile/Cannon/HE.png differ
diff --git a/Textures/Things/Projectile/Cannon/HEAT.png b/Textures/Things/Projectile/Cannon/HEAT.png
new file mode 100644
index 0000000..3b3c639
Binary files /dev/null and b/Textures/Things/Projectile/Cannon/HEAT.png differ
diff --git a/Textures/Things/Projectile/Mortar/EMP.png b/Textures/Things/Projectile/Mortar/EMP.png
new file mode 100644
index 0000000..d9b5ac1
Binary files /dev/null and b/Textures/Things/Projectile/Mortar/EMP.png differ
diff --git a/Textures/Things/Projectile/Mortar/HE.png b/Textures/Things/Projectile/Mortar/HE.png
new file mode 100644
index 0000000..1d67d46
Binary files /dev/null and b/Textures/Things/Projectile/Mortar/HE.png differ
diff --git a/Textures/Things/Projectile/Mortar/Illumination.png b/Textures/Things/Projectile/Mortar/Illumination.png
new file mode 100644
index 0000000..1fc1cee
Binary files /dev/null and b/Textures/Things/Projectile/Mortar/Illumination.png differ
diff --git a/Textures/Things/Projectile/Mortar/Incendiary.png b/Textures/Things/Projectile/Mortar/Incendiary.png
new file mode 100644
index 0000000..3427e2a
Binary files /dev/null and b/Textures/Things/Projectile/Mortar/Incendiary.png differ