diff --git a/Defs/RulePackDefs/RulePacks_Swearing.xml b/Defs/RulePackDefs/RulePacks_Swearing.xml index 39bc00c748..8c269ea904 100644 --- a/Defs/RulePackDefs/RulePacks_Swearing.xml +++ b/Defs/RulePackDefs/RulePacks_Swearing.xml @@ -31,4 +31,225 @@ + + SmokeCoverMote + + +
  • rule->[smokeCover]
  • +
    + +
  • + smokeCover + NameBanks/SwearLibrarySmokeCover +
  • +
    +
    +
    + + + TendingSelfMote + + +
  • rule->[tendingSelf]
  • +
    + +
  • + tendingSelf + NameBanks/SwearLibraryTendingSelf +
  • +
    +
    +
    + + + WeaponPickupRangedMote + + +
  • rule->[weaponPickupRanged]
  • +
    + +
  • + weaponPickupRanged + NameBanks/SwearLibraryWeaponPickupRanged +
  • +
    +
    +
    + + WeaponPickupMeleeMote + + +
  • rule->[weaponPickupMelee]
  • +
    + +
  • + weaponPickupMelee + NameBanks/SwearLibraryWeaponPickupMelee +
  • +
    +
    +
    + + AoeDeployedMote + + +
  • rule->[aoeDeployed]
  • +
    + +
  • + aoeDeployed + NameBanks/SwearLibraryAoeDeployed +
  • +
    +
    +
    + + FlareDeployedMote + + +
  • rule->[flareDeployed]
  • +
    + +
  • + flareDeployed + NameBanks/SwearLibraryFlareDeployed +
  • +
    +
    +
    + + GasMaskOnMote + + +
  • rule->[gasMaskOn]
  • +
    + +
  • + gasMaskOn + NameBanks/SwearLibraryGasMaskOn +
  • +
    +
    +
    + + GasMaskOffMote + + +
  • rule->[gasMaskOff]
  • +
    + +
  • + gasMaskOff + NameBanks/SwearLibraryGasMaskOff +
  • +
    +
    +
    + + + FireSel_SuppressingCloseMote + + +
  • rule->[fireSel_SuppressingClose]
  • +
    + +
  • + fireSel_SuppressingClose + NameBanks/SwearLibraryFireSel_SuppressingClose +
  • +
    +
    +
    + + + + FireSel_SuppressingFarMote + + +
  • rule->[fireSel_SuppressingFar]
  • +
    + +
  • + fireSel_SuppressingFar + NameBanks/SwearLibraryFireSel_SuppressingFar +
  • +
    +
    +
    + + + FireSel_AimingBadVisibilityMote + + +
  • rule->[fireSel_AimingBadVisibility]
  • +
    + +
  • + fireSel_AimingBadVisibility + NameBanks/SwearLibraryFireSel_AimingBadVisibility +
  • +
    +
    +
    + + + FireSel_AutoCloseMote + + +
  • rule->[fireSel_AutoClose]
  • +
    + +
  • + fireSel_AutoClose + NameBanks/SwearLibraryFireSel_AutoClose +
  • +
    +
    +
    + + + FireSel_AutoFarMote + + +
  • rule->[fireSel_AutoFar]
  • +
    + +
  • + fireSel_AutoFar + NameBanks/SwearLibraryFireSel_AutoFar +
  • +
    +
    +
    + + + FireSel_VeryLowAmmoMote + + +
  • rule->[fireSel_VeryLowAmmo]
  • +
    + +
  • + fireSel_VeryLowAmmo + NameBanks/SwearLibraryFireSel_VeryLowAmmo +
  • +
    +
    +
    + + + FireSel_LowAmmoMote + + +
  • rule->[fireSel_LowAmmo]
  • +
    + +
  • + fireSel_LowAmmo + NameBanks/SwearLibraryFireSel_LowAmmo +
  • +
    +
    +
    + \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryAoeDeployed.txt b/Languages/English/Strings/NameBanks/SwearLibraryAoeDeployed.txt new file mode 100644 index 0000000000..04d4ef9bd8 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryAoeDeployed.txt @@ -0,0 +1,4 @@ +Launching! +Fire in the hole! +Close your ears! +Bomb out! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AimingBadVisibility.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AimingBadVisibility.txt new file mode 100644 index 0000000000..a22a834939 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AimingBadVisibility.txt @@ -0,0 +1,11 @@ +I can barely see anything... +See that silhouette? +Did that spot just move? +I'll try to pick them off, let me aim +Wish I could see something +They're over there! Oh, wait, no... +Anyone saw where they are? +Shooting blind here... +See something? +Gonna have to aim carefully here +Need to line up my shot \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AutoClose.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AutoClose.txt new file mode 100644 index 0000000000..51455c7b3e --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AutoClose.txt @@ -0,0 +1,3 @@ +Get some! GET SOME! +How do you like full auto, you bastard? +Switching to auto! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AutoFar.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AutoFar.txt new file mode 100644 index 0000000000..784179f970 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_AutoFar.txt @@ -0,0 +1,11 @@ +Dig in and gun 'em down! +Keep them down while I aim +We got targets, far +Contact! +Pin them down for me! +Trying to aim here, come on! +How do you aim this thing, again? +That's gonna be a long shot +Shoot 'em, over there! +They're over there! +I see them, right there! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_LowAmmo.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_LowAmmo.txt new file mode 100644 index 0000000000..2f922ac1aa --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_LowAmmo.txt @@ -0,0 +1,8 @@ +Burning through ammo fast! +Running low on ammo +Running dry here! +My ammo's running low +On reserves +Draining ammo fast +Gonna need more ammo soon +Toss me some ammo! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_SuppressingClose.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_SuppressingClose.txt new file mode 100644 index 0000000000..dcb67505e5 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_SuppressingClose.txt @@ -0,0 +1,14 @@ +Suppressive fire! +Suppressing! +They're coming! +They're charging at me! +We got a runner! +Brace! +Oh don't you make one more step!.. +I'll keep them down +Stay down you bastard! +Getting a bit too close! +Shoot! Shoot! +Lighting 'em up! +Where do you think you're going? +Why don't you sit this one out? \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_SuppressingFar.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_SuppressingFar.txt new file mode 100644 index 0000000000..4026654759 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_SuppressingFar.txt @@ -0,0 +1,8 @@ +They're closing in! +Suppressing that one! +Gun 'em down! +Think you're fast enough? +Stop walking if you want to live! +Suppressing! +Are they walking towards me? +You think you can cross this and live? \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFireSel_VeryLowAmmo.txt b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_VeryLowAmmo.txt new file mode 100644 index 0000000000..9b902b08cf --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFireSel_VeryLowAmmo.txt @@ -0,0 +1,7 @@ +On my last mag here! +Running dry! +Should've taken that extra clip... +Gonna need a resupply soon +Anyone has spare ammo? +No ammo here! +Get me some ammo here! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryFlareDeployed.txt b/Languages/English/Strings/NameBanks/SwearLibraryFlareDeployed.txt new file mode 100644 index 0000000000..2e440110e8 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryFlareDeployed.txt @@ -0,0 +1,4 @@ +Launching flare +Close your eyes, everyone +Flare out! +Flaring them! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryGasMaskOff.txt b/Languages/English/Strings/NameBanks/SwearLibraryGasMaskOff.txt new file mode 100644 index 0000000000..6650f11788 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryGasMaskOff.txt @@ -0,0 +1,4 @@ +Don't need a gas mask anymore +Alright, get those masks off +Taking the mask off +Feels good to have this gas mask off my face \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryGasMaskOn.txt b/Languages/English/Strings/NameBanks/SwearLibraryGasMaskOn.txt new file mode 100644 index 0000000000..9a6267b837 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryGasMaskOn.txt @@ -0,0 +1,11 @@ +Gas! Gas! +Put your masks on! +Masking up +Gas mask on +Get a mask on! +Get your masks up +Can't breathe... +Getting harder to breathe here! +What is that smell? +Is that gas? +I can barely breathe already and you want me to put this thing on? \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibrarySmokeCover.txt b/Languages/English/Strings/NameBanks/SwearLibrarySmokeCover.txt new file mode 100644 index 0000000000..0cfa1da2bb --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibrarySmokeCover.txt @@ -0,0 +1,4 @@ +Smoke out! +I'll cover you +Deploying smoke +Hang in there, I got you! \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryTendingSelf.txt b/Languages/English/Strings/NameBanks/SwearLibraryTendingSelf.txt new file mode 100644 index 0000000000..b1816662d1 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryTendingSelf.txt @@ -0,0 +1,4 @@ +Need to triage this quick +Where was that damn medkit... +I'm bleeding here! +Got me good, didn't it? \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryWeaponPickupMelee.txt b/Languages/English/Strings/NameBanks/SwearLibraryWeaponPickupMelee.txt new file mode 100644 index 0000000000..9d560fc60a --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryWeaponPickupMelee.txt @@ -0,0 +1,4 @@ +This'll do +This one's mine! +Just need to reach it... +I've got something for you here \ No newline at end of file diff --git a/Languages/English/Strings/NameBanks/SwearLibraryWeaponPickupRanged.txt b/Languages/English/Strings/NameBanks/SwearLibraryWeaponPickupRanged.txt new file mode 100644 index 0000000000..f6eff44f21 --- /dev/null +++ b/Languages/English/Strings/NameBanks/SwearLibraryWeaponPickupRanged.txt @@ -0,0 +1,6 @@ +A gun, for me? +Finally, something with ammo +Grab that gun! +Free gun? +I wonder if this one's loaded +That'll work nicely \ No newline at end of file diff --git a/Source/CombatExtended/CombatExtended/AI/Comps/CompFireSelection.cs b/Source/CombatExtended/CombatExtended/AI/Comps/CompFireSelection.cs index bb414df0b7..0d540db890 100755 --- a/Source/CombatExtended/CombatExtended/AI/Comps/CompFireSelection.cs +++ b/Source/CombatExtended/CombatExtended/AI/Comps/CompFireSelection.cs @@ -118,12 +118,25 @@ public void OptimizeModes(CompFireModes fireModes, Verb verb, LocalTargetInfo ca { fireModes.TrySetAimMode(AimMode.SuppressFire); fireModes.TrySetFireMode(FireMode.AutoFire); + + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_SuppressingCloseMote, SelPawn); + } + return; } if (shotDist <= 30) { fireModes.TrySetAimMode(AimMode.Snapshot); fireModes.TrySetFireMode(FireMode.AutoFire); + + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_SuppressingFarMote, SelPawn); + } return; } } @@ -134,6 +147,12 @@ public void OptimizeModes(CompFireModes fireModes, Verb verb, LocalTargetInfo ca { fireModes.TrySetAimMode(AimMode.AimedShot); fireModes.TrySetFireMode(FireMode.BurstFire); + + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_AimingBadVisibilityMote, SelPawn); + } return; } if (recoilFactor <= 0.60f) @@ -142,10 +161,21 @@ public void OptimizeModes(CompFireModes fireModes, Verb verb, LocalTargetInfo ca { fireModes.TrySetAimMode(AimMode.Snapshot); fireModes.TrySetFireMode(FireMode.AutoFire); + + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_AutoCloseMote, SelPawn); + } return; } fireModes.TrySetAimMode(AimMode.AimedShot); fireModes.TrySetFireMode(FireMode.AutoFire); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_AutoFarMote, SelPawn); + } return; } if (recoilFactor > 3.5f && shotDist / range >= 0.6f) @@ -171,12 +201,22 @@ public void OptimizeModes(CompFireModes fireModes, Verb verb, LocalTargetInfo ca { fireModes.TrySetAimMode(AimMode.AimedShot); fireModes.TrySetFireMode(FireMode.SingleFire); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_VeryLowAmmoMote, SelPawn); + } return; } if (bullets < verbShoot.CompAmmo.MagSize * 1.5f && shotDist > 35) { fireModes.TrySetAimMode(AimMode.AimedShot); fireModes.TrySetFireMode(FireMode.BurstFire); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FireSel_LowAmmoMote, SelPawn); + } return; } fireModes.TrySetAimMode(AimMode.AimedShot); diff --git a/Source/CombatExtended/CombatExtended/AI/Comps/CompGasMask.cs b/Source/CombatExtended/CombatExtended/AI/Comps/CompGasMask.cs index 6c736ed1bd..7588e7f052 100755 --- a/Source/CombatExtended/CombatExtended/AI/Comps/CompGasMask.cs +++ b/Source/CombatExtended/CombatExtended/AI/Comps/CompGasMask.cs @@ -91,6 +91,12 @@ private void WearMask() SelPawn.inventory.innerContainer.Remove(apparel); SelPawn.apparel.Wear(apparel); maskEquiped = true; + + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.GasMaskOnMote, SelPawn); + } return; } } @@ -104,6 +110,11 @@ private void RemoveMask() { SelPawn.apparel.Remove(apparel); SelPawn.inventory.innerContainer.TryAddOrTransfer(apparel); + if (Rand.Chance(0.2f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.GasMaskOffMote, SelPawn); + } break; } } diff --git a/Source/CombatExtended/CombatExtended/AI/Comps/CompOpportunisticSwitch.cs b/Source/CombatExtended/CombatExtended/AI/Comps/CompOpportunisticSwitch.cs index 3402c5e1a2..6f05cdc93b 100755 --- a/Source/CombatExtended/CombatExtended/AI/Comps/CompOpportunisticSwitch.cs +++ b/Source/CombatExtended/CombatExtended/AI/Comps/CompOpportunisticSwitch.cs @@ -163,6 +163,11 @@ public bool TryUseAOE(Verb verb, LocalTargetInfo castTarg, LocalTargetInfo destT var job = JobMaker.MakeJob(CE_JobDefOf.OpportunisticAttack, weapon, targetInfo); job.maxNumStaticAttacks = 1; SelPawn.jobs.StartJob(job, JobCondition.InterruptForced, cancelBusyStances: false); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.AoeDeployedMote, SelPawn); + } return true; } } @@ -210,6 +215,11 @@ public bool TryFlare(Verb verb, LocalTargetInfo castTarg, LocalTargetInfo destTa job.maxNumStaticAttacks = 1; SelPawn.jobs.StartJob(job, JobCondition.InterruptForced); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.FlareDeployedMote, SelPawn); + } return true; } } diff --git a/Source/CombatExtended/CombatExtended/AI/Comps/CompTend.cs b/Source/CombatExtended/CombatExtended/AI/Comps/CompTend.cs index 2b6f9b4cbe..004ee4d84e 100755 --- a/Source/CombatExtended/CombatExtended/AI/Comps/CompTend.cs +++ b/Source/CombatExtended/CombatExtended/AI/Comps/CompTend.cs @@ -75,6 +75,11 @@ public override Job TryGiveTacticalJob() } lastTendJobAt = GenTicks.TicksGame; Job job = JobMaker.MakeJob(CE_JobDefOf.TendSelf, SelPawn); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.TendingSelfMote, SelPawn); + } job.endAfterTendedOnce = false; return job; } diff --git a/Source/CombatExtended/CombatExtended/AI/Comps/CompUrgentWeaponPickup.cs b/Source/CombatExtended/CombatExtended/AI/Comps/CompUrgentWeaponPickup.cs index 07e98c4e91..6864d7e21d 100755 --- a/Source/CombatExtended/CombatExtended/AI/Comps/CompUrgentWeaponPickup.cs +++ b/Source/CombatExtended/CombatExtended/AI/Comps/CompUrgentWeaponPickup.cs @@ -167,6 +167,11 @@ private void CheckPrimaryEquipment() Job equip = JobMaker.MakeJob(JobDefOf.Equip, weapon); SelPawn.jobs.jobQueue.EnqueueFirst(equip); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.WeaponPickupRangedMote, SelPawn); + } return; } } @@ -192,6 +197,11 @@ private void CheckPrimaryEquipment() Job job = JobMaker.MakeJob(JobDefOf.Equip, thing); SelPawn.jobs.StartJob(job, JobCondition.InterruptForced, resumeCurJobAfterwards: true); + if (Rand.Chance(0.5f)) + { + var tauntThrower = (TauntThrower)(SelPawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.WeaponPickupMeleeMote, SelPawn); + } return; } } diff --git a/Source/CombatExtended/CombatExtended/DefOfs/CE_RulePackDefOf.cs b/Source/CombatExtended/CombatExtended/DefOfs/CE_RulePackDefOf.cs index 5218448726..ba4054f396 100755 --- a/Source/CombatExtended/CombatExtended/DefOfs/CE_RulePackDefOf.cs +++ b/Source/CombatExtended/CombatExtended/DefOfs/CE_RulePackDefOf.cs @@ -11,6 +11,27 @@ static CE_RulePackDefOf() } public static RulePackDef AttackMote; public static RulePackDef SuppressedMote; + + public static RulePackDef SmokeCoverMote; + public static RulePackDef TendingSelfMote; + + public static RulePackDef WeaponPickupRangedMote; + public static RulePackDef WeaponPickupMeleeMote; + + public static RulePackDef AoeDeployedMote; + public static RulePackDef FlareDeployedMote; + + public static RulePackDef GasMaskOnMote; + public static RulePackDef GasMaskOffMote; + + public static RulePackDef FireSel_SuppressingCloseMote; + public static RulePackDef FireSel_SuppressingFarMote; + public static RulePackDef FireSel_AimingBadVisibilityMote; + public static RulePackDef FireSel_AutoCloseMote; + public static RulePackDef FireSel_AutoFarMote; + public static RulePackDef FireSel_VeryLowAmmoMote; + public static RulePackDef FireSel_LowAmmoMote; + public static RulePackDef DamageEvent_ShellingExplosion; public static RulePackDef DamageEvent_CookOff; public static RulePackDef DamageEvent_Shelling; diff --git a/Source/CombatExtended/CombatExtended/SuppressionUtility.cs b/Source/CombatExtended/CombatExtended/SuppressionUtility.cs index c9d43b2217..542161bde2 100755 --- a/Source/CombatExtended/CombatExtended/SuppressionUtility.cs +++ b/Source/CombatExtended/CombatExtended/SuppressionUtility.cs @@ -59,6 +59,11 @@ public static bool TryRequestHelp(Pawn pawn) { continue; } + if (Rand.Chance(0.4f)) + { + var tauntThrower = (TauntThrower)(pawn.Map.GetComponent(typeof(TauntThrower))); + tauntThrower?.TryThrowTaunt(CE_RulePackDefOf.SmokeCoverMote, pawn); + } Job job = JobMaker.MakeJob(CE_JobDefOf.OpportunisticAttack, grenade, pawn.Position); job.maxNumStaticAttacks = 1; other.jobs.StartJob(job, JobCondition.InterruptForced);