Skip to content

Commit

Permalink
removed loggers trol
Browse files Browse the repository at this point in the history
  • Loading branch information
gluesniffler committed Oct 29, 2024
1 parent 3ea0335 commit fd206e8
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 19 deletions.
5 changes: 0 additions & 5 deletions Content.Client/Medical/Surgery/SurgeryBui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public SurgeryBui(EntityUid owner, Enum uiKey) : base(owner, uiKey)

protected override void Open()
{
Logger.Debug("Attempting to open");
_system.OnRefresh += () =>
{
UpdateDisabledPanel();
Expand Down Expand Up @@ -194,13 +193,9 @@ int GetScore(BodyPartType? partType)


if (!_window.IsOpen)
{
Logger.Debug("Attempting to open");
_window.OpenCentered();
}
else
{
Logger.Debug("Attempting to refresh");
RefreshUI();
UpdateDisabledPanel();
}
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/Medical/Surgery/SurgerySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ protected override void RefreshUI(EntityUid body)
}

}
Logger.Debug($"Setting UI state with {surgeries}, {body} and {SurgeryUIKey.Key}");
_ui.SetUiState(body, SurgeryUIKey.Key, new SurgeryBuiState(surgeries));
}

Expand Down Expand Up @@ -115,10 +114,8 @@ private void OnToolAfterInteract(Entity<SurgeryToolComponent> ent, ref AfterInte
_popup.PopupEntity("You can't perform surgery on yourself!", user, user);
return;
}*/
Logger.Debug("OnToolAfterInteract passed, opening UI");
args.Handled = true;
_ui.OpenUi(args.Target.Value, SurgeryUIKey.Key, user);
Logger.Debug("UI opened");
RefreshUI(args.Target.Value);
}

Expand Down
1 change: 0 additions & 1 deletion Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ private void OnDamageChanged(Entity<BodyComponent> ent, ref DamageChangedEvent a
return;

var (targetType, targetSymmetry) = ConvertTargetBodyPart(args.TargetPart.Value);
Logger.Debug($"Applying damage to {ToPrettyString(ent)} with {ent.Comp} and {args} {targetType} {targetSymmetry}");
foreach (var part in GetBodyChildrenOfType(ent, targetType, ent.Comp)
.Where(part => part.Component.Symmetry == targetSymmetry))
{
Expand Down
7 changes: 1 addition & 6 deletions Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ protected virtual void AddPart(

var ev = new BodyPartAddedEvent(slotId, partEnt);
RaiseLocalEvent(bodyEnt, ref ev);
Logger.Debug($"Attempting to readd slot to {bodyEnt}");
AddLeg(partEnt, bodyEnt);
}

Expand Down Expand Up @@ -221,7 +220,7 @@ private void RemovePartEffect(Entity<BodyPartComponent> partEnt, Entity<BodyComp
if (!Resolve(bodyEnt, ref bodyEnt.Comp, logMissing: false))
return;

if (partEnt.Comp.Children.Any())
if (partEnt.Comp.Children.Any())
{
foreach (var slotId in partEnt.Comp.Children.Keys)
{
Expand Down Expand Up @@ -301,16 +300,12 @@ private void EnablePart(Entity<BodyPartComponent> partEnt)
/// </summary>
public void ChangeSlotState(Entity<BodyPartComponent> partEnt, bool disable)
{
if (partEnt.Comp.Body is not null)
Logger.Debug($"Attempting to change slot state to {disable} for {partEnt.Comp.PartType}. Number of parts: {GetBodyPartCount(partEnt.Comp.Body.Value, partEnt.Comp.PartType)}");
if (partEnt.Comp.Body is not null
&& GetBodyPartCount(partEnt.Comp.Body.Value, partEnt.Comp.PartType) == 1
&& TryGetPartSlotContainerName(partEnt.Comp.PartType, out var containerNames))
{
Logger.Debug($"Found container names {containerNames}, with a number of {containerNames.Count}");
foreach (var containerName in containerNames)
{
Logger.Debug($"Setting slot state to {disable} for {containerName}");
_inventorySystem.SetSlotStatus(partEnt.Comp.Body.Value, containerName, disable);
var ev = new RefreshInventorySlotsEvent(containerName);
RaiseLocalEvent(partEnt.Comp.Body.Value, ev);
Expand Down
4 changes: 0 additions & 4 deletions Content.Shared/Inventory/InventorySystem.Slots.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,12 @@ public void SetSlotStatus(EntityUid uid, string slotName, bool isDisabled, Inven
{
if (slot.Name != slotName)
continue;
Logger.Debug($"Found slot {slotName}, setting disabled to {isDisabled}");

if (isDisabled)
{
if (!TryGetSlotContainer(uid, slotName, out var container, out _, inventory))
break;

Logger.Debug($"Dropping contents.");
if (container.ContainedEntity is { } entityUid && TryComp(entityUid, out TransformComponent? transform) && _gameTiming.IsFirstTimePredicted)
{
_transform.AttachToGridOrMap(entityUid, transform);
Expand All @@ -201,9 +199,7 @@ public void SetSlotStatus(EntityUid uid, string slotName, bool isDisabled, Inven
}
//else
//_containerSystem.EnsureContainer<ContainerSlot>(uid, slotName);
Logger.Debug($"Slot state before {slot.Disabled}");
slot.Disabled = isDisabled;
Logger.Debug($"Slot state after {slot.Disabled}");
break;
}

Expand Down

0 comments on commit fd206e8

Please sign in to comment.