Contraband examine changes (again) (#36032)

* g

* no one caught it in review, damn
This commit is contained in:
Killerqu00
2025-04-18 03:23:02 +02:00
committed by GitHub
parent 4f24b25cf9
commit e0308d0913
9 changed files with 17 additions and 16 deletions

View File

@@ -84,26 +84,21 @@ public sealed class ContrabandSystem : EntitySystem
}
}
String carryingMessage;
// either its fully restricted, you have no departments, or your departments dont intersect with the restricted departments
// if it is fully restricted, you're department-less, or your department isn't in the allowed list, you cannot carry it. Otherwise, you can.
var carryingMessage = Loc.GetString("contraband-examine-text-avoid-carrying-around");
var iconTexture = "/Textures/Interface/VerbIcons/lock-red.svg.192dpi.png";
if (departments.Intersect(component.AllowedDepartments).Any()
|| jobs.Contains(jobId))
{
carryingMessage = Loc.GetString("contraband-examine-text-in-the-clear");
iconTexture = "/Textures/Interface/VerbIcons/unlock-green.svg.192dpi.png";
}
else
{
// otherwise fine to use :tm:
carryingMessage = Loc.GetString("contraband-examine-text-avoid-carrying-around");
}
var examineMarkup = GetContrabandExamine(departmentExamineMessage, carryingMessage);
_examine.AddDetailedExamineVerb(args,
_examine.AddHoverExamineVerb(args,
component,
examineMarkup,
Loc.GetString("contraband-examinable-verb-text"),
"/Textures/Interface/VerbIcons/lock.svg.192dpi.png",
Loc.GetString("contraband-examinable-verb-message"));
examineMarkup.ToMarkup(),
iconTexture);
}
private FormattedMessage GetContrabandExamine(String deptMessage, String carryMessage)