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

Fix solution visuals #128

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Content.Shared.Clothing;
using Content.Shared.Clothing.Components;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Item;
using Content.Shared.Rounding;
using Robust.Client.GameObjects;
Expand Down Expand Up @@ -167,7 +168,15 @@ private void OnGetHeldVisuals(EntityUid uid, SolutionContainerVisualsComponent c
var layer = new PrototypeLayerData();

var heldPrefix = item.HeldPrefix == null ? "inhand-" : $"{item.HeldPrefix}-inhand-";
var key = heldPrefix + args.Location.ToString().ToLowerInvariant() + component.InHandsFillBaseName + closestFillSprite;

var locationString = args.Location switch
{
HandLocation.Left => "left",
HandLocation.Right => "right",
_ => "left" // bruh? Maybe add a middle hand for something, so this has some logic
};

var key = $"{heldPrefix}{locationString}{component.InHandsFillBaseName}{closestFillSprite}";

layer.State = key;

Expand Down
11 changes: 6 additions & 5 deletions Resources/Prototypes/Body/Prototypes/arachnid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
brain: OrganHumanBrain
eyes: OrganArachnidEyes
tongue: OrganHumanTongue
eye_implant: null
torso:
part: TorsoArachnid
connections:
- right arm
- left arm
- right leg
- left leg
organs:
heart: OrganArachnidHeart
lungs: OrganAnimalLungs
stomach: OrganArachnidStomach
liver: OrganArachnidLiver
kidneys: OrganArachnidKidneys
connections:
- right arm
- left arm
- right leg
- left leg
right arm:
part: RightArmArachnid
connections:
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Body/Prototypes/dwarf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
brain: OrganHumanBrain
eyes: OrganHumanEyes
tongue: OrganHumanTongue
eye_implant: null
torso:
part: TorsoHuman
connections:
Expand Down
11 changes: 6 additions & 5 deletions Resources/Prototypes/Body/Prototypes/moth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
brain: OrganHumanBrain
eyes: OrganHumanEyes
tongue: OrganHumanTongue
eye_implant: null
torso:
part: TorsoMoth
connections:
- right arm
- left arm
- right leg
- left leg
organs:
heart: OrganAnimalHeart
lungs: OrganHumanLungs
stomach: OrganMothStomach
liver: OrganAnimalLiver
kidneys: OrganHumanKidneys
connections:
- right arm
- left arm
- right leg
- left leg
right arm:
part: RightArmMoth
connections:
Expand Down
11 changes: 6 additions & 5 deletions Resources/Prototypes/Body/Prototypes/reptilian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
brain: OrganHumanBrain
eyes: OrganHumanEyes
tongue: OrganHumanTongue
eye_implant: null
torso:
part: TorsoReptilian
connections:
- right arm
- left arm
- right leg
- left leg
organs:
heart: OrganAnimalHeart
lungs: OrganHumanLungs
stomach: OrganReptilianStomach
liver: OrganAnimalLiver
kidneys: OrganHumanKidneys
connections:
- right arm
- left arm
- right leg
- left leg
right arm:
part: RightArmReptilian
connections:
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Body/Prototypes/slime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
organs:
eyes: OrganHumanEyes
tongue: OrganHumanTongue
eye_implant: null
torso:
part: TorsoSlime
connections:
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Body/Prototypes/vox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
brain: OrganHumanBrain
eyes: OrganHumanEyes
tongue: OrganHumanTongue
eye_implant: null
torso:
part: TorsoVox
connections:
Expand Down
Loading