-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from borkroman/master
Берегись, Синдикекс!!
- Loading branch information
Showing
36 changed files
with
522 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using Content.Shared._Adventure.Abilities; | ||
using Content.Shared.Actions; | ||
using Content.Shared.Cuffs; | ||
using Content.Shared.DoAfter; | ||
|
||
namespace Content.Server._Adventure.Abilities; | ||
public sealed class BorgCuffedSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; | ||
[Dependency] private readonly SharedCuffableSystem _cuffable = default!; | ||
[Dependency] private readonly SharedActionsSystem _actions = default!; | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<BorgCuffedComponent, ComponentInit>(OnInit); | ||
SubscribeLocalEvent<BorgCuffedComponent, BorgCuffedActionEvent>(OnCuffed); | ||
SubscribeLocalEvent<BorgCuffedComponent, BorgCuffedDoAfterEvent>(OnCuffedDoAfter); | ||
} | ||
|
||
private void OnInit(EntityUid uid, BorgCuffedComponent component, ComponentInit args) | ||
{ | ||
_actions.AddAction(uid, component.CuffActionId); | ||
} | ||
|
||
private void OnCuffed(EntityUid uid, BorgCuffedComponent component, BorgCuffedActionEvent args) | ||
{ | ||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager ,uid, component.CuffTime, | ||
new BorgCuffedDoAfterEvent(), uid, target: args.Target, used: uid) | ||
{ | ||
BreakOnMove = true, | ||
BreakOnDamage = true | ||
}); | ||
|
||
args.Handled = true; | ||
} | ||
|
||
private void OnCuffedDoAfter(EntityUid uid, BorgCuffedComponent component, | ||
BorgCuffedDoAfterEvent args) | ||
{ | ||
if (args.Handled || args.Cancelled || args.Args.Target == null) | ||
return; | ||
|
||
var cuffs = Spawn(component.CableCuffsId, Transform(uid).Coordinates); | ||
|
||
if (!_cuffable.TryCuffingNow(args.Args.User, args.Args.Target.Value, cuffs)) | ||
QueueDel(cuffs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Content.Shared/_Adventure/Abilities/BorgCuffedComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Content.Shared.Actions; | ||
using Content.Shared.DoAfter; | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Shared._Adventure.Abilities; | ||
|
||
[RegisterComponent] | ||
public sealed partial class BorgCuffedComponent : Component | ||
{ | ||
[ViewVariables(VVAccess.ReadWrite), | ||
DataField("cableCuffs", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] | ||
public string CableCuffsId = "Zipties"; | ||
|
||
[ViewVariables(VVAccess.ReadWrite), | ||
DataField("cuffActionId", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] | ||
public string CuffActionId = "BorgCuffed"; | ||
|
||
[ViewVariables(VVAccess.ReadWrite), | ||
DataField("cuffTime")] | ||
public float CuffTime = 3.5f; | ||
} | ||
|
||
|
||
public sealed partial class BorgCuffedActionEvent : EntityTargetActionEvent | ||
{ | ||
|
||
} | ||
|
||
[Serializable, NetSerializable] | ||
public sealed partial class BorgCuffedDoAfterEvent : SimpleDoAfterEvent | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,4 @@ | |
JanitorBorg: [ 1, 1 ] | ||
MedicalBorg: [ 1, 1 ] | ||
ServiceBorg: [ 1, 1 ] | ||
SecurityBorg: [ 1, 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,4 +71,5 @@ | |
JanitorBorg: [ 1, 1 ] | ||
MedicalBorg: [ 1, 1 ] | ||
ServiceBorg: [ 1, 1 ] | ||
SecurityBorg: [ 1, 1 ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,4 @@ | |
JanitorBorg: [ 1, 1 ] | ||
MedicalBorg: [ 1, 1 ] | ||
ServiceBorg: [ 1, 1 ] | ||
SecurityBorg: [ 1, 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,4 @@ | |
JanitorBorg: [ 1, 1 ] | ||
MedicalBorg: [ 1, 1 ] | ||
ServiceBorg: [ 1, 1 ] | ||
SecurityBorg: [ 1, 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,4 @@ | |
JanitorBorg: [ 1, 1 ] | ||
MedicalBorg: [ 1, 1 ] | ||
ServiceBorg: [ 1, 1 ] | ||
SecurityBorg: [ 1, 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Resources/Prototypes/Adventure/Roles/BorgDep/SecBorg/ActionSecBorg.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- type: entity | ||
id: BorgCuffed | ||
name: Заковать | ||
description: Заковать нарушителя стяжками. | ||
categories: [ HideSpawnMenu ] | ||
components: | ||
- type: EntityTargetAction | ||
icon: { sprite: Adventure/Roles/BorgDep/SecBorg/modul.rsi, state: SecBorgCuff } | ||
itemIconStyle: NoItem | ||
whitelist: | ||
components: | ||
- Cuffable | ||
canTargetSelf: false | ||
useDelay: 15 | ||
checkCanAccess: true | ||
range: 2 | ||
event: !type:BorgCuffedActionEvent | ||
priority: 9 |
131 changes: 131 additions & 0 deletions
131
Resources/Prototypes/Adventure/Roles/BorgDep/SecBorg/Moduls_Weapons.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
#Модуль Охраны | ||
- type: Tag | ||
id: SecModul | ||
|
||
- type: entity | ||
id: BaseModuleSec | ||
parent: BaseBorgModule | ||
abstract: true | ||
components: | ||
- type: Tag | ||
tags: | ||
- SecModul | ||
|
||
- type: entity | ||
id: ModuleSec | ||
parent: [ BaseModuleSec, BaseProviderBorgModule ] | ||
description: Всё для вас и вашей безопасности. | ||
name: Охранный модуль киборга | ||
components: | ||
- type: BorgModuleIcon | ||
icon: { sprite: Adventure/Roles/BorgDep/SecBorg/modul.rsi, state: Sec-module } | ||
- type: Sprite | ||
sprite: Adventure/Roles/BorgDep/SecBorg/modul.rsi | ||
layers: | ||
- state: SecModul | ||
- state: SecModul-icon | ||
- type: ItemBorgModule | ||
items: | ||
- FlashSecBorg | ||
- StunbatonSecBorg | ||
- WeaponLaserSecBorg | ||
|
||
#Усмиритель | ||
- type: entity | ||
name: Усмиритель MK-2 | ||
noSpawn: false | ||
parent: BaseWeaponBatterySmall | ||
id: WeaponLaserSecBorg | ||
description: Для особо буйных. | ||
components: | ||
- type: Sprite | ||
sprite: Adventure/Roles/BorgDep/SecBorg/Borg_laser_gun.rsi | ||
layers: | ||
- state: base | ||
map: ["enum.GunVisualLayers.Base"] | ||
- state: mag-unshaded-4 | ||
map: ["enum.GunVisualLayers.MagUnshaded"] | ||
shader: unshaded | ||
- type: Gun | ||
selectedMode: SemiAuto | ||
fireRate: 3 | ||
soundGunshot: | ||
path: /Audio/Weapons/Guns/Gunshots/taser2.ogg | ||
- type: ProjectileBatteryAmmoProvider | ||
proto: BulletDisabler | ||
fireCost: 100 | ||
- type: BatteryWeaponFireModes | ||
fireModes: | ||
- proto: BulletDisabler | ||
fireCost: 100 | ||
- proto: BorgLethalBullet | ||
fireCost: 100 | ||
- type: BatterySelfRecharger | ||
autoRecharge: true | ||
autoRechargeRate: 20 | ||
- type: MagazineVisuals | ||
magState: mag | ||
steps: 5 | ||
zeroVisible: false | ||
|
||
- type: entity | ||
id: BorgLethalBullet | ||
noSpawn: true | ||
name: летальный заряд | ||
parent: BaseBullet | ||
components: | ||
- type: Projectile | ||
damage: | ||
types: | ||
Heat: 12 | ||
ignoreWhitelist: | ||
tags: | ||
- Swarmer | ||
- type: Sprite | ||
sprite: Adventure/Roles/BorgDep/SecBorg/Borg_laser_gun.rsi | ||
layers: | ||
- state: OmniLetal | ||
shader: unshaded | ||
- type: PointLight | ||
enabled: true | ||
color: "#ff4052" | ||
radius: 1.5 | ||
energy: 2 | ||
|
||
#Дубинка-шокер киборга | ||
- type: entity | ||
name: дубинка-шокер киборга | ||
parent: Stunbaton | ||
id: StunbatonSecBorg | ||
description: Электрошоковая дубинка для выведения людей из строя. | ||
noSpawn: false | ||
components: | ||
- type: BatterySelfRecharger | ||
autoRecharge: true | ||
autoRechargeRate: 10 | ||
|
||
#Вспышка киборга | ||
- type: entity | ||
name: вспышка киборга | ||
parent: Flash | ||
id: FlashSecBorg | ||
description: Сверхяркая вспышка со спусковым механизмом. | ||
noSpawn: false | ||
components: | ||
- type: Sprite | ||
sprite: Objects/Weapons/Melee/flash.rsi | ||
layers: | ||
- state: burnt | ||
map: [ "enum.FlashVisuals.BaseLayer" ] | ||
- state: flashing | ||
map: [ "enum.FlashVisuals.LightLayer" ] | ||
visible: false | ||
shader: unshaded | ||
- type: LimitedCharges | ||
maxCharges: 10 | ||
charges: 10 | ||
- type: AutoRecharge | ||
rechargeDuration: 30 | ||
|
||
|
||
|
Oops, something went wrong.