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 0000000000..d256ee842a Binary files /dev/null and b/Resources/Textures/Objects/Vehicles/motorbike.rsi/keys.png differ 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 0000000000..662b896f84 Binary files /dev/null and b/Resources/Textures/Objects/Vehicles/motorbike.rsi/vehicle.png differ