From 53a05caa3501c91b376a91173966d703f4ad4780 Mon Sep 17 00:00:00 2001 From: EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com> Date: Fri, 13 May 2022 21:31:34 -0400 Subject: [PATCH] Skeleton Bugfix Pt. 2 (#8137) --- .../Body/Systems/BodyReassembleSystem.cs | 20 ++++++------------ .../Entities/Mobs/Species/skeleton.yml | 12 ++++++++++- .../Mobs/Customization/eyes.rsi/meta.json | 2 +- .../Mobs/Customization/eyes.rsi/no_eyes.png | Bin 0 -> 4683 bytes 4 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 Resources/Textures/Mobs/Customization/eyes.rsi/no_eyes.png diff --git a/Content.Server/Body/Systems/BodyReassembleSystem.cs b/Content.Server/Body/Systems/BodyReassembleSystem.cs index 439cc89dab..03fab94e40 100644 --- a/Content.Server/Body/Systems/BodyReassembleSystem.cs +++ b/Content.Server/Body/Systems/BodyReassembleSystem.cs @@ -138,24 +138,18 @@ namespace Content.Server.Body.Systems // Ensures all of the old body part pieces are there var xformQuery = GetEntityQuery(); - var notFound = true; var bodyXform = xformQuery.GetComponent(uid); foreach (var part in component.BodyParts) { if (!xformQuery.TryGetComponent(part, out var xform) || - !bodyXform.Coordinates.InRange(EntityManager, xform.Coordinates, 2f)) continue; - - notFound = false; + !bodyXform.Coordinates.InRange(EntityManager, xform.Coordinates,2f)) + { + _popupSystem.PopupEntity(Loc.GetString("reassemble-fail"), uid, Filter.Entities(uid)); + return false; + } partList.Add(part); } - - if (notFound) - { - _popupSystem.PopupEntity(Loc.GetString("reassemble-fail"), uid, Filter.Entities(uid)); - return false; - } - return true; } @@ -163,7 +157,7 @@ namespace Content.Server.Body.Systems { component.CancelToken = null; - if (component.DNA == null) + if (component.DNA == null || component.BodyParts == null) return; // Creates the new entity and transfers the mind component @@ -177,7 +171,7 @@ namespace Content.Server.Body.Systems mindcomp.Mind.TransferTo(mob); // Cleans up all the body part pieces - foreach (var entity in args.PartList) + foreach (var entity in component.BodyParts) { EntityManager.DeleteEntity(entity); } diff --git a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml index 40bf594ed1..19ce535b18 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml @@ -28,7 +28,7 @@ - type: Barotrauma damage: types: - Blunt: 0.7 #per second, scales with pressure and other constants. + Blunt: 0.4 #per second, scales with pressure and other constants. - type: DamageOnHighSpeedImpact damage: types: @@ -70,6 +70,10 @@ color: "#ffffff" sprite: Mobs/Species/Skeleton/parts.rsi state: head_m + - map: ["enum.HumanoidVisualLayers.Eyes"] + color: "#008800" + sprite: Mobs/Customization/eyes.rsi + state: no_eyes - map: [ "enum.HumanoidVisualLayers.RArm" ] color: "#ffffff" sprite: Mobs/Species/Skeleton/parts.rsi @@ -122,6 +126,7 @@ - map: [ "shoes" ] - map: [ "ears" ] - map: [ "outerClothing" ] + - map: [ "eyes" ] - map: [ "belt" ] - map: [ "neck" ] - map: [ "back" ] @@ -274,6 +279,10 @@ color: "#b8b8b8" sprite: Mobs/Species/Skeleton/parts.rsi state: head_m + - map: ["enum.HumanoidVisualLayers.Eyes"] + color: "#008800" + sprite: Mobs/Customization/eyes.rsi + state: no_eyes - map: [ "enum.HumanoidVisualLayers.RArm" ] color: "#b8b8b8" sprite: Mobs/Species/Skeleton/parts.rsi @@ -326,6 +335,7 @@ - map: [ "shoes" ] - map: [ "ears" ] - map: [ "outerClothing" ] + - map: ["eyes"] - map: [ "belt" ] - map: [ "neck" ] - map: [ "back" ] diff --git a/Resources/Textures/Mobs/Customization/eyes.rsi/meta.json b/Resources/Textures/Mobs/Customization/eyes.rsi/meta.json index f509e81f54..41ae466309 100644 --- a/Resources/Textures/Mobs/Customization/eyes.rsi/meta.json +++ b/Resources/Textures/Mobs/Customization/eyes.rsi/meta.json @@ -1 +1 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "eyes", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "vox_eyes_s", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]} \ No newline at end of file +{"version": 1, "license": "CC-BY-SA-3.0","copyright": "Vox_eyes Taken from https://github.com/vgstation-coders/vgstation13 at 02ff588d59b3c560c685d9ca75e882d32a72d8cb and human_eyes taken from https://github.com/tgstation/tgstation/blob/8024397cc81c5f47f74cf4279e35728487d0a1a7/icons/mob/human_parts_greyscale.dmi and modified by DrSmugleaf", "size": {"x": 32, "y": 32}, "states": [{"name": "eyes", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name":"no_eyes"},{"name": "vox_eyes_s", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]} diff --git a/Resources/Textures/Mobs/Customization/eyes.rsi/no_eyes.png b/Resources/Textures/Mobs/Customization/eyes.rsi/no_eyes.png new file mode 100644 index 0000000000000000000000000000000000000000..1cdeb2aead2aea5b0a58d9d4f8154a9b42b0cb41 GIT binary patch literal 4683 zcmeHLYg7~077n2D5WKz+m*VXhP_R15x-rEG@n&h+0s3uTP{XpjKV@;GPMHxNiTr*6lwgYbJBf+56jj ze|w+3a*`Vn7VP9O#eqhnIY~l-BEh#mb=!>s&k`cJjYhNXNsEd$MxrK2rzcfJ5)K(x z>Tn1*6Dk_b-12y5?AFeij@iF073arE>~inNtu8sXc8*_gWoy-K(aU|?4o2~|Ta8{d zwl||l^6ZG;l3ttKlAYU|PhE@TA6Rah>EmyYfVe_=Es3)U>Vyo7n< z)w(^}%!&l{Bj((;Bb(n=?O(w;dfKjMsl+_-ak71LXvnM1;?Uwf7h2}0yiT!y?elw2 zbnf2p4fNL)tz=hDyHmZ-S)XiW;4HlW>d|e@$@zzSri|5o)UE+3RM?#lPd*{b4o+O* z*=8$RSQYcULR8(@u*xZKC$#hAyQ@VZa^bzAb$efYBZpU4?k3Wb$hyZo_GGWy!4C8vp0Jy-ApBQP`PJQ@w~4eEHri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