@@ -4,7 +4,6 @@ using Content.Server.GameTicking.Presets;
|
|||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Linguini.Shared.Util;
|
using Linguini.Shared.Util;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Robust.Shared.Prototypes;
|
|
||||||
|
|
||||||
namespace Content.Server.GameTicking.Commands
|
namespace Content.Server.GameTicking.Commands
|
||||||
{
|
{
|
||||||
@@ -12,7 +11,6 @@ namespace Content.Server.GameTicking.Commands
|
|||||||
public sealed class SetGamePresetCommand : IConsoleCommand
|
public sealed class SetGamePresetCommand : IConsoleCommand
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IEntityManager _entity = default!;
|
[Dependency] private readonly IEntityManager _entity = default!;
|
||||||
[Dependency] private readonly IPrototypeManager _prototype = default!;
|
|
||||||
|
|
||||||
public string Command => "setgamepreset";
|
public string Command => "setgamepreset";
|
||||||
public string Description => Loc.GetString("set-game-preset-command-description", ("command", Command));
|
public string Description => Loc.GetString("set-game-preset-command-description", ("command", Command));
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ using Content.Shared.Holopad;
|
|||||||
using Content.Shared.IdentityManagement;
|
using Content.Shared.IdentityManagement;
|
||||||
using Content.Shared.Labels.Components;
|
using Content.Shared.Labels.Components;
|
||||||
using Content.Shared.Mobs;
|
using Content.Shared.Mobs;
|
||||||
using Content.Shared.Mobs.Systems;
|
|
||||||
using Content.Shared.Power;
|
using Content.Shared.Power;
|
||||||
using Content.Shared.Silicons.StationAi;
|
using Content.Shared.Silicons.StationAi;
|
||||||
using Content.Shared.Speech;
|
using Content.Shared.Speech;
|
||||||
@@ -40,7 +39,6 @@ public sealed class HolopadSystem : SharedHolopadSystem
|
|||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||||
[Dependency] private readonly IGameTiming _timing = default!;
|
[Dependency] private readonly IGameTiming _timing = default!;
|
||||||
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
|
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
|
||||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
|
||||||
|
|
||||||
private float _updateTimer = 1.0f;
|
private float _updateTimer = 1.0f;
|
||||||
private const float UpdateTime = 1.0f;
|
private const float UpdateTime = 1.0f;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Content.Server.Administration.Logs;
|
using Content.Server.Administration.Logs;
|
||||||
using Content.Server.DeviceNetwork.Systems;
|
using Content.Server.DeviceNetwork.Systems;
|
||||||
using Content.Shared.ActionBlocker;
|
|
||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
using Content.Shared.DeviceNetwork;
|
using Content.Shared.DeviceNetwork;
|
||||||
using Content.Shared.DeviceNetwork.Events;
|
using Content.Shared.DeviceNetwork.Events;
|
||||||
@@ -17,7 +16,6 @@ namespace Content.Server.SurveillanceCamera;
|
|||||||
public sealed class SurveillanceCameraSystem : SharedSurveillanceCameraSystem
|
public sealed class SurveillanceCameraSystem : SharedSurveillanceCameraSystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
|
||||||
[Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!;
|
[Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!;
|
||||||
[Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
|
[Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
|
||||||
[Dependency] private readonly UserInterfaceSystem _userInterface = default!;
|
[Dependency] private readonly UserInterfaceSystem _userInterface = default!;
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
|
|||||||
{
|
{
|
||||||
SkinColorationStrategyInput.Unary => skinColoration.FromUnary(speciesPrototype.DefaultHumanSkinTone),
|
SkinColorationStrategyInput.Unary => skinColoration.FromUnary(speciesPrototype.DefaultHumanSkinTone),
|
||||||
SkinColorationStrategyInput.Color => skinColoration.ClosestSkinColor(speciesPrototype.DefaultSkinTone),
|
SkinColorationStrategyInput.Color => skinColoration.ClosestSkinColor(speciesPrototype.DefaultSkinTone),
|
||||||
|
_ => skinColoration.ClosestSkinColor(speciesPrototype.DefaultSkinTone),
|
||||||
};
|
};
|
||||||
|
|
||||||
return new(
|
return new(
|
||||||
@@ -109,11 +110,11 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
|
|||||||
Color.Black,
|
Color.Black,
|
||||||
Color.Black,
|
Color.Black,
|
||||||
skinColor,
|
skinColor,
|
||||||
new ()
|
new()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IReadOnlyList<Color> RealisticEyeColors = new List<Color>
|
private static IReadOnlyList<Color> _realisticEyeColors = new List<Color>
|
||||||
{
|
{
|
||||||
Color.Brown,
|
Color.Brown,
|
||||||
Color.Gray,
|
Color.Gray,
|
||||||
@@ -145,7 +146,7 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
|
|||||||
|
|
||||||
// TODO: Add random markings
|
// TODO: Add random markings
|
||||||
|
|
||||||
var newEyeColor = random.Pick(RealisticEyeColors);
|
var newEyeColor = random.Pick(_realisticEyeColors);
|
||||||
|
|
||||||
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
||||||
var skinType = protoMan.Index<SpeciesPrototype>(species).SkinColoration;
|
var skinType = protoMan.Index<SpeciesPrototype>(species).SkinColoration;
|
||||||
@@ -155,9 +156,10 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
|
|||||||
{
|
{
|
||||||
SkinColorationStrategyInput.Unary => strategy.FromUnary(random.NextFloat(0f, 100f)),
|
SkinColorationStrategyInput.Unary => strategy.FromUnary(random.NextFloat(0f, 100f)),
|
||||||
SkinColorationStrategyInput.Color => strategy.ClosestSkinColor(new Color(random.NextFloat(1), random.NextFloat(1), random.NextFloat(1), 1)),
|
SkinColorationStrategyInput.Color => strategy.ClosestSkinColor(new Color(random.NextFloat(1), random.NextFloat(1), random.NextFloat(1), 1)),
|
||||||
|
_ => strategy.ClosestSkinColor(new Color(random.NextFloat(1), random.NextFloat(1), random.NextFloat(1), 1)),
|
||||||
};
|
};
|
||||||
|
|
||||||
return new HumanoidCharacterAppearance(newHairStyle, newHairColor, newFacialHairStyle, newHairColor, newEyeColor, newSkinColor, new ());
|
return new HumanoidCharacterAppearance(newHairStyle, newHairColor, newFacialHairStyle, newHairColor, newEyeColor, newSkinColor, new());
|
||||||
|
|
||||||
float RandomizeColor(float channel)
|
float RandomizeColor(float channel)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user