Skip to content

Commit

Permalink
fixes?
Browse files Browse the repository at this point in the history
  • Loading branch information
Roudenn committed Nov 16, 2024
1 parent 983b397 commit 3efedc5
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 56 deletions.
1 change: 0 additions & 1 deletion Content.Server/EntityEffects/Effects/HealthChange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Content.Shared.EntityEffects;
using Content.Shared.FixedPoint;
using Content.Shared.Localizations;
using Content.Shared.Targeting; // Shitmed
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
using System.Linq;
Expand Down
3 changes: 1 addition & 2 deletions Content.Shared/Backmen/Surgery/SharedSurgerySystem.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,8 @@ private void OnAddPartStep(Entity<SurgeryAddPartStepComponent> ent, ref SurgeryS
var slotName = removedComp.Symmetry != null
? $"{removedComp.Symmetry?.ToString().ToLower()} {removedComp.Part.ToString().ToLower()}"
: removedComp.Part.ToString().ToLower();
_body.TryCreatePartSlot(args.Part, slotName, partComp.PartType, out var _);
_body.TryCreatePartSlot(args.Part, slotName, partComp.PartType, out _);
_body.AttachPart(args.Part, slotName, tool);
_body.ChangeSlotState((tool, partComp), false);
EnsureComp<BodyPartReattachedComponent>(tool);
var ev = new BodyPartAttachedEvent((tool, partComp));
RaiseLocalEvent(args.Body, ref ev);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Body/Systems/SharedBodySystem.Body.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public virtual HashSet<EntityUid> GibPart(

if (HasComp<InventoryComponent>(partId))
{
foreach (var item in _inventory.GetHandOrInventoryEntities((partId, null, inventory)))
foreach (var item in _inventory.GetHandOrInventoryEntities((partId)))
{
SharedTransform.AttachToGridOrMap(item);
gibs.Add(item);
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/Body/Systems/SharedBodySystem.Parts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ protected virtual void RemovePart(

protected virtual void DropPart(Entity<BodyPartComponent> partEnt)
{
ChangeSlotState(partEnt, true);
// I don't know if this can cause issues, since any part that's being detached HAS to have a Body.
// though I really just want the compiler to shut the fuck up.
var body = partEnt.Comp.Body.GetValueOrDefault();
Expand Down Expand Up @@ -289,6 +288,7 @@ private void EnablePart(Entity<BodyPartComponent> partEnt)

// I hate having to hardcode these checks so much.
if (partEnt.Comp.PartType == BodyPartType.Leg)
{
AddLeg(partEnt, (partEnt.Comp.Body.Value, body));
RaiseLocalEvent(partEnt.Comp.Body.Value, new MoodRemoveEffectEvent("SurgeryNoLeg"));
}
Expand Down Expand Up @@ -323,6 +323,7 @@ private void DisablePart(Entity<BodyPartComponent> partEnt)
return;

if (partEnt.Comp.PartType == BodyPartType.Leg)
{
RemoveLeg(partEnt, (partEnt.Comp.Body.Value, body));
RaiseLocalEvent(partEnt.Comp.Body.Value, new MoodEffectEvent("SurgeryNoLeg"));
}
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Body/Organs/felinid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
description: "Should you really have this?"
components:
- type: Sprite
sprite: Nyanotrasen/Mobs/Customization/felinid_tails.rsi
sprite: Backmen/Mobs/Customization/felinid_tails.rsi
state: basic_tail_tip
- type: MarkingContainer
marking: FelinidTailBasic
Expand Down
33 changes: 20 additions & 13 deletions Resources/Prototypes/Body/Parts/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
endSound:
path: /Audio/Medical/Surgery/organ2.ogg
# end-backmen: surgery
- type: Gibbable
- type: ContainerContainer
containers:
bodypart: !type:Container
Expand All @@ -24,13 +23,21 @@
- type: Tag
tags:
- Trash
# start-backmen: surgery

# start-backmen: surgery
- type: entity
id: BasePartDestructible
parent: BasePart
name: "body part"
abstract: true
components:
- type: Gibbable
- type: Destructible
thresholds:
- trigger:
!type:DamageTypeTrigger
damageType: Blunt
damage: 50
damage: 70
behaviors:
- !type:GibPartBehavior { }
- trigger:
Expand All @@ -45,7 +52,7 @@
damage: 200
behaviors:
- !type:SpawnEntitiesBehavior
spawnInContainer: true
spawnInContainer: false
spawn:
Ash:
min: 1
Expand Down Expand Up @@ -75,7 +82,7 @@
- type: entity
id: BaseHead
name: "head"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -91,7 +98,7 @@
- type: entity
id: BaseLeftArm
name: "left arm"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -102,7 +109,7 @@
- type: entity
id: BaseRightArm
name: "right arm"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -113,7 +120,7 @@
- type: entity
id: BaseLeftHand
name: "left hand"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -124,7 +131,7 @@
- type: entity
id: BaseRightHand
name: "right hand"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -135,7 +142,7 @@
- type: entity
id: BaseLeftLeg
name: "left leg"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -147,7 +154,7 @@
- type: entity
id: BaseRightLeg
name: "right leg"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -159,7 +166,7 @@
- type: entity
id: BaseLeftFoot
name: "left foot"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand All @@ -170,7 +177,7 @@
- type: entity
id: BaseRightFoot
name: "right foot"
parent: BasePart
parent: BasePartDestructible # backmen: surgery
abstract: true
components:
- type: BodyPart
Expand Down
34 changes: 21 additions & 13 deletions Resources/Prototypes/Body/Parts/skeleton.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
# TODO BODY: Part damage
- type: entity
id: PartSkeleton
parent: BaseItem
name: "skeleton body part"
abstract: true
components:
- type: Damageable
damageContainer: OrganicPart # Shitmed
damageContainer: OrganicPart # backmen: surgery
- type: BodyPart
- type: ContainerContainer
containers:
bodypart: !type:Container
ents: []
- type: StaticPrice
price: 20
- type: Gibbable
- type: Tag
tags:
- Trash

# start-backmen: surgery
- type: entity
id: PartSkeletonDestructible
parent: PartSkeleton
name: "body part"
abstract: true
components:
- type: Gibbable
- type: Destructible
thresholds:
- trigger:
!type:DamageTypeTrigger
damageType: Blunt
damage: 50
damage: 70
behaviors:
- !type:GibPartBehavior { }
- trigger:
Expand All @@ -47,6 +54,7 @@
- !type:PlaySoundBehavior
sound:
collection: MeatLaserImpact
# end-backmen: surgery

- type: entity
id: TorsoSkeleton
Expand All @@ -66,7 +74,7 @@
id: HeadSkeleton
name: "skull"
description: Alas poor Yorick...
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand Down Expand Up @@ -104,7 +112,7 @@
- type: entity
id: LeftArmSkeleton
name: "left skeleton arm"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -119,7 +127,7 @@
- type: entity
id: RightArmSkeleton
name: "right skeleton arm"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -134,7 +142,7 @@
- type: entity
id: LeftHandSkeleton
name: "left skeleton hand"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -149,7 +157,7 @@
- type: entity
id: RightHandSkeleton
name: "right skeleton hand"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -164,7 +172,7 @@
- type: entity
id: LeftLegSkeleton
name: "left skeleton leg"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -180,7 +188,7 @@
- type: entity
id: RightLegSkeleton
name: "right skeleton leg"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -196,7 +204,7 @@
- type: entity
id: LeftFootSkeleton
name: "left skeleton foot"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand All @@ -211,7 +219,7 @@
- type: entity
id: RightFootSkeleton
name: "right skeleton foot"
parent: PartSkeleton
parent: PartSkeletonDestructible # backmen: surgery
components:
- type: Sprite
sprite: Mobs/Species/Skeleton/parts.rsi
Expand Down
11 changes: 0 additions & 11 deletions Resources/Prototypes/Damage/modifier_sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,3 @@
id: PotassiumIodide
coefficients:
Radiation: 0.1

# backmen surgery modification: Change this if you want to alter how damage types affect part severing/integrity.
- type: damageModifierSet
id: PartDamage
coefficients:
Blunt: 0.8
Slash: 1.2
Piercing: 0.5
Cold: 0.5
Heat: 0.8
Shock: 0.5
Loading

0 comments on commit 3efedc5

Please sign in to comment.