Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verb translation keys #3363

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Languages/English/Keyed/Keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@

<CE_EstimatedHitChance>Estimated hit chance</CE_EstimatedHitChance>

<!-- 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>

<!-- Artillery -->
<CE_ArtilleryTarget_Distance>Distance: {0}/{1} Tiles</CE_ArtilleryTarget_Distance>
<CE_ArtilleryTarget_Distance_Selections>Distance: {0} Tiles\nselections in range: {1}/{2}</CE_ArtilleryTarget_Distance_Selections>
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
Loading