Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@ public sealed partial class GatheringProjectileComponent : Component
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("amount")]
public int Amount = 1;

/// <summary>
/// Goobstation
/// The probability that the given projectile will actually be gathering
/// </summary>
[DataField]
public float Probability = 1f;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public record struct GunRefreshModifiersEvent(
Angle MinAngle,
int ShotsPerBurst,
float FireRate,
float ProjectileSpeed
float ProjectileSpeed,
float BurstFireRate, // Goobstation
float BurstCooldown // Goobstation
);
6 changes: 5 additions & 1 deletion Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,11 @@ public void RefreshModifiers(Entity<GunComponent?> gun)
comp.MinAngle,
comp.ShotsPerBurst,
comp.FireRate,
comp.ProjectileSpeed
// Goobstation Lavaland PKAs Start
comp.ProjectileSpeed,
comp.BurstFireRate,
comp.BurstCooldown
// Goobstation Lavaland PKAs end
);

// Begin DeltaV additions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared._Lavaland.Weapons.Ranged.Upgrades;
using Content.Shared.Damage;
using Robust.Shared.GameStates;

Expand All @@ -6,12 +7,16 @@ namespace Content.Shared.Weapons.Ranged.Upgrades.Components;
/// <summary>
/// A <see cref="GunUpgradeComponent"/> for increasing the damage of a gun's projectile.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(GunUpgradeSystem))]
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGunUpgradeSystem))] // Goobstation - Swapped from GunUpgradeSystem to SharedGunUpgradeSystem
public sealed partial class GunUpgradeDamageComponent : Component
{
[DataField]
public DamageSpecifier? BonusDamage;

/// <summary>
/// Additional damage added onto the projectile's base damage.
/// Goobstation
/// How much should we multiply the total projectile's damage.
/// </summary>
[DataField]
public DamageSpecifier Damage = new();
public float Modifier = 1f;
}
18 changes: 12 additions & 6 deletions Content.Shared/Weapons/Ranged/Upgrades/GunUpgradeSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Linq;
using Content.Shared._DV.Weapons.Ranged.Upgrades; // DeltaV
using Content.Shared._DV.Weapons.Ranged.Upgrades; // DeltaV
using Content.Shared.Weapons.Ranged.Upgrades.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Examine;
Expand All @@ -9,7 +10,6 @@
using Content.Shared.Tag;
using Content.Shared.Weapons.Ranged.Events;
using Content.Shared.Weapons.Ranged.Systems;
using Content.Shared.Weapons.Ranged.Upgrades.Components;
using Content.Shared.Whitelist;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
Expand Down Expand Up @@ -106,12 +106,12 @@ private void OnAfterInteractUsing(Entity<UpgradeableGunComponent> ent, ref After
// End DeltaV Additions
}

private void OnFireRateRefresh(Entity<GunUpgradeFireRateComponent> ent, ref GunRefreshModifiersEvent args)
private void OnFireRateRefresh(Entity<Components.GunUpgradeFireRateComponent> ent, ref GunRefreshModifiersEvent args)
{
args.FireRate *= ent.Comp.Coefficient;
}

private void OnSpeedRefresh(Entity<GunUpgradeSpeedComponent> ent, ref GunRefreshModifiersEvent args)
private void OnSpeedRefresh(Entity<Components.GunUpgradeSpeedComponent> ent, ref GunRefreshModifiersEvent args)
{
args.ProjectileSpeed *= ent.Comp.Coefficient;
}
Expand All @@ -120,8 +120,14 @@ private void OnDamageGunShot(Entity<GunUpgradeDamageComponent> ent, ref GunShotE
{
foreach (var (ammo, _) in args.Ammo)
{
if (TryComp<ProjectileComponent>(ammo, out var proj))
proj.Damage += ent.Comp.Damage;
// Goobstation - Lavaland PKAs Start
if (!TryComp<ProjectileComponent>(ammo, out var projectile))
continue;
var multiplier = 1f;
if (ent.Comp.BonusDamage != null)
projectile.Damage += ent.Comp.BonusDamage * multiplier;
projectile.Damage *= ent.Comp.Modifier;
// Goobstation - Lavaland PKAs Start
}
}

Expand Down
19 changes: 19 additions & 0 deletions Content.Shared/_Lavaland/Body/CursedHeartComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Content.Shared.Actions;
using Robust.Shared.GameStates;

namespace Content.Shared._Lavaland.Body;

[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState]
public sealed partial class CursedHeartComponent : Component
{
[AutoNetworkedField]
public EntityUid? PumpActionEntity;

public TimeSpan LastPump = TimeSpan.Zero;

[DataField]
public float MaxDelay = 5f;
}

public sealed partial class PumpHeartActionEvent : InstantActionEvent;
25 changes: 25 additions & 0 deletions Content.Shared/_Lavaland/Body/CursedHeartGrantComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
// SPDX-FileCopyrightText: 2025 Aineias1 <dmitri.s.kiselev@gmail.com>
// SPDX-FileCopyrightText: 2025 FaDeOkno <143940725+FaDeOkno@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
// SPDX-FileCopyrightText: 2025 McBosserson <148172569+McBosserson@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Milon <plmilonpl@gmail.com>
// SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
// SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Unlumination <144041835+Unlumy@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
// SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
// SPDX-FileCopyrightText: 2025 username <113782077+whateverusername0@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 whateverusername0 <whateveremail>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

namespace Content.Shared._Lavaland.Body;

[RegisterComponent]
public sealed partial class CursedHeartGrantComponent : Component;
105 changes: 105 additions & 0 deletions Content.Shared/_Lavaland/Body/CursedHeartSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
using Content.Shared.Actions;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Interaction.Events;
using Content.Shared.Mobs;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Popups;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Content.Shared._Shitmed.Targeting; // Shitmed Change
using Content.Shared.Damage.Systems; // Shitmed Change
namespace Content.Shared._Lavaland.Body;

// TODO: Use Shitmed instead of Shitcode
public sealed class CursedHeartSystem : EntitySystem
{
[Dependency] private readonly SharedActionsSystem _actions = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly DamageableSystem _damage = default!;
//[Dependency] private readonly BloodstreamSystem _bloodstream = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<CursedHeartComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<CursedHeartComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<CursedHeartComponent, PumpHeartActionEvent>(OnPump);

SubscribeLocalEvent<CursedHeartGrantComponent, UseInHandEvent>(OnUseInHand);
}

public override void Update(float frameTime)
{
base.Update(frameTime);

var query = EntityQueryEnumerator<CursedHeartComponent, MobStateComponent>();
while (query.MoveNext(out var uid, out var comp, out var state))
{
if (state.CurrentState is MobState.Critical or MobState.Dead)
continue;

if (_timing.CurTime < comp.LastPump + TimeSpan.FromSeconds(comp.MaxDelay))
continue;

Damage(uid);
comp.LastPump = _timing.CurTime;
}
}

private void Damage(EntityUid uid)
{
// TODO: WHY BLOODSTREAM IS NOT IN SHARED RAAAAAGH
//_bloodstream.TryModifyBloodLevel(uid, -50, spill: false);
_damage.TryChangeDamage(uid, new DamageSpecifier(_proto.Index<DamageGroupPrototype>("Airloss"), 50), true, false);
_popup.PopupEntity(Loc.GetString("popup-cursed-heart-damage"), uid, uid, PopupType.MediumCaution);
}

private void OnMapInit(EntityUid uid, CursedHeartComponent comp, MapInitEvent args)
{
_actions.AddAction(uid, ref comp.PumpActionEntity, "ActionPumpCursedHeart");
}

private void OnShutdown(EntityUid uid, CursedHeartComponent comp, ComponentShutdown args)
{
_actions.RemoveAction(uid, comp.PumpActionEntity);
}

private void OnPump(EntityUid uid, CursedHeartComponent comp, PumpHeartActionEvent args)
{
if (args.Handled)
return;

args.Handled = true;
_audio.PlayGlobal(new SoundPathSpecifier("/Audio/_Lavaland/heartbeat.ogg"), uid);
_damage.TryChangeDamage(uid, new DamageSpecifier(_proto.Index<DamageGroupPrototype>("Brute"), -5), true, false, targetPart: TargetBodyPart.All); // Shitmed Change
_damage.TryChangeDamage(uid, new DamageSpecifier(_proto.Index<DamageGroupPrototype>("Airloss"), -5), true, false, targetPart: TargetBodyPart.All); // Shitmed Change
_damage.TryChangeDamage(uid, new DamageSpecifier(_proto.Index<DamageGroupPrototype>("Burn"), -8), true, false, targetPart: TargetBodyPart.All); // Shitmed Change
//_bloodstream.TryModifyBloodLevel(uid, 17);
comp.LastPump = _timing.CurTime;
}

private void OnUseInHand(EntityUid uid, CursedHeartGrantComponent comp, UseInHandEvent args)
{
if (HasComp<CursedHeartComponent>(args.User))
{
_popup.PopupEntity(Loc.GetString("popup-cursed-heart-already-cursed"), args.User, args.User, PopupType.MediumCaution);
args.Handled = true;
return;
}

_audio.PlayGlobal(new SoundPathSpecifier("/Audio/_Lavaland/heartbeat.ogg"), args.User);
var heart = EnsureComp<CursedHeartComponent>(args.User);
heart.LastPump = _timing.CurTime;
QueueDel(uid);
args.Handled = true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Goobstation.Common.Weapons;

[ByRefEvent]
public record struct GetLightAttackRangeEvent(EntityUid? Target, EntityUid User, float Range, bool Cancel = false);


[ByRefEvent]
public record struct LightAttackSpecialInteractionEvent(EntityUid? Target, EntityUid User, float Range, bool Cancel = false);
33 changes: 33 additions & 0 deletions Content.Shared/_Lavaland/Weapons/MeleeWeaponRelayComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
// SPDX-FileCopyrightText: 2025 Aineias1 <dmitri.s.kiselev@gmail.com>
// SPDX-FileCopyrightText: 2025 FaDeOkno <143940725+FaDeOkno@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
// SPDX-FileCopyrightText: 2025 McBosserson <148172569+McBosserson@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Milon <plmilonpl@gmail.com>
// SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
// SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Unlumination <144041835+Unlumy@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
// SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
// SPDX-FileCopyrightText: 2025 username <113782077+whateverusername0@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 whateverusername0 <whateveremail>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

using Robust.Shared.GameStates;

namespace Content.Shared._Lavaland.Weapons;

/// <summary>
/// Allows this melee weapon to relay the damage and take it from some other sources, for example gun attachments.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class MeleeWeaponRelayComponent : Component;

[ByRefEvent]
public record struct GetRelayMeleeWeaponEvent(EntityUid? Found = null, bool Handled = false);
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
// SPDX-FileCopyrightText: 2025 Aineias1 <dmitri.s.kiselev@gmail.com>
// SPDX-FileCopyrightText: 2025 FaDeOkno <143940725+FaDeOkno@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
// SPDX-FileCopyrightText: 2025 McBosserson <148172569+McBosserson@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Milon <plmilonpl@gmail.com>
// SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
// SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 Unlumination <144041835+Unlumy@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
// SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
// SPDX-FileCopyrightText: 2025 username <113782077+whateverusername0@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 whateverusername0 <whateveremail>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

namespace Content.Shared._Lavaland.Weapons.Ranged.Events;

/// <summary>
/// Raised on a gun when a projectile has been fired from it.
/// </summary>
public sealed class ProjectileShotEvent : EntityEventArgs
{
public EntityUid FiredProjectile = default!;
}

Loading
Loading