Add some animals basic mechanics (#5132)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
FoLoKe
2021-11-13 04:48:05 +03:00
committed by GitHub
parent 2353d340d0
commit 5f3ae602ed
49 changed files with 522 additions and 163 deletions

View File

@@ -79,7 +79,10 @@ namespace Content.Server.Climbing.Components
if (velocity <= 0.0f) return; 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; OwnerIsTransitioning = true;
Owner.SpawnTimer((int) (BufferTime * 1000), () => Owner.SpawnTimer((int) (BufferTime * 1000), () =>

View File

@@ -1,4 +1,4 @@
using Content.Server.Clothing.Components; using Content.Server.Clothing.Components;
using Content.Server.Inventory.Components; using Content.Server.Inventory.Components;
using Content.Shared.Inventory; using Content.Shared.Inventory;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
@@ -12,7 +12,15 @@ namespace Content.Server.Temperature.Components
public int GetHeatResistance() public int GetHeatResistance()
{ {
if (Owner.GetComponent<InventoryComponent>().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<InventoryComponent>(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; return gloves?.HeatResistance ?? int.MinValue;
} }

View File

@@ -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

View File

@@ -0,0 +1,7 @@
- type: bodyPreset
name: "animal preset"
id: AnimalPreset
partIDs:
legs: LegsAnimal
feet: FeetAnimal
torso: TorsoAnimal

View File

@@ -0,0 +1,8 @@
- type: bodyPreset
name: "primate preset"
id: PrimatePreset
partIDs:
hands: HandsAnimal
legs: LegsAnimal
feet: FeetAnimal
torso: TorsoAnimal

View File

@@ -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

View File

@@ -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

View File

@@ -17,14 +17,14 @@
state: bat state: bat
sprite: Mobs/Animals/bat.rsi sprite: Mobs/Animals/bat.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.25,-0.30,0.25,0.40" radius: 0.25
mass: 50 mass: 5
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -33,6 +33,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: bat normal: bat
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -52,22 +53,28 @@
state: 0 state: 0
sprite: Mobs/Animals/bee.rsi sprite: Mobs/Animals/bee.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.50,-0.90,0.50,0.05" radius: 0.1
mass: 90 mass: 5
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
- Opaque - Opaque
- type: MobState
thresholds:
0: !type:NormalMobState {}
5: !type:CriticalMobState {}
10: !type:DeadMobState {}
- type: Appearance - type: Appearance
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: 0 normal: 0
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -82,23 +89,11 @@
- map: ["enum.DamageStateVisualLayers.Base"] - map: ["enum.DamageStateVisualLayers.Base"]
state: chicken-0 state: chicken-0
sprite: Mobs/Animals/chicken.rsi 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 - type: Appearance
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: chicken-0 normal: chicken-0
crit: dead-0
dead: dead-0 dead: dead-0
- type: entity - type: entity
@@ -117,18 +112,23 @@
state: butterfly state: butterfly
sprite: Mobs/Animals/butterfly.rsi sprite: Mobs/Animals/butterfly.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.20,-0.20,0.20,0.20" radius: 0.2
mass: 5 mass: 5
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
- Opaque - Opaque
- type: MobState
thresholds:
0: !type:NormalMobState {}
5: !type:CriticalMobState {}
10: !type:DeadMobState {}
- type: RandomSpriteColor - type: RandomSpriteColor
state: butterfly state: butterfly
colors: colors:
@@ -143,6 +143,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: butterfly normal: butterfly
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -158,14 +159,14 @@
state: cow state: cow
sprite: Mobs/Animals/cow.rsi sprite: Mobs/Animals/cow.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.50,-0.60,0.50,0.05" radius: 0.40
mass: 20 mass: 45
mask: mask:
- Impassable - Impassable
- MobImpassable
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -174,6 +175,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: cow normal: cow
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -189,14 +191,14 @@
state: crab state: crab
sprite: Mobs/Animals/crab.rsi sprite: Mobs/Animals/crab.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.10,-0.10,0.10,0.10" radius: 0.35
mass: 5 mass: 5
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets!?
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -205,6 +207,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: crab normal: crab
crit: dead
dead: dead dead: dead
- type: AsteroidRockVisualizer - type: AsteroidRockVisualizer
@@ -220,23 +223,11 @@
- map: ["enum.DamageStateVisualLayers.Base"] - map: ["enum.DamageStateVisualLayers.Base"]
state: goat state: goat
sprite: Mobs/Animals/goat.rsi 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 - type: Appearance
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: goat normal: goat
crit: dead
dead: 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. # 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"] - map: ["enum.DamageStateVisualLayers.Base"]
state: goose state: goose
sprite: Mobs/Animals/goose.rsi 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 - type: Appearance
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: goose normal: goose
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -284,14 +263,14 @@
state: crawling state: crawling
sprite: Mobs/Animals/gorilla.rsi sprite: Mobs/Animals/gorilla.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.35,-0.30,0.35,0.35" radius: 0.48
mass: 20 mass: 20
mask: mask:
- Impassable - Impassable
- MobImpassable
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -300,6 +279,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: crawling normal: crawling
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -308,30 +288,24 @@
parent: SimpleMobBase 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. 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: components:
- type: GhostTakeoverAvailable
- type: Sprite - type: Sprite
drawdepth: Mobs drawdepth: Mobs
layers: layers:
- map: ["enum.DamageStateVisualLayers.Base"] - map: ["enum.DamageStateVisualLayers.Base"]
state: monkey state: monkey
sprite: Mobs/Animals/monkey.rsi sprite: Mobs/Animals/monkey.rsi
- type: Physics - type: Hands
bodyType: Dynamic - type: Body
fixtures: template: PrimateTemplate
- shape: preset: PrimatePreset
!type:PhysShapeAabb
bounds: "-0.30,-0.30,0.30,0.25"
mass: 10
mask:
- Impassable
- VaultImpassable
- SmallImpassable
layer:
- Opaque
- type: Appearance - type: Appearance
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: monkey normal: monkey
crit: dead
dead: dead dead: dead
- type: HandsVisualizer
- type: FireVisualizer - type: FireVisualizer
sprite: Mobs/Effects/onfire.rsi sprite: Mobs/Effects/onfire.rsi
normalState: Monkey_burning normalState: Monkey_burning
@@ -360,18 +334,23 @@
Slots: Slots:
- Helmet - Helmet
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.40,-0.30,0.40,0.45" radius: 0.2
mass: 10 mass: 10
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
- Opaque - Opaque
- type: MobState
thresholds:
0: !type:NormalMobState {}
10: !type:CriticalMobState {}
20: !type:DeadMobState {}
- type: MovementSpeedModifier - type: MovementSpeedModifier
baseWalkSpeed : 5 baseWalkSpeed : 5
baseSprintSpeed : 5 baseSprintSpeed : 5
@@ -451,14 +430,14 @@
state: parrot state: parrot
sprite: Mobs/Animals/parrot.rsi sprite: Mobs/Animals/parrot.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.35,-0.40,0.35,0.20" radius: 0.25
mass: 10 mass: 5
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -467,6 +446,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: parrot normal: parrot
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -482,14 +462,14 @@
state: penguin state: penguin
sprite: Mobs/Animals/penguin.rsi sprite: Mobs/Animals/penguin.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.30,-0.50,0.30,0.35" radius: 0.25
mass: 10 mass: 10
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -498,6 +478,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: penguin normal: penguin
crit: penguin_dead
dead: penguin_dead dead: penguin_dead
- type: entity - type: entity
@@ -513,24 +494,27 @@
state: snake state: snake
sprite: Mobs/Animals/snake.rsi sprite: Mobs/Animals/snake.rsi
- type: Physics - type: Physics
bodyType: KinematicController
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.30,-0.50,0.30,0.35" radius: 0.25
mass: 10 mass: 8
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
- Opaque - Opaque
- type: Appearance - type: Appearance
visuals: visuals:
- type: RotationVisualizer
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: snake normal: snake
# It's death animation is animated so hopefully this should push for separation between "dying" and "death" states. # 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 # Code unique spider prototypes or combine them all into one spider and get a
# random sprite state when you spawn it. # random sprite state when you spawn it.
@@ -547,14 +531,14 @@
state: tarantula state: tarantula
sprite: Mobs/Animals/spider.rsi sprite: Mobs/Animals/spider.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.40,-0.30,0.40,0.45" radius: 0.35
mass: 10 mass: 25
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -563,4 +547,5 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: tarantula normal: tarantula
crit: tarantula_dead
dead: tarantula_dead dead: tarantula_dead

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
name: space carp name: space carp
id: MobCarp id: MobCarp
parent: SimpleMobBase parent: SimpleSpaceMobBase
description: It's a space carp. description: It's a space carp.
components: components:
- type: UtilityAI - type: UtilityAI
@@ -18,11 +18,10 @@
state: alive state: alive
sprite: Mobs/Aliens/Carps/space.rsi sprite: Mobs/Aliens/Carps/space.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.35,-0.35,0.35,0.35" radius: 0.40
mass: 50 mass: 50
mask: mask:
- Impassable - Impassable
@@ -40,6 +39,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: alive normal: alive
crit: dead
dead: dead dead: dead
- type: entity - type: entity
@@ -68,11 +68,10 @@
state: alive state: alive
sprite: Mobs/Aliens/Carps/holo.rsi sprite: Mobs/Aliens/Carps/holo.rsi
- type: Physics - type: Physics
bodyType: Dynamic
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.35,-0.35,0.35,0.35" radius: 0.40
mass: 5 mass: 5
mask: mask:
- Impassable - Impassable

View File

@@ -16,11 +16,12 @@
- type: Physics - type: Physics
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.25,-0.50,0.25,0.30" radius: 0.35
mass: 10 mass: 10
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -29,6 +30,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: corgi normal: corgi
crit: corgi_dead
dead: corgi_dead dead: corgi_dead
- type: entity - type: entity
@@ -47,6 +49,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: ian normal: ian
crit: ian_dead
dead: ian_dead dead: ian_dead
- type: entity - type: entity
@@ -64,11 +67,12 @@
- type: Physics - type: Physics
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.20,-0.45,0.20,0.30" radius: 0.35
mass: 10 mass: 10
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -77,6 +81,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: cat normal: cat
crit: cat_dead
dead: cat_dead dead: cat_dead
- type: entity - type: entity
@@ -95,6 +100,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: cat2 normal: cat2
crit: cat2_dead
dead: cat2_dead dead: cat2_dead
- type: entity - type: entity
@@ -113,6 +119,7 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: caracal_flop normal: caracal_flop
crit: caracal_dead
dead: caracal_dead dead: caracal_dead
- type: entity - type: entity
@@ -133,11 +140,12 @@
- type: Physics - type: Physics
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb !type:PhysShapeCircle
bounds: "-0.35,-0.45,0.35,0.15" radius: 0.35
mass: 10 mass: 10
mask: mask:
- Impassable - Impassable
- MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
@@ -146,4 +154,5 @@
visuals: visuals:
- type: DamageStateVisualizer - type: DamageStateVisualizer
normal: sloth normal: sloth
crit: sloth_dead
dead: sloth_dead dead: sloth_dead

View File

@@ -1,7 +1,7 @@
- type: entity - type: entity
save: false save: false
abstract: true abstract: true
id: SimpleMobBase id: SimpleSpaceMobBase # Mob without barotrauma, freezing and asphyxiation (for space carps!?)
suffix: AI suffix: AI
components: components:
- type: Reactive - type: Reactive
@@ -16,16 +16,9 @@
- !type:FlammableReaction - !type:FlammableReaction
- type: UtilityAI - type: UtilityAI
behaviorSets: behaviorSets:
- Clothing # - Clothing
- Idle - Idle
- type: Hunger # No hunger and thirst for space mobs (need a way to eat station tiles for space carps)
damage:
types:
Blunt: 2
- type: Thirst
damage:
types:
Blunt: 2
- type: Input - type: Input
context: "human" context: "human"
- type: AiFactionTag - type: AiFactionTag
@@ -35,10 +28,6 @@
baseWalkSpeed : 4 baseWalkSpeed : 4
baseSprintSpeed : 4 baseSprintSpeed : 4
- type: MovedByPressure - type: MovedByPressure
- type: Barotrauma
damage:
types:
Blunt: 1 #per second, scales with pressure and other constants.
- type: DamageOnHighSpeedImpact - type: DamageOnHighSpeedImpact
damage: damage:
types: types:
@@ -51,18 +40,20 @@
- type: Clickable - type: Clickable
- type: InteractionOutline - type: InteractionOutline
- type: Physics - type: Physics
bodyType: Dynamic bodyType: KinematicController # Same for all inheritors
fixtures: fixtures:
- shape: - shape:
!type:PhysShapeAabb {} # Circles, cuz rotation of rectangles looks very bad
mass: 50 !type:PhysShapeCircle
radius: 0.35
mass: 20
mask: mask:
- Impassable - Impassable
# - MobImpassable Turns these off for now since humans don't have collisions either. - MobImpassable #Bullets?!
- VaultImpassable - VaultImpassable
- SmallImpassable - SmallImpassable
layer: layer:
- MobImpassable - Opaque
- type: SolutionContainerManager - type: SolutionContainerManager
- type: Bloodstream - type: Bloodstream
max_volume: 100 max_volume: 100
@@ -81,12 +72,81 @@
currentTemperature: 310.15 currentTemperature: 310.15
specificHeat: 42 specificHeat: 42
tempDamageCoefficient: 0.1 tempDamageCoefficient: 0.1
coldDamage:
types:
Cold : 1 #per second, scales with temperature & other constants
heatDamage: heatDamage:
types: types:
Heat : 1 #per second, scales with temperature & other constants 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 - type: Respirator
metabolismHeat: 5000 metabolismHeat: 5000
radiatedHeat: 400 radiatedHeat: 400
@@ -106,36 +166,15 @@
damageRecovery: damageRecovery:
types: types:
Asphyxiation: -1 Asphyxiation: -1
- type: MobState - type: Temperature
thresholds: heatDamageThreshold: 360
0: !type:NormalMobState {} coldDamageThreshold: 260
50: !type:CriticalMobState {} currentTemperature: 310.15
100: !type:DeadMobState {} specificHeat: 42
- type: HeatResistance tempDamageCoefficient: 0.1
- type: CombatMode coldDamage:
- type: Internals types:
- type: StatusEffects Cold : 1 #per second, scales with temperature & other constants
allowed: heatDamage:
- Stun types:
- KnockedDown Heat : 1 #per second, scales with temperature & other constants
- 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

View File

@@ -257,6 +257,15 @@
- state: chocolate - state: chocolate
- type: SliceableFood - type: SliceableFood
slice: FoodCakeChocolateSlice slice: FoodCakeChocolateSlice
- type: SolutionContainerManager
solutions:
food:
maxVol: 26
reagents:
- ReagentId: Nutriment
Quantity: 20
- ReagentId: Theobromine
Quantity: 5
- type: entity - type: entity
name: slice of chocolate cake name: slice of chocolate cake
@@ -267,6 +276,15 @@
layers: layers:
- state: plate-small - state: plate-small
- state: chocolate-slice - 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. # Tastes like sweetness, cake, chocolate.
- type: entity - type: entity

View File

@@ -131,6 +131,15 @@
components: components:
- type: Sprite - type: Sprite
state: choc state: choc
- type: SolutionContainerManager
solutions:
food:
maxVol: 5
reagents:
- ReagentId: Nutriment
Quantity: 3
- ReagentId: Theobromine
Quantity: 1
# Tastes like donut, bitterness. # Tastes like donut, bitterness.
- type: entity - type: entity
@@ -235,6 +244,15 @@
components: components:
- type: Sprite - type: Sprite
state: jelly-choc state: jelly-choc
- type: SolutionContainerManager
solutions:
food:
maxVol: 5
reagents:
- ReagentId: Nutriment
Quantity: 3
- ReagentId: Theobromine
Quantity: 1
# Tastes like jelly-donut, bitterness. # Tastes like jelly-donut, bitterness.
- type: entity - type: entity

View File

@@ -248,6 +248,15 @@
- pancakescc1 - pancakescc1
- pancakescc2 - pancakescc2
- pancakescc3 - pancakescc3
- type: SolutionContainerManager
solutions:
food:
maxVol: 6
reagents:
- ReagentId: Nutriment
Quantity: 5
- ReagentId: Theobromine
Quantity: 1
- type: entity - type: entity
name: waffles name: waffles

View File

@@ -323,4 +323,13 @@
layers: layers:
- state: plate-tart - state: plate-tart
- state: cocolava - state: cocolava
- type: SolutionContainerManager
solutions:
food:
maxVol: 26
reagents:
- ReagentId: Nutriment
Quantity: 15
- ReagentId: Theobromine
Quantity: 2
# Tastes like tart, dark chocolate. # Tastes like tart, dark chocolate.

View File

@@ -63,6 +63,15 @@
components: components:
- type: Sprite - type: Sprite
state: cornuto state: cornuto
- type: SolutionContainerManager
solutions:
food:
maxVol: 20
reagents:
- ReagentId: Nutriment
Quantity: 10
- ReagentId: Theobromine
Quantity: 1
# Popsicle # Popsicle
@@ -108,6 +117,15 @@
- state: jumbo - state: jumbo
- type: Food - type: Food
trash: FoodFrozenPopsicleTrash trash: FoodFrozenPopsicleTrash
- type: SolutionContainerManager
solutions:
food:
maxVol: 30
reagents:
- ReagentId: Nutriment
Quantity: 10
- ReagentId: Theobromine
Quantity: 1
- type: entity - type: entity
name: nogga black name: nogga black

View File

@@ -80,6 +80,15 @@
- id: FoodSnackChocolateBar - id: FoodSnackChocolateBar
sound: sound:
path: /Audio/Effects/unwrap.ogg 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 - type: entity
name: chocolate bar name: chocolate bar
@@ -92,6 +101,15 @@
state: chocolatebar-open state: chocolatebar-open
- type: Item - type: Item
color: brown color: brown
- type: SolutionContainerManager
solutions:
food:
maxVol: 30
reagents:
- ReagentId: Nutriment
Quantity: 10
- ReagentId: Theobromine
Quantity: 3
- type: entity - type: entity
name: energy bar name: energy bar

View File

@@ -3,3 +3,6 @@
- type: metabolizerType - type: metabolizerType
id: Human id: Human
- type: metabolizerType
id: Animal

View File

@@ -98,6 +98,27 @@
- !type:PlantAdjustHealth - !type:PlantAdjustHealth
amount: 0.5 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 - type: reagent
id: Plasma id: Plasma
name: plasma name: plasma

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 795 B

After

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB