add: Теперь сняряды для Синано можно печатать (#499)
This commit is contained in:
@@ -12,7 +12,7 @@ public sealed class WeaponModulesSystem : EntitySystem
|
||||
{
|
||||
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!;
|
||||
@@ -40,6 +40,9 @@ public sealed class WeaponModulesSystem : EntitySystem
|
||||
|
||||
SubscribeLocalEvent<AimModuleComponent, EntGotInsertedIntoContainerMessage>(EightAimModuleOnInsert);
|
||||
SubscribeLocalEvent<AimModuleComponent, EntGotRemovedFromContainerMessage>(EightAimModuleOnEject);
|
||||
|
||||
SubscribeLocalEvent<ShutterModuleComponent, EntGotInsertedIntoContainerMessage>(ShutterModuleOnInsert);
|
||||
SubscribeLocalEvent<ShutterModuleComponent, EntGotRemovedFromContainerMessage>(ShutterModuleOnEject);
|
||||
}
|
||||
|
||||
private bool TryInsertModule(EntityUid module, EntityUid weapon, BaseModuleComponent component,
|
||||
@@ -170,6 +173,22 @@ public sealed class WeaponModulesSystem : EntitySystem
|
||||
|
||||
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
|
||||
|
||||
#region EjectModules
|
||||
@@ -239,5 +258,19 @@ public sealed class WeaponModulesSystem : EntitySystem
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
HandGuardModule,
|
||||
AimModule
|
||||
AimModule,
|
||||
ShutterModule
|
||||
}
|
||||
|
||||
[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 }
|
||||
.desc = { ent-BaseAmmoProvider.desc }
|
||||
ent-BoxShinanoGrenadeFlash = коробка светошумовых гранат (40мм)
|
||||
ent-BoxShinanoGrenadeFlash = коробка светошумовых гранат SHN
|
||||
.desc = Заставь их плакать.
|
||||
ent-BoxShinanoGrenadeSmoke = коробка слезоточивых гранат (40мм)
|
||||
ent-BoxShinanoGrenadeSmoke = коробка слезоточивых гранат SHN
|
||||
.desc = Заставь их плакать.
|
||||
ent-BoxShinanoGrenadeStinger = коробка травматических гранат (40мм)
|
||||
ent-BoxShinanoGrenadeStinger = коробка травматических гранат SHN
|
||||
.desc = Это точно никого не убьет?
|
||||
ent-BoxShinanoGrenadeBeanbag = коробка травматических пуль (40мм)
|
||||
ent-BoxShinanoGrenadeBeanbag = коробка травматических пуль SHN
|
||||
.desc = Это точно никого не убьет?
|
||||
@@ -1,10 +1,10 @@
|
||||
ent-BaseShinanoGrenade = граната (40мм)
|
||||
ent-BaseShinanoGrenade = граната SHN
|
||||
.desc = { ent-BaseCartridge.desc }
|
||||
ent-ShinanoGrenadeFlash = светошумовая граната (40мм)
|
||||
ent-ShinanoGrenadeFlash = светошумовая граната SHN
|
||||
.desc = { ent-BaseShinanoGrenade.desc }
|
||||
ent-ShinanoGrenadeSmoke = слезоточивая граната (40мм)
|
||||
ent-ShinanoGrenadeSmoke = слезоточивая граната SHN
|
||||
.desc = { ent-BaseShinanoGrenade.desc }
|
||||
ent-ShinanoGrenadeStinger = травматическая граната (40мм)
|
||||
ent-ShinanoGrenadeStinger = травматическая граната SHN
|
||||
.desc = { ent-BaseShinanoGrenade.desc }
|
||||
ent-ShinanoGrenadeBeanbag = травматическая пуля (40мм)
|
||||
ent-ShinanoGrenadeBeanbag = травматическая пуля SHN
|
||||
.desc = { ent-BaseShinanoGrenade.desc }
|
||||
@@ -200,6 +200,7 @@
|
||||
- FlameHiderModuleRecipe
|
||||
- SilencerModuleRecipe
|
||||
- AcceleratorModuleRecipe
|
||||
- ShinanoGrenadeBeanbagRecipe
|
||||
emagDynamicRecipes:
|
||||
- CartridgePistolRubber
|
||||
- CartridgeMagnumRubber
|
||||
@@ -372,6 +373,7 @@
|
||||
- MagazineGrenadeEmpty
|
||||
- GrenadeEMP
|
||||
- GrenadeFlash
|
||||
- ShinanoGrenadeBeanbagRecipe
|
||||
- type: BluespaceStorage
|
||||
|
||||
- type: entity
|
||||
@@ -734,6 +736,7 @@
|
||||
- FlameHiderModuleRecipe
|
||||
- SilencerModuleRecipe
|
||||
- AcceleratorModuleRecipe
|
||||
- ShinanoGrenadeBeanbagRecipe
|
||||
dynamicRecipes:
|
||||
- CartridgeLightRifleIncendiary
|
||||
- CartridgeMagnumIncendiary
|
||||
@@ -790,6 +793,9 @@
|
||||
- ShuttleGunDusterCircuitboard
|
||||
- ClothingHandsGlovesMagnetic
|
||||
- ClothingHandsGlovesMagneticAdvanced
|
||||
- ShinanoGrenadeFlashRecipe
|
||||
- ShinanoGrenadeSmokeRecipe
|
||||
- ShinanoGrenadeStingerRecipe
|
||||
- type: EmagLatheRecipes
|
||||
emagStaticRecipes:
|
||||
- MagazineLightRifleBox
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
- MagazineBoxMagnumRubber
|
||||
- MagazineBoxLightRifleRubber
|
||||
- MagazineBoxRifleRubber
|
||||
- ShinanoGrenadeFlashRecipe
|
||||
- ShinanoGrenadeSmokeRecipe
|
||||
- ShinanoGrenadeStingerRecipe
|
||||
|
||||
- type: technology
|
||||
id: UraniumMunitions
|
||||
|
||||
@@ -49,6 +49,23 @@
|
||||
- 0,0,0,0
|
||||
- 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
|
||||
- type: entity
|
||||
parent: BaseHandGuardModule
|
||||
@@ -127,3 +144,14 @@
|
||||
- type: Sprite
|
||||
state: eightaim
|
||||
- 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:
|
||||
path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
|
||||
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
|
||||
materials:
|
||||
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
|
||||
id: BaseAimModule
|
||||
|
||||
- type: Tag
|
||||
id: BaseShutterModule
|
||||
|
||||
- type: Tag
|
||||
id: DoorjackUsable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user