Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deltamerge Part 1 #1697

Merged
merged 61 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e900700
Vulpkanin Mask/Helmet Sprite updates (#1814)
TadJohnson00 Sep 12, 2024
d0ee161
Corpsman Glasses (#1828)
Unkn0wnGh0st333 Sep 16, 2024
dedd0bc
Laika Emote Sounds! [She can bark again!] (#1838)
Unkn0wnGh0st333 Sep 16, 2024
ed9de4c
make cats attack mouse toy (#1877)
deltanedas Sep 24, 2024
9d65ba7
Craftable muskets + Flintlocks (#1008)
Tryded May 26, 2024
1c8fe16
Vulp helmets: The reckoning (#1077)
Adrian16199 Apr 25, 2024
b413895
Suit-storage update to all delta V sprite guns. (#1092)
Adrian16199 Apr 19, 2024
9506262
Add awoo emote to vulps (and harpies) (#1094)
pissdemon Apr 25, 2024
c91cd0c
[Feat] Security dogs now have vulpkanin vocal emotes (#1176)
Remuchi May 9, 2024
2f3e6f6
Adds new Lobby Track (#1209)
Colin-Tel May 18, 2024
7ceb329
Fix DeltaV Armors not having AllowSuitStorage (#1227)
Tryded May 21, 2024
51f950e
Harpy Can Now Mimic Harps!
angelofallars Feb 1, 2025
ccb0f01
Fixes for craftable muskets (#1261)
Tryded May 27, 2024
7f3b8a2
Add Oney RoundEnd sound (#1271)
Colin-Tel Jul 1, 2024
7956536
Porting tiger tail sprite from SS13 for felinids. (#1272)
Adrian16199 Jul 1, 2024
c0af9b3
Split Emag in half (#1426)
WarMechanic Jul 9, 2024
6164a1a
CrystalThistle! (#1462)
jimmy12or Jul 22, 2024
0739247
2 New peppers! Ghost and Cosmic Revenant! (#1542)
jimmy12or Jul 27, 2024
3ad54f9
Fix Delta-V's variant of mystagogue's cloak not having steal target t…
Radezolid Sep 6, 2024
8c28d7c
Remove whitelist from shelves (#1763)
IamVelcroboy Sep 7, 2024
895af8c
make bookshelf storage more flexible (#1765)
deltanedas Sep 7, 2024
8109b6f
Double Ice Cream, a new drink for bartenders to serve. Take 2 (#1780)
dge21 Sep 18, 2024
404a3e2
feat: blue and purple tomato soup (#1781)
DisposableCrewmember42 Sep 12, 2024
d406a07
Give Mystagogue External access (#1804)
Colin-Tel Sep 11, 2024
f107e2a
Adds a black turtleneck (#1905)
Aikakakah Nov 8, 2024
3a9d68c
add lone digger by caravan palace to the jukebox (#1998)
MilonPL Oct 13, 2024
20956a3
Add "Deck the Halls" by Kevin Macleod (#2233)
Lyndomen Nov 19, 2024
ed2b4a3
fix deck the halls in jukebox (#2245)
MilonPL Nov 20, 2024
834139e
make chapel sprite purple (#1910)
deltanedas Sep 25, 2024
4dd3eed
shrink tree hitboxes (#1935)
deltanedas Sep 29, 2024
05d1385
Fixed Vulpkanin maskes not properly hiding the face on screen loadout…
FryOfDestiny Sep 30, 2024
9c9d5c8
Added hiss emote to tarantulas (#1994)
FryOfDestiny Oct 12, 2024
e07c0d8
add Hiss emote to arachnid (#1997)
deltanedas Oct 12, 2024
6e9371e
give xenos speech sounds from rmc14 (#2031)
deltanedas Oct 21, 2024
94f9609
Double the amount of Hardsuits for sec (#2089)
Stop-Signs Nov 3, 2024
b755d04
mail carrier hood. AAAAAAAAAAAAH!! (#2113)
Monotheonist Dec 6, 2024
92c4b94
Hristov Tweaks, Incidental Musiket Changes (#2213)
Avalon-Proto Jan 14, 2025
470beba
Add medkit slot (#2209)
Radezolid Nov 16, 2024
2a276dc
feat: HydroCo - Beverage Powders (#2210)
DisposableCrewmember42 Nov 29, 2024
77ca815
New Blood Based Soda! (#2250)
BlitzTheSquishy Dec 18, 2024
e7741a9
Relabels IK-60 to be more accurate (#2266)
Lyndomen Nov 22, 2024
9cee3b6
Add missing RPDS sprites from Frontier (#2267)
Kr8art Nov 22, 2024
da111d9
Home run bat discount (#2294)
Stop-Signs Nov 27, 2024
800acf4
Add sustenance vendor restock (#2307)
Kr8art Nov 29, 2024
d82bfac
Buff Aloxadone (#2318)
Kr8art Nov 30, 2024
da77261
Frontier Port: Pretty Money (#2398)
Unkn0wnGh0st333 Dec 18, 2024
e180a1b
Infer type for EntSelector (#30856)
EmoGarbage404 Aug 10, 2024
9fb1414
Bartending+: Shaking and Stirring (#29243)
Vermidia Jul 7, 2024
fe630d7
Port Magic Crayon From Frontier (#2410)
Avalon-Proto Dec 27, 2024
0ce6ca2
Drink flavors (#2462)
Aikakakah Dec 20, 2024
943e4bf
Add luna moth wings to moths (#2478)
boogiebogus Dec 20, 2024
c029d5d
Removes cooked egg reaction (#2501)
Stop-Signs Dec 22, 2024
bd19699
1 more egg carton (#2503)
Stop-Signs Dec 22, 2024
7ac1b2d
Update some food spawners w/ entity tables (#30957)
IamVelcroboy Aug 16, 2024
b8f9b7c
Port ingredient containers from frontier (#2504)
Stop-Signs Jan 3, 2025
d622d8d
Adds recipe for a box of nuggies (#2524)
Colin-Tel Dec 26, 2024
5a7c543
Add fox ears inner layer (#2539)
Kr8art Jan 1, 2025
63712e6
Added binary key to the LPO (#2635)
Radezolid Jan 7, 2025
43290c6
Adds some things to the lobby (#1143)
Apr 28, 2024
e5c671b
Change the binary translator key's contraband designation to syndicat…
ArtisticRoomba Sep 16, 2024
5d5fdbe
Update binary key to use AI icon (#32327)
ScarKy0 Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions Content.Client/Crayon/CrayonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ protected override void FrameUpdate(FrameEventArgs args)
}

_parent.UIUpdateNeeded = false;

// Frontier: unlimited crayon, Delta V Port
if (_parent.Capacity == int.MaxValue)
{
_label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label-unlimited",
("color", _parent.Color),
("state", _parent.SelectedState)));
return;
}
// End Frontier, Delta V Port

_label.SetMarkup(Robust.Shared.Localization.Loc.GetString("crayon-drawing-label",
("color",_parent.Color),
("state",_parent.SelectedState),
Expand Down
21 changes: 13 additions & 8 deletions Content.Client/Stack/StackSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace Content.Client.Stack
{
[UsedImplicitly]
public sealed class StackSystem : SharedStackSystem
public sealed partial class StackSystem : SharedStackSystem // Frontier: add partial to class definition
{
[Dependency] private readonly AppearanceSystem _appearanceSystem = default!;
[Dependency] private readonly ItemCounterSystem _counterSystem = default!;
Expand Down Expand Up @@ -56,20 +56,25 @@ private void OnAppearanceChange(EntityUid uid, StackComponent comp, ref Appearan
if (args.Sprite == null || comp.LayerStates.Count < 1)
return;

StackLayerData data = new StackLayerData(); // Frontier: use structure to store StackLayerData

// Skip processing if no actual
if (!_appearanceSystem.TryGetData<int>(uid, StackVisuals.Actual, out var actual, args.Component))
if (!_appearanceSystem.TryGetData<int>(uid, StackVisuals.Actual, out data.Actual, args.Component))
return;

if (!_appearanceSystem.TryGetData<int>(uid, StackVisuals.MaxCount, out var maxCount, args.Component))
maxCount = comp.LayerStates.Count;
if (!_appearanceSystem.TryGetData<int>(uid, StackVisuals.MaxCount, out data.MaxCount, args.Component))
data.MaxCount = comp.LayerStates.Count;

if (!_appearanceSystem.TryGetData<bool>(uid, StackVisuals.Hide, out data.Hidden, args.Component))
data.Hidden = false;

if (!_appearanceSystem.TryGetData<bool>(uid, StackVisuals.Hide, out var hidden, args.Component))
hidden = false;
if (comp.LayerFunction != StackLayerFunction.None) // Frontier: use stack layer function to modify appearance if provided.
ApplyLayerFunction(uid, comp, ref data); // Frontier: definition in _NF/Stack/StackSystem.Layers.cs

if (comp.IsComposite)
_counterSystem.ProcessCompositeSprite(uid, actual, maxCount, comp.LayerStates, hidden, sprite: args.Sprite);
_counterSystem.ProcessCompositeSprite(uid, data.Actual, data.MaxCount, comp.LayerStates, data.Hidden, sprite: args.Sprite);
else
_counterSystem.ProcessOpaqueSprite(uid, comp.BaseLayer, actual, maxCount, comp.LayerStates, hidden, sprite: args.Sprite);
_counterSystem.ProcessOpaqueSprite(uid, comp.BaseLayer, data.Actual, data.MaxCount, comp.LayerStates, data.Hidden, sprite: args.Sprite);
}
}
}
56 changes: 56 additions & 0 deletions Content.Client/_NF/Stack/StackSystem.Layers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using Content.Shared.Stacks.Components;
using Content.Shared.Stacks;

namespace Content.Client.Stack
{
/// <summary>
/// Data used to determine which layers of a stack's sprite are visible.
/// </summary>
public struct StackLayerData
{
public int Actual;
public int MaxCount;
public bool Hidden;
}

public sealed partial class StackSystem : SharedStackSystem
{
// Modifies a given stack component to adjust the layers to display.
private bool ApplyLayerFunction(EntityUid uid, StackComponent comp, ref StackLayerData data)
{
switch (comp.LayerFunction)
{
case StackLayerFunction.Threshold:
if (TryComp<StackLayerThresholdComponent>(uid, out var threshold))
{
ApplyThreshold(threshold, ref data);
return true;
}
break;
}
// No function applied.
return false;
}

/// <summary>
/// Sets Actual to the number of thresholds that Actual exceeds from the beginning of the list.
/// Sets MaxCount to the total number of thresholds plus one (for values under thresholds).
/// </summary>
private static void ApplyThreshold(StackLayerThresholdComponent comp, ref StackLayerData data)
{
// We must stop before we run out of thresholds or layers, whichever's smaller.
data.MaxCount = Math.Min(comp.Thresholds.Count + 1, data.MaxCount);
int newActual = 0;
foreach (var threshold in comp.Thresholds)
{
//If our value exceeds threshold, the next layer should be displayed.
//Note: we must ensure actual <= MaxCount.
if (data.Actual >= threshold && newActual < data.MaxCount)
newActual++;
else
break;
}
data.Actual = newActual;
}
}
}
8 changes: 8 additions & 0 deletions Content.Packaging/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"profiles": {
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
}
}
57 changes: 47 additions & 10 deletions Content.Server/Chemistry/EntitySystems/ReactionMixerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reaction;
using Content.Shared.DoAfter;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Nutrition.EntitySystems;
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Server.Popups;

Expand All @@ -10,34 +13,68 @@ public sealed partial class ReactionMixerSystem : EntitySystem
{
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainers = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<ReactionMixerComponent, AfterInteractEvent>(OnAfterInteract);
SubscribeLocalEvent<ReactionMixerComponent, ShakeEvent>(OnShake);
SubscribeLocalEvent<ReactionMixerComponent, ReactionMixDoAfterEvent>(OnDoAfter);
}

private void OnAfterInteract(Entity<ReactionMixerComponent> entity, ref AfterInteractEvent args)
{
if (!args.Target.HasValue || !args.CanReach)
if (!args.Target.HasValue || !args.CanReach || !entity.Comp.MixOnInteract)
return;

var mixAttemptEvent = new MixingAttemptEvent(entity);
RaiseLocalEvent(entity, ref mixAttemptEvent);
if (mixAttemptEvent.Cancelled)
{
if (!MixAttempt(entity, args.Target.Value, out var solution))
return;
}

if (!_solutionContainers.TryGetMixableSolution(args.Target.Value, out var solution, out _))
var doAfterArgs = new DoAfterArgs(EntityManager, args.User, entity.Comp.TimeToMix, new ReactionMixDoAfterEvent(), entity, args.Target.Value, entity);

_doAfterSystem.TryStartDoAfter(doAfterArgs);
}

private void OnDoAfter(Entity<ReactionMixerComponent> entity, ref ReactionMixDoAfterEvent args)
{
//Do again to get the solution again
if (!MixAttempt(entity, args.Target!.Value, out var solution))
return;

_popup.PopupEntity(Loc.GetString(entity.Comp.MixMessage, ("mixed", Identity.Entity(args.Target.Value, EntityManager)), ("mixer", Identity.Entity(entity.Owner, EntityManager))), args.User, args.User);
_popup.PopupEntity(Loc.GetString(entity.Comp.MixMessage, ("mixed", Identity.Entity(args.Target!.Value, EntityManager)), ("mixer", Identity.Entity(entity.Owner, EntityManager))), args.User, args.User);

_solutionContainers.UpdateChemicals(solution!.Value, true, entity.Comp);

var afterMixingEvent = new AfterMixingEvent(entity, args.Target!.Value);
RaiseLocalEvent(entity, afterMixingEvent);
}

private void OnShake(Entity<ReactionMixerComponent> entity, ref ShakeEvent args)
{
if (!MixAttempt(entity, entity, out var solution))
return;

_solutionContainers.UpdateChemicals(solution.Value, true, entity.Comp);
_solutionContainers.UpdateChemicals(solution!.Value, true, entity.Comp);

var afterMixingEvent = new AfterMixingEvent(entity, args.Target.Value);
var afterMixingEvent = new AfterMixingEvent(entity, entity);
RaiseLocalEvent(entity, afterMixingEvent);
}

private bool MixAttempt(EntityUid ent, EntityUid target, out Entity<SolutionComponent>? solution)
{
solution = null;
var mixAttemptEvent = new MixingAttemptEvent(ent);
RaiseLocalEvent(ent, ref mixAttemptEvent);
if (mixAttemptEvent.Cancelled)
{
return false;
}

if (!_solutionContainers.TryGetMixableSolution(target, out solution, out _))
return false;

return true;
}
}
11 changes: 8 additions & 3 deletions Content.Server/Crayon/CrayonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ private void OnCrayonAfterInteract(EntityUid uid, CrayonComponent component, Aft
if (component.UseSound != null)
_audio.PlayPvs(component.UseSound, uid, AudioParams.Default.WithVariation(0.125f));

// Decrease "Ammo"
component.Charges--;
Dirty(uid, component);
// Frontier: check if crayon is infinite, Delta V Port
if (component.Charges != int.MaxValue)
{
// Decrease "Ammo"
component.Charges--;
Dirty(uid, component);
}
// End Frontier, Delta V Port

_adminLogger.Add(LogType.CrayonDraw, LogImpact.Low, $"{EntityManager.ToPrettyString(args.User):user} drew a {component.Color:color} {component.SelectedState}");
args.Handled = true;
Expand Down
21 changes: 21 additions & 0 deletions Content.Shared/Chemistry/Reaction/ReactionMixerComponent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Content.Shared.Chemistry.Components;
using Content.Shared.DoAfter;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;

namespace Content.Shared.Chemistry.Reaction;

Expand All @@ -19,9 +21,28 @@ public sealed partial class ReactionMixerComponent : Component
[ViewVariables]
[DataField]
public LocId MixMessage = "default-mixing-success";

/// <summary>
/// Defines if interacting is enough to mix with this component
/// </summary>
[ViewVariables]
[DataField]
public bool MixOnInteract = true;

/// <summary>
/// How long it takes to mix with this
/// </summary>
[ViewVariables]
[DataField]
public TimeSpan TimeToMix = TimeSpan.Zero;
}

[ByRefEvent]
public record struct MixingAttemptEvent(EntityUid Mixed, bool Cancelled = false);

public readonly record struct AfterMixingEvent(EntityUid Mixed, EntityUid Mixer);

[Serializable, NetSerializable]
public sealed partial class ReactionMixDoAfterEvent : SimpleDoAfterEvent
{
}
15 changes: 15 additions & 0 deletions Content.Shared/Emag/Components/EmagComponent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Content.Shared.Emag.Systems;
using Content.Shared.Tag;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization;
Expand All @@ -17,4 +18,18 @@ public sealed partial class EmagComponent : Component
[DataField("emagImmuneTag", customTypeSerializer: typeof(PrototypeIdSerializer<TagPrototype>)), ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public string EmagImmuneTag = "EmagImmune";

// DeltaV - Add a whitelist/blacklist to the Emag
/// <summary>
/// Whitelist that entities must be on to work.
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;

/// <summary>
/// Blacklist that entities must be off to work.
/// </summary>
[DataField]
public EntityWhitelist? Blacklist;
// End of DeltaV code
}
11 changes: 11 additions & 0 deletions Content.Shared/Emag/Systems/EmagSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Content.Shared.Popups;
using Content.Shared.Silicons.Laws.Components;
using Content.Shared.Tag;
using Content.Shared.Whitelist;

namespace Content.Shared.Emag.Systems;

Expand All @@ -23,6 +24,7 @@ public sealed class EmagSystem : EntitySystem
[Dependency] private readonly SharedChargesSystem _charges = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!; // DeltaV - Add a whitelist/blacklist to the Emag

public override void Initialize()
{
Expand Down Expand Up @@ -50,6 +52,15 @@ public bool TryUseEmag(EntityUid uid, EntityUid user, EntityUid target, EmagComp
if (_tag.HasTag(target, comp.EmagImmuneTag))
return false;

// DeltaV - Add a whitelist / blacklist to the Emag
if (_whitelist.IsWhitelistFail(comp.Whitelist, target)
|| _whitelist.IsBlacklistPass(comp.Blacklist, target))
{
_popup.PopupClient(Loc.GetString("emag-invalid-target", ("emag", uid), ("target", target)), user, user);
return false;
}
// End of DeltaV code

TryComp<LimitedChargesComponent>(uid, out var charges);
if (_charges.IsEmpty(uid, charges))
{
Expand Down
4 changes: 3 additions & 1 deletion Content.Shared/EntityTable/EntitySelectors/EntSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ namespace Content.Shared.EntityTable.EntitySelectors;
/// </summary>
public sealed partial class EntSelector : EntityTableSelector
{
[DataField(required: true)]
public const string IdDataFieldTag = "id";

[DataField(IdDataFieldTag, required: true)]
public EntProtoId Id;

[DataField]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Validation;
using Robust.Shared.Serialization.TypeSerializers.Interfaces;

namespace Content.Shared.EntityTable.EntitySelectors;

[TypeSerializer]
public sealed class EntityTableTypeSerializer :
ITypeReader<EntityTableSelector, MappingDataNode>
{
public ValidationNode Validate(ISerializationManager serializationManager,
MappingDataNode node,
IDependencyCollection dependencies,
ISerializationContext? context = null)
{
if (node.Has(EntSelector.IdDataFieldTag))
return serializationManager.ValidateNode<EntSelector>(node, context);

return new ErrorNode(node, "Custom validation not supported! Please specify the type manually!");
}

public EntityTableSelector Read(ISerializationManager serializationManager,
MappingDataNode node,
IDependencyCollection dependencies,
SerializationHookContext hookCtx,
ISerializationContext? context = null,
ISerializationManager.InstantiationDelegate<EntityTableSelector>? instanceProvider = null)
{
var type = typeof(EntityTableSelector);
if (node.Has(EntSelector.IdDataFieldTag))
type = typeof(EntSelector);

return (EntityTableSelector) serializationManager.Read(type, node, context)!;
}
}
Loading
Loading