Skip to content

Commit

Permalink
Фикс упаковщика
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jan 4, 2025
1 parent e5bdd73 commit 864c12b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Content.Server/Construction/FlatpackSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Server.Audio;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared._Sunrise.Economy;
using Content.Shared.Construction;
using Content.Shared.Construction.Components;
using Content.Shared.Containers.ItemSlots;
Expand Down Expand Up @@ -102,6 +102,7 @@ private void FinishPacking(Entity<FlatpackCreatorComponent> ent, bool interrupte
return;

var flatpack = Spawn(comp.BaseFlatpackPrototype, Transform(ent).Coordinates);
EnsureComp<DontSellComponent>(flatpack); // Sunrise-Edit
SetupFlatpack(flatpack, proto, board);
Del(board);
}
Expand Down
7 changes: 2 additions & 5 deletions Content.Server/Lathe/LatheSystem.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Server._Sunrise.DontSellingGrid;
using Content.Server.Administration.Logs;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Fluids.EntitySystems;
using Content.Server.Lathe.Components;
using Content.Server.Materials;
using Content.Server.Popups;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Server.Stack;
using Content.Shared._Sunrise.Economy;
using Content.Shared.Atmos;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.UserInterface;
using Content.Shared.Database;
using Content.Shared.Emag.Components;
using Content.Shared.Examine;
using Content.Shared.Lathe;
using Content.Shared.Materials;
using Content.Shared.Power;
Expand Down Expand Up @@ -230,8 +228,7 @@ public void FinishProducing(EntityUid uid, LatheComponent? comp = null, LathePro
if (comp.CurrentRecipe.Result is { } resultProto)
{
var result = Spawn(resultProto, Transform(uid).Coordinates);
// Sunrise-Edit
EnsureComp<DontSellComponent>(result);
EnsureComp<DontSellComponent>(result); // Sunrise-Edit
_stack.TryMergeToContacts(result);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Server.Cargo.Components;
using Content.Server.Cargo.Systems;
using Content.Server.GameTicking;
using Content.Server.Station.Events;
using Content.Shared._Sunrise.Economy;
using Content.Shared.GameTicking;
using Robust.Shared.Containers;

Expand Down
2 changes: 2 additions & 0 deletions Content.Shared/Construction/SharedFlatpackSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared._Sunrise.Economy;
using Content.Shared.Construction.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Containers.ItemSlots;
Expand Down Expand Up @@ -93,6 +94,7 @@ private void OnFlatpackInteractUsing(Entity<FlatpackComponent> ent, ref Interact
if (_net.IsServer)
{
var spawn = Spawn(comp.Entity, _map.GridTileToLocal(grid, gridComp, buildPos));
EnsureComp<DontSellComponent>(spawn); // Sunrise-Edit
_adminLogger.Add(LogType.Construction,
LogImpact.Low,
$"{ToPrettyString(args.User):player} unpacked {ToPrettyString(spawn):entity} at {xform.Coordinates} from {ToPrettyString(uid):entity}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Content.Server._Sunrise.DontSellingGrid;
namespace Content.Shared._Sunrise.Economy;

/// <summary>
///
Expand Down
8 changes: 8 additions & 0 deletions Resources/Changelog/ChangelogSunrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9566,3 +9566,11 @@
type: Add
id: 667
time: '2025-01-04T04:05:23.286347+00:00'
- author: VigersRay
changes:
- message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0430\u0431\u0443\
\u0437 \u044D\u043A\u043E\u043D\u043E\u043C\u0438\u043A\u0438 \u0443\u043F\u0430\
\u043A\u043E\u0432\u0449\u0438\u043A\u043E\u043C."
type: Fix
id: 668
time: '2025-01-04T05:25:54.588559+00:00'

0 comments on commit 864c12b

Please sign in to comment.