Skip to content

Commit

Permalink
fix the things + locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Roudenn committed Nov 18, 2024
1 parent 30932f0 commit 894aa89
Show file tree
Hide file tree
Showing 46 changed files with 341 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;

namespace Content.IntegrationTests.Tests.Shitmed.Body;
namespace Content.IntegrationTests.Tests.Backmen.Body;

[TestFixture]
public sealed class SpeciesBUiTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
using Content.Shared.Body.Systems;
using Content.Shared.Body.Events;
using Content.Shared.Body.Organ;
using Content.Server.DelayedDeath;
using Content.Server.Backmen.DelayedDeath;
using Content.Server.Body.Components;
namespace Content.Server.Body.Systems;
using Content.Shared.Backmen.Surgery.Body.Organs;

namespace Content.Server.Backmen.Body.Systems;

public sealed class HeartSystem : EntitySystem
{
Expand All @@ -31,8 +33,8 @@ private void HandleAddition(EntityUid uid, HeartComponent _, ref OrganAddedToBod
if (TerminatingOrDeleted(uid) || TerminatingOrDeleted(args.Body))
return;

if (_bodySystem.TryGetBodyOrganComponents<BrainComponent>(args.Body, out var _))
if (_bodySystem.TryGetBodyOrganEntityComps<BrainComponent>(args.Body, out var _))
RemComp<DelayedDeathComponent>(args.Body);
}
// Shitmed-End
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Content.Server.DelayedDeath;
namespace Content.Server.Backmen.DelayedDeath;

[RegisterComponent]
public sealed partial class DelayedDeathComponent : Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
using Content.Shared.Mobs.Systems;
using Robust.Shared.Timing;
using Robust.Shared.Prototypes;
namespace Content.Server.DelayedDeath;

namespace Content.Server.Backmen.DelayedDeath;

public partial class DelayedDeathSystem : EntitySystem
{
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Backmen/Surgery/SurgerySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Content.Shared.Backmen.Surgery.Effects.Step;
using Content.Shared.Backmen.Surgery.Tools;
using Content.Shared.Bed.Sleep;
using Content.Shared.Medical.Surgery;

namespace Content.Server.Backmen.Surgery;

Expand Down
5 changes: 3 additions & 2 deletions Content.Server/Body/Systems/BrainSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
using Content.Shared.Body.Systems;
using Content.Shared.Body.Events;
using Content.Shared.Body.Organ;
using Content.Server.DelayedDeath;
using Content.Server.Backmen.DelayedDeath;
using Content.Shared.Backmen.Surgery.Body.Organs;
using Content.Shared.Mind;
using Content.Shared.Mind.Components;
using Content.Shared.Pointing;
Expand Down Expand Up @@ -43,7 +44,7 @@ private void HandleAddition(EntityUid uid, BrainComponent _, ref OrganAddedToBod
return;

RemComp<DebrainedComponent>(args.Body);
if (_bodySystem.TryGetBodyOrganComponents<HeartComponent>(args.Body, out var _))
if (_bodySystem.TryGetBodyOrganEntityComps<HeartComponent>(args.Body, out var _))
RemComp<DelayedDeathComponent>(args.Body);
HandleMind(args.Body, uid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ private void OnPartAppearanceStartup(EntityUid uid, BodyPartAppearanceComponent
|| TerminatingOrDeleted(part.OriginalBody.Value)
|| !TryComp(part.OriginalBody.Value, out HumanoidAppearanceComponent? bodyAppearance))
{
component.ID = part.BaseLayerId;
//component.ID = part.BaseLayerId;
component.Type = relevantLayer;
return;
}

var customLayers = bodyAppearance.CustomBaseLayers;
var spriteLayers = bodyAppearance.BaseLayers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Content.Shared.Backmen.Surgery.Steps.Parts;
using Content.Shared.Backmen.Surgery.Tools;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Medical.Surgery;

namespace Content.Shared.Backmen.Surgery;

Expand Down
21 changes: 15 additions & 6 deletions Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,20 @@ public virtual HashSet<EntityUid> GibPart(
if (IsPartRoot(bodyEnt, partId, part: part))
return gibs;

ChangeSlotState((partId, part), true);

RemovePartChildren((partId, part), bodyEnt);

_gibbingSystem.TryGibEntityWithRef(partId, partId, GibType.Gib, GibContentsOption.Drop, ref gibs,
playAudio: true, launchGibs: true, launchDirection: splatDirection, launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance, launchCone: splatCone);

_gibbingSystem.TryGibEntityWithRef(partId,
partId,
GibType.Gib,
GibContentsOption.Drop,
ref gibs,
playAudio: true,
launchGibs: true,
launchDirection: splatDirection,
launchImpulse: GibletLaunchImpulse * splatModifier,
launchImpulseVariance: GibletLaunchImpulseVariance,
launchCone: splatCone);
}

if (HasComp<InventoryComponent>(partId))
{
Expand All @@ -418,8 +424,11 @@ private void OnProfileLoadFinished(EntityUid uid, BodyComponent component, Profi
{
if (!HasComp<HumanoidAppearanceComponent>(uid)
|| TerminatingOrDeleted(uid))
return;

foreach (var part in GetBodyChildren(uid, component))
{
EnsureComp<BodyPartAppearanceComponent>(part.Id);
}
}
}
52 changes: 52 additions & 0 deletions Resources/Locale/ru-RU/backmen/surgery/surgery-popup.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
surgery-popup-step-SurgeryStepOpenIncisionScalpel = {$user} делает разрез на {$part} {$target}.
surgery-popup-step-SurgeryStepClampBleeders = {$user} пережимает внутреннее кровотечение на {$part} {$target}.
surgery-popup-step-SurgeryStepRetractSkin = {$user} втягивает кожу на {$part} {$target}.
surgery-popup-step-SurgeryStepSawBones = {$user} пилит через кости на {$part} {$target}.
surgery-popup-step-SurgeryStepPriseOpenBones = {$user} вскрывает кости на {$part} {$target}.
surgery-popup-step-SurgeryStepCloseBones = {$user} закрывает кости на {$part} {$target}.
surgery-popup-step-SurgeryStepMendRibcage = {$user} лечит грудную клетку на {$part} {$target}.
surgery-popup-step-SurgeryStepCloseIncision = {$user} закрывает разрез на {$part} {$target}.
surgery-popup-step-SurgeryStepInsertFeature = {$user} вставляет что-то в {$part} {$target}!
surgery-popup-procedure-SurgeryAttachHead-step-SurgeryStepInsertFeature = {$user} присоединяет голову к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachLeftArm-step-SurgeryStepInsertFeature = {$user} присоединяет левую руку к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachRightArm-step-SurgeryStepInsertFeature = {$user} присоединяет правую руку к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachLeftLeg-step-SurgeryStepInsertFeature = {$user} присоединяет левую ногу к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachRightLeg-step-SurgeryStepInsertFeature = {$user}присоединяет правую ногу к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachLeftHand-step-SurgeryStepInsertFeature = {$user} присоединяет левую ладонь к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachRightHand-step-SurgeryStepInsertFeature = {$user} присоединяет правую ногу к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachLeftFoot-step-SurgeryStepInsertFeature = {$user} присоединяет левую стопу к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachRightFoot-step-SurgeryStepInsertFeature = {$user} присоединяет правую стопу к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachLegs-step-SurgeryStepInsertFeature = {$user} присоединяет ноги к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachHands-step-SurgeryStepInsertFeature = {$user} присоединяет руки к {$part} {$target}!
surgery-popup-procedure-SurgeryAttachFeet-step-SurgeryStepInsertFeature = {$user} присоединяет стопы к {$part} {$target}!
surgery-popup-step-SurgeryStepSealWounds = {$user} лечит раны на {$part} {$target}.
surgery-popup-step-SurgeryStepSawFeature = {$user} пилит через кости на {$part} {$target}.
surgery-popup-step-SurgeryStepClampInternalBleeders = {$user} пережимает внутреннее кровотечение у {$part} {$target}.
surgery-popup-step-SurgeryStepRemoveFeature = {$user} ампутирует {$part} {$target}!
surgery-popup-step-SurgeryStepCarefulIncisionScalpel = {$user} аккуратно закрывает разрез на {$part} {$target}.
surgery-popup-step-SurgeryStepRepairBruteTissue = {$user} лечит механические повреждения на {$part} {$target}!
surgery-popup-step-SurgeryStepRepairBurnTissue = {$user} лечит физические повреждения на {$part} {$target}!
surgery-popup-step-SurgeryStepSealTendWound = {$user} закрывает раны на {$part} {$target}.
surgery-popup-step-SurgeryStepInsertItem = {$user} вставляет что-то в {$part} {$target}!
surgery-popup-step-SurgeryStepRemoveItem = {$user} достаёт что-то из {$part} {$target}!
surgery-popup-step-SurgeryStepRemoveOrgan = {$user} удаляет орган из {$part} {$target}!
surgery-popup-step-SurgeryStepInsertOrgan = {$user} вставляет орган в {$part} {$target}!
surgery-popup-procedure-SurgeryRemoveBrain-step-SurgeryStepRemoveOrgan = {$user} удаляет мозг из {$part} {$target}!
surgery-popup-procedure-SurgeryRemoveHeart-step-SurgeryStepRemoveOrgan = {$user} удаляет сердце из {$part} {$target}!
surgery-popup-procedure-SurgeryRemoveLiver-step-SurgeryStepRemoveOrgan = {$user} удаляет печень из {$part} {$target}!
surgery-popup-procedure-SurgeryRemoveLungs-step-SurgeryStepRemoveOrgan = {$user} удаляет лёгкие из {$part} {$target}!
surgery-popup-procedure-SurgeryRemoveEyes-step-SurgeryStepRemoveOrgan = {$user} удаляет глаза из {$part} {$target}!
surgery-popup-procedure-SurgeryRemoveStomach-step-SurgeryStepRemoveOrgan = {$user} удаляет желудок из {$part} {$target}!
surgery-popup-procedure-SurgeryInsertBrain-step-SurgeryStepInsertOrgan = {$user} вставляет мозг в {$part} {$target}!
surgery-popup-step-SurgeryStepInsertLungs = {$user} вставляет лёгкие в {$part} {$target}!
surgery-popup-step-SurgeryStepInsertLiver = {$user} вставляет печень в {$part} {$target}!
surgery-popup-step-SurgeryStepInsertEyes = {$user} вставляет глаза в {$part} {$target}!
surgery-popup-step-SurgeryStepInsertHeart = {$user} вставляет сердце в {$part} {$target}!
surgery-popup-step-SurgeryStepInsertStomach = {$user} вставляет желудок в {$part} {$target}!
surgery-popup-step-SurgeryStepSealOrganWound = {$user} лечит раны на {$part} {$target}.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
metabolizer-type-anthropomorph-animal = Гуманоидное животное
metabolizer-type-shadowkin = Шадовкин
14 changes: 3 additions & 11 deletions Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,8 @@
interfaces:
enum.StrippingUiKey.Key:
type: StrippableBoundUserInterface
enum.SurgeryUIKey.Key:
type: SurgeryBui # backmen: surgery
- type: InventorySlots
- type: Inventory
speciesId: hamster
Expand Down Expand Up @@ -616,13 +618,7 @@
32:
sprite: Mobs/Animals/mothroach/displacement.rsi
state: neck
# start-backmen: surgery
- type: SurgeryTarget
- type: UserInterface
interfaces:
enum.SurgeryUIKey.Key:
type: SurgeryBui
# end-backmen: surgery
- type: SurgeryTarget # backmen: surgery

# Note that the mallard duck is actually a male drake mallard, with the brown duck being the female variant of the same species, however ss14 lacks sex specific textures
# The white duck is more akin to a pekin or call duck.
Expand Down Expand Up @@ -1879,10 +1875,6 @@
Burger: RatBurger
Skewer: RatSkewer
# start-backmen: surgery
- type: StepTriggerImmune
whitelist:
types:
- Landmine
- type: SurgeryTarget
- type: UserInterface
interfaces:
Expand Down
111 changes: 111 additions & 0 deletions Resources/Prototypes/_Backmen/Body/Organs/shadowkin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
- type: entity
id: OrganShadowkinBrain
parent: OrganHumanBrain
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
state: brain

- type: entity
id: OrganShadowkinEyes
parent: OrganHumanEyes
description: I see beyond anything you ever will!
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
layers:
- state: eyes

- type: entity
id: OrganShadowkinEars
parent: OrganHumanEars
description: Hey, listen!
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
state: ears

- type: entity
id: OrganShadowkinTongue
parent: OrganHumanTongue
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
state: tongue

- type: entity
id: OrganShadowkinAppendix
parent: OrganHumanAppendix
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
layers:
- state: appendix

- type: entity
id: OrganShadowkinHeart
parent: OrganHumanHeart
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
state: heart
- type: Metabolizer
maxReagents: 2
metabolizerTypes: [Shadowkin]
groups:
- id: Medicine
- id: Poison
- id: Narcotic

- type: entity
id: OrganShadowkinStomach
parent: OrganHumanStomach
description: '"Yummy!", says the stomach, although you are unable to hear it.'
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
state: stomach
- type: SolutionContainerManager
solutions:
stomach:
maxVol: 40
food:
maxVol: 5
reagents:
- ReagentId: UncookedAnimalProteins
Quantity: 5
- type: Metabolizer
maxReagents: 3
metabolizerTypes: [Shadowkin]
groups:
- id: Food
- id: Drink

- type: entity
id: OrganShadowkinLiver
parent: OrganHumanLiver
description: "Live 'er? I hardly know 'er!"
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
state: liver
- type: Metabolizer
maxReagents: 1
metabolizerTypes: [Shadowkin]
groups:
- id: Alcohol
rateModifier: 0.1

- type: entity
id: OrganShadowkinKidneys
parent: OrganHumanKidneys
description: Give the kid their knees back, please, this is the third time this week.
components:
- type: Sprite
sprite: Backmen/Mobs/Species/Shadowkin/organs.rsi
layers:
- state: kidneys
- type: Metabolizer
maxReagents: 5
metabolizerTypes: [Shadowkin]
removeEmpty: true
4 changes: 2 additions & 2 deletions Resources/Prototypes/_Backmen/Body/Parts/shadowkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
components:
- type: Sprite
netsync: false
sprite: Backmen/Mobs/Species/shadowkin.rsi
sprite: Backmen/Mobs/Species/Shadowkin/parts.rsi
- type: Icon
sprite: Backmen/Mobs/Species/shadowkin.rsi
sprite: Backmen/Mobs/Species/Shadowkin/parts.rsi
- type: Damageable
damageContainer: OrganicPart # backmen: surgery
- type: SurgeryTool
Expand Down
16 changes: 8 additions & 8 deletions Resources/Prototypes/_Backmen/Body/Prototypes/shadowkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
torso:
part: TorsoShadowkin
connections:
- right_arm
- left_arm
- right_leg
- left_leg
- right arm
- left arm
- right leg
- left leg
- head
organs:
heart: OrganShadowkinHeart
Expand All @@ -26,23 +26,23 @@
right arm:
part: RightArmShadowkin
connections:
- right_hand
- right hand
left arm:
part: LeftArmShadowkin
connections:
- left_hand
- left hand
right hand:
part: RightHandShadowkin
left hand:
part: LeftHandShadowkin
right leg:
part: RightLegShadowkin
connections:
- right_foot
- right foot
left leg:
part: LeftLegShadowkin
connections:
- left_foot
- left foot
right foot:
part: RightFootShadowkin
left foot:
Expand Down
Loading

0 comments on commit 894aa89

Please sign in to comment.