Rat King Tweaks (#8940)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -39,16 +39,9 @@ namespace Content.Server.RatKing
|
|||||||
public float HungerPerDomainUse = 50f;
|
public float HungerPerDomainUse = 50f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The disease prototype id that the Domain ability spreads
|
/// How many moles of Miasma are released after one us of Domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables, DataField("domainDiseaseId", customTypeSerializer: typeof(PrototypeIdSerializer<DiseasePrototype>))]
|
[ViewVariables, DataField("molesMiasmaPerDomain")]
|
||||||
public string DomainDiseaseId = "Plague";
|
public float MolesMiasmaPerDomain = 75f;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The range of the Domain ability.
|
|
||||||
/// </summary>
|
|
||||||
[ViewVariables(VVAccess.ReadWrite), DataField("domainRange")]
|
|
||||||
public float DomainRange = 3f;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using Content.Server.Actions;
|
using Content.Server.Actions;
|
||||||
|
using Content.Server.Atmos.EntitySystems;
|
||||||
using Content.Server.Disease;
|
using Content.Server.Disease;
|
||||||
using Content.Server.Disease.Components;
|
using Content.Server.Disease.Components;
|
||||||
using Content.Server.Nutrition.Components;
|
using Content.Server.Nutrition.Components;
|
||||||
using Content.Server.Popups;
|
using Content.Server.Popups;
|
||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
|
using Content.Shared.Atmos;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.RatKing
|
namespace Content.Server.RatKing
|
||||||
@@ -14,6 +16,7 @@ namespace Content.Server.RatKing
|
|||||||
[Dependency] private readonly ActionsSystem _action = default!;
|
[Dependency] private readonly ActionsSystem _action = default!;
|
||||||
[Dependency] private readonly DiseaseSystem _disease = default!;
|
[Dependency] private readonly DiseaseSystem _disease = default!;
|
||||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||||
|
[Dependency] private readonly AtmosphereSystem _atmos = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -54,8 +57,8 @@ namespace Content.Server.RatKing
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all of the nearby disease-carrying entities in a radius
|
/// uses hunger to release a specific amount of miasma into the air. This heals the rat king
|
||||||
/// and gives them the specified disease. It has a hunger cost as well
|
/// and his servants through a specific metabolism.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnDomain(EntityUid uid, RatKingComponent component, RatKingDomainActionEvent args)
|
private void OnDomain(EntityUid uid, RatKingComponent component, RatKingDomainActionEvent args)
|
||||||
{
|
{
|
||||||
@@ -74,17 +77,11 @@ namespace Content.Server.RatKing
|
|||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
hunger.CurrentHunger -= component.HungerPerDomainUse;
|
hunger.CurrentHunger -= component.HungerPerDomainUse;
|
||||||
|
|
||||||
_popup.PopupEntity(Loc.GetString("rat-king-domain-popup"), uid, Filter.Pvs(uid, default, EntityManager));
|
_popup.PopupEntity(Loc.GetString("rat-king-domain-popup"), uid, Filter.Pvs(uid));
|
||||||
|
|
||||||
var tstalker = GetEntityQuery<DiseaseCarrierComponent>();
|
var tileMix = _atmos.GetTileMixture(Transform(uid).Coordinates);
|
||||||
foreach (var entity in _lookup.GetEntitiesInRange(uid, component.DomainRange)) //go through all of them, filtering only those in range that are not the king itself
|
if (tileMix != null)
|
||||||
{
|
tileMix.AdjustMoles(Gas.Miasma, component.MolesMiasmaPerDomain);
|
||||||
if (entity == uid)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (tstalker.TryGetComponent(entity, out var diseasecomp))
|
|
||||||
_disease.TryInfect(diseasecomp, component.DomainDiseaseId); //infect them with w/e disease
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ rat-king-raise-army-name = Raise Army
|
|||||||
rat-king-raise-army-description = Spend some hunger to summon an allied rat to help defend you.
|
rat-king-raise-army-description = Spend some hunger to summon an allied rat to help defend you.
|
||||||
|
|
||||||
rat-king-domain-name = Rat King's Domain
|
rat-king-domain-name = Rat King's Domain
|
||||||
rat-king-domain-description = Spend some hunger to infect those around you with the plague.
|
rat-king-domain-description = Spend some hunger to release a cloud of miasma into the air.
|
||||||
rat-king-domain-popup = A cloud of plague is released into the air!
|
rat-king-domain-popup = A cloud of miasma is released into the air!
|
||||||
|
|
||||||
rat-king-too-hungry = You are too hungry to use this ability!
|
rat-king-too-hungry = You are too hungry to use this ability!
|
||||||
8
Resources/Prototypes/Body/Mechanisms/rat.yml
Normal file
8
Resources/Prototypes/Body/Mechanisms/rat.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
- type: entity
|
||||||
|
id: OrganRatLungs
|
||||||
|
parent: OrganHumanLungs
|
||||||
|
suffix: "rat"
|
||||||
|
components:
|
||||||
|
- type: Metabolizer
|
||||||
|
metabolizerTypes: [ Rat ]
|
||||||
|
|
||||||
39
Resources/Prototypes/Body/Parts/rat.yml
Normal file
39
Resources/Prototypes/Body/Parts/rat.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Just copypasta of some animal basic body parts for interaction,
|
||||||
|
# It's basically as animals except a different torso with different organs
|
||||||
|
- type: entity
|
||||||
|
id: TorsoRat
|
||||||
|
name: "animal torso"
|
||||||
|
parent: PartAnimal
|
||||||
|
noSpawn: true
|
||||||
|
components:
|
||||||
|
- type: BodyPart
|
||||||
|
partType: Torso
|
||||||
|
size: 7
|
||||||
|
compatibility: Biological
|
||||||
|
mechanisms:
|
||||||
|
- OrganRatLungs
|
||||||
|
- OrganHumanStomach
|
||||||
|
- OrganHumanLiver
|
||||||
|
- OrganHumanHeart
|
||||||
|
- OrganHumanKidneys
|
||||||
|
- type: Damageable
|
||||||
|
damageContainer: Biological
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: OrganRatLungs
|
||||||
|
parent: BaseAnimalOrgan
|
||||||
|
name: lungs
|
||||||
|
noSpawn: true
|
||||||
|
components:
|
||||||
|
- type: Mechanism
|
||||||
|
size: 1
|
||||||
|
compatibility: Biological
|
||||||
|
- type: Lung
|
||||||
|
- type: Metabolizer
|
||||||
|
removeEmpty: true
|
||||||
|
solutionOnBody: false
|
||||||
|
solution: "Lung"
|
||||||
|
metabolizerTypes: [ Rat ]
|
||||||
|
groups:
|
||||||
|
- id: Gas
|
||||||
|
rateModifier: 100.0
|
||||||
7
Resources/Prototypes/Body/Presets/rat.yml
Normal file
7
Resources/Prototypes/Body/Presets/rat.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
- type: bodyPreset
|
||||||
|
name: "animal preset"
|
||||||
|
id: RatPreset
|
||||||
|
partIDs:
|
||||||
|
legs: LegsAnimal
|
||||||
|
feet: FeetAnimal
|
||||||
|
torso: TorsoRat
|
||||||
@@ -15,3 +15,6 @@
|
|||||||
|
|
||||||
- type: metabolizerType
|
- type: metabolizerType
|
||||||
id: Vox
|
id: Vox
|
||||||
|
|
||||||
|
- type: metabolizerType
|
||||||
|
id: Rat
|
||||||
|
|||||||
@@ -50,6 +50,9 @@
|
|||||||
types:
|
types:
|
||||||
Slash: 12
|
Slash: 12
|
||||||
Piercing: 8
|
Piercing: 8
|
||||||
|
- type: Body
|
||||||
|
template: AnimalTemplate
|
||||||
|
preset: RatPreset
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
- type: DamageStateVisuals
|
- type: DamageStateVisuals
|
||||||
rotate: true
|
rotate: true
|
||||||
@@ -100,6 +103,13 @@
|
|||||||
amount: 1
|
amount: 1
|
||||||
- type: DiseaseCarrier
|
- type: DiseaseCarrier
|
||||||
carrierDiseases:
|
carrierDiseases:
|
||||||
|
- VentCough
|
||||||
|
- AMIV
|
||||||
|
- SpaceCold
|
||||||
|
- SpaceFlu
|
||||||
|
- Bird Flew
|
||||||
|
- VanAusdallsRobovirus
|
||||||
|
- BleedersBite
|
||||||
- Plague
|
- Plague
|
||||||
- type: SlowOnDamage
|
- type: SlowOnDamage
|
||||||
speedModifierThresholds:
|
speedModifierThresholds:
|
||||||
@@ -117,8 +127,8 @@
|
|||||||
components:
|
components:
|
||||||
- type: CombatMode
|
- type: CombatMode
|
||||||
- type: MovementSpeedModifier
|
- type: MovementSpeedModifier
|
||||||
baseWalkSpeed : 4
|
baseWalkSpeed : 3.5
|
||||||
baseSprintSpeed : 4
|
baseSprintSpeed : 3.5
|
||||||
- type: UtilityAI
|
- type: UtilityAI
|
||||||
behaviorSets:
|
behaviorSets:
|
||||||
- Idle
|
- Idle
|
||||||
@@ -151,8 +161,8 @@
|
|||||||
- type: MobState
|
- type: MobState
|
||||||
thresholds:
|
thresholds:
|
||||||
0: !type:NormalMobState {}
|
0: !type:NormalMobState {}
|
||||||
25: !type:CriticalMobState {}
|
30: !type:CriticalMobState {}
|
||||||
50: !type:DeadMobState {}
|
60: !type:DeadMobState {}
|
||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
range: 1
|
range: 1
|
||||||
arcwidth: 0
|
arcwidth: 0
|
||||||
@@ -160,7 +170,10 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Slash: 5
|
Slash: 5
|
||||||
Piercing: 2
|
Piercing: 3
|
||||||
|
- type: Body
|
||||||
|
template: AnimalTemplate
|
||||||
|
preset: RatPreset
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
- type: DamageStateVisuals
|
- type: DamageStateVisuals
|
||||||
rotate: true
|
rotate: true
|
||||||
@@ -174,6 +187,13 @@
|
|||||||
- type: Puller
|
- type: Puller
|
||||||
- type: DiseaseCarrier
|
- type: DiseaseCarrier
|
||||||
carrierDiseases:
|
carrierDiseases:
|
||||||
|
- VentCough
|
||||||
|
- AMIV
|
||||||
|
- SpaceCold
|
||||||
|
- SpaceFlu
|
||||||
|
- Bird Flew
|
||||||
|
- VanAusdallsRobovirus
|
||||||
|
- BleedersBite
|
||||||
- Plague
|
- Plague
|
||||||
- type: Vocal
|
- type: Vocal
|
||||||
# mice are gender neutral who cares
|
# mice are gender neutral who cares
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
conditions:
|
conditions:
|
||||||
- !type:OrganType
|
- !type:OrganType
|
||||||
type: Animal
|
type: Animal
|
||||||
|
- !type:Oxygenate
|
||||||
|
conditions:
|
||||||
|
- !type:OrganType
|
||||||
|
type: Rat
|
||||||
# Convert Oxygen into CO2.
|
# Convert Oxygen into CO2.
|
||||||
- !type:ModifyLungGas
|
- !type:ModifyLungGas
|
||||||
conditions:
|
conditions:
|
||||||
@@ -157,6 +161,9 @@
|
|||||||
effects:
|
effects:
|
||||||
- !type:ChemCauseRandomDisease
|
- !type:ChemCauseRandomDisease
|
||||||
conditions:
|
conditions:
|
||||||
|
- !type:OrganType
|
||||||
|
type: Rat
|
||||||
|
shouldHave: false
|
||||||
- !type:ReagentThreshold
|
- !type:ReagentThreshold
|
||||||
reagent: Miasma
|
reagent: Miasma
|
||||||
min: 1
|
min: 1
|
||||||
@@ -168,8 +175,12 @@
|
|||||||
- Bird Flew
|
- Bird Flew
|
||||||
- VanAusdallsRobovirus
|
- VanAusdallsRobovirus
|
||||||
- BleedersBite
|
- BleedersBite
|
||||||
|
- Plague
|
||||||
- !type:HealthChange
|
- !type:HealthChange
|
||||||
conditions:
|
conditions:
|
||||||
|
- !type:OrganType
|
||||||
|
type: Rat
|
||||||
|
shouldHave: false
|
||||||
- !type:ReagentThreshold
|
- !type:ReagentThreshold
|
||||||
reagent: Miasma
|
reagent: Miasma
|
||||||
min: 1
|
min: 1
|
||||||
@@ -181,6 +192,23 @@
|
|||||||
- !type:ChemVomit
|
- !type:ChemVomit
|
||||||
probability: 0.12
|
probability: 0.12
|
||||||
conditions:
|
conditions:
|
||||||
|
- !type:OrganType
|
||||||
|
type: Rat
|
||||||
|
shouldHave: false
|
||||||
- !type:ReagentThreshold
|
- !type:ReagentThreshold
|
||||||
reagent: Miasma
|
reagent: Miasma
|
||||||
min: 0.8
|
min: 0.8
|
||||||
|
- !type:HealthChange
|
||||||
|
conditions:
|
||||||
|
- !type:OrganType
|
||||||
|
type: Rat
|
||||||
|
- !type:ReagentThreshold
|
||||||
|
reagent: Miasma
|
||||||
|
min: 1
|
||||||
|
scaleByQuantity: true
|
||||||
|
ignoreResistances: true
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Blunt: -4
|
||||||
|
Slash: -3
|
||||||
|
Piercing: -3
|
||||||
|
|||||||
Reference in New Issue
Block a user