Skip to content

Ammo Providers & Hitscan Compability, Jumping Hitscans, Gun Overheating, MultiRaycast Hitscans. HV Revolvers. - #4335

Open
NazrinNya wants to merge 15 commits into
Monolith-Station:mainfrom
NazrinNya:armada
Open

Ammo Providers & Hitscan Compability, Jumping Hitscans, Gun Overheating, MultiRaycast Hitscans. HV Revolvers.#4335
NazrinNya wants to merge 15 commits into
Monolith-Station:mainfrom
NazrinNya:armada

Conversation

@NazrinNya

Copy link
Copy Markdown
Contributor

About the PR

This PR includes major changes to wizbase.

All ammo providers are now compatible with hitscans.
Added hitscan multiraycast
Added gun overheating, not implemented anywhere currently.
Added hitscans that jump between other mobs (ultrakill coins or some shit)

shit above doesn't matter to normal players so

.45 magnum FMJ -> .45 magnum HV. default .45 magnum now shoots hitscan projectile piercing 1 mob.

Why / Balance

revolvers were underperforming so this should make them somewhat unique now

Media

Requirements

  • I have read relevant guidelines/documentation to this PR found on our devwiki.
  • I have added media to this PR or it does not require an ingame showcase.
  • I can confirm this PR contains either no AI-generated content, or AI-generated content that meets our guidelines.

How to test

Breaking changes

Changelog

🆑

  • tweak: .45 magnum FMJ is now hypervelocity.

@monolith8319 monolith8319 changed the title Ammo providers & Hitscan compability, Jumping hitscans, Gun overheating, MultiRaycast hitscans. HV revolvers. Ammo Providers & Hitscan Compability, Jumping Hitscans, Gun Overheating, MultiRaycast Hitscans. HV Revolvers. Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

RSI Diff Bot; head commit 156fef9 merging into c42e8fe
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/_Mono/Objects/Weapons/Guns/Projectiles/lasers.rsi

State Old New Status
ballistic_impact Added
ballistic_muzzle Added
ballistic_trail Added

@NazrinNya NazrinNya mentioned this pull request Jul 21, 2026
3 tasks
@waphun

waphun commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

There was another revolver pr made by fluffen. What happened to that?

@NazrinNya

Copy link
Copy Markdown
Contributor Author

There was another revolver pr made by fluffen. What happened to that?

who knows

@OneZerooo0

OneZerooo0 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Revolver PR is currently working except for migrations being dumb or something, I can update it after this one tho

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you empty extend it twice

Comment on lines 35 to 62
@@ -42,6 +47,17 @@ private void OnCartridgeDamageExamine(EntityUid uid, CartridgeAmmoComponent comp
return p.Damage * Damageable.UniversalProjectileDamageModifier;
}
}
// mono
else if (entityProto.Components.TryGetValue(Factory.GetComponentName<HitscanBasicDamageComponent>(), out var hitscan))
{
var h = (HitscanBasicDamageComponent) hitscan.Component;

if (h.Damage.Empty)
return null;

isHitscan = true;
return h.Damage;
}

return null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually this should probably use the shared system's methods for bullet protos which i wrote

gun.ProjectileSpeedModified,
offset); // Mono - add offset

if (HasComp<FireControllableComponent>(gunUid)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this not event-based actually

/// <summary>
/// Entities that were already hit by hitscan (Or fired it)
/// </summary>
public HashSet<int> IgnoredEntities = [];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this int (and not NetEntity/EntityUid)
why is this not DataField

Comment on lines +14 to +15
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no readonly

Comment on lines +2 to +22

[RegisterComponent]
public sealed partial class GunOverheatComponent : Component
{
[DataField]
public float FireRatePenalty = 2f;

[DataField]
public float SpreadPenalty = 2f;

[DataField]
public float HeatCapacity = 100f;

[DataField]
public float Heat = 0f;

[DataField]
public float HeatPerShot = 5f;

[DataField]
public float HeatDissipation = 10f;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

summaries

private float _updateCooldown = 0.25f;
private float _updateTimer;

[Dependency] private readonly SharedGunSystem _gun = default!;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readonly

return;
}

var ents = EntityQueryEnumerator<GunOverheatComponent, GunComponent>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to query for guncomp


private void OnGunShot(Entity<GunOverheatComponent> ent, ref GunShotEvent ev)
{
if (!TryComp<GunComponent>(ent, out var gun))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query since we're trying to optimize guns


public float CalculatePenalty(float penalty, GunOverheatComponent overheat)
{
var i = Math.Pow(overheat.Heat / overheat.HeatCapacity, 0.25f);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably have the exponent be in the comp

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants