forked from AdventureTimeSS14/space_station_ADT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Защита от стамина урона + блокировка шприцов ухтантам и скафандрам (A…
…dventureTimeSS14#314) <!-- ЭТО ШАБЛОН ВАШЕГО PULL REQUEST. Текст между стрелками - это комментарии - они не будут видны в PR. --> ## Описание PR <!-- Ниже опишите ваш Pull Request. Что он изменяет? На что еще это может повлиять? Постарайтесь описать все внесённые вами изменения! --> Добавил защиту от стана и блокировку шприцов унатхам, а так же мобам в скафандрах **Медиа** <!-- Если приемлемо, добавьте скриншоты для демонстрации вашего PR. Если ваш PR представляет собой визуальное изменение, добавьте скриншоты, иначе он может быть закрыт. --> **Проверки** <!-- Выполнение всех следующих действий, если это приемлемо для вида изменений сильно ускорит разбор вашего PR --> - [ ] PR полностью завершён и мне не нужна помощь чтобы его закончить. - [ ] Я внимательно просмотрел все свои изменения и багов в них не нашёл. - [ ] Я запускал локальный сервер со своими изменениями и всё протестировал. - [ ] Я добавил скриншот/видео демонстрации PR в игре, **или** этот PR этого не требует. **Изменения** <!-- Здесь вы можете написать список изменений, который будет автоматически добавлен в игру, когда ваш PR будет принят. В журнал изменений следует помещать только то, что действительно важно игрокам. В списке изменений тип значка не является часть предложения, поэтому явно указывайте - Добавлен, Удалён, Изменён. плохо: - add: Новый инструмент для инженеров хорошо: - add: Добавлен новый инструмент для инженеров Вы можете указать своё имя после символа 🆑 именно оно будет отображаться в журнале изменений (иначе будет использоваться ваше имя на GitHub) Например: 🆑 Ian --> 🆑 Котя - add: Добавлена защита от стана скафандрам ЯО и СБ. - add: Теперь шприцы не работают на мобов, которые носят скафандры. - add: Шприцы так же перестали работать на унатхов даже без скафандра. --------- Co-authored-by: bananchiki <[email protected]>
- Loading branch information
Showing
20 changed files
with
206 additions
and
5 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
Content.Server/ADT/Chemistry/Systems/InjectorsBlockerSystem.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,26 @@ | ||
using Content.Shared.Chemistry; | ||
using Content.Shared.Chemistry.Components; | ||
using Content.Shared.Inventory; | ||
|
||
namespace Content.Server.Chemistry.EntitySystems; | ||
|
||
public sealed class InjectorsBlockerSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<InjectorsBlockerComponent, InjectAttemptEvent>(OnInjectAttempt); | ||
SubscribeLocalEvent<InjectorsBlockerComponent, InventoryRelayedEvent<InjectAttemptEvent>>(OnInjectRelayAttempt); | ||
} | ||
|
||
private void OnInjectAttempt(EntityUid uid, InjectorsBlockerComponent comp, InjectAttemptEvent args) | ||
{ | ||
args.Cancel(); | ||
} | ||
|
||
private void OnInjectRelayAttempt(EntityUid uid, InjectorsBlockerComponent comp, InventoryRelayedEvent<InjectAttemptEvent> args) | ||
{ | ||
args.Args.Cancel(); | ||
} | ||
} |
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
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
12 changes: 12 additions & 0 deletions
12
Content.Shared/ADT/Chemistry/Components/InjectorsBlockerComponent.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,12 @@ | ||
using Content.Shared.Chemistry.EntitySystems; | ||
using Content.Shared.DoAfter; | ||
using Content.Shared.FixedPoint; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Serialization; | ||
|
||
namespace Content.Shared.Chemistry.Components; | ||
|
||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class InjectorsBlockerComponent : Component | ||
{ | ||
} |
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,13 @@ | ||
using Content.Shared.Inventory; | ||
|
||
namespace Content.Shared.Chemistry; | ||
|
||
public sealed class InjectAttemptEvent : CancellableEntityEventArgs, IInventoryRelayEvent | ||
{ | ||
// Whenever locational damage is a thing, this should just check only that bit of armour. | ||
public SlotFlags TargetSlots { get; } = ~SlotFlags.POCKET; | ||
|
||
public InjectAttemptEvent() | ||
{ | ||
} | ||
} |
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
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
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
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 @@ | ||
armor-stamina-protection-value = - [color=cyan] Стамина [/color] урон снижается на [color=lightblue]{ $value }%[/color]. |
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 @@ | ||
injector-component-fail-user = Вы не можете ввести содержимое шприца в { CAPITALIZE($target) }. |
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
Oops, something went wrong.