Slimes and their habitats (#15379)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Nim
2023-05-01 11:21:39 +03:00
committed by GitHub
parent 9e9d9c1a4a
commit 78f56a4369
20 changed files with 452 additions and 50 deletions

View File

@@ -1,9 +0,0 @@
using Content.Server.StationEvents.Events;
namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(SpiderSpawnRule))]
public sealed class SpiderSpawnRuleComponent : Component
{
}

View File

@@ -1,15 +1,11 @@
using Content.Server.StationEvents.Events;
using Content.Shared.Storage;
namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(VentCrittersRule))]
public sealed class VentCrittersRuleComponent : Component
{
[DataField("spawnedPrototypeChoices")]
public List<string> SpawnedPrototypeChoices = new()
{
"MobMouse",
"MobMouse1",
"MobMouse2"
};
[DataField("entries")]
public List<EntitySpawnEntry> Entries = new();
}

View File

@@ -1,28 +0,0 @@
using Content.Server.StationEvents.Components;
using System.Linq;
using Content.Server.GameTicking.Rules.Components;
namespace Content.Server.StationEvents.Events;
public sealed class SpiderSpawnRule : StationEventSystem<SpiderSpawnRuleComponent>
{
protected override void Started(EntityUid uid, SpiderSpawnRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
base.Started(uid, component, gameRule, args);
var spawnLocations = EntityQuery<VentCritterSpawnLocationComponent>().ToList();
RobustRandom.Shuffle(spawnLocations);
var mod = Math.Sqrt(GetSeverityModifier());
var spawnAmount = (int) (RobustRandom.Next(4, 8) * mod);
Sawmill.Info($"Spawning {spawnAmount} of spiders");
foreach (var location in spawnLocations)
{
if (spawnAmount-- == 0)
break;
var xform = Transform(location.Owner);
Spawn("MobGiantSpiderAngry", xform.Coordinates);
}
}
}

View File

@@ -7,15 +7,24 @@ namespace Content.Server.StationEvents.Events;
public sealed class VentCrittersRule : StationEventSystem<VentCrittersRuleComponent>
{
/*
* DO NOT COPY PASTE THIS TO MAKE YOUR MOB EVENT.
* USE THE PROTOTYPE.
*/
protected override void Started(EntityUid uid, VentCrittersRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
base.Started(uid, component, gameRule, args);
var spawnChoice = RobustRandom.Pick(component.SpawnedPrototypeChoices);
var spawnChoice = RobustRandom.Pick(component.Entries);
// TODO: What we should actually do is take the component count and then multiply a prob by that
// then just iterate until we get it
// This will be on average twice as fast.
var spawnLocations = EntityManager.EntityQuery<VentCritterSpawnLocationComponent>().ToList();
RobustRandom.Shuffle(spawnLocations);
var spawnAmount = RobustRandom.Next(4, 12); // A small colony of critters.
// A small colony of critters.
var spawnAmount = RobustRandom.Next(spawnChoice.Amount, spawnChoice.MaxAmount);
Sawmill.Info($"Spawning {spawnAmount} of {spawnChoice}");
foreach (var location in spawnLocations)
{
@@ -23,7 +32,7 @@ public sealed class VentCrittersRule : StationEventSystem<VentCrittersRuleCompon
break;
var coords = Transform(location.Owner);
Spawn(spawnChoice, coords.Coordinates);
Spawn(spawnChoice.PrototypeId, coords.Coordinates);
}
}
}

View File

@@ -19,3 +19,9 @@
license: "CC-BY-SA-3.0"
copyright: "Made and posted by GentleJester#8754 on the SS14 discord."
source: "https://discord.com/channels/310555209753690112/311537926376783886/1097222920813674527"
- files:
- slime1.ogg
license: "CC-BY-SA-3.0"
copyright: "Taken from https://github.com/tgstation/tgstation"
source: "https://github.com/nero1024/tgstation/blob/83ccc939a20489de8ab81cb47e6f8e84c490adc2/sound/effects/footstep/slime1.ogg"

Binary file not shown.

View File

@@ -73,3 +73,10 @@ accent-words-kangaroo-1 = Grr!
accent-words-kangaroo-2 = Hisss!
accent-words-kangaroo-3 = Shreak!
accent-words-kangaroo-4 = Chuu!
# Slimes
accent-words-slimes-1 = Blyump.
accent-words-slimes-2 = Blimpuf?
accent-words-slimes-3 = Blump!
accent-words-slimes-4 = Bluuump...
accent-words-slimes-5 = Blabl blump!

View File

@@ -15,4 +15,7 @@ ghost-role-information-hamster-name = Hamster
ghost-role-information-hamster-description = A grumpy little ball of fluff.
ghost-role-information-hamlet-name = Hamlet the hamster.
ghost-role-information-hamlet-description = Lives in the station bridge, has a bit of a temper and is always hungry.
ghost-role-information-hamlet-description = Lives in the station bridge, has a bit of a temper and is always hungry.
ghost-role-information-slimes-name = Slime
ghost-role-information-slimes-description = Everything around you irritates your instincts, destroy them!

