From 9363674bd582434dcf859d1dc796a5a288b915a5 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Sat, 15 Oct 2022 18:06:01 -0400 Subject: [PATCH] Bad 2 Da Bone [Skeleton Tweaks] (#11669) Co-authored-by: Kara --- .../Components/TransferMindOnGibComponent.cs | 11 ++++ .../Mind/TransferMindOnGibSystem.cs | 37 +++++++++++++ Resources/Prototypes/Body/Parts/skeleton.yml | 31 +++-------- Resources/Prototypes/Damage/modifier_sets.yml | 8 +-- .../Datasets/Names/skeleton_first.yml | 24 +++++++++ .../Entities/Mobs/Player/skeleton.yml | 25 +++++++++ .../Entities/Mobs/Species/skeleton.yml | 31 +++++++++-- .../Entities/Objects/Vehicles/buckleable.yml | 51 ++++++++++++++++++ .../Entities/Objects/Vehicles/keys.yml | 15 ++++++ .../Roles/Jobs/Fun/misc_startinggear.yml | 19 +++++++ Resources/Prototypes/Species/skeleton.yml | 5 +- Resources/Prototypes/tags.yml | 6 +++ .../Objects/Vehicles/motorbike.rsi/keys.png | Bin 0 -> 291 bytes .../Objects/Vehicles/motorbike.rsi/meta.json | 18 +++++++ .../Vehicles/motorbike.rsi/vehicle.png | Bin 0 -> 2279 bytes 15 files changed, 249 insertions(+), 32 deletions(-) create mode 100644 Content.Server/Mind/Components/TransferMindOnGibComponent.cs create mode 100644 Content.Server/Mind/TransferMindOnGibSystem.cs create mode 100644 Resources/Prototypes/Datasets/Names/skeleton_first.yml create mode 100644 Resources/Textures/Objects/Vehicles/motorbike.rsi/keys.png create mode 100644 Resources/Textures/Objects/Vehicles/motorbike.rsi/meta.json create mode 100644 Resources/Textures/Objects/Vehicles/motorbike.rsi/vehicle.png diff --git a/Content.Server/Mind/Components/TransferMindOnGibComponent.cs b/Content.Server/Mind/Components/TransferMindOnGibComponent.cs new file mode 100644 index 0000000000..f2c95982c6 --- /dev/null +++ b/Content.Server/Mind/Components/TransferMindOnGibComponent.cs @@ -0,0 +1,11 @@ +using Content.Shared.Tag; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; + +namespace Content.Server.Mind.Components; + +[RegisterComponent] +public sealed class TransferMindOnGibComponent : Component +{ + [DataField("targetTag", customTypeSerializer: typeof(PrototypeIdSerializer))] + public string TargetTag = "MindTransferTarget"; +} diff --git a/Content.Server/Mind/TransferMindOnGibSystem.cs b/Content.Server/Mind/TransferMindOnGibSystem.cs new file mode 100644 index 0000000000..1aed10c324 --- /dev/null +++ b/Content.Server/Mind/TransferMindOnGibSystem.cs @@ -0,0 +1,37 @@ +using System.Linq; +using Content.Server.Body.Components; +using Content.Server.Mind.Components; +using Content.Shared.Tag; +using Robust.Shared.Random; + +namespace Content.Server.Mind; + +/// +/// This handles transfering a target's mind +/// to a different entity when they gib. +/// used for skeletons. +/// +public sealed class TransferMindOnGibSystem : EntitySystem +{ + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly TagSystem _tag = default!; + + /// + public override void Initialize() + { + SubscribeLocalEvent(OnGib); + } + + private void OnGib(EntityUid uid, TransferMindOnGibComponent component, BeingGibbedEvent args) + { + if (!TryComp(uid, out var mindcomp) || mindcomp.Mind == null) + return; + + var validParts = args.GibbedParts.Where(p => _tag.HasTag(p, component.TargetTag)).ToHashSet(); + if (!validParts.Any()) + return; + + var ent = _random.Pick(validParts); + mindcomp.Mind.TransferTo(ent); + } +} diff --git a/Resources/Prototypes/Body/Parts/skeleton.yml b/Resources/Prototypes/Body/Parts/skeleton.yml index c13fa128a4..f50223082e 100644 --- a/Resources/Prototypes/Body/Parts/skeleton.yml +++ b/Resources/Prototypes/Body/Parts/skeleton.yml @@ -31,8 +31,6 @@ partType: Torso size: 14 compatibility: Biological -# criticalThreshold: 100 -# deadThreshold: 150 - type: entity id: HeadSkeleton @@ -53,25 +51,26 @@ compatibility: Biological - type: Input context: "human" + - type: MovementSpeedModifier + baseWalkSpeed: 0 + baseSprintSpeed: 0 - type: Speech - type: Vocal + maleScream: /Audio/Voice/Skeleton/skeleton_scream.ogg + femaleScream: /Audio/Voice/Skeleton/skeleton_scream.ogg - type: Emoting - type: Grammar attributes: proper: true - type: Examiner - - type: IntrinsicRadio - channels: - - Common - type: DoAfter - type: Actions - type: MobState thresholds: 0: Alive - # criticalThreshold: 50 - # deadThreshold: 120 - type: Tag tags: + - MindTransferTarget - Head - type: entity @@ -91,8 +90,6 @@ size: 5 compatibility: Biological symmetry: Left - # criticalThreshold: 40 - # deadThreshold: 80 - type: entity id: RightArmSkeleton @@ -111,8 +108,6 @@ size: 5 compatibility: Biological symmetry: Right - # criticalThreshold: 40 - # deadThreshold: 80 - type: entity id: LeftHandSkeleton @@ -131,8 +126,6 @@ size: 3 compatibility: Biological symmetry: Left - # criticalThreshold: 30 - # deadThreshold: 60 - type: entity id: RightHandSkeleton @@ -151,8 +144,6 @@ size: 3 compatibility: Biological symmetry: Right - # criticalThreshold: 30 - # deadThreshold: 60 - type: entity id: LeftLegSkeleton @@ -169,8 +160,6 @@ - type: BodyPart partType: Leg size: 6 - compatibility: Biological - symmetry: Left - type: entity id: RightLegSkeleton @@ -189,8 +178,6 @@ size: 6 compatibility: Biological symmetry: Right - # criticalThreshold: 45 - # deadThreshold: 90 - type: entity id: LeftFootSkeleton @@ -209,8 +196,6 @@ size: 2 compatibility: Biological symmetry: Left -# criticalThreshold: 30 -# deadThreshold: 60 - type: entity id: RightFootSkeleton @@ -228,6 +213,4 @@ partType: Foot size: 2 compatibility: Biological - symmetry: Right -# criticalThreshold: 30 -# deadThreshold: 60 + symmetry: Right \ No newline at end of file diff --git a/Resources/Prototypes/Damage/modifier_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml index 1809dcc12d..54ffa352fe 100644 --- a/Resources/Prototypes/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Damage/modifier_sets.yml @@ -125,15 +125,17 @@ - type: damageModifierSet id: Skeleton coefficients: - Blunt: 2.0 - Slash: 1.5 - Piercing: 1.2 + Blunt: 1.1 + Slash: 0.8 + Piercing: 0.6 Cold: 0.0 Poison: 0.0 Radiation: 0.0 Asphyxiation: 0.0 Bloodloss: 0.0 Cellular: 0.0 + flatReductions: + Blunt: 5 # Represents which damage types should be modified # in relation to how they cause bloodloss damage. diff --git a/Resources/Prototypes/Datasets/Names/skeleton_first.yml b/Resources/Prototypes/Datasets/Names/skeleton_first.yml new file mode 100644 index 0000000000..67c71ab69b --- /dev/null +++ b/Resources/Prototypes/Datasets/Names/skeleton_first.yml @@ -0,0 +1,24 @@ +- type: dataset + id: skeletonNamesFirst + values: + - Sternum + - Ribs + - Vertebrae + - Sacrum + - Mandible + - Clavicle + - Scapula + - Humerus + - Radius + - Ulna + - Carpals + - Phanages + - Pelvis + - Femur + - Tibia + - Fibula + - Marrow + - Tarsalls + - Patella + - Tailbone + - Boner \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml index f7633bef29..3f60116835 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml @@ -26,3 +26,28 @@ - type: Faction factions: - NanoTrasen + +- type: entity + name: Skeleton Pirate + parent: MobSkeletonPerson + id: MobSkeletonPirate + components: + - type: GhostTakeoverAvailable + name: Skeleton Pirate + description: Cause chaos and loot the station for treasure. + - type: Loadout + prototypes: [PirateGear] + - type: RandomHumanoidAppearance + + +- type: entity + name: Skeleton Biker + parent: MobSkeletonPerson + id: MobSkeletonBiker + components: + - type: GhostTakeoverAvailable + name: Skeleton Biker + description: Ride around on your sweet ride. + - type: Loadout + prototypes: [SkeletonBiker] + - type: RandomHumanoidAppearance diff --git a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml index b0368bd284..240ecdf2d3 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/skeleton.yml @@ -10,7 +10,6 @@ - type: Icon sprite: Mobs/Species/Skeleton/parts.rsi state: full - # Other - type: Body template: HumanoidTemplate preset: SkeletonPreset @@ -18,15 +17,30 @@ - type: Damageable damageContainer: Biological damageModifierSet: Skeleton + - type: Barotrauma #no space damage. + damage: + types: + Blunt: 0 + - type: Bloodstream + maxBleedAmount: 0 + bloodReagent: Milk + bloodlossDamage: #no bloodloss damage. overriding base components + types: + Bloodloss: 0 + bloodlossHealDamage: + types: + Bloodloss: 0 - type: MobState thresholds: 0: Alive - 100: Dead + 100: Critical + 150: Dead + - type: TransferMindOnGib - type: Destructible thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 150 behaviors: - !type:GibBehavior { } - type: SlowOnDamage #modified speeds because they're so weak @@ -34,6 +48,17 @@ 60: 0.9 80: 0.7 - type: Speech + - type: Fixtures + fixtures: + - shape: + !type:PhysShapeCircle + radius: 0.35 + density: 130 + restitution: 0.0 + mask: + - MobMask + layer: + - MobLayer - type: entity save: false diff --git a/Resources/Prototypes/Entities/Objects/Vehicles/buckleable.yml b/Resources/Prototypes/Entities/Objects/Vehicles/buckleable.yml index 9cce40a844..5bdd52d8c9 100644 --- a/Resources/Prototypes/Entities/Objects/Vehicles/buckleable.yml +++ b/Resources/Prototypes/Entities/Objects/Vehicles/buckleable.yml @@ -316,3 +316,54 @@ path: /Audio/Effects/Vehicle/vehiclestartup.ogg params: volume: -3 + +- type: entity + parent: BaseVehicle + id: VehicleSkeletonMotorcycle + name: skeleton motorcycle + description: Bad to the Bone. + components: + - type: Vehicle + northOverride: -0.1 + southOverride: 0.1 + - type: Sprite + sprite: Objects/Vehicles/motorbike.rsi + layers: + - state: vehicle + map: ["enum.VehicleVisualLayers.AutoAnimate"] + netsync: false + noRot: true + - type: Strap + buckleOffset: "0.1, -0.05" + maxBuckleDistance: 1 + - type: MovementSpeedModifier + acceleration: 2 + friction: 1.5 + baseWalkSpeed: 4.5 + baseSprintSpeed: 7 + - type: UnpoweredFlashlight + toggleAction: + name: action-name-toggle-light + description: action-description-toggle-light + icon: Objects/Tools/flashlight.rsi/flashlight.png + iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png + event: !type:ToggleActionEvent + - type: PointLight + enabled: false + radius: 3.5 + softness: 2 + mask: /Textures/Effects/LightMasks/cone.png + autoRot: true + - type: ItemSlots + slots: + key_slot: + name: Keys + whitelist: + requireAll: true + tags: + - VehicleKey + - SkeletonMotorcycleKeys + insertSound: + path: /Audio/Effects/Vehicle/vehiclestartup.ogg + params: + volume: -3 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Vehicles/keys.yml b/Resources/Prototypes/Entities/Objects/Vehicles/keys.yml index 7d3f6dd307..558c63cca8 100644 --- a/Resources/Prototypes/Entities/Objects/Vehicles/keys.yml +++ b/Resources/Prototypes/Entities/Objects/Vehicles/keys.yml @@ -73,3 +73,18 @@ sprite: Objects/Vehicles/syndicatesegway.rsi state: keys netsync: false + +- type: entity + parent: VehicleKeyATV + id: VehicleKeySkeletonMotorcycle + name: skeleton motorcycle keys + description: A beautiful set of keys adorned with a skull. + components: + - type: Tag + tags: + - VehicleKey + - SkeletonMotorcycleKeys + - type: Sprite + sprite: Objects/Vehicles/motorbike.rsi + state: keys + netsync: false diff --git a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml index 49727f1bf3..b08d1f8a79 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/misc_startinggear.yml @@ -32,6 +32,25 @@ satchel: ClothingBackpackSatchelEngineering duffelbag: ClothingBackpackSatchelEngineering +#Skeleton Biker +- type: startingGear + id: SkeletonBiker + equipment: + jumpsuit: ClothingUniformJumpsuitColorBlack + back: ClothingBackpackFilled + head: HatBandSkull + eyes: ClothingEyesGlassesSunglasses + outerClothing: ClothingOuterCoatGentle + gloves: ClothingHandsGlovesFingerless + shoes: ClothingShoesBootsJack + id: PassengerPDA + ears: ClothingHeadsetGrey + pocket1: VehicleSkeletonMotorcycle + pocket2: VehicleKeySkeletonMotorcycle + innerclothingskirt: ClothingUniformJumpskirtColorBlack + satchel: ClothingBackpackSatchelFilled + duffelbag: ClothingBackpackDuffelFilled + #Space Ninja Outfit - type: startingGear id: SpaceNinjaGear diff --git a/Resources/Prototypes/Species/skeleton.yml b/Resources/Prototypes/Species/skeleton.yml index ea6bda1a20..a5ae1bdd25 100644 --- a/Resources/Prototypes/Species/skeleton.yml +++ b/Resources/Prototypes/Species/skeleton.yml @@ -1,10 +1,12 @@ - type: species id: Skeleton name: Skeleton - roundStart: false #unspooky, change it in october + roundStart: false prototype: MobSkeletonPerson sprites: MobSkeletonSprites markingLimits: MobHumanMarkingLimits + maleFirstNames: skeletonNamesFirst + femaleFirstNames: skeletonNamesFirst dollPrototype: MobSkeletonPersonDummy skinColoration: TintedHues @@ -15,7 +17,6 @@ Hair: MobHumanoidAnyMarking FacialHair: MobHumanoidAnyMarking Chest: MobSkeletonTorso - Eyes: MobHumanoidEyes LArm: MobSkeletonLArm RArm: MobSkeletonRArm LHand: MobSkeletonLHand diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index f1140c17c9..4c081ffa4f 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -365,6 +365,9 @@ - type: Tag id: MicrowaveSelfUnsafe +- type: Tag + id: MindTransferTarget + - type: Tag id: MonkeyCube @@ -465,6 +468,9 @@ - type: Tag id: Shovel +- type: Tag + id: SkeletonMotorcycleKeys + - type: Tag id: Smokable diff --git a/Resources/Textures/Objects/Vehicles/motorbike.rsi/keys.png b/Resources/Textures/Objects/Vehicles/motorbike.rsi/keys.png new file mode 100644 index 0000000000000000000000000000000000000000..d256ee842afc01e31a70846629c5c16ce574fb57 GIT binary patch literal 291 zcmV+;0o?wHP)Px#-AP12R9J=Wl{*T;P!L6rA__@k(g%VrB%tB~#Lh+7*jd}zxQH~Owt}eOLX-#T zpJ`(gE5%Qhi5SFps$t;HT(|=R27|%y@028>)gnw^d%gZZG%K@cwFuM0ZVy1vZt+-4 zOq8<LRw@!v&~Dvp&-Zf~5al+TPSVryM65M+*QL>HFdU7)a|4ei zJl`i$O1vC|5dh4WYh1@6xg^pNfZzyk*tUf}pQ%-A#TWo^9VgfFTn0AVO$jJ20-*Q^ pY}?AU{3CQb-M7DBFc=I!#T85-LagJ6{XqZ#002ovPDHLkV1hZ-cDMil literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Vehicles/motorbike.rsi/meta.json b/Resources/Textures/Objects/Vehicles/motorbike.rsi/meta.json new file mode 100644 index 0000000000..33f642dd76 --- /dev/null +++ b/Resources/Textures/Objects/Vehicles/motorbike.rsi/meta.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from TerraGov-Marine-Corps at commit https://github.com/tgstation/TerraGov-Marine-Corps/blob/ded67dce88183b6dbca13d324370801d0fd976a0/icons/obj/vehicles.dmi, modified by EmoGarbage404", + "states": [ + { + "name": "vehicle", + "directions": 4 + }, + { + "name": "keys" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Vehicles/motorbike.rsi/vehicle.png b/Resources/Textures/Objects/Vehicles/motorbike.rsi/vehicle.png new file mode 100644 index 0000000000000000000000000000000000000000..662b896f849b07ce8b947d0f578bc88a2d0dc392 GIT binary patch literal 2279 zcmVPx-p-DtRRCt{2TU|&TSr+~(NL)fy5-hZ_D{HKl0Uc=3m<%yW2;|WR#h^P5ECa&~ zy9;5-2E!8BJY`Xqm7Nf>?2n5uER4Hxble9Y1(CL$jpJx+m=+{m+S9G{^pwQuLRMMk z?n8TSs>|whb*0QKOn)HVU3Kez=bU@)y{GOu0wt7CLJ1|5P(leM{4gOnY1G-(%VM!- z2n6b|xcCHH$&Dk=`ITCB>C#)EcK@1s?5OYWo4?FSqgd=2bY17a2Zx5))oa)J@449- zJ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