Fix some Build Warnings
This commit is contained in:
parent
d7b086865b
commit
a9eeb98744
|
|
@ -19,13 +19,18 @@ public sealed class ContentNetworkResourceManager
|
|||
{
|
||||
_cfgManager.OnValueChanged(CCVars.ResourceUploadingStoreEnabled, value => StoreUploaded = value, true);
|
||||
AutoDelete(_cfgManager.GetCVar(CCVars.ResourceUploadingStoreDeletionDays));
|
||||
_netRes.OnResourceUploaded += OnUploadResource;
|
||||
_netRes.ResourcesUploaded += OnUploadResource;
|
||||
}
|
||||
|
||||
private async void OnUploadResource(ICommonSession session, NetworkResourceUploadMessage msg)
|
||||
private async void OnUploadResource(NetworkResourcesUploadedEvent msg)
|
||||
{
|
||||
if (StoreUploaded)
|
||||
await _serverDb.AddUploadedResourceLogAsync(session.UserId, DateTime.Now, msg.RelativePath.ToString(), msg.Data);
|
||||
{
|
||||
foreach(var file in msg.Files)
|
||||
{
|
||||
await _serverDb.AddUploadedResourceLogAsync(msg.Session.UserId, DateTime.Now, file.Relative.ToString(), file.Data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async void AutoDelete(int days)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using Content.Shared.Audio;
|
|||
using Content.Shared.CartridgeLoader;
|
||||
using Content.Shared._DV.CartridgeLoader.Cartridges;
|
||||
using Content.Shared._DV.NanoChat;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.CartridgeLoader.Cartridges;
|
||||
|
|
@ -65,10 +66,13 @@ public sealed partial class LogProbeCartridgeSystem
|
|||
EntityUid target,
|
||||
NanoChatCardComponent card)
|
||||
{
|
||||
var param = new AudioParams();
|
||||
param.Variation = 0.25f;
|
||||
|
||||
_audio.PlayEntity(ent.Comp.SoundScan,
|
||||
args.InteractEvent.User,
|
||||
target,
|
||||
AudioHelpers.WithVariation(0.25f, _random));
|
||||
param);
|
||||
_popup.PopupCursor(Loc.GetString("log-probe-scan-nanochat", ("card", target)), args.InteractEvent.User);
|
||||
|
||||
ent.Comp.PulledAccessLogs.Clear();
|
||||
|
|
|
|||
|
|
@ -6,14 +6,11 @@ using Content.Shared.Damage.Systems;
|
|||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Light.Components;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mindshield.Components;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.NPC;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.StatusEffectNew;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
|
|
@ -100,7 +97,7 @@ public sealed class CosmicSiphonSystem : EntitySystem
|
|||
Dirty(ent, ent.Comp);
|
||||
if (_cosmicCult.EntityIsCultist(target))
|
||||
{
|
||||
_statusEffects.TryAddStatusEffect<CosmicEntropyDebuffComponent>(target, "EntropicDegen", TimeSpan.FromSeconds(_random.Next(21) + 40), true); //40-60 seconds, 4-6 cold damage per siphon
|
||||
_statusEffects.TryAddStatusEffectDuration(target, "EntropicDegen", out _, TimeSpan.FromSeconds(_random.Next(21) + 40)); //40-60 seconds, 4-6 cold damage per siphon
|
||||
_popup.PopupEntity(Loc.GetString("cosmicability-siphon-cultist-success", ("target", Identity.Entity(target, EntityManager))), ent, ent);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ using Content.Shared.Inventory.Events;
|
|||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Polymorph;
|
||||
using Content.Shared.Speech.Components;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.StatusEffectNew;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.EntitySerialization.Systems;
|
||||
|
|
@ -67,7 +67,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
|||
private readonly ResPath _mapPath = new("Maps/_DV/Nonstations/cosmicvoid.yml");
|
||||
|
||||
private static readonly EntProtoId CosmicEchoVfx = "CosmicEchoVfx";
|
||||
private static readonly ProtoId<StatusEffectPrototype> EntropicDegen = "EntropicDegen";
|
||||
private static readonly string EntropicDegen = "EntropicDegen";
|
||||
private static readonly ProtoId<RadioChannelPrototype> CosmicRadio = "CosmicRadio";
|
||||
|
||||
public override void Initialize()
|
||||
|
|
@ -173,7 +173,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
|||
{
|
||||
if (!EntityIsCultist(args.Equipee))
|
||||
{
|
||||
_statusEffects.TryAddStatusEffect<CosmicEntropyDebuffComponent>(args.Equipee, EntropicDegen, TimeSpan.FromDays(1), true); // TimeSpan.MaxValue causes a crash here, so we use FromDays(1) instead.
|
||||
_statusEffects.TryAddStatusEffectDuration(args.Equipee, EntropicDegen, out _, TimeSpan.FromDays(1)); // TimeSpan.MaxValue causes a crash here, so we use FromDays(1) instead.
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(args.Equipee, out var comp)) comp.Degen = new(){DamageDict = new(){{"Cold", 0.5}, {"Asphyxiation", 1.5}, {"Ion", 1.5}}};
|
||||
}
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
|||
{
|
||||
if (!EntityIsCultist(args.User))
|
||||
{
|
||||
_statusEffects.TryAddStatusEffect<CosmicEntropyDebuffComponent>(args.User, EntropicDegen, TimeSpan.FromDays(1), true);
|
||||
_statusEffects.TryAddStatusEffectDuration(args.User, EntropicDegen, out _, TimeSpan.FromDays(1));
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(args.User, out var comp)) comp.Degen = new(){DamageDict = new(){{"Cold", 0.5}, {"Asphyxiation", 1.5}, {"Ion", 1.5}}};
|
||||
_popup.PopupEntity(Loc.GetString("cosmiccult-gear-pickup", ("ITEM", args.Equipped)), args.User, args.User, PopupType.MediumCaution);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,12 @@ using Content.Server.Bible.Components;
|
|||
using Content.Server.Popups;
|
||||
using Content.Shared._DV.CosmicCult;
|
||||
using Content.Shared._DV.CosmicCult.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.StatusEffectNew;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
|
|
@ -71,7 +70,7 @@ public sealed class CosmicRiftSystem : EntitySystem
|
|||
if (!_random.Prob(comp.PulseProb)) continue;
|
||||
var damageMultiplier = Math.Clamp(comp.PulseRange / distance, 1, 10); //0.2 damage per second at max distance, up to 2 per second if closer
|
||||
var effectDuration = _random.Next(10, 40); //2-8 damage at max distance, 20-80 damage at min distance
|
||||
_statusEffects.TryAddStatusEffect<CosmicEntropyDebuffComponent>(mob, "EntropicDegen", TimeSpan.FromSeconds(effectDuration), true);
|
||||
_statusEffects.TryAddStatusEffectDuration(mob, "EntropicDegen", out _, TimeSpan.FromSeconds(effectDuration));
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(mob, out var debuff)) debuff.Degen =
|
||||
new(){DamageDict = new(){
|
||||
{"Cold", 0.05 * damageMultiplier},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using Content.Shared._DV.Psionics.Systems;
|
|||
using Content.Shared.GameTicking.Components;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.StatusEffectNew;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server._DV.StationEvents.GameRules;
|
||||
|
|
@ -40,10 +40,9 @@ internal sealed class NoosphericSilenceRule : StationEventSystem<NoosphericSilen
|
|||
var duration = _robustRandom.Next(ruleComp.MinDuration, ruleComp.MaxDuration);
|
||||
|
||||
// TODO Replace with statusEffectSystemNew when Upstream makes a muted prototype.
|
||||
_statusEffectsSystem.TryAddStatusEffect(potPsion,
|
||||
_statusEffectsSystem.TryAddStatusEffectDuration(potPsion,
|
||||
"Muted",
|
||||
duration,
|
||||
false,
|
||||
"Muted");
|
||||
out _,
|
||||
duration);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using Content.Server._DV.Weather;
|
||||
using Content.Shared.Damage.Systems;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Mobs.Components;
|
||||
|
|
@ -6,7 +5,7 @@ using Content.Shared.Weather;
|
|||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared._DV.Weather;
|
||||
namespace Content.Server._DV.Weather;
|
||||
|
||||
/// <summary>
|
||||
/// Handles weather damage for exposed entities.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using Content.Shared.Chat;
|
|||
using Content.Shared.Weather;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public sealed class FishingSystem : SharedFishingSystem
|
|||
// works janky on clientside so we can't predict when fishing starts.
|
||||
[Dependency] private readonly IComponentFactory _compFactory = default!;
|
||||
[Dependency] private readonly IPrototypeManager _proto = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly RobustRandom _random = default!;
|
||||
[Dependency] private readonly PhysicsSystem _physics = default!;
|
||||
|
||||
public override void Initialize()
|
||||
|
|
@ -78,7 +78,7 @@ public sealed class FishingSystem : SharedFishingSystem
|
|||
activeFishSpot.FishDifficulty = fishComp?.FishDifficulty ?? FishComponent.DefaultDifficulty;
|
||||
|
||||
// Assign things that depend on the spot
|
||||
var time = spotComp.FishDefaultTimer + _random.NextFloat(-spotComp.FishTimerVariety, spotComp.FishTimerVariety);
|
||||
var time = spotComp.FishDefaultTimer + _random.NextFloat() * spotComp.FishTimerVariety - _random.NextFloat() * spotComp.FishTimerVariety;
|
||||
activeFishSpot.FishingStartTime = Timing.CurTime + TimeSpan.FromSeconds(time);
|
||||
activeFishSpot.AttachedFishingLure = ent;
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ public sealed class FishingSystem : SharedFishingSystem
|
|||
if (Timing.CurTime < fisher.Comp.NextStruggle)
|
||||
return;
|
||||
|
||||
fisher.Comp.NextStruggle = Timing.CurTime + TimeSpan.FromSeconds(_random.NextFloat(0.06f, 0.18f));
|
||||
fisher.Comp.NextStruggle = Timing.CurTime + TimeSpan.FromSeconds(0.06f + _random.NextFloat() * 0.12f);
|
||||
fisher.Comp.TotalProgress -= activeSpotComp.FishDifficulty;
|
||||
Dirty(fisher);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,23 +34,11 @@ public sealed partial class ThavenMoodsSystem : SharedThavenMoodSystem
|
|||
public IReadOnlyList<ThavenMood> SharedMoods => _sharedMoods.AsReadOnly();
|
||||
private readonly List<ThavenMood> _sharedMoods = new();
|
||||
|
||||
|
||||
[ValidatePrototypeId<DatasetPrototype>]
|
||||
private const string SharedDataset = "ThavenMoodsShared";
|
||||
|
||||
[ValidatePrototypeId<DatasetPrototype>]
|
||||
private const string YesAndDataset = "ThavenMoodsYesAnd";
|
||||
|
||||
[ValidatePrototypeId<DatasetPrototype>]
|
||||
private const string NoAndDataset = "ThavenMoodsNoAnd";
|
||||
|
||||
[ValidatePrototypeId<DatasetPrototype>]
|
||||
private const string WildcardDataset = "ThavenMoodsWildcard";
|
||||
|
||||
[ValidatePrototypeId<EntityPrototype>]
|
||||
private const string ActionViewMoods = "ActionViewMoods";
|
||||
|
||||
[ValidatePrototypeId<WeightedRandomPrototype>]
|
||||
private const string RandomThavenMoodDataset = "RandomThavenMoodDataset";
|
||||
|
||||
public override void Initialize()
|
||||
|
|
|
|||
Loading…
Reference in New Issue