Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Roudenn committed Nov 30, 2024
1 parent 11d8926 commit 300e58f
Show file tree
Hide file tree
Showing 17 changed files with 214 additions and 340 deletions.
10 changes: 0 additions & 10 deletions Content.Client/Inventory/ClientInventorySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public override void Initialize()

SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<InventorySlotsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<InventorySlotsComponent, RefreshInventorySlotsEvent>(OnRefreshInventorySlots);
SubscribeLocalEvent<InventoryComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<InventorySlotsComponent, DidEquipEvent>((_, comp, args) =>
Expand Down Expand Up @@ -182,15 +181,6 @@ public void UpdateSlot(EntityUid owner, InventorySlotsComponent component, strin
EntitySlotUpdate?.Invoke(newData);
}

public void OnRefreshInventorySlots(EntityUid owner, InventorySlotsComponent component, RefreshInventorySlotsEvent args)
{
if (!component.SlotData.TryGetValue(args.SlotName, out var slotData)
|| _playerManager.LocalEntity != owner)
return;

OnSlotRemoved?.Invoke(slotData);
}

public bool TryAddSlotDef(EntityUid owner, InventorySlotsComponent component, SlotDefinition newSlotDef)
{
SlotData newSlotData = newSlotDef; //convert to slotData
Expand Down
15 changes: 15 additions & 0 deletions Content.Server/Backmen/Surgery/SurgerySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ private void SetDamage(EntityUid body,
targetPart: _body.GetTargetBodyPart(partComp));
}

private void AttemptStartSurgery(Entity<SurgeryToolComponent> ent, EntityUid user, EntityUid target)
{
if (!IsLyingDown(target, user))
return;

if (user == target && !_config.GetCVar(Shared.Backmen.CCVar.CCVars.CanOperateOnSelf))
{
_popup.PopupEntity(Loc.GetString("surgery-error-self-surgery"), user, user);
return;
}

_ui.OpenUi(target, SurgeryUIKey.Key, user);
RefreshUI(target);
}

private void OnUtilityVerb(Entity<SurgeryToolComponent> ent, ref GetVerbsEvent<UtilityVerb> args)
{
if (!args.CanInteract
Expand Down
3 changes: 0 additions & 3 deletions Content.Server/Backmen/Targeting/TargetingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using Content.Shared.Backmen.Targeting;
using Content.Shared.Body.Systems;
using Content.Shared.Mobs;
using Content.Shared.Backmen.Targeting;
using Content.Shared.Backmen.Targeting.Events;
using Content.Shared.Body.Part;

namespace Content.Server.Backmen.Targeting;
public sealed class TargetingSystem : SharedTargetingSystem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using Content.Shared.Popups;
using Robust.Shared.Prototypes;
using System.Linq;
using Content.Shared._Shitmed.Medical.Surgery;
using Content.Shared.Backmen.Mood;
using Content.Shared.Backmen.Surgery.Body.Events;
using Content.Shared.Backmen.Surgery.Body.Organs;
Expand Down
6 changes: 3 additions & 3 deletions Content.Shared/Body/Part/BodyPartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Content.Shared.Body.Part;

[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedBodySystem))]
//[Access(typeof(SharedBodySystem))]
public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
{
// Need to set this on container changes as it may be several transform parents up the hierarchy.
Expand All @@ -36,7 +36,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
public string ToolName { get; set; } = "A body part";

[DataField, AlwaysPushInheritance]
public string SlotId = "";
public string SlotId { get; set; } = "";

[DataField, AutoNetworkedField]
public bool? Used { get; set; } = null;
Expand Down Expand Up @@ -153,7 +153,7 @@ public sealed partial class BodyPartComponent : Component, ISurgeryToolComponent
public bool IsVital;

[DataField, AutoNetworkedField]
public BodyPartSymmetry Symmetry = BodyPartSymmetry.None;
public BodyPartSymmetry Symmetry { get; set; } = BodyPartSymmetry.None;

/// <summary>
/// When attached, the part will ensure these components on the entity, and delete them on removal.
Expand Down
2 changes: 0 additions & 2 deletions Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ private void InitializeParts()
// Shitmed Change Start
SubscribeLocalEvent<BodyPartComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<BodyPartComponent, ComponentRemove>(OnBodyPartRemove);
SubscribeLocalEvent<BodyPartComponent, EntInsertedIntoContainerMessage>(OnBodyPartInserted);
SubscribeLocalEvent<BodyPartComponent, EntRemovedFromContainerMessage>(OnBodyPartRemoved);
SubscribeLocalEvent<BodyPartComponent, AmputateAttemptEvent>(OnAmputateAttempt);
SubscribeLocalEvent<BodyPartComponent, BodyPartEnableChangedEvent>(OnPartEnableChanged);
}
Expand Down
53 changes: 0 additions & 53 deletions Resources/Locale/en-US/surgery/surgery-popup.ftl

This file was deleted.

14 changes: 0 additions & 14 deletions Resources/Locale/en-US/surgery/surgery-ui.ftl

This file was deleted.

52 changes: 0 additions & 52 deletions Resources/Prototypes/Recipes/Lathes/medical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,55 +215,3 @@
materials:
Steel: 100
Plastic: 100

# Shitmed Recipes

- type: latheRecipe
id: MedicalCyberneticEyes
result: MedicalCyberneticEyes
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300

- type: latheRecipe
id: EnergyScalpel
result: EnergyScalpel
completetime: 2
materials:
Steel: 600
Glass: 150
Gold: 150

- type: latheRecipe
id: AdvancedRetractor
result: AdvancedRetractor
completetime: 2
materials:
Steel: 600
Glass: 150
Silver: 150

- type: latheRecipe
id: EnergyCautery
result: EnergyCautery
completetime: 2
materials:
Steel: 600
Glass: 150
Plasma: 150

- type: latheRecipe
id: OmnimedTool
result: OmnimedTool
completetime: 2
materials:
Steel: 600
Glass: 150
Gold: 150
Silver: 150
Plasma: 150
80 changes: 80 additions & 0 deletions Resources/Prototypes/_Backmen/Recipes/Lathes/robotics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,83 @@
Steel: 500
Plasma: 100

- type: latheRecipe
id: BorgModuleSurgery
result: BorgModuleSurgery
category: Robotics
completetime: 3
materials:
Steel: 250
Glass: 250
Plastic: 250

- type: latheRecipe
id: BorgModuleAdvancedSurgery
result: BorgModuleAdvancedSurgery
category: Robotics
completetime: 3
materials:
Steel: 500
Glass: 500
Plastic: 250
Gold: 50

- type: latheRecipe
id: JawsOfLifeLeftArm
result: JawsOfLifeLeftArm
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300

- type: latheRecipe
id: JawsOfLifeRightArm
result: JawsOfLifeRightArm
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300

- type: latheRecipe
id: SpeedLeftLeg
result: SpeedLeftLeg
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300

- type: latheRecipe
id: SpeedRightLeg
result: SpeedRightLeg
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300

- type: latheRecipe
id: BasicCyberneticEyes
result: BasicCyberneticEyes
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300
12 changes: 12 additions & 0 deletions Resources/Prototypes/_Backmen/Recipes/Lathes/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@
Plastic: 500
Gold: 250
Uranium: 50

- type: latheRecipe
id: SecurityCyberneticEyes
result: SecurityCyberneticEyes
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300
52 changes: 51 additions & 1 deletion Resources/Prototypes/_Backmen/Recipes/Lathes/surgery.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,61 @@
- type: latheRecipe
id: BoneGel
result: BoneGel
completetime: 10
completetime: 2
materials:
Plastic: 200
Plasma: 200

- type: latheRecipe
id: MedicalCyberneticEyes
result: MedicalCyberneticEyes
category: Robotics
completetime: 5
materials:
Steel: 1000
Glass: 500
Plastic: 500
Gold: 300
Silver: 300

- type: latheRecipe
id: EnergyScalpel
result: EnergyScalpel
completetime: 2
materials:
Steel: 600
Glass: 150
Gold: 150

- type: latheRecipe
id: AdvancedRetractor
result: AdvancedRetractor
completetime: 2
materials:
Steel: 600
Glass: 150
Silver: 150

- type: latheRecipe
id: EnergyCautery
result: EnergyCautery
completetime: 2
materials:
Steel: 600
Glass: 150
Plasma: 150

- type: latheRecipe
id: OmnimedTool
result: OmnimedTool
completetime: 2
materials:
Steel: 1200
Glass: 300
Gold: 300
Silver: 300
Plasma: 300

- type: latheRecipe
id: SynthHeart
result: BioSynthHeart
Expand Down
Loading

0 comments on commit 300e58f

Please sign in to comment.