diff --git a/Content.Client/SS220/SuperMatter/Emitter/Ui/SuperMatterEmitterExtensionMenu.xaml.cs b/Content.Client/SS220/SuperMatter/Emitter/Ui/SuperMatterEmitterExtensionMenu.xaml.cs index 7ba39258f8f2..166cc518f0f2 100644 --- a/Content.Client/SS220/SuperMatter/Emitter/Ui/SuperMatterEmitterExtensionMenu.xaml.cs +++ b/Content.Client/SS220/SuperMatter/Emitter/Ui/SuperMatterEmitterExtensionMenu.xaml.cs @@ -65,8 +65,9 @@ private void InitPowerConsumptionSpinBox() if (child.GetType() == typeof(LineEdit)) child.MinSize = new Vector2(60, 0); } - PowerConsumptionSpinBox.AddLeftButton(-100, "-100"); + PowerConsumptionSpinBox.AddLeftButton(-500, "-500"); + PowerConsumptionSpinBox.AddLeftButton(-100, "-100"); PowerConsumptionSpinBox.AddRightButton(100, "+100"); PowerConsumptionSpinBox.AddRightButton(500, "+500"); PowerConsumptionSpinBox.IsValid = PowerConsumptionValidate; diff --git a/Content.Server/Administration/UI/AdminAnnounceEui.cs b/Content.Server/Administration/UI/AdminAnnounceEui.cs index b6a6ba998400..7f38685b5124 100644 --- a/Content.Server/Administration/UI/AdminAnnounceEui.cs +++ b/Content.Server/Administration/UI/AdminAnnounceEui.cs @@ -1,15 +1,18 @@ +using Content.Server.Administration.Logs; using Content.Server.Administration.Managers; using Content.Server.Chat; using Content.Server.Chat.Managers; using Content.Server.Chat.Systems; using Content.Server.EUI; using Content.Shared.Administration; +using Content.Shared.Database; using Content.Shared.Eui; namespace Content.Server.Administration.UI { public sealed class AdminAnnounceEui : BaseEui { + [Dependency] private readonly IAdminLogManager _adminLogManager = default!; // SS220-add-eui-log [Dependency] private readonly IAdminManager _adminManager = default!; [Dependency] private readonly IChatManager _chatManager = default!; private readonly ChatSystem _chatSystem; @@ -42,7 +45,10 @@ public override void HandleMessage(EuiMessageBase msg) Close(); break; } - + // SS220-add-eui-log + _adminLogManager.Add(LogType.Chat, LogImpact.Low, + $"Announcement from {Player:user}, announcer: {doAnnounce.Announcer}, message: {doAnnounce.Announcement}"); + // SS220-add-eui-log switch (doAnnounce.AnnounceType) { case AdminAnnounceType.Server: diff --git a/Content.Server/Fax/AdminUI/AdminFaxEui.cs b/Content.Server/Fax/AdminUI/AdminFaxEui.cs index e31d7b1c5808..baccc6f16084 100644 --- a/Content.Server/Fax/AdminUI/AdminFaxEui.cs +++ b/Content.Server/Fax/AdminUI/AdminFaxEui.cs @@ -10,12 +10,15 @@ using Content.Shared.Ghost; using Content.Shared.Paper; using Content.Shared.SS220.Photocopier; +using Content.Server.Administration.Logs; +using Content.Shared.Database; namespace Content.Server.Fax.AdminUI; public sealed class AdminFaxEui : BaseEui { [Dependency] private readonly IEntityManager _entityManager = default!; + [Dependency] private readonly IAdminLogManager _adminLogManager = default!; // SS220-add-eui-log private readonly FaxSystem _faxSystem; private readonly FollowerSystem _followerSystem; @@ -75,6 +78,10 @@ public override void HandleMessage(EuiMessageBase msg) PrototypeId = "PaperNtFormCc" }; + // SS220-add-eui-log + _adminLogManager.Add(LogType.Action, LogImpact.Low, + $"Announcement from {Player:user}, title is {sendData.Title}, content {sendData.Content}, stamp state '{sendData.StampState}', stamped by {sendData.From}"); + // SS220-add-eui-log var printout = new FaxPrintout(dataToCopy, metaData); _faxSystem.Receive(_entityManager.GetEntity(sendData.Target), printout); break; diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Database.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Database.cs index f02cb2e00b30..711f5251def5 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Database.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Database.cs @@ -33,9 +33,6 @@ public void BroadcastData(Entity crystal) comp.Name ??= MetaData(crystal.Owner).EntityName; Dictionary gasRatios = new(); - if (!comp.AccumulatedGasesMoles.TryGetValue(Gas.Oxygen, out _)) - return; - foreach (var gas in Enum.GetValues()) { gasRatios.Add(gas, comp.AccumulatedGasesMoles[gas] / comp.AccumulatedGasesMoles.Values.Sum()); diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Delamination.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Delamination.cs index fac00703733f..62ec4ee7862a 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Delamination.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.Delamination.cs @@ -99,7 +99,7 @@ private void Delaminate(Entity crystal) switch (smState) { case SuperMatterPhaseState.ResonanceRegion: - spawnedUid = Spawn(crystal.Comp.ResonanceSpawnPrototype, Transform(crystal.Owner).Coordinates); + _explosion.TriggerExplosive(crystal.Owner); break; case SuperMatterPhaseState.SingularityRegion: spawnedUid = Spawn(crystal.Comp.SingularitySpawnPrototype, Transform(crystal.Owner).Coordinates); diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs index dc27d6aa14a7..b375c65268ff 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.EventHandlers.cs @@ -5,12 +5,9 @@ using Content.Shared.Interaction; using Content.Shared.Projectiles; using Content.Shared.Tools.Components; -using Microsoft.EntityFrameworkCore.Migrations.Operations; -using Content.Server.Construction.Completions; -using Content.Shared.Destructible; using Content.Shared.SS220.SuperMatter.Ui; -using Microsoft.EntityFrameworkCore.Diagnostics; using Content.Shared.Humanoid; +using Content.Shared.Database; namespace Content.Server.SS220.SuperMatterCrystal; @@ -88,6 +85,7 @@ private void OnActivation(Entity entity, ref SuperMatterAc if (!entity.Comp.Activated) { SendAdminChatAlert(entity, Loc.GetString("supermatter-admin-alert-activated"), $"{EntityManager.ToPrettyString(args.Target)}"); + _adminLog.Add(LogType.Action, LogImpact.High, $"Crystal {ToPrettyString(entity):user} was activated by {ToPrettyString(args.Target):target}"); entity.Comp.Activated = true; } args.Handled = true; diff --git a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs index f8784a5ff516..b6544cf23fc9 100644 --- a/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs +++ b/Content.Server/SS220/SuperMatter/Crystal/SuperMatterSystem.cs @@ -45,13 +45,20 @@ public override void Update(float frameTime) while (query.MoveNext(out var uid, out var smComp)) { if (!HasComp(uid) - || MetaData(uid).Initialized == false) + || MetaData(uid).EntityLifeStage < EntityLifeStage.MapInitialized) continue; // add here to give admins a way to freeze all logic if (HasComp(uid)) continue; + // I kinda fixed it, but in case of another misunderstanding + if (!smComp.AccumulatedGasesMoles.TryGetValue(Gas.Oxygen, out _)) + { + Log.Debug($"Dictionary for Supermatter crystal {ToPrettyString(uid)} gas accumulator isn't initialized!"); + continue; + } + var crystal = new Entity(uid, smComp); UpdateDelayed(crystal, flooredFrameTime); SuperMatterUpdate(crystal, flooredFrameTime); diff --git a/Resources/Prototypes/SS220/Entities/Structures/Power/Generation/Supermatter/crystal.yml b/Resources/Prototypes/SS220/Entities/Structures/Power/Generation/Supermatter/crystal.yml index 4f2814e9b9d7..0a38662903bf 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Power/Generation/Supermatter/crystal.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Power/Generation/Supermatter/crystal.yml @@ -33,12 +33,13 @@ - type: CollisionWake enabled: false - type: SinguloFood - energy: 10000 + energy: 5000 - type: Explosive explosionType: Default - maxIntensity: 25000 - intensitySlope: 5 - totalIntensity: 25000 + maxIntensity: 60 + intensitySlope: 10 + totalIntensity: 100000 + maxTileBreak: 128 - type: NameIdentifier group: GenericNumber - type: TTS