adapt codebase
This commit is contained in:
@@ -86,7 +86,7 @@ public sealed partial class StencilOverlay : Overlay
|
||||
//CP14 Overlays
|
||||
if (_entManager.TryGetComponent<CP14CloudShadowsComponent>(mapUid, out var shadows))
|
||||
{
|
||||
DrawCloudShadows(args, shadows, invMatrix);
|
||||
DrawCloudShadows(args, res, shadows, invMatrix);
|
||||
}
|
||||
//CP14 Overlays end
|
||||
|
||||
|
||||
@@ -7,7 +7,11 @@ namespace Content.Client.Overlays;
|
||||
|
||||
public sealed partial class StencilOverlay
|
||||
{
|
||||
private void DrawCloudShadows(in OverlayDrawArgs args, CP14CloudShadowsComponent cloudComp, Matrix3x2 invMatrix)
|
||||
private void DrawCloudShadows(
|
||||
in OverlayDrawArgs args,
|
||||
CachedResources res,
|
||||
CP14CloudShadowsComponent cloudComp,
|
||||
Matrix3x2 invMatrix)
|
||||
{
|
||||
var worldHandle = args.WorldHandle;
|
||||
var mapId = args.MapId;
|
||||
@@ -18,7 +22,7 @@ public sealed partial class StencilOverlay
|
||||
// Cut out the irrelevant bits via stencil
|
||||
// This is why we don't just use parallax; we might want specific tiles to get drawn over
|
||||
// particularly for planet maps or stations.
|
||||
worldHandle.RenderInRenderTarget(_blep!, () =>
|
||||
worldHandle.RenderInRenderTarget(res.Blep!, () =>
|
||||
{
|
||||
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();
|
||||
_grids.Clear();
|
||||
@@ -51,7 +55,7 @@ public sealed partial class StencilOverlay
|
||||
|
||||
worldHandle.SetTransform(Matrix3x2.Identity);
|
||||
worldHandle.UseShader(_protoManager.Index<ShaderPrototype>("StencilMask").Instance());
|
||||
worldHandle.DrawTextureRect(_blep!.Texture, worldBounds);
|
||||
worldHandle.DrawTextureRect(res.Blep!.Texture, worldBounds);
|
||||
var curTime = _timing.RealTime;
|
||||
var sprite = _sprite.GetFrame(new SpriteSpecifier.Texture(cloudComp.ParallaxPath), curTime);
|
||||
|
||||
|
||||
@@ -278,6 +278,7 @@ public sealed class PlayTimeTrackingSystem : EntitySystem
|
||||
|
||||
var requirements = _roles.GetRoleRequirements(antag);
|
||||
return JobRequirements.TryRequirementsMet(
|
||||
player.UserId, //CP14
|
||||
requirements,
|
||||
playTimes,
|
||||
out _,
|
||||
|
||||
@@ -138,6 +138,16 @@ public sealed class IdentitySystem : EntitySystem
|
||||
var representation = GetIdentityRepresentation(ent.Owner);
|
||||
var name = GetIdentityName(ent, representation);
|
||||
|
||||
//CP14 override character name
|
||||
if (TryComp<HumanoidAppearanceComponent>(ent, out var humanoid))
|
||||
{
|
||||
var species = _humanoid.GetSpeciesRepresentation(humanoid.Species).ToLower();
|
||||
var age = _humanoid.GetAgeRepresentation(humanoid.Species, humanoid.Age);
|
||||
|
||||
name = age + " " + species;
|
||||
}
|
||||
//CP14 end
|
||||
|
||||
// Clone the old entity's grammar to the identity entity, for loc purposes.
|
||||
if (TryComp<GrammarComponent>(ent, out var grammar))
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public static class JobRequirements
|
||||
{
|
||||
var sys = entManager.System<SharedRoleSystem>();
|
||||
var requirements = sys.GetRoleRequirements(job);
|
||||
return TryRequirementsMet(requirements, playTimes, out reason, entManager, protoManager, profile);
|
||||
return TryRequirementsMet(userId, requirements, playTimes, out reason, entManager, protoManager, profile);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,6 +38,7 @@ public static class JobRequirements
|
||||
/// <param name="reason"> If the requirements were not met, details are provided here. </param>
|
||||
/// <returns>Returns true if all requirements were met or there were no requirements.</returns>
|
||||
public static bool TryRequirementsMet(
|
||||
NetUserId userId, //CP14 add NetUserId for sponsorship checks
|
||||
HashSet<JobRequirement>? requirements,
|
||||
IReadOnlyDictionary<string, TimeSpan> playTimes,
|
||||
[NotNullWhen(false)] out FormattedMessage? reason,
|
||||
|
||||
Reference in New Issue
Block a user