Skeleton Bugfix Pt. 2 (#8137)

This commit is contained in:
EmoGarbage404
2022-05-13 21:31:34 -04:00
committed by GitHub
parent ff4cf85a68
commit 53a05caa35
4 changed files with 19 additions and 15 deletions

View File

@@ -138,24 +138,18 @@ namespace Content.Server.Body.Systems
// Ensures all of the old body part pieces are there // Ensures all of the old body part pieces are there
var xformQuery = GetEntityQuery<TransformComponent>(); var xformQuery = GetEntityQuery<TransformComponent>();
var notFound = true;
var bodyXform = xformQuery.GetComponent(uid); var bodyXform = xformQuery.GetComponent(uid);
foreach (var part in component.BodyParts) foreach (var part in component.BodyParts)
{ {
if (!xformQuery.TryGetComponent(part, out var xform) || if (!xformQuery.TryGetComponent(part, out var xform) ||
!bodyXform.Coordinates.InRange(EntityManager, xform.Coordinates, 2f)) continue; !bodyXform.Coordinates.InRange(EntityManager, xform.Coordinates,2f))
{
notFound = false; _popupSystem.PopupEntity(Loc.GetString("reassemble-fail"), uid, Filter.Entities(uid));
return false;
}
partList.Add(part); partList.Add(part);
} }
if (notFound)
{
_popupSystem.PopupEntity(Loc.GetString("reassemble-fail"), uid, Filter.Entities(uid));
return false;
}
return true; return true;
} }
@@ -163,7 +157,7 @@ namespace Content.Server.Body.Systems
{ {
component.CancelToken = null; component.CancelToken = null;
if (component.DNA == null) if (component.DNA == null || component.BodyParts == null)
return; return;
// Creates the new entity and transfers the mind component // Creates the new entity and transfers the mind component
@@ -177,7 +171,7 @@ namespace Content.Server.Body.Systems
mindcomp.Mind.TransferTo(mob); mindcomp.Mind.TransferTo(mob);
// Cleans up all the body part pieces // Cleans up all the body part pieces
foreach (var entity in args.PartList) foreach (var entity in component.BodyParts)
{ {
EntityManager.DeleteEntity(entity); EntityManager.DeleteEntity(entity);
} }

View File

@@ -28,7 +28,7 @@
- type: Barotrauma - type: Barotrauma
damage: damage:
types: 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 - type: DamageOnHighSpeedImpact
damage: damage:
types: types:
@@ -70,6 +70,10 @@
color: "#ffffff" color: "#ffffff"
sprite: Mobs/Species/Skeleton/parts.rsi sprite: Mobs/Species/Skeleton/parts.rsi
state: head_m state: head_m
- map: ["enum.HumanoidVisualLayers.Eyes"]
color: "#008800"
sprite: Mobs/Customization/eyes.rsi
state: no_eyes
- map: [ "enum.HumanoidVisualLayers.RArm" ] - map: [ "enum.HumanoidVisualLayers.RArm" ]
color: "#ffffff" color: "#ffffff"
sprite: Mobs/Species/Skeleton/parts.rsi sprite: Mobs/Species/Skeleton/parts.rsi
@@ -122,6 +126,7 @@
- map: [ "shoes" ] - map: [ "shoes" ]
- map: [ "ears" ] - map: [ "ears" ]
- map: [ "outerClothing" ] - map: [ "outerClothing" ]
- map: [ "eyes" ]
- map: [ "belt" ] - map: [ "belt" ]
- map: [ "neck" ] - map: [ "neck" ]
- map: [ "back" ] - map: [ "back" ]
@@ -274,6 +279,10 @@
color: "#b8b8b8" color: "#b8b8b8"
sprite: Mobs/Species/Skeleton/parts.rsi sprite: Mobs/Species/Skeleton/parts.rsi
state: head_m state: head_m
- map: ["enum.HumanoidVisualLayers.Eyes"]
color: "#008800"
sprite: Mobs/Customization/eyes.rsi
state: no_eyes
- map: [ "enum.HumanoidVisualLayers.RArm" ] - map: [ "enum.HumanoidVisualLayers.RArm" ]
color: "#b8b8b8" color: "#b8b8b8"
sprite: Mobs/Species/Skeleton/parts.rsi sprite: Mobs/Species/Skeleton/parts.rsi
@@ -326,6 +335,7 @@
- map: [ "shoes" ] - map: [ "shoes" ]
- map: [ "ears" ] - map: [ "ears" ]
- map: [ "outerClothing" ] - map: [ "outerClothing" ]
- map: ["eyes"]
- map: [ "belt" ] - map: [ "belt" ]
- map: [ "neck" ] - map: [ "neck" ]
- map: [ "back" ] - map: [ "back" ]

View File

@@ -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]]}]} {"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]]}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB