Hivelord mob (#31322)

* Hivelord

* make it longah
This commit is contained in:
Nemanja
2024-09-11 09:52:27 -04:00
committed by GitHub
parent 7f76af4da8
commit e510504596
29 changed files with 354 additions and 5 deletions

View File

@@ -45,6 +45,12 @@ public sealed partial class PerishableComponent : Component
[DataField, AutoNetworkedField] [DataField, AutoNetworkedField]
public int Stage; public int Stage;
/// <summary>
/// If true, rot will always progress.
/// </summary>
[DataField, AutoNetworkedField]
public bool ForceRotProgression;
} }

View File

@@ -115,6 +115,10 @@ public abstract class SharedRottingSystem : EntitySystem
if (!Resolve(uid, ref perishable, false)) if (!Resolve(uid, ref perishable, false))
return false; return false;
// Overrides all the other checks.
if (perishable.ForceRotProgression)
return true;
// only dead things or inanimate objects can rot // only dead things or inanimate objects can rot
if (TryComp<MobStateComponent>(uid, out var mobState) && !_mobState.IsDead(uid, mobState)) if (TryComp<MobStateComponent>(uid, out var mobState) && !_mobState.IsDead(uid, mobState))
return false; return false;

View File

@@ -0,0 +1,9 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Damage.Components;
/// <summary>
/// This is used for an effect that nullifies <see cref="SlowOnDamageComponent"/> and adds an alert.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SlowOnDamageSystem))]
public sealed partial class IgnoreSlowOnDamageComponent : Component;

View File

@@ -22,6 +22,10 @@ namespace Content.Shared.Damage
SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ExaminedEvent>(OnExamined); SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ClothingGotEquippedEvent>(OnGotEquipped); SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ClothingGotEquippedEvent>(OnGotEquipped);
SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ClothingGotUnequippedEvent>(OnGotUnequipped); SubscribeLocalEvent<ClothingSlowOnDamageModifierComponent, ClothingGotUnequippedEvent>(OnGotUnequipped);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ComponentStartup>(OnIgnoreStartup);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ComponentShutdown>(OnIgnoreShutdown);
SubscribeLocalEvent<IgnoreSlowOnDamageComponent, ModifySlowOnDamageSpeedEvent>(OnIgnoreModifySpeed);
} }
private void OnRefreshMovespeed(EntityUid uid, SlowOnDamageComponent component, RefreshMovementSpeedModifiersEvent args) private void OnRefreshMovespeed(EntityUid uid, SlowOnDamageComponent component, RefreshMovementSpeedModifiersEvent args)
@@ -84,6 +88,21 @@ namespace Content.Shared.Damage
{ {
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(args.Wearer); _movementSpeedModifierSystem.RefreshMovementSpeedModifiers(args.Wearer);
} }
private void OnIgnoreStartup(Entity<IgnoreSlowOnDamageComponent> ent, ref ComponentStartup args)
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}
private void OnIgnoreShutdown(Entity<IgnoreSlowOnDamageComponent> ent, ref ComponentShutdown args)
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}
private void OnIgnoreModifySpeed(Entity<IgnoreSlowOnDamageComponent> ent, ref ModifySlowOnDamageSpeedEvent args)
{
args.Speed = 1f;
}
} }
[ByRefEvent] [ByRefEvent]

View File

@@ -17,7 +17,7 @@ public sealed partial class RechargeBasicEntityAmmoComponent : Component
[DataField("rechargeSound")] [DataField("rechargeSound")]
[AutoNetworkedField] [AutoNetworkedField]
public SoundSpecifier RechargeSound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg") public SoundSpecifier? RechargeSound = new SoundPathSpecifier("/Audio/Magic/forcewall.ogg")
{ {
Params = AudioParams.Default.WithVolume(-5f) Params = AudioParams.Default.WithVolume(-5f)
}; };
@@ -27,4 +27,7 @@ public sealed partial class RechargeBasicEntityAmmoComponent : Component
AutoNetworkedField] AutoNetworkedField]
[AutoPausedField] [AutoPausedField]
public TimeSpan? NextCharge; public TimeSpan? NextCharge;
[DataField, AutoNetworkedField]
public bool ShowExamineText = true;
} }

