Реворк экспедиций (#360)

* - add: Expedition rework.

* - tweak: Hardsuit tweak.
This commit is contained in:
Aviu00
2024-06-16 15:33:26 +00:00
committed by GitHub
parent b6d9ee496a
commit 3353440a99
19 changed files with 280 additions and 115 deletions

View File

@@ -64,7 +64,7 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
var offering = new OfferingWindowOption();
offering.Title = Loc.GetString($"salvage-expedition-type");
var difficultyId = "Moderate";
var difficultyId = missionParams.Difficulty;
var difficultyProto = _protoManager.Index<SalvageDifficultyPrototype>(difficultyId);
// TODO: Selectable difficulty soon.
var mission = salvage.GetMission(difficultyProto, missionParams.Seed);
@@ -80,7 +80,7 @@ public sealed class SalvageExpeditionConsoleBoundUserInterface : BoundUserInterf
offering.AddContent(new Label
{
Text = Loc.GetString("salvage-expedition-difficulty-Moderate"),
Text = Loc.GetString($"salvage-expedition-difficulty-{difficultyId}"),
FontColorOverride = difficultyColor,
HorizontalAlignment = Control.HAlignment.Left,
Margin = new Thickness(0f, 0f, 0f, 5f),

View File

@@ -18,7 +18,9 @@ public sealed partial class SalvageSystem
* Handles setup / teardown of salvage expeditions.
*/
private const int MissionLimit = 3;
private const int MissionLimit = 5;
private static readonly string[] Difficulties = {"Minimal", "Minor", "Moderate", "Hazardous", "Extreme"};
private readonly JobQueue _salvageQueue = new();
private readonly List<(SpawnSalvageMissionJob Job, CancellationTokenSource CancelToken)> _salvageJobs = new();
@@ -136,7 +138,7 @@ public sealed partial class SalvageSystem
{
Index = component.NextIndex,
Seed = _random.Next(),
Difficulty = "Moderate",
Difficulty = Difficulties[i],
};
component.Missions[component.NextIndex++] = mission;

View File

@@ -3,6 +3,7 @@ using System.Linq;
using System.Numerics;
using System.Threading;
using System.Threading.Tasks;
using Content.Server._White.Other;
using Content.Server.Atmos;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
@@ -118,7 +119,7 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
// Setup mission configs
// As we go through the config the rating will deplete so we'll go for most important to least important.
var difficultyId = "Moderate";
var difficultyId = _missionParams.Difficulty;
var difficultyProto = _prototypeManager.Index<SalvageDifficultyPrototype>(difficultyId);
var mission = _entManager.System<SharedSalvageSystem>()
@@ -304,6 +305,8 @@ public sealed class SpawnSalvageMissionJob : Job<bool>
}
var uid = _entManager.SpawnAtPosition(entry.Proto, grid.GridTileToLocal(tile));
if (_entManager.HasComponent<ExpeditionGhostRoleComponent>(uid))
return;
_entManager.RemoveComponent<GhostRoleComponent>(uid);
_entManager.RemoveComponent<GhostTakeoverAvailableComponent>(uid);
return;

View File

@@ -0,0 +1,6 @@
namespace Content.Server._White.Other;
[RegisterComponent]
public sealed partial class ExpeditionGhostRoleComponent : Component
{
}

View File

@@ -1749,7 +1749,7 @@ namespace Content.Shared.CCVar
/// Cooldown for missions.
/// </summary>
public static readonly CVarDef<float>
SalvageExpeditionCooldown = CVarDef.Create("salvage.expedition_cooldown", 780f, CVar.REPLICATED);
SalvageExpeditionCooldown = CVarDef.Create("salvage.expedition_cooldown", 300f, CVar.REPLICATED);
/*
* Flavor

View File

@@ -85,7 +85,7 @@ public sealed record SalvageMissionParams
[ViewVariables(VVAccess.ReadWrite)] public int Seed;
public string Difficulty = string.Empty;
public string Difficulty = "Moderate";
}
/// <summary>

View File

@@ -1,4 +1,5 @@
using Content.Shared.Damage;
using Content.Shared.Mobs.Systems;
using Content.Shared.Projectiles;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Audio;
@@ -15,6 +16,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
[Dependency] private readonly INetManager _netManager = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly DamageableSystem _damageable = default!;
[Dependency] private readonly MobStateSystem _mobState = default!; // WD
public override void Initialize()
{
@@ -32,7 +34,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
RemCompDeferred<DamageMarkerComponent>(uid);
_audio.PlayPredicted(component.Sound, uid, args.User);
if (TryComp<LeechOnMarkerComponent>(args.Used, out var leech))
if (TryComp<LeechOnMarkerComponent>(args.Used, out var leech) && !_mobState.IsDead(uid)) // WD EDIT
{
_damageable.TryChangeDamage(args.User, leech.Leech, true, false, origin: args.Used);
}

View File

@@ -144,10 +144,11 @@
- type: Armor
modifiers:
coefficients:
Blunt: 0.7
Slash: 0.7
Piercing: 0.5
Blunt: 0.6
Slash: 0.6
Piercing: 0.7
Radiation: 0.3
Heat: 0.8
Caustic: 0.7
- type: ClothingSpeedModifier
walkModifier: 0.85
@@ -180,6 +181,7 @@
Piercing: 0.5
Heat: 0.3
Radiation: 0.1
Caustic: 0.5
- type: ExplosionResistance
damageCoefficient: 0.2
- type: TemperatureProtection

View File

@@ -61,9 +61,8 @@
soundHit:
path: /Audio/Effects/bite.ogg
damage:
types:
Piercing: 5
Slash: 10
groups:
Brute: 15
- type: TypingIndicator
proto: alien
- type: Tag
@@ -80,6 +79,9 @@
interactFailureSound:
path: /Audio/Effects/bite.ogg
- type: Penetrated
- type: NightVision
toggleSound: null
color: "#404040"
- type: entity
parent: BaseMobCarp
@@ -98,6 +100,8 @@
alive: Rainbow
enum.DamageStateVisualLayers.BaseUnshaded:
mouth: ""
- type: MovementSpeedModifier
baseSprintSpeed: 6
- type: entity
name: magicarp
@@ -178,13 +182,10 @@
thresholds:
0: Alive
50: Dead
- type: SlowOnDamage
speedModifierThresholds:
25: 0.7
- type: MeleeWeapon
damage:
types:
Slash: 6
groups:
Brute: 7.5
- type: entity
name: sharkminnow
@@ -234,8 +235,9 @@
amount: 4
- type: MeleeWeapon
damage:
groups:
Brute: 15
types:
Slash: 12
Bloodloss: 5
- type: entity

View File

@@ -118,6 +118,9 @@
- type: Grammar
attributes:
gender: male
- type: NightVision
toggleSound: null
color: "#404040"
- type: entity
id: MobRatKingBuff

View File

@@ -67,7 +67,7 @@
50: Dead
- type: SlowOnDamage
speedModifierThresholds:
25: 0.5
40: 0.7
- type: Stamina
critThreshold: 200
- type: Bloodstream
@@ -81,7 +81,7 @@
animation: WeaponArcBite
damage:
groups:
Brute: 6
Brute: 10
- type: DamageStateVisuals
rotate: true
states:
@@ -121,6 +121,9 @@
molsPerSecondPerUnitMass: 0.0005
- type: Speech
speechVerb: LargeMob
- type: NightVision
toggleSound: null
color: "#404040"
- type: entity
name: Praetorian
@@ -137,12 +140,12 @@
- type: MobThresholds
thresholds:
0: Alive
100: Dead
150: Dead
- type: Stamina
critThreshold: 300
- type: SlowOnDamage
speedModifierThresholds:
50: 0.7
130: 0.7
- type: Fixtures
fixtures:
fix1:
@@ -154,6 +157,11 @@
- MobMask
layer:
- MobLayer
- type: MeleeWeapon
animation: WeaponArcBite
damage:
groups:
Brute: 20
- type: entity
name: Drone
@@ -170,16 +178,17 @@
- type: MobThresholds
thresholds:
0: Alive
80: Dead
150: Dead
- type: SlowOnDamage
speedModifierThresholds:
40: 0.7
130: 0.7
- type: MeleeWeapon
damage:
groups:
Brute: 6
Brute: 15
- type: MovementSpeedModifier
baseSprintSpeed: 4
baseWalkSpeed: 2.0
baseSprintSpeed: 2.5
- type: Fixtures
fixtures:
fix1:
@@ -210,12 +219,12 @@
300: Dead
- type: SlowOnDamage
speedModifierThresholds:
150: 0.7
270: 0.7
- type: MovementSpeedModifier
- type: MeleeWeapon
damage:
groups:
Brute: 12
Brute: 25
- type: Fixtures
fixtures:
fix1:
@@ -230,6 +239,7 @@
- type: Tag
tags:
- CannotSuicide
- type: ExpeditionGhostRole
- type: entity
name: Ravager
@@ -252,10 +262,10 @@
- type: MeleeWeapon
damage:
groups:
Brute: 10
Brute: 20
- type: SlowOnDamage
speedModifierThresholds:
50: 0.7
80: 0.7
- type: Fixtures
fixtures:
fix1:
@@ -285,7 +295,7 @@
- type: MeleeWeapon
damage:
groups:
Brute: 5
Brute: 8
- type: Fixtures
fixtures:
fix1:
@@ -331,7 +341,7 @@
50: Dead
- type: SlowOnDamage
speedModifierThresholds:
25: 0.7
40: 0.7
- type: HTN
rootTask:
task: SimpleRangedHostileCompound

View File

@@ -14,6 +14,9 @@
makeSentient: true
name: ghost-role-information-space-dragon-name
description: ghost-role-information-space-dragon-description
- type: SlowOnDamage
speedModifierThresholds:
270: 0.7
- type: GhostTakeoverAvailable
- type: HTN
rootTask:
@@ -108,9 +111,8 @@
soundHit:
path: /Audio/Weapons/Xeno/alien_claw_flesh3.ogg
damage:
types:
Piercing: 15
Slash: 15
groups:
Brute: 30
- type: Devourer
foodPreference: Humanoid
shouldStoreDevoured: true
@@ -126,6 +128,9 @@
tags:
- CannotSuicide
- DoorBumpOpener
- type: NightVision
toggleSound: null
color: "#404040"
- type: entity
parent: BaseMobDragon
@@ -146,18 +151,16 @@
components:
- type: GhostRole
description: ghost-role-information-space-dragon-dungeon-description
- type: SlowOnDamage
speedModifierThresholds:
100: 0.7
- type: MobThresholds
thresholds:
0: Alive
200: Dead
# less meat spawned since it's a lot easier to kill
- type: Butcherable
spawned:
- id: FoodMeatDragon
amount: 1
- type: MeleeWeapon
damage:
groups:
Brute: 20
- type: ExpeditionGhostRole
- type: entity
id: ActionSpawnRift

View File

@@ -43,7 +43,6 @@
capacity: 1
count: 1
- type: MeleeWeapon
attackRate: 1.5
wideAnimationRotation: -135
damage:
types:
@@ -55,8 +54,8 @@
- type: IncreaseDamageOnWield
damage:
types:
Blunt: 2.5
Slash: 2.5
Blunt: 5
Slash: 5
Structural: 30
- type: GunRequiresWield
- type: Item

View File

@@ -327,6 +327,7 @@
radius: 1.8
energy: 1.6
color: "#3db83b"
- type: CargoSellBlacklist
- type: entity
parent: VendingMachine

View File

@@ -1,11 +1,43 @@
- type: salvageDifficulty
id: Minimal
lootBudget: 10
mobBudget: 10
modifierBudget: 1
color: "#9FED5896"
recommendedPlayers: 1
- type: salvageDifficulty
id: Minor
lootBudget: 30
mobBudget: 30
modifierBudget: 1
color: "#EFB34196"
recommendedPlayers: 2
- type: salvageDifficulty
id: Moderate
lootBudget: 30
mobBudget: 25
lootBudget: 50
mobBudget: 50
modifierBudget: 2
color: "#52B4E996"
recommendedPlayers: 2
- type: salvageDifficulty
id: Hazardous
lootBudget: 70
mobBudget: 70
modifierBudget: 2
color: "#DE3A3A96"
recommendedPlayers: 3
- type: salvageDifficulty
id: Extreme
lootBudget: 100
mobBudget: 100
modifierBudget: 3
color: "#D381C996"
recommendedPlayers: 4
#9FED5896
#EFB34196
#DE3A3A96

View File

@@ -12,10 +12,13 @@
prob: 0.02
- proto: MobXenoRavager
cost: 5
- proto: MobXenoRunner
cost: 2
- proto: MobXenoRouny
cost: 3
prob: 0.02
- proto: MobXenoSpitter
cost: 3
- proto: WeaponTurretXeno
prob: 0.1
configs:
@@ -27,17 +30,20 @@
entries:
- proto: MobCarpDungeon
# These do too much damage for salvage, need nerfs
#- proto: MobCarpHolo
# cost: 5
# prob: 0.1
#- proto: MobCarpMagic
# cost: 5
# prob: 0.1
- proto: MobCarpRainbow # carp version of rouny...
cost: 3
- proto: MobCarpHolo
cost: 5
prob: 0.05
- proto: MobCarpMagic
cost: 4
prob: 0.1
- proto: MobCarpRainbow # carp version of rouny...
cost: 6
prob: 0.05
- proto: MobShark
cost: 8
prob: 0.035
- proto: MobDragonDungeon
cost: 10
cost: 12
prob: 0.02
configs:
DefenseStructure: CarpStatue

View File

@@ -105,6 +105,100 @@
- proto: WeaponTeslaGun
prob: 0.1
cost: 2
- proto: EnergyBattleAxe
prob: 0.1
cost: 8
- proto: WeaponRifleAk
cost: 5
- proto: TimeBeacon
cost: 2
prob: 0.5
- proto: ClothingBackpackDuffelSyndicateFilledSMG
cost: 6
prob: 0.5
- proto: ClothingBackpackDuffelSyndicateFilledShotgun
cost: 8
prob: 0.5
- proto: BriefcaseSyndieSniperBundleFilled
cost: 10
prob: 0.5
- proto: ClothingBackpackDuffelSyndicateFilledLMG
cost: 12
prob: 0.5
- proto: WeaponRevolverMateba
cost: 5
- proto: WeaponRevolverDeckard
cost: 4
- proto: ExGrenade
cost: 3
- proto: SupermatterGrenade
cost: 5
- proto: WhiteholeGrenade
cost: 3
- proto: ClothingOuterHardsuitMaxim
cost: 5
- proto: GrenadeIncendiary
cost: 4
- proto: ExperimentalSyndicateTeleporter
cost: 8
prob: 0.5
- proto: ClothingHeadHelmetSwat
cost: 4
- proto: ClothingBeltMilitaryWebbing
cost: 2
- proto: ClothingOuterVestWeb
cost: 5
- proto: ClothingEyesNightVisionGoggles
cost: 5
- proto: ClothingHandsGlovesCombat
cost: 3
- proto: Katana
cost: 3
- proto: WeaponMakeshiftLaser
cost: 4
- proto: WeaponLaserGun
cost: 5
- proto: WeaponEgun
cost: 5
- proto: WeaponXrayCannon
cost: 6
- proto: WeaponLaserCannon
cost: 6
- proto: WeaponTempGun
cost: 4
- proto: WeaponAdvancedLaser
cost: 10
prob: 0.5
- proto: Stimpack
cost: 6
- proto: StimkitFilled
cost: 8
prob: 0.5
- proto: CrateSecurityRiot
cost: 5
prob: 0.5
- proto: CrateSecurityNonlethal
cost: 4
prob: 0.5
- proto: ClothingShoesBootsMagSyndie
cost: 5
- proto: JetpackBlackFilled
cost: 3
- proto: WeaponLauncherRocket
cost: 8
- proto: WeaponLauncherPirateCannon
cost: 5
- proto: LightModule
cost: 2
- proto: LaserModule
cost: 4
- proto: FlameHiderModule
cost: 2
- proto: SilencerModule
cost: 3
- proto: AcceleratorModule
cost: 5
# Mob loot table

View File

@@ -60,60 +60,60 @@
id: RoomTemp
cost: 0
- type: salvageTemperatureMod
id: Hot
cost: 1
temperature: 323.15 # 50C
biomes:
- Caves
#- LowDesert
- Grasslands
- Lava
- type: salvageTemperatureMod
id: Burning
desc: High temperature
cost: 2
temperature: 423.15 # 200C
biomes:
- Caves
#- LowDesert
- Lava
- type: salvageTemperatureMod
id: Melting
desc: Extreme heat
cost: 4
temperature: 1273.15 # 1000C hot hot hot
biomes:
- Lava
- type: salvageTemperatureMod
id: Cold
cost: 1
temperature: 275.15 # 2C
biomes:
- Caves
#- LowDesert
- Grasslands
- Snow
- type: salvageTemperatureMod
id: Tundra
desc: Low temperature
cost: 2
temperature: 263.15 # -40C
biomes:
- Caves
- Snow
- type: salvageTemperatureMod
id: Frozen
desc: Extreme cold
cost: 4
temperature: 123.15 # -150C
biomes:
- Snow
#- type: salvageTemperatureMod
# id: Hot
# cost: 1
# temperature: 323.15 # 50C
# biomes:
# - Caves
# #- LowDesert
# - Grasslands
# - Lava
#
#- type: salvageTemperatureMod
# id: Burning
# desc: High temperature
# cost: 2
# temperature: 423.15 # 200C
# biomes:
# - Caves
# #- LowDesert
# - Lava
#
#- type: salvageTemperatureMod
# id: Melting
# desc: Extreme heat
# cost: 4
# temperature: 1273.15 # 1000C hot hot hot
# biomes:
# - Lava
#
#- type: salvageTemperatureMod
# id: Cold
# cost: 1
# temperature: 275.15 # 2C
# biomes:
# - Caves
# #- LowDesert
# - Grasslands
# - Snow
#
#- type: salvageTemperatureMod
# id: Tundra
# desc: Low temperature
# cost: 2
# temperature: 263.15 # -40C
# biomes:
# - Caves
# - Snow
#
#- type: salvageTemperatureMod
# id: Frozen
# desc: Extreme cold
# cost: 4
# temperature: 123.15 # -150C
# biomes:
# - Snow
# Air mixtures
- type: salvageAirMod
@@ -242,7 +242,7 @@
proto: SnowyLabs
biomes:
- Snow
- type: salvageDungeonMod
id: Haunted
proto: Haunted

View File

@@ -1,4 +1,4 @@
- type: cargoProduct
- type: cargoProduct
id: CratePaper
icon:
sprite: Objects/Materials/Sheets/other.rsi
@@ -273,6 +273,6 @@
sprite: Clothing/Head/Hardsuits/security.rsi
state: icon-flash
product: CrateSecurityVoidsuit
cost: 4000
cost: 10000
category: Security
group: market