add: Теперь сняряды для Синано можно печатать (#499)
This commit is contained in:
@@ -12,7 +12,7 @@ public sealed class WeaponModulesSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
protected static readonly Dictionary<string, Enum> Slots = new()
|
protected static readonly Dictionary<string, Enum> Slots = new()
|
||||||
{
|
{
|
||||||
{ "handguard_module", ModuleVisualState.HandGuardModule }, { "barrel_module", ModuleVisualState.BarrelModule }, { "aim_module", ModuleVisualState.AimModule }
|
{ "handguard_module", ModuleVisualState.HandGuardModule }, { "barrel_module", ModuleVisualState.BarrelModule }, { "aim_module", ModuleVisualState.AimModule }, { "shutter_module", ModuleVisualState.ShutterModule }
|
||||||
};
|
};
|
||||||
|
|
||||||
[Dependency] private readonly PointLightSystem _lightSystem = default!;
|
[Dependency] private readonly PointLightSystem _lightSystem = default!;
|
||||||
@@ -40,6 +40,9 @@ public sealed class WeaponModulesSystem : EntitySystem
|
|||||||
|
|
||||||
SubscribeLocalEvent<AimModuleComponent, EntGotInsertedIntoContainerMessage>(EightAimModuleOnInsert);
|
SubscribeLocalEvent<AimModuleComponent, EntGotInsertedIntoContainerMessage>(EightAimModuleOnInsert);
|
||||||
SubscribeLocalEvent<AimModuleComponent, EntGotRemovedFromContainerMessage>(EightAimModuleOnEject);
|
SubscribeLocalEvent<AimModuleComponent, EntGotRemovedFromContainerMessage>(EightAimModuleOnEject);
|
||||||
|
|
||||||
|
SubscribeLocalEvent<ShutterModuleComponent, EntGotInsertedIntoContainerMessage>(ShutterModuleOnInsert);
|
||||||
|
SubscribeLocalEvent<ShutterModuleComponent, EntGotRemovedFromContainerMessage>(ShutterModuleOnEject);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component,
|
private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component,
|
||||||
@@ -170,6 +173,22 @@ public sealed class WeaponModulesSystem : EntitySystem
|
|||||||
|
|
||||||
EnsureComp<TelescopeComponent>(weapon).Divisor = component.Divisor;
|
EnsureComp<TelescopeComponent>(weapon).Divisor = component.Divisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShutterModuleOnInsert(EntityUid module, ShutterModuleComponent component, EntGotInsertedIntoContainerMessage args)
|
||||||
|
{
|
||||||
|
EntityUid weapon = args.Container.Owner;
|
||||||
|
|
||||||
|
if (!TryComp<GunComponent>(weapon, out var gunComp)) return;
|
||||||
|
|
||||||
|
if(!TryInsertModule(module, weapon, component, args.Container.ID, out var weaponModulesComponent))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!TryComp<BallisticAmmoProviderComponent>(weapon, out var ballisticAmmo))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ballisticAmmo.Whitelist?.Tags?.Add(component.Tag);
|
||||||
|
Dirty(weapon, ballisticAmmo);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region EjectModules
|
#region EjectModules
|
||||||
@@ -239,5 +258,19 @@ public sealed class WeaponModulesSystem : EntitySystem
|
|||||||
|
|
||||||
RemComp<TelescopeComponent>(weapon);
|
RemComp<TelescopeComponent>(weapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShutterModuleOnEject(EntityUid module, ShutterModuleComponent component, EntGotRemovedFromContainerMessage args)
|
||||||
|
{
|
||||||
|
EntityUid weapon = args.Container.Owner;
|
||||||
|
|
||||||
|
if(!TryEjectModule(module, weapon, args.Container.ID, out var weaponModulesComponent))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!TryComp<BallisticAmmoProviderComponent>(weapon, out var ballisticAmmo))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ballisticAmmo.Whitelist?.Tags?.Remove(component.Tag);
|
||||||
|
Dirty(weapon, ballisticAmmo);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Content.Shared._White.WeaponModules;
|
||||||
|
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed partial class ShutterModuleComponent : BaseModuleComponent
|
||||||
|
{
|
||||||
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||||
|
public string Tag;
|
||||||
|
}
|
||||||
@@ -21,7 +21,8 @@ public enum ModuleVisualState : byte
|
|||||||
{
|
{
|
||||||
BarrelModule,
|
BarrelModule,
|
||||||
HandGuardModule,
|
HandGuardModule,
|
||||||
AimModule
|
AimModule,
|
||||||
|
ShutterModule
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
|||||||
2
Resources/Locale/ru-RU/_white/weapon-module.ftl
Normal file
2
Resources/Locale/ru-RU/_white/weapon-module.ftl
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ent-ShinanoShutterModule = модифицированный затвор Синано
|
||||||
|
.desc = Нелегальная модификация для TS430 Shinano, произведенная одним из подрядчиков Синдиката. Позволяет использовать широкий спектр гранатных боеприпасов, что стоят на вооружении Синдиката.
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
ent-BaseShinanoGrenadeAmmoProvider = { ent-BaseAmmoProvider }
|
ent-BaseShinanoGrenadeAmmoProvider = { ent-BaseAmmoProvider }
|
||||||
.desc = { ent-BaseAmmoProvider.desc }
|
.desc = { ent-BaseAmmoProvider.desc }
|
||||||
ent-BoxShinanoGrenadeFlash = коробка светошумовых гранат (40мм)
|
ent-BoxShinanoGrenadeFlash = коробка светошумовых гранат SHN
|
||||||
.desc = Заставь их плакать.
|
.desc = Заставь их плакать.
|
||||||
ent-BoxShinanoGrenadeSmoke = коробка слезоточивых гранат (40мм)
|
ent-BoxShinanoGrenadeSmoke = коробка слезоточивых гранат SHN
|
||||||
.desc = Заставь их плакать.
|
.desc = Заставь их плакать.
|
||||||
ent-BoxShinanoGrenadeStinger = коробка травматических гранат (40мм)
|
ent-BoxShinanoGrenadeStinger = коробка травматических гранат SHN
|
||||||
.desc = Это точно никого не убьет?
|
.desc = Это точно никого не убьет?
|
||||||
ent-BoxShinanoGrenadeBeanbag = коробка травматических пуль (40мм)
|
ent-BoxShinanoGrenadeBeanbag = коробка травматических пуль SHN
|
||||||
.desc = Это точно никого не убьет?
|
.desc = Это точно никого не убьет?
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
ent-BaseShinanoGrenade = граната (40мм)
|
ent-BaseShinanoGrenade = граната SHN
|
||||||
.desc = { ent-BaseCartridge.desc }
|
.desc = { ent-BaseCartridge.desc }
|
||||||
ent-ShinanoGrenadeFlash = светошумовая граната (40мм)
|
ent-ShinanoGrenadeFlash = светошумовая граната SHN
|
||||||
.desc = { ent-BaseShinanoGrenade.desc }
|
.desc = { ent-BaseShinanoGrenade.desc }
|
||||||
ent-ShinanoGrenadeSmoke = слезоточивая граната (40мм)
|
ent-ShinanoGrenadeSmoke = слезоточивая граната SHN
|
||||||
.desc = { ent-BaseShinanoGrenade.desc }
|
.desc = { ent-BaseShinanoGrenade.desc }
|
||||||
ent-ShinanoGrenadeStinger = травматическая граната (40мм)
|
ent-ShinanoGrenadeStinger = травматическая граната SHN
|
||||||
.desc = { ent-BaseShinanoGrenade.desc }
|
.desc = { ent-BaseShinanoGrenade.desc }
|
||||||
ent-ShinanoGrenadeBeanbag = травматическая пуля (40мм)
|
ent-ShinanoGrenadeBeanbag = травматическая пуля SHN
|
||||||
.desc = { ent-BaseShinanoGrenade.desc }
|
.desc = { ent-BaseShinanoGrenade.desc }
|
||||||
@@ -200,6 +200,7 @@
|
|||||||
- FlameHiderModuleRecipe
|
- FlameHiderModuleRecipe
|
||||||
- SilencerModuleRecipe
|
- SilencerModuleRecipe
|
||||||
- AcceleratorModuleRecipe
|
- AcceleratorModuleRecipe
|
||||||
|
- ShinanoGrenadeBeanbagRecipe
|
||||||
emagDynamicRecipes:
|
emagDynamicRecipes:
|
||||||
- CartridgePistolRubber
|
- CartridgePistolRubber
|
||||||
- CartridgeMagnumRubber
|
- CartridgeMagnumRubber
|
||||||
@@ -372,6 +373,7 @@
|
|||||||
- MagazineGrenadeEmpty
|
- MagazineGrenadeEmpty
|
||||||
- GrenadeEMP
|
- GrenadeEMP
|
||||||
- GrenadeFlash
|
- GrenadeFlash
|
||||||
|
- ShinanoGrenadeBeanbagRecipe
|
||||||
- type: BluespaceStorage
|
- type: BluespaceStorage
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -734,6 +736,7 @@
|
|||||||
- FlameHiderModuleRecipe
|
- FlameHiderModuleRecipe
|
||||||
- SilencerModuleRecipe
|
- SilencerModuleRecipe
|
||||||
- AcceleratorModuleRecipe
|
- AcceleratorModuleRecipe
|
||||||
|
- ShinanoGrenadeBeanbagRecipe
|
||||||
dynamicRecipes:
|
dynamicRecipes:
|
||||||
- CartridgeLightRifleIncendiary
|
- CartridgeLightRifleIncendiary
|
||||||
- CartridgeMagnumIncendiary
|
- CartridgeMagnumIncendiary
|
||||||
@@ -790,6 +793,9 @@
|
|||||||
- ShuttleGunDusterCircuitboard
|
- ShuttleGunDusterCircuitboard
|
||||||
- ClothingHandsGlovesMagnetic
|
- ClothingHandsGlovesMagnetic
|
||||||
- ClothingHandsGlovesMagneticAdvanced
|
- ClothingHandsGlovesMagneticAdvanced
|
||||||
|
- ShinanoGrenadeFlashRecipe
|
||||||
|
- ShinanoGrenadeSmokeRecipe
|
||||||
|
- ShinanoGrenadeStingerRecipe
|
||||||
- type: EmagLatheRecipes
|
- type: EmagLatheRecipes
|
||||||
emagStaticRecipes:
|
emagStaticRecipes:
|
||||||
- MagazineLightRifleBox
|
- MagazineLightRifleBox
|
||||||
|
|||||||
@@ -65,6 +65,9 @@
|
|||||||
- MagazineBoxMagnumRubber
|
- MagazineBoxMagnumRubber
|
||||||
- MagazineBoxLightRifleRubber
|
- MagazineBoxLightRifleRubber
|
||||||
- MagazineBoxRifleRubber
|
- MagazineBoxRifleRubber
|
||||||
|
- ShinanoGrenadeFlashRecipe
|
||||||
|
- ShinanoGrenadeSmokeRecipe
|
||||||
|
- ShinanoGrenadeStingerRecipe
|
||||||
|
|
||||||
- type: technology
|
- type: technology
|
||||||
id: UraniumMunitions
|
id: UraniumMunitions
|
||||||
|
|||||||
@@ -49,6 +49,23 @@
|
|||||||
- 0,0,0,0
|
- 0,0,0,0
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BaseItem
|
||||||
|
id: BaseShutterModule
|
||||||
|
abstract: true
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
sprite: White/Objects/Weapons/modules.rsi
|
||||||
|
- type: Tag
|
||||||
|
tags:
|
||||||
|
- BaseShutterModule
|
||||||
|
- type: Item
|
||||||
|
sprite: White/Objects/Weapons/modules.rsi
|
||||||
|
size: Small
|
||||||
|
shape:
|
||||||
|
- 0,0,0,0
|
||||||
|
- type: Appearance
|
||||||
|
|
||||||
# modules
|
# modules
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: BaseHandGuardModule
|
parent: BaseHandGuardModule
|
||||||
@@ -127,3 +144,14 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: eightaim
|
state: eightaim
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BaseShutterModule
|
||||||
|
id: ShinanoShutterModule
|
||||||
|
name: "modified Shinano shutter"
|
||||||
|
description: An illegal modification for the TS430 Shinano made by one of the Syndicate's contractors. It allows the use of a wide range of grenade ammunition that are in service with the Syndicate.
|
||||||
|
components:
|
||||||
|
- type: ShutterModule
|
||||||
|
value: "shinano"
|
||||||
|
module_type: "shutter_module"
|
||||||
|
tag: Grenade
|
||||||
|
|||||||
@@ -38,3 +38,18 @@
|
|||||||
soundInsert:
|
soundInsert:
|
||||||
path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
|
path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
|
||||||
autoCycle: false
|
autoCycle: false
|
||||||
|
- type: WeaponModules
|
||||||
|
- type: ItemSlots
|
||||||
|
slots:
|
||||||
|
shutter_module:
|
||||||
|
name: Shutter Module
|
||||||
|
insertSound: /Audio/White/Gun/Modules/insertmodule.ogg
|
||||||
|
ejectSound: /Audio/White/Gun/Modules/ejectmodule.ogg
|
||||||
|
priority: 1
|
||||||
|
whitelist:
|
||||||
|
tags:
|
||||||
|
- BaseShutterModule
|
||||||
|
- type: ContainerContainer
|
||||||
|
containers:
|
||||||
|
shutter_module: !type:ContainerSlot
|
||||||
|
- type: Appearance
|
||||||
|
|||||||
@@ -133,3 +133,37 @@
|
|||||||
completetime: 5
|
completetime: 5
|
||||||
materials:
|
materials:
|
||||||
Steel: 1500
|
Steel: 1500
|
||||||
|
|
||||||
|
- type: latheRecipe
|
||||||
|
id: ShinanoGrenadeFlashRecipe
|
||||||
|
result: ShinanoGrenadeFlash
|
||||||
|
completetime: 3
|
||||||
|
materials:
|
||||||
|
Steel: 800
|
||||||
|
Plastic: 200
|
||||||
|
Glass: 100
|
||||||
|
Plasma: 100
|
||||||
|
|
||||||
|
- type: latheRecipe
|
||||||
|
id: ShinanoGrenadeSmokeRecipe
|
||||||
|
result: ShinanoGrenadeSmoke
|
||||||
|
completetime: 3
|
||||||
|
materials:
|
||||||
|
Steel: 800
|
||||||
|
Plastic: 200
|
||||||
|
Uranium: 200
|
||||||
|
|
||||||
|
- type: latheRecipe
|
||||||
|
id: ShinanoGrenadeStingerRecipe
|
||||||
|
result: ShinanoGrenadeStinger
|
||||||
|
completetime: 3
|
||||||
|
materials:
|
||||||
|
Steel: 800
|
||||||
|
Plastic: 800
|
||||||
|
|
||||||
|
- type: latheRecipe
|
||||||
|
id: ShinanoGrenadeBeanbagRecipe
|
||||||
|
result: ShinanoGrenadeBeanbag
|
||||||
|
completetime: 3
|
||||||
|
materials:
|
||||||
|
Steel: 800
|
||||||
@@ -79,6 +79,9 @@
|
|||||||
- type: Tag
|
- type: Tag
|
||||||
id: BaseAimModule
|
id: BaseAimModule
|
||||||
|
|
||||||
|
- type: Tag
|
||||||
|
id: BaseShutterModule
|
||||||
|
|
||||||
- type: Tag
|
- type: Tag
|
||||||
id: DoorjackUsable
|
id: DoorjackUsable
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user