diff --git a/Content.Server/Climbing/Components/ClimbingComponent.cs b/Content.Server/Climbing/Components/ClimbingComponent.cs index 94071dec59..aab3e2f2c4 100644 --- a/Content.Server/Climbing/Components/ClimbingComponent.cs +++ b/Content.Server/Climbing/Components/ClimbingComponent.cs @@ -79,7 +79,10 @@ namespace Content.Server.Climbing.Components if (velocity <= 0.0f) return; - Body.ApplyLinearImpulse((to - from).Normalized * velocity * 400); + // Since there are bodies with different masses: + // mass * 5 seems enough to move entity + // instead of launching cats like rockets against the walls with constant impulse value. + Body.ApplyLinearImpulse((to - from).Normalized * velocity * Body.Mass * 5); OwnerIsTransitioning = true; Owner.SpawnTimer((int) (BufferTime * 1000), () => diff --git a/Content.Server/Temperature/Components/HeatResistanceComponent.cs b/Content.Server/Temperature/Components/HeatResistanceComponent.cs index e3df76566b..27feb3cb3a 100644 --- a/Content.Server/Temperature/Components/HeatResistanceComponent.cs +++ b/Content.Server/Temperature/Components/HeatResistanceComponent.cs @@ -1,4 +1,4 @@ -using Content.Server.Clothing.Components; +using Content.Server.Clothing.Components; using Content.Server.Inventory.Components; using Content.Shared.Inventory; using Robust.Shared.GameObjects; @@ -12,7 +12,15 @@ namespace Content.Server.Temperature.Components public int GetHeatResistance() { - if (Owner.GetComponent().TryGetSlotItem(EquipmentSlotDefines.Slots.GLOVES, out ClothingComponent? gloves)) + // TODO: When making into system: Any animal that touches bulb that has no + // InventoryComponent but still would have default heat resistance in the future (maybe) + if (!Owner.TryGetComponent(out var inventoryComp)) + { + // Magical number just copied from below + return int.MinValue; + } + + if (inventoryComp.TryGetSlotItem(EquipmentSlotDefines.Slots.GLOVES, out ClothingComponent? gloves)) { return gloves?.HeatResistance ?? int.MinValue; } diff --git a/Resources/Prototypes/Body/Parts/animal.yml b/Resources/Prototypes/Body/Parts/animal.yml new file mode 100644 index 0000000000..3cc1566c4b --- /dev/null +++ b/Resources/Prototypes/Body/Parts/animal.yml @@ -0,0 +1,157 @@ +# Just copypasta of some human basic body parts for interaction, +# only differences for now is that limbs work in pairs, +# they are unextractable and can't be spawned (no surgery on Animals!?). + +- type: entity + id: PartAnimal + parent: BaseItem + name: "animal body part" + abstract: true + components: + - type: Damageable + damageContainer: Biological + - type: BiologicalSurgeryData + +# For primates mainly +- type: entity + id: HandsAnimal + name: "animal hands" + parent: PartAnimal + abstract: true + components: + - type: BodyPart + partType: Hand + size: 1 + compatibility: Biological + symmetry: Left + - type: Grasp + +- type: entity + id: LegsAnimal + name: "animal legs" + parent: PartAnimal + abstract: true + components: + - type: BodyPart + partType: Leg + size: 1 + compatibility: Biological + +- type: entity + id: FeetAnimal + name: "animal feet" + parent: PartAnimal + abstract: true + components: + - type: BodyPart + partType: Foot + size: 1 + compatibility: Biological + +- type: entity + id: TorsoAnimal + name: "animal torso" + parent: PartAnimal + abstract: true + components: + - type: BodyPart + partType: Torso + size: 7 + compatibility: Biological + mechanisms: + - OrganAnimalLungs + - OrganAnimalStomach + - OrganAnimalLiver + - OrganAnimalHeart + - OrganAnimalKidneys + - type: Damageable + damageContainer: Biological + +- type: entity + id: BaseAnimalOrgan + parent: BaseItem + abstract: true + components: + - type: Mechanism + +- type: entity + id: OrganAnimalLungs + parent: BaseAnimalOrgan + name: lungs + abstract: true + components: + - type: Mechanism + size: 1 + compatibility: Biological + behaviors: + - !type:LungBehavior {} + +- type: entity + id: OrganAnimalStomach + parent: BaseAnimalOrgan + name: stomach + abstract: true + components: + - type: Mechanism + size: 1 + compatibility: Biological + - type: SolutionContainerManager + solutions: + stomach: + maxVol: 100 + - type: Stomach + maxVolume: 100 + digestionDelay: 20 + - type: Metabolizer + maxReagents: 3 + metabolizerTypes: [Human, Animal] + groups: + - id: Food + - id: Drink + +- type: entity + id: OrganAnimalLiver + parent: BaseAnimalOrgan + name: liver + abstract: true + components: + - type: Mechanism + size: 1 + compatibility: Biological + - type: Metabolizer + maxReagents: 1 + metabolizerTypes: [Human, Animal] + groups: + - id: Alcohol + rateModifier: 0.1 + +- type: entity + id: OrganAnimalHeart + parent: BaseAnimalOrgan + name: heart + abstract: true + components: + - type: Mechanism + size: 1 + compatibility: Biological + - type: Metabolizer + maxReagents: 2 + metabolizerTypes: [Human, Animal] + groups: + - id: Medicine + - id: Poison + - id: Narcotic + +- type: entity + id: OrganAnimalKidneys + parent: BaseAnimalOrgan + name: kidneys + abstract: true + components: + - type: Mechanism + size: 1 + compatibility: Biological + - type: Metabolizer + maxReagents: 5 + metabolizerTypes: [Human, Animal] + removeEmpty: true diff --git a/Resources/Prototypes/Body/Presets/animal.yml b/Resources/Prototypes/Body/Presets/animal.yml new file mode 100644 index 0000000000..dc54809c69 --- /dev/null +++ b/Resources/Prototypes/Body/Presets/animal.yml @@ -0,0 +1,7 @@ +- type: bodyPreset + name: "animal preset" + id: AnimalPreset + partIDs: + legs: LegsAnimal + feet: FeetAnimal + torso: TorsoAnimal diff --git a/Resources/Prototypes/Body/Presets/primate.yml b/Resources/Prototypes/Body/Presets/primate.yml new file mode 100644 index 0000000000..743046c607 --- /dev/null +++ b/Resources/Prototypes/Body/Presets/primate.yml @@ -0,0 +1,8 @@ +- type: bodyPreset + name: "primate preset" + id: PrimatePreset + partIDs: + hands: HandsAnimal + legs: LegsAnimal + feet: FeetAnimal + torso: TorsoAnimal diff --git a/Resources/Prototypes/Body/Templates/animal.yml b/Resources/Prototypes/Body/Templates/animal.yml new file mode 100644 index 0000000000..c3c246753d --- /dev/null +++ b/Resources/Prototypes/Body/Templates/animal.yml @@ -0,0 +1,14 @@ +# I know I've skipped few parts +- type: bodyTemplate + id: AnimalTemplate + name: "animal template" + centerSlot: "torso" + slots: + torso: Torso + legs: Leg + feet: Foot + connections: + torso: + - legs + legs: + - feet diff --git a/Resources/Prototypes/Body/Templates/primate.yml b/Resources/Prototypes/Body/Templates/primate.yml new file mode 100644 index 0000000000..359361013d --- /dev/null +++ b/Resources/Prototypes/Body/Templates/primate.yml @@ -0,0 +1,16 @@ +# I know I've skipped few parts +- type: bodyTemplate + id: PrimateTemplate + name: "primate template" + centerSlot: "torso" + slots: + torso: Torso + hands: Hand + legs: Leg + feet: Foot + connections: + torso: + - hands + - legs + legs: + - feet diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 70d0420881..0eb0e2fc30 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -17,14 +17,14 @@ state: bat sprite: Mobs/Animals/bat.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.25,-0.30,0.25,0.40" - mass: 50 + !type:PhysShapeCircle + radius: 0.25 + mass: 5 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -33,6 +33,7 @@ visuals: - type: DamageStateVisualizer normal: bat + crit: dead dead: dead - type: entity @@ -52,22 +53,28 @@ state: 0 sprite: Mobs/Animals/bee.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.50,-0.90,0.50,0.05" - mass: 90 + !type:PhysShapeCircle + radius: 0.1 + mass: 5 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: - Opaque + - type: MobState + thresholds: + 0: !type:NormalMobState {} + 5: !type:CriticalMobState {} + 10: !type:DeadMobState {} - type: Appearance visuals: - type: DamageStateVisualizer normal: 0 + crit: dead dead: dead - type: entity @@ -82,23 +89,11 @@ - map: ["enum.DamageStateVisualLayers.Base"] state: chicken-0 sprite: Mobs/Animals/chicken.rsi - - type: Physics - bodyType: Dynamic - fixtures: - - shape: - !type:PhysShapeAabb - bounds: "-0.20,-0.45,0.20,0.10" - mass: 20 - mask: - - Impassable - - VaultImpassable - - SmallImpassable - layer: - - Opaque - type: Appearance visuals: - type: DamageStateVisualizer normal: chicken-0 + crit: dead-0 dead: dead-0 - type: entity @@ -117,18 +112,23 @@ state: butterfly sprite: Mobs/Animals/butterfly.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.20,-0.20,0.20,0.20" + !type:PhysShapeCircle + radius: 0.2 mass: 5 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: - Opaque + - type: MobState + thresholds: + 0: !type:NormalMobState {} + 5: !type:CriticalMobState {} + 10: !type:DeadMobState {} - type: RandomSpriteColor state: butterfly colors: @@ -143,6 +143,7 @@ visuals: - type: DamageStateVisualizer normal: butterfly + crit: dead dead: dead - type: entity @@ -158,14 +159,14 @@ state: cow sprite: Mobs/Animals/cow.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.50,-0.60,0.50,0.05" - mass: 20 + !type:PhysShapeCircle + radius: 0.40 + mass: 45 mask: - Impassable + - MobImpassable - VaultImpassable - SmallImpassable layer: @@ -174,6 +175,7 @@ visuals: - type: DamageStateVisualizer normal: cow + crit: dead dead: dead - type: entity @@ -189,14 +191,14 @@ state: crab sprite: Mobs/Animals/crab.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.10,-0.10,0.10,0.10" + !type:PhysShapeCircle + radius: 0.35 mass: 5 mask: - Impassable + - MobImpassable #Bullets!? - VaultImpassable - SmallImpassable layer: @@ -205,6 +207,7 @@ visuals: - type: DamageStateVisualizer normal: crab + crit: dead dead: dead - type: AsteroidRockVisualizer @@ -220,23 +223,11 @@ - map: ["enum.DamageStateVisualLayers.Base"] state: goat sprite: Mobs/Animals/goat.rsi - - type: Physics - bodyType: Dynamic - fixtures: - - shape: - !type:PhysShapeAabb - bounds: "-0.50,-0.60,0.50,0.05" - mass: 20 - mask: - - Impassable - - VaultImpassable - - SmallImpassable - layer: - - Opaque - type: Appearance visuals: - type: DamageStateVisualizer normal: goat + crit: dead dead: dead # Note that we gotta make this bitch vomit someday when you feed it anthrax or sumthin. Needs to be a small item thief too and aggressive if attacked. @@ -252,23 +243,11 @@ - map: ["enum.DamageStateVisualLayers.Base"] state: goose sprite: Mobs/Animals/goose.rsi - - type: Physics - bodyType: Dynamic - fixtures: - - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.45,0.35,0.45" - mass: 20 - mask: - - Impassable - - VaultImpassable - - SmallImpassable - layer: - - Opaque - type: Appearance visuals: - type: DamageStateVisualizer normal: goose + crit: dead dead: dead - type: entity @@ -284,14 +263,14 @@ state: crawling sprite: Mobs/Animals/gorilla.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.30,0.35,0.35" + !type:PhysShapeCircle + radius: 0.48 mass: 20 mask: - Impassable + - MobImpassable - VaultImpassable - SmallImpassable layer: @@ -300,6 +279,7 @@ visuals: - type: DamageStateVisualizer normal: crawling + crit: dead dead: dead - type: entity @@ -308,30 +288,24 @@ parent: SimpleMobBase description: New church of neo-darwinists actually believe that EVERY animal evolved from a monkey. Tastes like pork, and killing them is both fun and relaxing. components: + - type: GhostTakeoverAvailable - type: Sprite drawdepth: Mobs layers: - map: ["enum.DamageStateVisualLayers.Base"] state: monkey sprite: Mobs/Animals/monkey.rsi - - type: Physics - bodyType: Dynamic - fixtures: - - shape: - !type:PhysShapeAabb - bounds: "-0.30,-0.30,0.30,0.25" - mass: 10 - mask: - - Impassable - - VaultImpassable - - SmallImpassable - layer: - - Opaque + - type: Hands + - type: Body + template: PrimateTemplate + preset: PrimatePreset - type: Appearance visuals: - type: DamageStateVisualizer normal: monkey + crit: dead dead: dead + - type: HandsVisualizer - type: FireVisualizer sprite: Mobs/Effects/onfire.rsi normalState: Monkey_burning @@ -360,18 +334,23 @@ Slots: - Helmet - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.40,-0.30,0.40,0.45" + !type:PhysShapeCircle + radius: 0.2 mass: 10 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: - Opaque + - type: MobState + thresholds: + 0: !type:NormalMobState {} + 10: !type:CriticalMobState {} + 20: !type:DeadMobState {} - type: MovementSpeedModifier baseWalkSpeed : 5 baseSprintSpeed : 5 @@ -451,14 +430,14 @@ state: parrot sprite: Mobs/Animals/parrot.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.40,0.35,0.20" - mass: 10 + !type:PhysShapeCircle + radius: 0.25 + mass: 5 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -467,6 +446,7 @@ visuals: - type: DamageStateVisualizer normal: parrot + crit: dead dead: dead - type: entity @@ -482,14 +462,14 @@ state: penguin sprite: Mobs/Animals/penguin.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.30,-0.50,0.30,0.35" + !type:PhysShapeCircle + radius: 0.25 mass: 10 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -498,6 +478,7 @@ visuals: - type: DamageStateVisualizer normal: penguin + crit: penguin_dead dead: penguin_dead - type: entity @@ -513,24 +494,27 @@ state: snake sprite: Mobs/Animals/snake.rsi - type: Physics - bodyType: KinematicController fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.30,-0.50,0.30,0.35" - mass: 10 + !type:PhysShapeCircle + radius: 0.25 + mass: 8 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: - Opaque - type: Appearance visuals: + - type: RotationVisualizer - type: DamageStateVisualizer normal: snake # It's death animation is animated so hopefully this should push for separation between "dying" and "death" states. - dead: dead + # looks stupid, Rotation visualizer for now + # dead: dead + # crit: dead # Code unique spider prototypes or combine them all into one spider and get a # random sprite state when you spawn it. @@ -547,14 +531,14 @@ state: tarantula sprite: Mobs/Animals/spider.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.40,-0.30,0.40,0.45" - mass: 10 + !type:PhysShapeCircle + radius: 0.35 + mass: 25 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -563,4 +547,5 @@ visuals: - type: DamageStateVisualizer normal: tarantula + crit: tarantula_dead dead: tarantula_dead diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml index 8d837303a8..0fc44e8cfd 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/carp.yml @@ -1,7 +1,7 @@ - type: entity name: space carp id: MobCarp - parent: SimpleMobBase + parent: SimpleSpaceMobBase description: It's a space carp. components: - type: UtilityAI @@ -18,11 +18,10 @@ state: alive sprite: Mobs/Aliens/Carps/space.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.35,0.35,0.35" + !type:PhysShapeCircle + radius: 0.40 mass: 50 mask: - Impassable @@ -40,6 +39,7 @@ visuals: - type: DamageStateVisualizer normal: alive + crit: dead dead: dead - type: entity @@ -68,11 +68,10 @@ state: alive sprite: Mobs/Aliens/Carps/holo.rsi - type: Physics - bodyType: Dynamic fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.35,0.35,0.35" + !type:PhysShapeCircle + radius: 0.40 mass: 5 mask: - Impassable diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml index c0b1017eaa..a9e847c6bf 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml @@ -16,11 +16,12 @@ - type: Physics fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.25,-0.50,0.25,0.30" + !type:PhysShapeCircle + radius: 0.35 mass: 10 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -29,6 +30,7 @@ visuals: - type: DamageStateVisualizer normal: corgi + crit: corgi_dead dead: corgi_dead - type: entity @@ -47,6 +49,7 @@ visuals: - type: DamageStateVisualizer normal: ian + crit: ian_dead dead: ian_dead - type: entity @@ -64,11 +67,12 @@ - type: Physics fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.20,-0.45,0.20,0.30" + !type:PhysShapeCircle + radius: 0.35 mass: 10 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -77,6 +81,7 @@ visuals: - type: DamageStateVisualizer normal: cat + crit: cat_dead dead: cat_dead - type: entity @@ -95,6 +100,7 @@ visuals: - type: DamageStateVisualizer normal: cat2 + crit: cat2_dead dead: cat2_dead - type: entity @@ -113,6 +119,7 @@ visuals: - type: DamageStateVisualizer normal: caracal_flop + crit: caracal_dead dead: caracal_dead - type: entity @@ -133,11 +140,12 @@ - type: Physics fixtures: - shape: - !type:PhysShapeAabb - bounds: "-0.35,-0.45,0.35,0.15" + !type:PhysShapeCircle + radius: 0.35 mass: 10 mask: - Impassable + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: @@ -146,4 +154,5 @@ visuals: - type: DamageStateVisualizer normal: sloth + crit: sloth_dead dead: sloth_dead diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml index 658d4c0d73..90f5275904 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/simplemob.yml @@ -1,7 +1,7 @@ - type: entity save: false abstract: true - id: SimpleMobBase + id: SimpleSpaceMobBase # Mob without barotrauma, freezing and asphyxiation (for space carps!?) suffix: AI components: - type: Reactive @@ -16,16 +16,9 @@ - !type:FlammableReaction - type: UtilityAI behaviorSets: - - Clothing + # - Clothing - Idle - - type: Hunger - damage: - types: - Blunt: 2 - - type: Thirst - damage: - types: - Blunt: 2 + # No hunger and thirst for space mobs (need a way to eat station tiles for space carps) - type: Input context: "human" - type: AiFactionTag @@ -35,10 +28,6 @@ baseWalkSpeed : 4 baseSprintSpeed : 4 - type: MovedByPressure - - type: Barotrauma - damage: - types: - Blunt: 1 #per second, scales with pressure and other constants. - type: DamageOnHighSpeedImpact damage: types: @@ -51,18 +40,20 @@ - type: Clickable - type: InteractionOutline - type: Physics - bodyType: Dynamic + bodyType: KinematicController # Same for all inheritors fixtures: - shape: - !type:PhysShapeAabb {} - mass: 50 + # Circles, cuz rotation of rectangles looks very bad + !type:PhysShapeCircle + radius: 0.35 + mass: 20 mask: - Impassable -# - MobImpassable Turns these off for now since humans don't have collisions either. + - MobImpassable #Bullets?! - VaultImpassable - SmallImpassable layer: - - MobImpassable + - Opaque - type: SolutionContainerManager - type: Bloodstream max_volume: 100 @@ -81,12 +72,81 @@ currentTemperature: 310.15 specificHeat: 42 tempDamageCoefficient: 0.1 - coldDamage: - types: - Cold : 1 #per second, scales with temperature & other constants heatDamage: types: Heat : 1 #per second, scales with temperature & other constants + - type: MobState + thresholds: + 0: !type:NormalMobState {} + 50: !type:CriticalMobState {} + 100: !type:DeadMobState {} + - type: HeatResistance + - type: CombatMode + - type: Internals + - type: StatusEffects + allowed: + - Stun + - KnockedDown + - SlowedDown + - Stutter + - Electrocution + - type: Body + template: AnimalTemplate + preset: AnimalPreset + - type: Examiner + - type: UnarmedCombat + range: 1.5 + arcwidth: 0 + arc: bite + damage: + groups: + Brute: 5 + - type: Appearance + visuals: + - type: BuckleVisualizer + - type: FireVisualizer + sprite: Mobs/Effects/onfire.rsi + normalState: Generic_mob_burning + - type: Actions + innateActions: + - CombatMode + - type: DoAfter + - type: Climbing + - type: Flashable + - type: Pullable + - type: Puller + - type: Buckle + - type: Recyclable + safe: false + - type: Butcherable + meat: FoodMeat + - type: StandingState + - type: Alerts + +- type: entity + save: false + abstract: true + id: SimpleMobBase # for air breathers + parent: SimpleSpaceMobBase + suffix: AI + components: + - type: UtilityAI + behaviorSets: + - Idle + # - Hunger TODO: eating on the floor and fix weird AI endless stomach + # - Thirst + - type: Hunger + damage: + types: + Blunt: 2 + - type: Thirst + damage: + types: + Blunt: 2 + - type: Barotrauma + damage: + types: + Blunt: 1 #per second, scales with pressure and other constants. - type: Respirator metabolismHeat: 5000 radiatedHeat: 400 @@ -106,36 +166,15 @@ damageRecovery: types: Asphyxiation: -1 - - type: MobState - thresholds: - 0: !type:NormalMobState {} - 50: !type:CriticalMobState {} - 100: !type:DeadMobState {} - - type: HeatResistance - - type: CombatMode - - type: Internals - - type: StatusEffects - allowed: - - Stun - - KnockedDown - - SlowedDown - - type: Examiner - - type: UnarmedCombat - range: 1.5 - arcwidth: 0 - arc: bite - damage: - groups: - Brute: 5 - - type: Appearance - visuals: - - type: BuckleVisualizer - - type: FireVisualizer - sprite: Mobs/Effects/onfire.rsi - normalState: Generic_mob_burning - - type: Pullable - - type: Buckle - - type: Butcherable - meat: FoodMeat - - type: Recyclable - safe: false + - type: Temperature + heatDamageThreshold: 360 + coldDamageThreshold: 260 + currentTemperature: 310.15 + specificHeat: 42 + tempDamageCoefficient: 0.1 + coldDamage: + types: + Cold : 1 #per second, scales with temperature & other constants + heatDamage: + types: + Heat : 1 #per second, scales with temperature & other constants diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml index 644fafed20..2c04c198c3 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml @@ -257,6 +257,15 @@ - state: chocolate - type: SliceableFood slice: FoodCakeChocolateSlice + - type: SolutionContainerManager + solutions: + food: + maxVol: 26 + reagents: + - ReagentId: Nutriment + Quantity: 20 + - ReagentId: Theobromine + Quantity: 5 - type: entity name: slice of chocolate cake @@ -267,6 +276,15 @@ layers: - state: plate-small - state: chocolate-slice + - type: SolutionContainerManager + solutions: + food: + maxVol: 10 # There is something weird about SliceBase: SliceableFoodComp has 5 default slices, which leads to total volume of 40, but CakeBase has only 26 total volume + reagents: + - ReagentId: Nutriment + Quantity: 7 # TODO: Recalculate volumes and nutrition for sliceable food + - ReagentId: Theobromine + Quantity: 1 # Tastes like sweetness, cake, chocolate. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml index c258344823..76f71f39d9 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml @@ -131,6 +131,15 @@ components: - type: Sprite state: choc + - type: SolutionContainerManager + solutions: + food: + maxVol: 5 + reagents: + - ReagentId: Nutriment + Quantity: 3 + - ReagentId: Theobromine + Quantity: 1 # Tastes like donut, bitterness. - type: entity @@ -235,6 +244,15 @@ components: - type: Sprite state: jelly-choc + - type: SolutionContainerManager + solutions: + food: + maxVol: 5 + reagents: + - ReagentId: Nutriment + Quantity: 3 + - ReagentId: Theobromine + Quantity: 1 # Tastes like jelly-donut, bitterness. - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml index ee531c5c0c..a6815ad5e8 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml @@ -248,6 +248,15 @@ - pancakescc1 - pancakescc2 - pancakescc3 + - type: SolutionContainerManager + solutions: + food: + maxVol: 6 + reagents: + - ReagentId: Nutriment + Quantity: 5 + - ReagentId: Theobromine + Quantity: 1 - type: entity name: waffles diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml index 838941e4d6..0f778f0aec 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pie.yml @@ -323,4 +323,13 @@ layers: - state: plate-tart - state: cocolava + - type: SolutionContainerManager + solutions: + food: + maxVol: 26 + reagents: + - ReagentId: Nutriment + Quantity: 15 + - ReagentId: Theobromine + Quantity: 2 # Tastes like tart, dark chocolate. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml index 80f2198afd..e70860d1fa 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml @@ -63,6 +63,15 @@ components: - type: Sprite state: cornuto + - type: SolutionContainerManager + solutions: + food: + maxVol: 20 + reagents: + - ReagentId: Nutriment + Quantity: 10 + - ReagentId: Theobromine + Quantity: 1 # Popsicle @@ -108,6 +117,15 @@ - state: jumbo - type: Food trash: FoodFrozenPopsicleTrash + - type: SolutionContainerManager + solutions: + food: + maxVol: 30 + reagents: + - ReagentId: Nutriment + Quantity: 10 + - ReagentId: Theobromine + Quantity: 1 - type: entity name: nogga black diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index c9002d1c52..627c2975bd 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -80,6 +80,15 @@ - id: FoodSnackChocolateBar sound: path: /Audio/Effects/unwrap.ogg + - type: SolutionContainerManager #seems like you can eat it unwrapped + solutions: + food: + maxVol: 30 + reagents: + - ReagentId: Nutriment + Quantity: 10 + - ReagentId: Theobromine + Quantity: 3 - type: entity name: chocolate bar @@ -92,6 +101,15 @@ state: chocolatebar-open - type: Item color: brown + - type: SolutionContainerManager + solutions: + food: + maxVol: 30 + reagents: + - ReagentId: Nutriment + Quantity: 10 + - ReagentId: Theobromine + Quantity: 3 - type: entity name: energy bar diff --git a/Resources/Prototypes/Reagents/Metabolism/metabolizer_types.yml b/Resources/Prototypes/Reagents/Metabolism/metabolizer_types.yml index c5f9c4a088..450e1ca3d4 100644 --- a/Resources/Prototypes/Reagents/Metabolism/metabolizer_types.yml +++ b/Resources/Prototypes/Reagents/Metabolism/metabolizer_types.yml @@ -3,3 +3,6 @@ - type: metabolizerType id: Human + +- type: metabolizerType + id: Animal diff --git a/Resources/Prototypes/Reagents/chemicals.yml b/Resources/Prototypes/Reagents/chemicals.yml index 1d611c6fbd..ddfd70c11f 100644 --- a/Resources/Prototypes/Reagents/chemicals.yml +++ b/Resources/Prototypes/Reagents/chemicals.yml @@ -98,6 +98,27 @@ - !type:PlantAdjustHealth amount: 0.5 +- type: reagent + id: Theobromine + name: theobromine + desc: Theobromine is a bitter alkaloid of the cacao plant found in chocolate, and some other foods. + physicalDesc: grainy + color: "#f5f5f5" + meltingPoint: 351 + boilingPoint: 554 # I'm not a chemist, but it boils at 295, lower than melting point, idk how it works so I gave it higher value + metabolisms: + Poison: + effects: + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 1 + - !type:OrganType + type: Animal # Applying damage to the mobs with lower metabolism capabilities + damage: + types: + Poison: 4 + - type: reagent id: Plasma name: plasma diff --git a/Resources/Textures/Mobs/Animals/chicken.rsi/chicken-0.png b/Resources/Textures/Mobs/Animals/chicken.rsi/chicken-0.png index d5ebdc2de1..f7476ff0f8 100644 Binary files a/Resources/Textures/Mobs/Animals/chicken.rsi/chicken-0.png and b/Resources/Textures/Mobs/Animals/chicken.rsi/chicken-0.png differ diff --git a/Resources/Textures/Mobs/Animals/chicken.rsi/dead-0.png b/Resources/Textures/Mobs/Animals/chicken.rsi/dead-0.png index bc4ac071de..620b3f53dd 100644 Binary files a/Resources/Textures/Mobs/Animals/chicken.rsi/dead-0.png and b/Resources/Textures/Mobs/Animals/chicken.rsi/dead-0.png differ diff --git a/Resources/Textures/Mobs/Animals/chicken.rsi/icon-0.png b/Resources/Textures/Mobs/Animals/chicken.rsi/icon-0.png index b63fd80fbe..1fe1f401f6 100644 Binary files a/Resources/Textures/Mobs/Animals/chicken.rsi/icon-0.png and b/Resources/Textures/Mobs/Animals/chicken.rsi/icon-0.png differ diff --git a/Resources/Textures/Mobs/Animals/crab.rsi/crab.png b/Resources/Textures/Mobs/Animals/crab.rsi/crab.png index 9c423c97b9..e40337e1ec 100644 Binary files a/Resources/Textures/Mobs/Animals/crab.rsi/crab.png and b/Resources/Textures/Mobs/Animals/crab.rsi/crab.png differ diff --git a/Resources/Textures/Mobs/Animals/crab.rsi/dead.png b/Resources/Textures/Mobs/Animals/crab.rsi/dead.png index c2fa2d91ac..f0afa348b3 100644 Binary files a/Resources/Textures/Mobs/Animals/crab.rsi/dead.png and b/Resources/Textures/Mobs/Animals/crab.rsi/dead.png differ diff --git a/Resources/Textures/Mobs/Animals/gorilla.rsi/crawling.png b/Resources/Textures/Mobs/Animals/gorilla.rsi/crawling.png index 2faeab4cde..748baf4e46 100644 Binary files a/Resources/Textures/Mobs/Animals/gorilla.rsi/crawling.png and b/Resources/Textures/Mobs/Animals/gorilla.rsi/crawling.png differ diff --git a/Resources/Textures/Mobs/Animals/gorilla.rsi/dead.png b/Resources/Textures/Mobs/Animals/gorilla.rsi/dead.png index 0033f8f4d7..1c28758d25 100644 Binary files a/Resources/Textures/Mobs/Animals/gorilla.rsi/dead.png and b/Resources/Textures/Mobs/Animals/gorilla.rsi/dead.png differ diff --git a/Resources/Textures/Mobs/Animals/gorilla.rsi/icon.png b/Resources/Textures/Mobs/Animals/gorilla.rsi/icon.png index ad43fef184..dd8762e1af 100644 Binary files a/Resources/Textures/Mobs/Animals/gorilla.rsi/icon.png and b/Resources/Textures/Mobs/Animals/gorilla.rsi/icon.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/dead-0.png b/Resources/Textures/Mobs/Animals/mouse.rsi/dead-0.png index 4fd3f66e06..8b7c552134 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/dead-0.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/dead-0.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/dead-1.png b/Resources/Textures/Mobs/Animals/mouse.rsi/dead-1.png index 1be9c8c6c9..f1751c1abb 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/dead-1.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/dead-1.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/dead-2.png b/Resources/Textures/Mobs/Animals/mouse.rsi/dead-2.png index 6ac77d6707..d44fd76876 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/dead-2.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/dead-2.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/icon-0.png b/Resources/Textures/Mobs/Animals/mouse.rsi/icon-0.png index 63e17544dd..63067418b1 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/icon-0.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/icon-0.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/icon-1.png b/Resources/Textures/Mobs/Animals/mouse.rsi/icon-1.png index 70a62f1cf9..9ab821cc68 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/icon-1.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/icon-1.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/icon-2.png b/Resources/Textures/Mobs/Animals/mouse.rsi/icon-2.png index d52d3b4c27..c793cd65ca 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/icon-2.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/icon-2.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-0.png b/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-0.png index b82f7affde..1cfe399b63 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-0.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-0.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-1.png b/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-1.png index 073b4ef031..5d96953df5 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-1.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-1.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-2.png b/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-2.png index c70a5a8b16..fe0969a1bb 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-2.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/mouse-2.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/splat-0.png b/Resources/Textures/Mobs/Animals/mouse.rsi/splat-0.png index 67f508a133..022377f2fa 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/splat-0.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/splat-0.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/splat-1.png b/Resources/Textures/Mobs/Animals/mouse.rsi/splat-1.png index a5ecc07329..62ef6b934b 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/splat-1.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/splat-1.png differ diff --git a/Resources/Textures/Mobs/Animals/mouse.rsi/splat-2.png b/Resources/Textures/Mobs/Animals/mouse.rsi/splat-2.png index 297f2dbd4f..4ecfb74b1d 100644 Binary files a/Resources/Textures/Mobs/Animals/mouse.rsi/splat-2.png and b/Resources/Textures/Mobs/Animals/mouse.rsi/splat-2.png differ diff --git a/Resources/Textures/Mobs/Pets/cat.rsi/cat.png b/Resources/Textures/Mobs/Pets/cat.rsi/cat.png index 37b105b12e..076bdd223c 100644 Binary files a/Resources/Textures/Mobs/Pets/cat.rsi/cat.png and b/Resources/Textures/Mobs/Pets/cat.rsi/cat.png differ diff --git a/Resources/Textures/Mobs/Pets/cat.rsi/cat2.png b/Resources/Textures/Mobs/Pets/cat.rsi/cat2.png index 09eed19efc..91328bd4e7 100644 Binary files a/Resources/Textures/Mobs/Pets/cat.rsi/cat2.png and b/Resources/Textures/Mobs/Pets/cat.rsi/cat2.png differ diff --git a/Resources/Textures/Mobs/Pets/cat.rsi/cat2_dead.png b/Resources/Textures/Mobs/Pets/cat.rsi/cat2_dead.png index efef131b8e..143e16425a 100644 Binary files a/Resources/Textures/Mobs/Pets/cat.rsi/cat2_dead.png and b/Resources/Textures/Mobs/Pets/cat.rsi/cat2_dead.png differ diff --git a/Resources/Textures/Mobs/Pets/cat.rsi/cat_dead.png b/Resources/Textures/Mobs/Pets/cat.rsi/cat_dead.png index 5f4ad65721..214e47b59a 100644 Binary files a/Resources/Textures/Mobs/Pets/cat.rsi/cat_dead.png and b/Resources/Textures/Mobs/Pets/cat.rsi/cat_dead.png differ diff --git a/Resources/Textures/Mobs/Pets/corgi.rsi/corgi.png b/Resources/Textures/Mobs/Pets/corgi.rsi/corgi.png index 585f64cd5e..bc6dc88800 100644 Binary files a/Resources/Textures/Mobs/Pets/corgi.rsi/corgi.png and b/Resources/Textures/Mobs/Pets/corgi.rsi/corgi.png differ diff --git a/Resources/Textures/Mobs/Pets/corgi.rsi/corgi_dead.png b/Resources/Textures/Mobs/Pets/corgi.rsi/corgi_dead.png index b52737b4b7..673b3ca3f1 100644 Binary files a/Resources/Textures/Mobs/Pets/corgi.rsi/corgi_dead.png and b/Resources/Textures/Mobs/Pets/corgi.rsi/corgi_dead.png differ diff --git a/Resources/Textures/Mobs/Pets/corgi.rsi/ian.png b/Resources/Textures/Mobs/Pets/corgi.rsi/ian.png index 4ee2f2544b..d394e19426 100644 Binary files a/Resources/Textures/Mobs/Pets/corgi.rsi/ian.png and b/Resources/Textures/Mobs/Pets/corgi.rsi/ian.png differ diff --git a/Resources/Textures/Mobs/Pets/corgi.rsi/ian_dead.png b/Resources/Textures/Mobs/Pets/corgi.rsi/ian_dead.png index 383a23326f..4d66574b73 100644 Binary files a/Resources/Textures/Mobs/Pets/corgi.rsi/ian_dead.png and b/Resources/Textures/Mobs/Pets/corgi.rsi/ian_dead.png differ diff --git a/Resources/Textures/Mobs/Pets/sloth.rsi/sloth.png b/Resources/Textures/Mobs/Pets/sloth.rsi/sloth.png index 66d8bb71c7..fcb8d9b9bd 100644 Binary files a/Resources/Textures/Mobs/Pets/sloth.rsi/sloth.png and b/Resources/Textures/Mobs/Pets/sloth.rsi/sloth.png differ diff --git a/Resources/Textures/Mobs/Pets/sloth.rsi/sloth_dead.png b/Resources/Textures/Mobs/Pets/sloth.rsi/sloth_dead.png index 6320626c24..5fadcec3db 100644 Binary files a/Resources/Textures/Mobs/Pets/sloth.rsi/sloth_dead.png and b/Resources/Textures/Mobs/Pets/sloth.rsi/sloth_dead.png differ