space-station-14
space-station-14 copied to clipboard
Added the Ion Rifle
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)
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 |
sorry for the laser rifle change, noticed a single sling pixel was not colored properly
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;
} ``
@metalgearsloth is that good enough code?
Closed due to feature freeze May 10th-June 14th. Comment to have it reopen after this.
Open
are you still working on this
No I stopped, got too busy with other shit and this became frustrating
This pull request has conflicts, please resolve those before we can evaluate the pull request.
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.