// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com> // SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com> // SPDX-FileCopyrightText: 2025 Misandry // SPDX-FileCopyrightText: 2025 gus // // SPDX-License-Identifier: AGPL-3.0-or-later using Content.Shared._Shitcode.Wizard.Mutate; using Content.Shared.Weapons.Ranged.Events; namespace Content.Shared.Weapons.Ranged.Systems; public abstract partial class SharedGunSystem { protected virtual void InitializeBasicHitScan() { SubscribeLocalEvent(OnBasicHitscanTakeAmmo); SubscribeLocalEvent(OnBasicHitscanAmmoCount); } private void OnBasicHitscanAmmoCount(Entity ent, ref GetAmmoCountEvent args) { args.Capacity = int.MaxValue; args.Count = int.MaxValue; } private void OnBasicHitscanTakeAmmo(Entity ent, ref TakeAmmoEvent args) { for (var i = 0; i < args.Shots; i++) { args.Ammo.Add((null, ProtoManager.Index(ent.Comp.Proto))); } } }