View File

@@ -24,6 +24,7 @@ petting-success-holo = You pet {THE($target)} on {POSS-ADJ($target)} metallic sp
petting-success-dragon = Dodging teeth, claws, and flames, you pet {THE($target)} on {POSS-ADJ($target)} massive scaled head.
petting-success-hamster = You pet {THE($target)} on {POSS-ADJ($target)} fluffy little head.
petting-success-bear = You reluctantly pet {THE($target)} on {POSS-ADJ($target)} mystical head.
petting-success-slimes = You pet {THE($target)} on {POSS-ADJ($target)} mucous surface.
petting-failure-generic = You reach out to pet {THE($target)}, but {SUBJECT($target)} {CONJUGATE-BE($target)} aloof towards you.

View File

@@ -99,3 +99,12 @@
- accent-words-kangaroo-2
- accent-words-kangaroo-3
- accent-words-kangaroo-4
- type: accent
id: slimes
fullReplacements:
- accent-words-slimes-1
- accent-words-slimes-2
- accent-words-slimes-3
- accent-words-slimes-4
- accent-words-slimes-5

View File

@@ -344,7 +344,7 @@
- type: ConditionalSpawner
prototypes:
- MobBoxingKangaroo
- type: entity
name: Space Spider Spawner
id: SpawnMobSpaceSpider
@@ -357,3 +357,81 @@
- type: ConditionalSpawner
prototypes:
- MobSpiderSpace
- type: entity
name: Slimes Spawner Blue Good
id: SpawnMobAdultSlimesBlue
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- state: ai
- type: ConditionalSpawner
prototypes:
- MobAdultSlimesBlueGood
- type: entity
name: Slimes Spawner Blue Angry
id: SpawnMobAdultSlimesBlueAngry
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- state: ai
- type: ConditionalSpawner
prototypes:
- MobAdultSlimesBlueAngry
- type: entity
name: Slimes Spawner Green Good
id: SpawnMobAdultSlimesGreen
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- state: ai
- type: ConditionalSpawner
prototypes:
- MobAdultSlimesGreenGood
- type: entity
name: Slimes Spawner Green Angry
id: SpawnMobAdultSlimesGreenAngry
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- state: ai
- type: ConditionalSpawner
prototypes:
- MobAdultSlimesGreenAngry
- type: entity
name: Slimes Spawner Yellow Good
id: SpawnMobAdultSlimesYellow
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- state: ai
- type: ConditionalSpawner
prototypes:
- MobAdultSlimesYellowGood
- type: entity
name: Slimes Spawner Yellow Angry
id: SpawnMobAdultSlimesYellowAngry
parent: MarkerBase
components:
- type: Sprite
layers:
- state: green
- state: ai
- type: ConditionalSpawner
prototypes:
- MobAdultSlimesYellowAngry

View File

