mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-14 19:29:57 +01:00
Last dance
This commit is contained in:
@@ -240,14 +240,11 @@ public abstract partial class SharedGunSystem
|
||||
for (var i = 0; i < args.Shots; i++)
|
||||
{
|
||||
EntityUid? ammoEntity = null;
|
||||
|
||||
var existingEnt = component.Entities[^1];
|
||||
|
||||
if (component.Entities.Count > 0)
|
||||
{
|
||||
args.Ammo.Add((existingEnt, EnsureShootable(existingEnt)));
|
||||
if (!component.AutoCycle) //WL - if autocycle=false don't remove spent ammo from the gun
|
||||
break;
|
||||
var existingEnt = component.Entities[^1];
|
||||
component.Entities.RemoveAt(component.Entities.Count - 1);
|
||||
DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.Entities));
|
||||
Containers.Remove(existingEnt, component.Container);
|
||||
@@ -261,8 +258,8 @@ public abstract partial class SharedGunSystem
|
||||
//WL - if autocycle=false put spent ammo back in the gun
|
||||
if (!component.AutoCycle)
|
||||
{
|
||||
component.Entities.Add(existingEnt);
|
||||
Containers.Insert(existingEnt, component.Container);
|
||||
component.Entities.Add(ammoEntity.Value);
|
||||
Containers.Insert(ammoEntity.Value, component.Container);
|
||||
DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.Entities));
|
||||
}
|
||||
//WL - Autocycle end
|
||||
|
||||
@@ -12029,19 +12029,19 @@ entities:
|
||||
parent: 2
|
||||
- type: Fixtures
|
||||
fixtures: {}
|
||||
- uid: 13173
|
||||
components:
|
||||
- type: MetaData
|
||||
name: APC (Engi - Telecomms)
|
||||
- type: Transform
|
||||
rot: 3.141592653589793 rad
|
||||
pos: 18.5,-20.5
|
||||
parent: 2
|
||||
- type: AccessReader
|
||||
accessListsOriginal:
|
||||
- - Engineering
|
||||
- type: Fixtures
|
||||
fixtures: {}
|
||||
# - uid: 13173
|
||||
# components:
|
||||
# - type: MetaData
|
||||
# name: APC (Engi - Telecomms)
|
||||
# - type: Transform
|
||||
# rot: 3.141592653589793 rad
|
||||
# pos: 18.5,-20.5
|
||||
# parent: 2
|
||||
# - type: AccessReader
|
||||
# accessListsOriginal:
|
||||
# - - Engineering
|
||||
# - type: Fixtures
|
||||
# fixtures: {}
|
||||
- uid: 13549
|
||||
components:
|
||||
- type: MetaData
|
||||
|
||||
Reference in New Issue
Block a user