space-station-14 icon indicating copy to clipboard operation
space-station-14 copied to clipboard

Added the Ion Rifle

Open Boaz1111 opened this issue 1 year ago • 2 comments

About the PR

Added the ion rifle, as well as an ion rifle crate. In the future, one rifle should be mapped in every armory. sprites as added in this PR https://github.com/space-wizards/space-station-14/pull/20949

Why / Balance

Counter to borgs, laser rifles, other things using batteries. Mechs will be affected in the future as soon as they use standardised powercells just like borgs.

Technical details

Media

  • [X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

:cl:

  • add: An Ion Rifle has been added to the game, it can be purchased by cargo, or found in the armory(soon)

Boaz1111 avatar Jan 22 '24 22:01 Boaz1111

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

Resources/Textures/Objects/Weapons/Guns/Battery/laser_gun.rsi

State Old New Status
equipped-BACKPACK Modified
Resources/Textures/Objects/Weapons/Guns/Battery/ion_rifle.rsi

State Old New Status
base Added
equipped-BACKPACK Added
icon Added
inhand-left Added
inhand-right Added
mag-unshaded-0 Added
mag-unshaded-1 Added
mag-unshaded-2 Added
mag-unshaded-3 Added
mag-unshaded-4 Added
Edit: diff updated after b3692a22c12a0bc649272d402ce5a2e80c6bf1bc

github-actions[bot] avatar Jan 22 '24 22:01 github-actions[bot]

sorry for the laser rifle change, noticed a single sling pixel was not colored properly

Boaz1111 avatar Jan 22 '24 22:01 Boaz1111

I think it's shit code pretty much, but here's the code for this pr: using Content.Shared.Projectiles;(to server EMP system, ~1 line) SubscribeLocalEvent<EmpOnCollideComponent, ProjectileHitEvent>(OnProjectileHit);(to server EMP system, ~29 line) private void OnProjectileHit(EntityUid uid, EmpOnCollideComponent component, ref ProjectileHitEvent args) { TryEmpEffects(args.Target, component.EnergyConsumption, component.DisableDuration); }(to server EMP system, ~148-151 line)

and here's component:

``namespace Content.Server.Emp;

[RegisterComponent] [Access(typeof(EmpSystem))] public sealed partial class EmpOnCollideComponent : Component {

/// <summary>
/// How much energy will be consumed per battery
/// </summary>
[DataField("energyConsumption"), ViewVariables(VVAccess.ReadWrite)]
public float EnergyConsumption;

/// <summary>
/// How long it disables targets in seconds
/// </summary>
[DataField("disableDuration"), ViewVariables(VVAccess.ReadWrite)]
public float DisableDuration = 60f;

} ``

Ratyyy avatar May 05 '24 09:05 Ratyyy

@metalgearsloth is that good enough code?

Boaz1111 avatar May 06 '24 01:05 Boaz1111

Closed due to feature freeze May 10th-June 14th. Comment to have it reopen after this.

Emisse avatar May 10 '24 15:05 Emisse

Open

Boaz1111 avatar Jun 13 '24 22:06 Boaz1111

are you still working on this

Emisse avatar Aug 18 '24 22:08 Emisse

No I stopped, got too busy with other shit and this became frustrating

Boaz1111 avatar Aug 19 '24 10:08 Boaz1111

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

github-actions[bot] avatar Aug 19 '24 11:08 github-actions[bot]

No I stopped, got too busy with other shit and this became frustrating

I'll close this PR then for now. If you want to continue working on it, just ping me and I will re-open it.

slarticodefast avatar Sep 04 '24 15:09 slarticodefast