Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe. This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown. * Fix a bunch of warnings * More warning fixes * Use new DateTime serializer to get rid of ISerializationHooks in changelog code. * Get rid of some more ISerializationHooks for enums * And a little more * Apply suggestions from code review Co-authored-by: 0x6273 <0x40@keemail.me> --------- Co-authored-by: 0x6273 <0x40@keemail.me>
This commit is contained in:
committed by
GitHub
parent
d0c174388c
commit
68ce53ae17
@@ -147,7 +147,7 @@ namespace Content.Server.Construction
|
||||
|
||||
if (step == null)
|
||||
{
|
||||
_sawmill.Warning($"Called {nameof(HandleEdge)} on entity {ToPrettyString(uid)} but the current state is not valid for that!");
|
||||
Log.Warning($"Called {nameof(HandleEdge)} on entity {ToPrettyString(uid)} but the current state is not valid for that!");
|
||||
return HandleResult.False;
|
||||
}
|
||||
|
||||
@@ -513,10 +513,10 @@ namespace Content.Server.Construction
|
||||
{
|
||||
if (construction.Deleted)
|
||||
{
|
||||
_sawmill.Error($"Construction component was deleted while still processing interactions." +
|
||||
$"Entity {ToPrettyString(uid)}, graph: {construction.Graph}, " +
|
||||
$"Next: {interaction.GetType().Name}, " +
|
||||
$"Remaining Queue: {string.Join(", ", construction.InteractionQueue.Select(x => x.GetType().Name))}");
|
||||
Log.Error($"Construction component was deleted while still processing interactions." +
|
||||
$"Entity {ToPrettyString(uid)}, graph: {construction.Graph}, " +
|
||||
$"Next: {interaction.GetType().Name}, " +
|
||||
$"Remaining Queue: {string.Join(", ", construction.InteractionQueue.Select(x => x.GetType().Name))}");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ namespace Content.Server.Construction
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_sawmill.Error($"Caught exception while processing construction queue. Entity {ToPrettyString(uid)}, graph: {construction.Graph}");
|
||||
Log.Error($"Caught exception while processing construction queue. Entity {ToPrettyString(uid)}, graph: {construction.Graph}");
|
||||
_runtimeLog.LogException(e, $"{nameof(ConstructionSystem)}.{nameof(UpdateInteractions)}");
|
||||
Del(uid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user