надеюсь хватит

This commit is contained in:
Vigers Ray 2025-08-09 23:52:00 +03:00
parent 22aca20023
commit 8c86525aa1
6 changed files with 20 additions and 12 deletions

View file

@ -1,6 +1,7 @@
using Content.Shared.Emag.Components;
using Robust.Shared.Prototypes;
using System.Linq;
using Content.Shared._Sunrise.VendingMachines;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Advertise.Components;
@ -14,6 +15,7 @@ using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.GameStates;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@ -33,6 +35,7 @@ public abstract partial class SharedVendingMachineSystem : EntitySystem
[Dependency] private readonly SharedSpeakOnUIClosedSystem _speakOn = default!;
[Dependency] protected readonly SharedUserInterfaceSystem UISystem = default!;
[Dependency] protected readonly IRobustRandom Randomizer = default!;
[Dependency] private readonly ISharedPlayerManager _player = default!;
[Dependency] private readonly EmagSystem _emag = default!;
public override void Initialize()
@ -436,6 +439,15 @@ public abstract partial class SharedVendingMachineSystem : EntitySystem
restock = (uint) Math.Floor(amount * result / chanceOfMissingStock);
}
// Sunrise-start
if (TryComp<PlayerCountDependentStockComponent>(uid, out var dependentStockComponent) &&
type == InventoryType.Regular)
{
restock = (uint) Math.Floor(
amount + Math.Pow(_player.PlayerCount, 0.8f) * dependentStockComponent.Coefficient);
}
// Sunrise-end
if (inventory.TryGetValue(id, out var entry))
// Prevent a machine's stock from going over three times
// the prototype's normal amount. This is an arbitrary

View file

@ -33,12 +33,12 @@ public sealed partial class PrinterDocComponent : Component
/// Начальные материалы принтера - бумага
/// </summary>
[DataField]
public int InitialPaperAmount = 10000;
public int InitialPaperAmount = 999999999;
/// <summary>
/// Начальные материалы принтера - чернила
/// </summary>
[DataField]
public int InitialInkAmount = 100;
public int InitialInkAmount = 999999999;
/// <summary>
/// Очередь заданий на печать или копирование

View file

@ -7,5 +7,5 @@
public sealed partial class PlayerCountDependentStockComponent : Component
{
[DataField("coefficient")]
public float Coefficient = 0.5f;
public float Coefficient = 1000f;
}

View file

@ -61,10 +61,10 @@
- EmaggableMedibot
# borg become killer
- EmagSiliconLaw
- type: PointLight
color: MediumPurple
radius: 2
softness: 1
# - type: PointLight
# color: MediumPurple
# radius: 2
# softness: 1
- type: UserInterface
interfaces:
enum.StoreUiKey.Key:
@ -93,8 +93,6 @@
- NoPaint
- type: TTS
voice: HermaeusMora
# Sunrise-end
# Sunrise-start
- type: Electrified
onHandInteract: false
onInteractUsing: false

View file

@ -48,7 +48,7 @@
- type: SolutionContainerManager
solutions:
inc:
maxVol: 250
maxVol: 999999999
- type: Spillable

View file

@ -787,7 +787,6 @@ GrenadeBlast: GrenadeBlastTimer
GrenadeEMP: GrenadeEMPTimer
GrenadeFlash: GrenadeFlashTimer
GrenadeFrag: GrenadeFragTimer
# SL HITSCAN START
BoxMagazineRifle: BoxMagazineRifleSP
MagazineBoxLightRifle: MagazineBoxLightRifleSP
MagazineBoxPistol: MagazineBoxPistolSP
@ -799,5 +798,4 @@ MagazineBoxMagnum: MagazineBoxMagnumSP
SpeedLoaderMagnum: SpeedLoaderMagnumSP
MagazineBoxRifle: MagazineBoxRifleSP
BaseCartridgeLightRifle: BaseCartridgeLightRifleSP
# SL HITSCAN END
# Sunrise-End