AlertOrder = _prototypeManager.EnumeratePrototypes<AlertOrderPrototype>().FirstOrDefault();
if (AlertOrder == null)
- Log.Error("alert", "no alertOrder prototype found, alerts will be in random order");
+ Log.Error("No alertOrder prototype found, alerts will be in random order");
}
public IReadOnlyDictionary<AlertKey, AlertState>? ActiveAlerts
{
if (!revealedLayers.Add(key))
{
- Logger.Warning($"Duplicate key for clothing visuals: {key}. Are multiple components attempting to modify the same layer? Equipment: {ToPrettyString(equipment)}");
+ Log.Warning($"Duplicate key for clothing visuals: {key}. Are multiple components attempting to modify the same layer? Equipment: {ToPrettyString(equipment)}");
continue;
}
if (!spriteQuery.TryGetComponent(uid, out var sprite))
{
- Logger.Error($"Encountered a icon-smoothing entity without a sprite: {ToPrettyString(uid)}");
+ Log.Error($"Encountered a icon-smoothing entity without a sprite: {ToPrettyString(uid)}");
RemCompDeferred(uid, smooth);
return;
}
{
if (!_mapManager.TryGetGrid(xform.GridUid, out grid))
{
- Logger.Error($"Failed to calculate IconSmoothComponent sprite in {uid} because grid {xform.GridUid} was missing.");
+ Log.Error($"Failed to calculate IconSmoothComponent sprite in {uid} because grid {xform.GridUid} was missing.");
return;
}
}
{
base.Initialize();
SubscribeNetworkEvent<RulesMessage>(OnRulesReceived);
- Logger.DebugS("info", "Requested server info.");
+ Log.Debug("Requested server info.");
RaiseNetworkEvent(new RequestRulesMessage());
}
private void OnRulesReceived(RulesMessage message, EntitySessionEventArgs eventArgs)
{
- Logger.DebugS("info", "Received server rules.");
+ Log.Debug("Received server rules.");
Rules = message;
_rules.UpdateRules();
}
else
{
// admeme fuck-ups or bad yaml?
- Logger.Warning($"RGB light attempted to use invalid sprite index {index} on entity {ToPrettyString(uid)}");
+ Log.Warning($"RGB light attempted to use invalid sprite index {index} on entity {ToPrettyString(uid)}");
rgb.Layers.Remove(index);
}
}
{
if (layer.Key is not { } strKey || !int.TryParse(strKey, out index))
{
- Logger.Error($"Invalid key `{layer.Key}` for entity with random sprite {ToPrettyString(uid)}");
+ Log.Error($"Invalid key `{layer.Key}` for entity with random sprite {ToPrettyString(uid)}");
continue;
}
}
if (physics.Mass / ShuttleSystem.TileMassMultiplier >= 7.0f)
{
AddComp<GridAtmosphereComponent>(ev.Entity);
- Logger.InfoS("atmos", $"Giving grid {ev.Entity} GridAtmosphereComponent.");
+ Log.Info($"Giving grid {ev.Entity} GridAtmosphereComponent.");
}
// It's not super important to remove it should the grid become too small again.
// If explosions ever gain the ability to outright shatter grids, do rethink this.
}
else
{
- Logger.Warning("atmos", $"{ToPrettyString(uid)} received GasFilterSelectGasMessage with an invalid ID: {args.ID}");
+ Log.Warning($"{ToPrettyString(uid)} received GasFilterSelectGasMessage with an invalid ID: {args.ID}");
}
}
else
#endif
}
- Logger.InfoS("Explosion", $"Processed {TilesPerTick - tilesRemaining} tiles in {Stopwatch.Elapsed.TotalMilliseconds}ms");
+ Log.Info($"Processed {TilesPerTick - tilesRemaining} tiles in {Stopwatch.Elapsed.TotalMilliseconds}ms");
// we have finished processing our tiles. Is there still an ongoing explosion?
if (_activeExplosion != null)
if (!_explosionTypes.TryGetValue(typeID, out var typeIndex))
{
- Logger.Error("Attempted to spawn explosion using a prototype that was not defined during initialization. Explosion prototype hot-reload is not currently supported.");
+ Log.Error("Attempted to spawn explosion using a prototype that was not defined during initialization. Explosion prototype hot-reload is not currently supported.");
return null;
}
if (!_prototypeManager.TryIndex<ExplosionPrototype>(typeId, out var type))
{
- Logger.Error($"Attempted to spawn unknown explosion prototype: {type}");
+ Log.Error($"Attempted to spawn unknown explosion prototype: {type}");
return;
}
var ent = Spawn(comp.SmokePrototype, coords.SnapToGrid());
if (!TryComp<SmokeComponent>(ent, out var smoke))
{
- Logger.Error($"Smoke prototype {comp.SmokePrototype} was missing SmokeComponent");
+ Log.Error($"Smoke prototype {comp.SmokePrototype} was missing SmokeComponent");
Del(ent);
return;
}
if (speciesPrototype == null)
{
- Logger.Error("Tried to get age representation of species that couldn't be indexed: " + species);
+ Log.Error("Tried to get age representation of species that couldn't be indexed: " + species);
return Loc.GetString("identity-age-young");
}
private void OnRequestRules(RequestRulesMessage message, EntitySessionEventArgs eventArgs)
{
- Log.Debug("info", "Client requested rules.");
+ Log.Debug("Client requested rules.");
var title = Loc.GetString(_cfg.GetCVar(CCVars.RulesHeader));
var path = _cfg.GetCVar(CCVars.RulesFile);
var rules = "Server could not read its rules.";
}
catch (Exception)
{
- Log.Debug("info", "Could not read server rules file.");
+ Log.Debug("Could not read server rules file.");
}
var response = new RulesMessage(title, rules);
RaiseNetworkEvent(response, eventArgs.SenderSession.Channel);
var xformQuery = GetEntityQuery<TransformComponent>();
if (!xformQuery.TryGetComponent(uid, out var xform))
{
- Logger.Error("ParticleAccelerator attempted to emit a particle without (having) a transform from which to base its initial position and orientation.");
+ Log.Error("ParticleAccelerator attempted to emit a particle without (having) a transform from which to base its initial position and orientation.");
return;
}
if (component.Prototypes.Count == 0)
{
- Logger.Warning($"Prototype list in ConditionalSpawnComponent is empty! Entity: {ToPrettyString(uid)}");
+ Log.Warning($"Prototype list in ConditionalSpawnComponent is empty! Entity: {ToPrettyString(uid)}");
return;
}
if (component.Prototypes.Count == 0)
{
- Logger.Warning($"Prototype list in RandomSpawnerComponent is empty! Entity: {ToPrettyString(uid)}");
+ Log.Warning($"Prototype list in RandomSpawnerComponent is empty! Entity: {ToPrettyString(uid)}");
return;
}
jobs.ExtendedAccess = count <= thresh;
- Logger.DebugS(
- "station", "Station {Station} on extended access: {ExtendedAccess}",
+ Log.Debug("Station {Station} on extended access: {ExtendedAccess}",
Name(station), jobs.ExtendedAccess);
}
}
if (xform.GridUid == EntityUid.Invalid)
{
- Log.Debug("A");
+ Log.Debug("Unable to get owning station - GridUid invalid.");
return null;
}
{
if (!_proto.TryIndex<ListingPrototype>(listingId, out var proto))
{
- Logger.Error("Attempted to add invalid listing.");
+ Log.Error("Attempted to add invalid listing.");
return false;
}
return TryAddListing(component, proto);
if (!_inventorySystem.TryGetSlot(target, slot, out var slotDef))
{
- Logger.Error($"{ToPrettyString(user)} attempted to place an item in a non-existent inventory slot ({slot}) on {ToPrettyString(target)}");
+ Log.Error($"{ToPrettyString(user)} attempted to place an item in a non-existent inventory slot ({slot}) on {ToPrettyString(target)}");
return;
}
if (!_inventorySystem.TryGetSlot(target, slot, out var slotDef))
{
- Logger.Error($"{ToPrettyString(user)} attempted to take an item from a non-existent inventory slot ({slot}) on {ToPrettyString(target)}");
+ Log.Error($"{ToPrettyString(user)} attempted to take an item from a non-existent inventory slot ({slot}) on {ToPrettyString(target)}");
return;
}
{
if (!_prototypeManager.TryIndex<TraitPrototype>(traitId, out var traitPrototype))
{
- Logger.Warning($"No trait found with ID {traitId}!");
+ Log.Warning($"No trait found with ID {traitId}!");
return;
}
-using System.Linq;
+using System.Linq;
using Content.Server.Worldgen.Components;
using Content.Server.Worldgen.Prototypes;
using Robust.Shared.Prototypes;
return;
}
- Logger.Error($"Biome selection ran out of biomes to select? See biomes list: {component.Biomes}");
+ Log.Error($"Biome selection ran out of biomes to select? See biomes list: {component.Biomes}");
}
private void OnBiomeSelectionStartup(EntityUid uid, BiomeSelectionComponent component, ComponentStartup args)
-using Content.Server.Administration;
+using Content.Server.Administration;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Events;
using Content.Server.Worldgen.Components;
return;
var target = _map.GetMapEntityId(_gameTicker.DefaultMap);
- Logger.Debug($"Trying to configure {_gameTicker.DefaultMap}, aka {ToPrettyString(target)} aka {target}");
+ Log.Debug($"Trying to configure {_gameTicker.DefaultMap}, aka {ToPrettyString(target)} aka {target}");
var cfg = _proto.Index<WorldgenConfigPrototype>(_worldgenConfig);
cfg.Apply(target, _ser, EntityManager); // Apply the config to the map.
if (doAfter.Delay <= TimeSpan.Zero)
{
- Logger.Warning("Awaited instant DoAfters are not supported fully supported");
+ Log.Warning("Awaited instant DoAfters are not supported fully supported");
return DoAfterStatus.Finished;
}
{
if (!ValidateClientInput(session, coords, uid, out var userEntity))
{
- Logger.InfoS("system.interaction", $"TryPullObject input validation failed");
+ Log.Info($"TryPullObject input validation failed");
return true;
}
// client sanitization
if (!TryComp(item, out TransformComponent? itemXform) || !ValidateClientInput(args.SenderSession, itemXform.Coordinates, item, out var user))
{
- Logger.InfoS("system.interaction", $"Inventory interaction validation failed. Session={args.SenderSession}");
+ Log.Info($"Inventory interaction validation failed. Session={args.SenderSession}");
return;
}
// client sanitization
if (!ValidateClientInput(session, coords, uid, out var user))
{
- Logger.InfoS("system.interaction", $"Alt-use input validation failed");
+ Log.Info($"Alt-use input validation failed");
return true;
}
// client sanitization
if (!ValidateClientInput(session, coords, uid, out var userEntity))
{
- Logger.InfoS("system.interaction", $"Use input validation failed");
+ Log.Info($"Use input validation failed");
return true;
}
if (length > MaxRaycastRange)
{
- Logger.Warning("InRangeUnobstructed check performed over extreme range. Limiting CollisionRay size.");
+ Log.Warning("InRangeUnobstructed check performed over extreme range. Limiting CollisionRay size.");
length = MaxRaycastRange;
}
{
if (!ValidateClientInput(session, coords, uid, out var user))
{
- Logger.InfoS("system.interaction", $"ActivateItemInWorld input validation failed");
+ Log.Info($"ActivateItemInWorld input validation failed");
return false;
}
if (!coords.IsValid(EntityManager))
{
- Logger.InfoS("system.interaction", $"Invalid Coordinates: client={session}, coords={coords}");
+ Log.Info($"Invalid Coordinates: client={session}, coords={coords}");
return false;
}
if (IsClientSide(uid))
{
- Logger.WarningS("system.interaction",
- $"Client sent interaction with client-side entity. Session={session}, Uid={uid}");
+ Log.Warning($"Client sent interaction with client-side entity. Session={session}, Uid={uid}");
return false;
}
if (userEntity == null || !userEntity.Value.Valid)
{
- Logger.WarningS("system.interaction",
- $"Client sent interaction with no attached entity. Session={session}");
+ Log.Warning($"Client sent interaction with no attached entity. Session={session}");
return false;
}
if (!Exists(userEntity))
{
- Logger.WarningS("system.interaction",
- $"Client attempted interaction with a non-existent attached entity. Session={session}, entity={userEntity}");
+ Log.Warning($"Client attempted interaction with a non-existent attached entity. Session={session}, entity={userEntity}");
return false;
}