Skip to content

Commit

Permalink
Add verb translation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
N7Huntsman committed Aug 22, 2024
1 parent a536e77 commit 280a171
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
16 changes: 13 additions & 3 deletions Languages/English/Keyed/Keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@
<CE_ReloadDesc>Reloads this gun.</CE_ReloadDesc>
<CE_TurretReloading>Reloading</CE_TurretReloading>

<!-- Ranged Attack -->
<CE_OutOfBounds>Out of bounds</CE_OutOfBounds>
<CE_NoSelfTarget>Can't target self</CE_NoSelfTarget>
<CE_NoLoS>No line of sight</CE_NoLoS>
<CE_BlockedRoof>Blocked by roof</CE_BlockedRoof>
<CE_BlockedShield>Shooting disallowed by </CE_BlockedShield>
<CE_BlockedMaxRange>Outside of range</CE_BlockedMaxRange>
<CE_BlockedMinRange>Within minimum range</CE_BlockedMinRange>

<!-- Inventory -->
<CE_TakeFromOther_Equipping>Equipping</CE_TakeFromOther_Equipping>
<CE_TakeFromOther_Taking>Taking</CE_TakeFromOther_Taking>
Expand Down Expand Up @@ -122,10 +131,10 @@
<CE_degrees>&#176;</CE_degrees>
<CE_meters>m</CE_meters>
<CE_WeaponPenetrationFactor>Weapon penetration factor</CE_WeaponPenetrationFactor>
<CE_WeaponPenetrationSkillFactor>Skill factor</CE_WeaponPenetrationSkillFactor>
<CE_WeaponPenetrationOtherFactors>Other factors</CE_WeaponPenetrationOtherFactors>
<CE_WeaponPenetrationSkillFactor>Skill factor</CE_WeaponPenetrationSkillFactor>
<CE_WeaponPenetrationOtherFactors>Other factors</CE_WeaponPenetrationOtherFactors>
<CE_AdjustedForWeapon>Adjusted for weapon</CE_AdjustedForWeapon>
<CE_RangedQualityMultiplier>Penetration quality factor</CE_RangedQualityMultiplier>
<CE_RangedQualityMultiplier>Penetration quality factor</CE_RangedQualityMultiplier>
<CE_DPS>Damage per second</CE_DPS>
<CE_DamageVariation>Damage variation</CE_DamageVariation>
<CE_FinalAverageDamage>Final average damage</CE_FinalAverageDamage>
Expand Down Expand Up @@ -154,6 +163,7 @@
<!-- Assign menu -->
<CE_UpdateLoadoutNow>Rearm</CE_UpdateLoadoutNow>


<!-- Uncompiled dev build popup -->
<CE_UncompiledDevBuild>Uncompiled CE dev build\n\nYou're running a development build of Combat Extended that is not intended for gameplay purposes, this will create a large amount of errors if you attempt to play a colony.\n\nEither download an official CE release from GitHub's Releases section, or if you need the latest development snapshot for testing purposes, get it from the link below.</CE_UncompiledDevBuild>
<CE_GetCompiledDevBuild>Get development snapshot</CE_GetCompiledDevBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,15 +847,15 @@ public virtual bool CanHitTargetFrom(IntVec3 root, LocalTargetInfo targ, out str
}
if (caster?.Map == null || !targ.Cell.InBounds(caster.Map) || !root.InBounds(caster.Map))
{
report = "Out of bounds";
report = "CE_OutofBounds".Translate();
return false;
}
// Check target self
if (targ.Thing != null && targ.Thing == caster)
{
if (!verbProps.targetParams.canTargetSelf)
{
report = "Can't target self";
report = "CE_NoSelfTarget".Translate();
return false;
}
return true;
Expand All @@ -866,7 +866,7 @@ public virtual bool CanHitTargetFrom(IntVec3 root, LocalTargetInfo targ, out str
RoofDef roofDef = caster.Map.roofGrid.RoofAt(targ.Cell);
if (roofDef != null && roofDef.isThickRoof)
{
report = "Blocked by roof";
report = "CE_BlockedRoof".Translate();
return false;
}
}
Expand All @@ -889,7 +889,7 @@ public virtual bool CanHitTargetFrom(IntVec3 root, LocalTargetInfo targ, out str
//pawns can use turrets while wearing shield belts, but the shield is disabled for the duration via Harmony patch (see Harmony-ShieldBelt.cs)
if (!current.AllowVerbCast(this) && !(current.TryGetComp<CompShield>() != null && isTurretOperator))
{
report = "Shooting disallowed by " + current.LabelShort;
report = "CE_BlockedShield".Translate() + current.LabelShort;
return false;
}
}
Expand All @@ -902,15 +902,15 @@ public virtual bool CanHitTargetFrom(IntVec3 root, LocalTargetInfo targ, out str
float lengthHorizontalSquared = (root - targ.Cell).LengthHorizontalSquared;
if (lengthHorizontalSquared > EffectiveRange * EffectiveRange)
{
report = "Out of range";
report = "CE_BlockedMaxRange".Translate();
}
else if (lengthHorizontalSquared < verbProps.minRange * verbProps.minRange)
{
report = "Within minimum range";
report = "CE_BlockedMinRange".Translate();
}
else
{
report = "No line of sight";
report = "CE_NoLoS".Translate();
}
return false;
}
Expand Down

0 comments on commit 280a171

Please sign in to comment.