@@ -0,0 +1,247 @@
- type: entity
name: basic slime
id: MobAdultSlimes
parent: SimpleMobBase
abstract: true
description: It looks so much like jelly. I wonder what it tastes like?
suffix: Good
components:
- type: Faction
factions:
- SimpleNeutral
- type: HTN
rootTask: SimpleHostileCompound
- type: Sprite
drawdepth: Mobs
netsync: false
sprite: Mobs/Aliens/slimes.rsi
layers:
- map: [ "enum.DamageStateVisualLayers.Base" ]
state: blue_adult_slime
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeCircle
radius: 0.30
density: 80
mask:
- MobMask
layer:
- MobLayer
- type: MobThresholds
thresholds:
0: Alive
120: Dead
- type: MovementSpeedModifier
baseWalkSpeed: 2
baseSprintSpeed: 4
- type: FootstepModifier
footstepSoundCollection:
path: /Audio/Effects/Footsteps/slime1.ogg
- type: Tag
tags:
- FootstepSound
- type: Butcherable
butcheringType: Knife
spawned:
- id: FoodMeatSlime
amount: 2
- type: Respirator
damage:
types:
Asphyxiation: 0.2
damageRecovery:
types:
Asphyxiation: -1.0
maxSaturation: 15
- type: Damageable
damageContainer: Biological
damageModifierSet: Slime
- type: Bloodstream
bloodReagent: Slime
bloodlossDamage:
types:
Bloodloss:
1
bloodlossHealDamage:
types:
Bloodloss:
-0.25
- type: Barotrauma
damage:
types:
Blunt: 0.45
- type: Reactive
groups:
Flammable: [ Touch ]
Extinguish: [ Touch ]
reactions:
- reagents: [ Water, SpaceCleaner ]
methods: [ Touch ]
effects:
- !type:WashCreamPieReaction
- reagents: [ Water ]
methods: [ Touch ]
effects:
- !type:HealthChange
scaled: true
damage:
types:
Heat: 3
- !type:PopupMessage
type: Local
messages: [ "slime-hurt-by-water-popup" ]
probability: 0.25
- type: CombatMode
- type: MeleeWeapon
hidden: true
soundHit:
path: /Audio/Weapons/punch3.ogg
angle: 0
animation: WeaponArcPunch
damage:
types:
Blunt: 6
Structural: 4
Caustic: 4
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-slimes
interactFailureString: petting-failure-generic
- type: ReplacementAccent
accent: slimes
- type: GhostTakeoverAvailable
makeSentient: true
name: ghost-role-information-slimes-name
description: ghost-role-information-slimes-description
- type: entity
name: blue slime
id: MobAdultSlimesBlueGood
parent: MobAdultSlimes
suffix: Good
components:
- type: DamageStateVisuals
states:
Alive:
Base: blue_adult_slime
Dead:
Base: blue_adult_slime_dead
- type: entity
name: blue slime
parent: MobAdultSlimes
id: MobAdultSlimesBlueAngry
suffix: Angry
components:
- type: Faction
factions:
- SimpleHostile
- type: DamageStateVisuals
states:
Alive:
Base: blue_adult_slime
Dead:
Base: blue_adult_slime_dead
- type: entity
name: green slime
parent: MobAdultSlimes
id: MobAdultSlimesGreenGood
suffix: Good
components:
- type: Sprite
layers:
- map: [ "enum.DamageStateVisualLayers.Base" ]
state: green_adult_slime
- type: DamageStateVisuals
states:
Alive:
Base: green_adult_slime
Dead:
Base: green_adult_slime_dead
- type: MeleeWeapon
damage:
types:
Blunt: 6
Structural: 4
Caustic: 1
Poison: 4
- type: entity
name: green slime
parent: MobAdultSlimes
id: MobAdultSlimesGreenAngry
suffix: Angry
components:
- type: Faction
factions:
- SimpleHostile
- type: Sprite
layers:
- map: [ "enum.DamageStateVisualLayers.Base" ]
state: green_adult_slime
- type: DamageStateVisuals
states:
Alive:
Base: green_adult_slime
Dead:
Base: green_adult_slime_dead
- type: MeleeWeapon
damage:
types:
Blunt: 6
Structural: 4
Caustic: 1
Poison: 4
- type: entity
name: yellow slime
parent: MobAdultSlimes
id: MobAdultSlimesYellowGood
suffix: Good
components:
- type: Sprite
layers:
- map: [ "enum.DamageStateVisualLayers.Base" ]
state: yellow_adult_slime
- type: DamageStateVisuals
states:
Alive:
Base: yellow_adult_slime
Dead:
Base: yellow_adult_slime_dead
- type: MeleeWeapon
damage:
types:
Blunt: 6
Structural: 4
Caustic: 1
Cellular: 3
- type: entity
name: yellow slime
parent: MobAdultSlimes
id: MobAdultSlimesYellowAngry
suffix: Angry
components:
- type: Faction
factions:
- SimpleHostile
- type: Sprite
layers:
- map: [ "enum.DamageStateVisualLayers.Base" ]
state: yellow_adult_slime
- type: DamageStateVisuals
states:
Alive:
Base: yellow_adult_slime
Dead:
Base: yellow_adult_slime_dead
- type: MeleeWeapon
damage:
types:
Blunt: 6
Structural: 4
Caustic: 1
Cellular: 3

View File

@@ -244,6 +244,38 @@
weight: 5
duration: 60
- type: VentCrittersRule
entries:
- id: MobMouse
amount: 4
maxAmount: 12
- id: MobMouse1
amount: 4
maxAmount: 12
- id: MobMouse2
amount: 4
maxAmount: 12
- type: entity
id: SlimesSpawn
parent: BaseGameRule
noSpawn: true
components:
- type: StationEvent
earliestStart: 20
minimumPlayers: 15
weight: 5
duration: 60
- type: VentCrittersRule
entries:
- id: MobAdultSlimesBlueAngry
amount: 6
maxAmount: 10
- id: MobAdultSlimesGreenAngry
amount: 6
maxAmount: 10
- id: MobAdultSlimesYellowAngry
amount: 6
maxAmount: 10
- type: entity
id: SpiderSpawn
@@ -255,7 +287,11 @@
minimumPlayers: 15
weight: 5
duration: 60
- type: SpiderSpawnRule
- type: VentCrittersRule
entries:
- id: MobGiantSpiderAngry
amount: 4
maxAmount: 8
- type: entity
id: ZombieOutbreak

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

View File

@@ -0,0 +1,47 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from the tgstation at https://github.com/tgstation/tgstation/blob/bb89e65aebb14d6ba0ce7fc43363fbc3f1279e79/icons/mob/simple/slimes.dmi",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "blue_adult_slime",
"delays": [
[
0.3,
0.3
]
]
},
{
"name": "blue_adult_slime_dead"
},
{
"name": "green_adult_slime",
"delays": [
[
0.3,
0.3
]
]
},
{
"name": "green_adult_slime_dead"
},
{
"name": "yellow_adult_slime",
"delays": [
[
0.3,
0.3
]
]
},
{
"name": "yellow_adult_slime_dead"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B