Skip to content

Commit

Permalink
Merge branch 'DeltaV-Station:master' into Byoin-surgery-accommodation
Browse files Browse the repository at this point in the history
  • Loading branch information
FieldCommand authored Jan 9, 2025
2 parents d75477d + 60c5291 commit f303e65
Show file tree
Hide file tree
Showing 31 changed files with 262 additions and 206 deletions.
9 changes: 9 additions & 0 deletions Content.Server/Body/Systems/BodySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace Content.Server.Body.Systems;

public sealed class BodySystem : SharedBodySystem
{
[Dependency] private readonly BloodstreamSystem _bloodstream = default!; // Shitmed Change
[Dependency] private readonly GhostSystem _ghostSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
Expand Down Expand Up @@ -195,5 +196,13 @@ protected override void RemoveBodyMarkings(EntityUid target, BodyPartAppearanceC
Dirty(target, bodyAppearance);
}

protected override void PartRemoveDamage(Entity<BodyComponent?> bodyEnt, Entity<BodyPartComponent> partEnt)
{
var bleeding = partEnt.Comp.SeverBleeding;
if (partEnt.Comp.IsVital)
bleeding *= 2f;
_bloodstream.TryModifyBleedAmount(bodyEnt, bleeding);
}

// Shitmed Change End
}
2 changes: 1 addition & 1 deletion Content.Server/Cloning/CloningConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private CloningConsoleBoundUserInterfaceState GetUserInterfaceState(CloningConso
{
scanBodyInfo = MetaData(scanBody.Value).EntityName;

if (false) // GoobStation: Lets you clone living people
if (!_mobStateSystem.IsDead(scanBody.Value))
{
clonerStatus = ClonerStatus.ScannerOccupantAlive;
}
Expand Down
12 changes: 5 additions & 7 deletions Content.Server/Cloning/CloningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity<MindComponen
return false;

var mind = mindEnt.Comp;
// GoobStation: Remove this logic entirely, infinite clone army
/*if (ClonesWaitingForMind.TryGetValue(mind, out var clone))
if (ClonesWaitingForMind.TryGetValue(mind, out var clone))
{
if (EntityManager.EntityExists(clone) &&
!_mobStateSystem.IsDead(clone) &&
Expand All @@ -160,11 +159,10 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity<MindComponen
return false; // Mind already has clone

ClonesWaitingForMind.Remove(mind);
}*/
}

// GoobStation: Lets you clone living people
//if (mind.OwnedEntity != null && !_mobStateSystem.IsDead(mind.OwnedEntity.Value))
// return false; // Body controlled by mind is not dead
if (mind.OwnedEntity != null && !_mobStateSystem.IsDead(mind.OwnedEntity.Value))
return false; // Body controlled by mind is not dead

// Yes, we still need to track down the client because we need to open the Eui
if (mind.UserId == null || !_playerManager.TryGetSessionById(mind.UserId.Value, out var client))
Expand Down Expand Up @@ -253,7 +251,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity<MindComponen
cloneMindReturn.Mind = mind;
cloneMindReturn.Parent = uid;
_containerSystem.Insert(mob, clonePod.BodyContainer);
//ClonesWaitingForMind.Add(mind, mob); // GoobStation
ClonesWaitingForMind.Add(mind, mob);
UpdateStatus(uid, CloningPodStatus.NoMind, clonePod);
_euiManager.OpenEui(new AcceptCloningEui(mindEnt, mind, this), client);

Expand Down

This file was deleted.

47 changes: 0 additions & 47 deletions Content.Server/Nyanotrasen/Abilities/Borgs/FabricateCandySystem.cs

This file was deleted.

8 changes: 4 additions & 4 deletions Content.Shared/Body/Part/BodyPartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
public BodyPartSlot? ParentSlot;

/// <summary>
/// Shitmed Change: Amount of damage to deal when the part gets removed.
/// Only works if IsVital is true.
/// Shitmed Change: Bleeding stacks to give when this body part is severed.
/// Doubled for <see cref="IsVital"/>. parts.
/// </summary>
[DataField, AutoNetworkedField]
public FixedPoint2 VitalDamage = 100;
[DataField]
public float SeverBleeding = 4f;

[DataField, AlwaysPushInheritance]
public string ToolName { get; set; } = "A body part";
Expand Down
14 changes: 2 additions & 12 deletions Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,19 +383,9 @@ private void RemoveLeg(Entity<BodyPartComponent> legEnt, Entity<BodyComponent?>
}
}

