mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* Yay * Do a LOT changes in yml * and again * Finale changes * yml and locale * locale tweak * yml and charp cleanup * fix carpets * and some-some * And some * I want to believe that its last🙏🙏 * 😭 * 😭😭 * clean * fix * AAHHAHAHAHAHAH * fix * FINAL * thisguyusa... * LAST_ONE * wawa * merge2 * sdobfjibwdsjaqaksmzxsowaw2edqw84 * aoaoaooaoaao * this hardcode took 30 minutes of my life * fix aaaa * fix test * FIX BUILD * oops * oops * aaooaoaoa * fuck * oops * refactor: cleanup after merge + use protoId in KitchenSpikeComponent * refactor: fix butcherable stuff again!~ * fix: now actively checks for EdibleComponent on slicing, predicted items splitting * fix: changed knife.yaml to use Slicing tool * fix: no more sounds spam on chop-chop * refactor: cleanups * refactor: default time value for slicable * refactor: whitespaces and extract variables * fix: slicable no longer prevents InteractUsingEvent by marking handled w/o actually handling * feat: chopping trees now requires sawing tool, same for slicing logs * refactor: cleanup after merge * refactor: fix non-related PR changes * refactor: rename locid * refactor: remove unneeded red 'slice' verb name when slicing entities with mob-state. * refactor: simplify test code changes * refactor: better readability for test * refactor: linebreak for unary op * refactor: xml-doc for SliceableComponent corrected to be more fitting. * refactor: cleanup SliceableSystem some more * refactor: use HasComp instead of TryComp in AddSliceVerb * refactor: extracted methods to improve readability * refactor: remove unchecked operator - not needed when casting from uint * refactor: SliceableSystem cleanups, fix logs not being chopped due to solution splitting * fix: slice verb is now showing up even if disabled, slicing is done even if there is no solution to split, replaced direct dependency for sliceable component to food component with default solution-name * refactor: comment about RandomPredicted + toy knife now fits into clown shoes * refactor: remove EdibleComponent dependency from SliceableSystem * refactor: moved SliceableSystem into ToolRefinableSystem * refactor: basic renaming for comps * refactor: cleanup after merge * refactor: reorder methods, renaming, simplify polymorph related conditions on slicing * refactor: xml-doc + reorder yaml fields * refactor: fixing yaml + method renaming, unused usings removed * refactor: removed unused usings * refactor: fix typo * refactor: remove reference for deleted meat proto * refactor: clean up yaml after merge * refactor: fix multiple typos from mass replace * refactor: fix missed field renaming * refactor: ensure all entities that had ToolRefinable got BaseSlicingRefinable (aftermerge cleanup) * refactor: undo solution-related changes for animals.yml * refactor: fix invalid parent set for corgi + fix amount of slices for the rest of pies * refactor: revert Solution to SolutionContainerManager changes after merge * refactor: revert Solution to SolutionContainerManager changes after merge * refactor: fix invalid property name for toolMissingQualityTooltip in yml, fixed missing entity on which AttemptToolRefineEvent is raised * refactor: remove over-indent for components of BaseSlicingRefinable and for Slicing tool quality * refactor: remove over-indentation on MobCarpHolo * empty collection --------- Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru> Co-authored-by: Fildrance <fildrance@gmail.com> Co-authored-by: iaada <iaada@users.noreply.github.com>
134 lines
3.6 KiB
C#
134 lines
3.6 KiB
C#
using Content.Shared.DoAfter;
|
|
using Content.Shared.Interaction;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Construction;
|
|
|
|
/// <summary>
|
|
/// Sent client -> server to to tell the server that we started building
|
|
/// a structure-construction.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class TryStartStructureConstructionMessage : EntityEventArgs
|
|
{
|
|
/// <summary>
|
|
/// Position to start building.
|
|
/// </summary>
|
|
public readonly NetCoordinates Location;
|
|
|
|
/// <summary>
|
|
/// The construction prototype to start building.
|
|
/// </summary>
|
|
public readonly string PrototypeName;
|
|
|
|
public readonly Angle Angle;
|
|
|
|
/// <summary>
|
|
/// Identifier to be sent back in the acknowledgement so that the client can clean up its ghost.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// So essentially the client is sending its own entity to the server so it knows to delete it when it gets server
|
|
/// response back.
|
|
/// </remarks>
|
|
public readonly int Ack;
|
|
|
|
public TryStartStructureConstructionMessage(NetCoordinates loc, string prototypeName, Angle angle, int ack)
|
|
{
|
|
Location = loc;
|
|
PrototypeName = prototypeName;
|
|
Angle = angle;
|
|
Ack = ack;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sent client -> server to to tell the server that we started building
|
|
/// an item-construction.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class TryStartItemConstructionMessage : EntityEventArgs
|
|
{
|
|
/// <summary>
|
|
/// The construction prototype to start building.
|
|
/// </summary>
|
|
public readonly string PrototypeName;
|
|
|
|
public TryStartItemConstructionMessage(string prototypeName)
|
|
{
|
|
PrototypeName = prototypeName;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sent server -> client to tell the client that a ghost has started to be constructed.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class AckStructureConstructionMessage : EntityEventArgs
|
|
{
|
|
public readonly int GhostId;
|
|
|
|
/// <summary>
|
|
/// The entity that is now being constructed, if any.
|
|
/// </summary>
|
|
public readonly NetEntity? Uid;
|
|
|
|
public AckStructureConstructionMessage(int ghostId, NetEntity? uid = null)
|
|
{
|
|
GhostId = ghostId;
|
|
Uid = uid;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sent client -> server to request a specific construction guide.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class RequestConstructionGuide : EntityEventArgs
|
|
{
|
|
public readonly string ConstructionId;
|
|
|
|
public RequestConstructionGuide(string constructionId)
|
|
{
|
|
ConstructionId = constructionId;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sent server -> client as a response to a <see cref="RequestConstructionGuide"/> net message.
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public sealed class ResponseConstructionGuide : EntityEventArgs
|
|
{
|
|
public readonly string ConstructionId;
|
|
public readonly ConstructionGuide Guide;
|
|
|
|
public ResponseConstructionGuide(string constructionId, ConstructionGuide guide)
|
|
{
|
|
ConstructionId = constructionId;
|
|
Guide = guide;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed partial class ConstructionInteractDoAfterEvent : DoAfterEvent
|
|
{
|
|
[DataField("clickLocation")]
|
|
public NetCoordinates ClickLocation;
|
|
|
|
private ConstructionInteractDoAfterEvent()
|
|
{
|
|
}
|
|
|
|
public ConstructionInteractDoAfterEvent(IEntityManager entManager, InteractUsingEvent ev)
|
|
{
|
|
ClickLocation = entManager.GetNetCoordinates(ev.ClickLocation);
|
|
}
|
|
|
|
public override DoAfterEvent Clone() => this;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed partial class ToolRefineDoAfterEvent : SimpleDoAfterEvent
|
|
{
|
|
}
|