View File

@@ -66,6 +66,9 @@ public sealed class RechargeBasicEntityAmmoSystem : EntitySystem
private void OnExamined(EntityUid uid, RechargeBasicEntityAmmoComponent component, ExaminedEvent args) private void OnExamined(EntityUid uid, RechargeBasicEntityAmmoComponent component, ExaminedEvent args)
{ {
if (!component.ShowExamineText)
return;
if (!TryComp<BasicEntityAmmoProviderComponent>(uid, out var ammo) if (!TryComp<BasicEntityAmmoProviderComponent>(uid, out var ammo)
|| ammo.Count == ammo.Capacity || || ammo.Count == ammo.Capacity ||
component.NextCharge == null) component.NextCharge == null)

View File

@@ -96,6 +96,9 @@ alerts-bleed-desc = You're [color=red]bleeding[/color].
alerts-pacified-name = [color=green]Pacified[/color] alerts-pacified-name = [color=green]Pacified[/color]
alerts-pacified-desc = You're pacified; you won't be able to harm living creatures. alerts-pacified-desc = You're pacified; you won't be able to harm living creatures.
alerts-adrenaline-name = [color=red]Adrenaline[/color]
alerts-adrenaline-desc = You're full of adrenaline: pain won't slow you down.
alerts-suit-power-name = Suit Power alerts-suit-power-name = Suit Power
alerts-suit-power-desc = How much power your space ninja suit has. alerts-suit-power-desc = How much power your space ninja suit has.

View File

@@ -13,3 +13,4 @@ reagent-effect-status-effect-RatvarianLanguage = ratvarian language patterns
reagent-effect-status-effect-StaminaModifier = modified stamina reagent-effect-status-effect-StaminaModifier = modified stamina
reagent-effect-status-effect-RadiationProtection = radiation protection reagent-effect-status-effect-RadiationProtection = radiation protection
reagent-effect-status-effect-Drowsiness = drowsiness reagent-effect-status-effect-Drowsiness = drowsiness
reagent-effect-status-effect-Adrenaline = adrenaline

View File

@@ -28,3 +28,5 @@ reagent-desc-sodium-polyacrylate = A super-absorbent polymer with assorted indus
reagent-name-cellulose = cellulose fibers reagent-name-cellulose = cellulose fibers
reagent-desc-cellulose = A crystaline polydextrose polymer, plants swear by this stuff. reagent-desc-cellulose = A crystaline polydextrose polymer, plants swear by this stuff.
reagent-name-rororium = rororium
reagent-desc-rororium = A strange substance which fills the cores of the hivelords that roam the mining asteroid. Thought to be the source of their regenerative powers.

View File

@@ -427,6 +427,14 @@
name: alerts-pacified-name name: alerts-pacified-name
description: alerts-pacified-desc description: alerts-pacified-desc
- type: alert
id: Adrenaline
icons:
- sprite: Mobs/Species/Human/organs.rsi
state: heart-on
name: alerts-adrenaline-name
description: alerts-adrenaline-desc
- type: alert - type: alert
id: Debug1 id: Debug1
icons: icons:

View File

@@ -476,3 +476,21 @@
amount: !type:ConstantNumberSelector amount: !type:ConstantNumberSelector
value: 3 value: 3
- type: entity
parent: MarkerBase
id: SalvageSpawnerMobMiningAsteroid
name: Mining Asteroid Mob Spawner
components:
- type: Sprite
layers:
- state: green
- sprite: Mobs/Aliens/Asteroid/goliath.rsi
state: goliath
- type: EntityTableSpawner
table: !type:GroupSelector
children:
- id: MobGoliath
weight: 65
- id: MobHivelord
weight: 35

View File

@@ -26,6 +26,7 @@
- TemporaryBlindness - TemporaryBlindness
- RadiationProtection - RadiationProtection
- Drowsiness - Drowsiness
- Adrenaline
- type: StandingState - type: StandingState
- type: Tag - type: Tag
tags: tags:
@@ -180,3 +181,156 @@
state: goliath_tentacle_retract state: goliath_tentacle_retract
- type: EffectVisuals - type: EffectVisuals
- type: AnimationPlayer - type: AnimationPlayer
- type: entity
id: MobHivelord
parent: [ BaseMobAsteroid, FlyingMobBase ]
name: hivelord
description: A truly alien creature, it is a mass of unknown organic material, constantly fluctuating. When attacking, pieces of it split off and attack in tandem with the original.
components:
- type: Sprite
sprite: Mobs/Aliens/Asteroid/hivelord.rsi
layers:
- map: ["enum.DamageStateVisualLayers.Base"]
state: hivelord
- type: DamageStateVisuals
states:
Alive:
Base: hivelord
Dead:
Base: hivelord_dead
- type: MovementSpeedModifier
baseWalkSpeed : 3.5
baseSprintSpeed : 4.0
- type: MobThresholds
thresholds:
0: Alive
75: Dead
- type: MeleeWeapon
damage:
types:
Blunt: 0
- type: Gun
fireRate: 0.66
selectedMode: SemiAuto
showExamineText: false
availableModes:
- SemiAuto
soundGunshot: null
- type: RechargeBasicEntityAmmo
showExamineText: false
rechargeCooldown: 0
rechargeSound: null
- type: BasicEntityAmmoProvider
proto: MobHivelordBrood
capacity: 1
count: 1
- type: NpcFactionMember
factions:
- SimpleHostile
- type: HTN
rootTask:
task: SimpleRangedHostileCompound
blackboard:
VisionRadius: !type:Single
4
AggroVisionRadius: !type:Single
9
- type: Butcherable
spawned:
- id: FoodHivelordRemains
- type: entity
id: MobHivelordBrood
parent: [ BaseMobAsteroid, FlyingMobBase ]
name: hivelord brood
description: A fragment of the original hivelord, rallying behind its original. One isn't much of a threat, but...
components:
- type: Sprite
sprite: Mobs/Aliens/Asteroid/hivelord.rsi
layers:
- state: hivelordbrood
- type: MovementSpeedModifier
baseWalkSpeed : 3.5
baseSprintSpeed : 4.0
- type: MobThresholds
thresholds:
0: Alive
5: Dead
- type: MeleeWeapon
soundHit:
path: /Audio/Weapons/bladeslice.ogg
angle: 0
attackRate: 1.0
range: 0.75
animation: WeaponArcPunch
damage:
types:
Slash: 7
- type: Ammo
muzzleFlash: null
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 5
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: NpcFactionMember
factions:
- SimpleHostile
- type: HTN
rootTask:
task: SimpleHostileCompound
blackboard: # highly aggressive
VisionRadius: !type:Single
15
AggroVisionRadius: !type:Single
15
- type: TimedDespawn
lifetime: 100
- type: entity
id: FoodHivelordRemains
parent: FoodBase
name: hivelord remains
description: All that remains of a hivelord, it seems to be what allows it to break pieces of itself off without being hurt... its healing properties will soon become inert if not used quickly. Try not to think about what you're eating.
components:
- type: SolutionContainerManager
solutions:
food:
maxVol: 5
reagents:
- ReagentId: Rororium
Quantity: 5
- type: Sprite
sprite: Objects/Consumable/Food/rorocore.rsi
state: boiled
- type: Item
size: Normal
- type: Perishable
rotAfter: 120 # rot after 2 minutes
molsPerSecondPerUnitMass: 0
forceRotProgression: true
- type: RotInto
entity: FoodHivelordRemainsInert
stage: 1
- type: StaticPrice
price: 5000
- type: entity
id: FoodHivelordRemainsInert
parent: BaseItem
name: inert hivelord remains
description: All that remains of a hivelord... Now all is truly lost.
components:
- type: Sprite
sprite: Objects/Consumable/Food/rorocore.rsi
state: boiled
color: "#664444"
- type: SpaceGarbage
- type: Item
size: Normal
- type: StaticPrice
price: 500

View File

@@ -29,6 +29,7 @@
- Flashed - Flashed
- RadiationProtection - RadiationProtection
- Drowsiness - Drowsiness
- Adrenaline
- type: Buckle - type: Buckle
- type: StandingState - type: StandingState
- type: Tag - type: Tag
@@ -106,6 +107,7 @@
- Flashed - Flashed
- RadiationProtection - RadiationProtection
- Drowsiness - Drowsiness
- Adrenaline
- type: Bloodstream - type: Bloodstream
bloodMaxVolume: 150 bloodMaxVolume: 150
- type: MobPrice - type: MobPrice

View File

@@ -106,6 +106,7 @@
- Pacified - Pacified
- RadiationProtection - RadiationProtection
- Drowsiness - Drowsiness
- Adrenaline
- type: Temperature - type: Temperature
heatDamageThreshold: 800 heatDamageThreshold: 800
- type: Metabolizer - type: Metabolizer

View File

@@ -135,6 +135,7 @@
- Flashed - Flashed
- RadiationProtection - RadiationProtection
- Drowsiness - Drowsiness
- Adrenaline
- type: Body - type: Body
prototype: Human prototype: Human
requiredLegs: 2 requiredLegs: 2

View File

@@ -180,7 +180,7 @@
minCount: 8 minCount: 8
maxCount: 15 maxCount: 15
groups: groups:
- id: MobGoliath - id: SalvageSpawnerMobMiningAsteroid
amount: 1 amount: 1
#- type: dungeonConfig #- type: dungeonConfig
@@ -207,10 +207,10 @@
# Mobs # Mobs
# If you want exterior dungeon mobs add them under the prototype. # If you want exterior dungeon mobs add them under the prototype.
- !type:MobsDunGen - !type:MobsDunGen
minCount: 20 minCount: 25
maxCount: 30 maxCount: 35
groups: groups:
- id: MobGoliath - id: SalvageSpawnerMobMiningAsteroid
amount: 1 amount: 1
#- type: dungeonConfig #- type: dungeonConfig

View File

@@ -166,3 +166,23 @@
color: "#E6E6DA" color: "#E6E6DA"
physicalDesc: reagent-physical-desc-crystalline physicalDesc: reagent-physical-desc-crystalline
slippery: false slippery: false
- type: reagent
id: Rororium
name: reagent-name-rororium
desc: reagent-desc-rororium
group: Biological
flavor: tingly
physicalDesc: reagent-physical-desc-refreshing
color: "#bf1365"
metabolisms:
Medicine:
effects:
- !type:HealthChange
damage:
groups:
Brute: -4
- !type:GenericStatusEffect
key: Adrenaline
component: IgnoreSlowOnDamage
time: 120

View File

@@ -68,3 +68,7 @@
- type: statusEffect - type: statusEffect
id: Drowsiness #blurs your vision and makes you randomly fall asleep id: Drowsiness #blurs your vision and makes you randomly fall asleep
- type: statusEffect
id: Adrenaline
alert: Adrenaline

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

View File

@@ -0,0 +1,74 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from vgstation13 at https://github.com/vgstation-coders/vgstation13/blob/9bd459b27c73575fd5e3bf2efea13b816d0ac7c8/icons/mob/animal.dmi",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "hivelord",
"delays": [
[
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "hivelord_nocore",
"delays": [
[
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "hivelord_alert",
"delays": [
[
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "hivelord_alert_nocore",
"delays": [
[
0.5,
0.5,
0.5,
0.5
]
]
},
{
"name": "hivelord_dead"
},
{
"name": "hivelord_dead_nocore"
},
{
"name": "hivelordbrood",
"delays": [
[
0.5,
0.5,
0.5,
0.5,
0.5,
0.5
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

View File

@@ -0,0 +1,17 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "boiled"
}
]
}