Default warp point names (#21017)

This commit is contained in:
Leon Friedrich
2023-10-16 16:39:39 +11:00
committed by GitHub
parent 422544035d
commit 1f0c9314fd
6 changed files with 53 additions and 21 deletions

View File

@@ -58,14 +58,13 @@ public sealed class NinjaConditionsSystem : EntitySystem
{
if (!TryComp<NinjaRoleComponent>(mindId, out var role) ||
role.SpiderChargeTarget == null ||
!TryComp<WarpPointComponent>(role.SpiderChargeTarget, out var warp) ||
warp.Location == null)
!TryComp<WarpPointComponent>(role.SpiderChargeTarget, out var warp))
{
// this should never really happen but eh
return Loc.GetString("objective-condition-spider-charge-title-no-target");
}
return Loc.GetString("objective-condition-spider-charge-title", ("location", warp.Location));
return Loc.GetString("objective-condition-spider-charge-title", ("location", warp.Location ?? Name(role.SpiderChargeTarget.Value)));
}
// steal research