private void PartRemoveDamage(Entity<BodyComponent?> bodyEnt, Entity<BodyPartComponent> partEnt)
// Shitmed Change: made virtual, bleeding damage is done on server
protected virtual void PartRemoveDamage(Entity<BodyComponent?> bodyEnt, Entity<BodyPartComponent> partEnt)
{
if (!Resolve(bodyEnt, ref bodyEnt.Comp, logMissing: false))
return;

if (!_timing.ApplyingState
&& partEnt.Comp.IsVital
&& !GetBodyChildrenOfType(bodyEnt, partEnt.Comp.PartType, bodyEnt.Comp).Any()
)
{
var damage = new DamageSpecifier(Prototypes.Index<DamageTypePrototype>("Bloodloss"), partEnt.Comp.VitalDamage); // Shitmed Change
Damageable.TryChangeDamage(bodyEnt, damage, partMultiplier: 0f); // Shitmed Change
}
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions Content.Shared/Lock/LockSystem.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.ActionBlocker;
using Content.Shared.Construction.Components;
using Content.Shared.DoAfter;
using Content.Shared.Emag.Systems;
using Content.Shared.Examine;
using Content.Shared.Hands.Components;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Popups;
Expand All @@ -26,6 +26,7 @@ namespace Content.Shared.Lock;
public sealed class LockSystem : EntitySystem
{
[Dependency] private readonly AccessReaderSystem _accessReader = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
[Dependency] private readonly ActivatableUISystem _activatableUI = default!;
[Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
Expand Down Expand Up @@ -246,7 +247,7 @@ public bool IsLocked(Entity<LockComponent?> ent)
/// </summary>
public bool CanToggleLock(EntityUid uid, EntityUid user, bool quiet = true)
{
if (!HasComp<HandsComponent>(user))
if (!_actionBlocker.CanComplexInteract(user))
return false;

var ev = new LockToggleAttemptEvent(user, quiet);
Expand Down
4 changes: 0 additions & 4 deletions Content.Shared/Nyanotrasen/Actions/FabricateCandyEvent.cs

This file was deleted.

46 changes: 46 additions & 0 deletions Content.Shared/_DV/Silicons/Borgs/FabricateCandyComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Content.Shared.Actions;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;

namespace Content.Shared._DV.Silicons.Borgs;

/// <summary>
/// Lets a medical borg spawn a number of candy items using actions.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class FabricateCandyComponent : Component
{
/// <summary>
/// Actions to add to the entity.
/// </summary>
[DataField(required: true)]
public List<EntProtoId> Actions = new();

/// <summary>
/// The sound played when fabricating candy.
/// </summary>
[DataField]
public SoundSpecifier FabricationSound = new SoundPathSpecifier("/Audio/Machines/machine_vend.ogg")
{
Params = new AudioParams
{
Volume = -2f
}
};
}

/// <summary>
/// Action event to use for candy fabrication actions.
/// </summary>
public sealed partial class FabricateCandyActionEvent : InstantActionEvent
{
/// <summary>
/// The item to spawn at the borg.
/// </summary>
/// <remarks>
/// The client only sends a <see cref="RequestPerformActionEvent"/>, no exploits possible with this being in the event.
/// </remarks>
[DataField(required: true)]
public EntProtoId Item;
}
45 changes: 45 additions & 0 deletions Content.Shared/_DV/Silicons/Borgs/FabricateCandySystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Content.Shared.Actions;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;

namespace Content.Shared._DV.Silicons.Borgs;

public sealed partial class FabricateCandySystem : EntitySystem
{
[Dependency] private readonly INetManager _net = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;

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

SubscribeLocalEvent<FabricateCandyComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<FabricateCandyComponent, FabricateCandyActionEvent>(OnFabricate);
}

private void OnMapInit(Entity<FabricateCandyComponent> ent, ref MapInitEvent args)
{
var (uid, comp) = ent;
foreach (var id in comp.Actions)
{
_actions.AddAction(uid, id);
}
}

private void OnFabricate(Entity<FabricateCandyComponent> ent, ref FabricateCandyActionEvent args)
{
_audio.PlayPredicted(ent.Comp.FabricationSound, ent, ent);
args.Handled = true;

if (_net.IsClient)
return;

var spawned = Spawn(args.Item, Transform(ent).Coordinates);
_adminLogger.Add(LogType.EntitySpawn, LogImpact.Low, $"{ToPrettyString(ent):player} fabricated {ToPrettyString(spawned):item}");
}
}
59 changes: 31 additions & 28 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@
Entries:
- author: dge21
changes:
- message: the mime suit is craftable now!
type: Add
id: 383
time: '2024-06-04T15:49:58.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/1286
- author: Leo, Velcroboy, and Timemaster
changes:
- message: Added The Justice Department >:)
type: Add
id: 384
time: '2024-06-07T13:22:37.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/660
- author: rosieposieeee
changes:
- message: Submarine Station has been removed from rotation.
type: Remove
id: 385
time: '2024-06-07T14:37:29.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/1307
- author: Lyndomen
changes:
- message: Burning bodies no longer ash
type: Tweak
id: 386
time: '2024-06-08T00:20:26.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/1324
- author: Colin_Tel, Space Law Rewrite Team
changes:
- message: Added a guidebook entry for Justice under "Jobs"
Expand Down Expand Up @@ -3844,3 +3816,34 @@
id: 882
time: '2025-01-09T06:34:46.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2645
- author: Velcroboy
changes:
- message: Hospital curtains now take up less space when open and have interaction
outlines. This should make treating patients under them a little better.
type: Tweak
id: 883
time: '2025-01-09T09:13:51.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2657
- author: deltanedas
changes:
- message: Fixed cloning not working.
type: Fix
id: 884
time: '2025-01-09T12:39:39.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2667
- author: deltanedas
changes:
- message: AI cores will soon have defense turrets that the AI can deploy to shoot
intruders.
type: Add
id: 885
time: '2025-01-09T17:06:00.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2665
- author: deltanedas
changes:
- message: Losing a limb makes you bleed profusely instead of dealing bloodloss
damage.
type: Tweak
id: 886
time: '2025-01-09T18:02:35.0000000+00:00'
url: https://github.com/DeltaV-Station/Delta-v/pull/2668
5 changes: 0 additions & 5 deletions Resources/Locale/en-US/nyanotrasen/abilities/borgs.ftl

This file was deleted.

Loading

0 comments on commit f303e65

Please sign in to comment.