-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Описание PR Увеличено здоровье ксеноморфам. Добавлена способность ставить турельки у королевы. **Ссылка на публикацию в Discord** - [Заказы-разработка](https://discord.com/channels/901772674865455115/1318583251933331569) ## Техническая информация Попытался добавить ивент по шаблону ивента мима. Не получилось, не видел прототип ивента. (Сам ивент видел). Добавил способность королеве на основе невидимой стены мима. Она может раз в 3 минуты призвать турель с 100 хп. (К сожалению спрайт стенки у кнопки. Да.) ## Требования - [x] Я прочитал(а) и следую [Руководство по созданию пулл реквестов](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html). Я понимаю, что в противном случае мой ПР может быть закрыт по усмотрению мейнтейнера. - [x] Я добавил скриншоты/видео к этому пулл реквесту, демонстрирующие его изменения в игре, **или** этот пулл реквест не требует демонстрации в игре **Чейнджлог** :cl: NameLunar - fix: Ксеноморфы эволюционировали и стали намного опасней. В особенности Королева! - add: Добавлены некоторые способности для королевы ксеноморфов. --------- Co-authored-by: Schrödinger <[email protected]>
- Loading branch information
1 parent
b19a0a5
commit 1bc5607
Showing
9 changed files
with
260 additions
and
18 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
Content.Server/ADT/Abilities/XenoQeen/XenoQeenComponent.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,29 @@ | ||
using Robust.Shared.Prototypes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; | ||
|
||
namespace Content.Server.Abilities.XenoQeen | ||
{ | ||
/// <summary> | ||
/// Lets its owner entity use mime powers, like placing invisible walls. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class XenoQeenComponent : Component | ||
{ | ||
/// <summary> | ||
/// Whether this component is active or not. | ||
/// </summarY> | ||
[DataField("enabled")] | ||
public bool Enabled = true; | ||
|
||
/// <summary> | ||
/// The wall prototype to use. | ||
/// </summary> | ||
[DataField("wallPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] | ||
public string XenoTurret = "WeaponTurretXeno"; | ||
|
||
[DataField("xenoTurretAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))] | ||
public string? XenoTurretAction = "ActionXenoQeenTurret"; | ||
|
||
[DataField("xenoTurretActionEntity")] public EntityUid? XenoTurretActionEntity; | ||
} | ||
} |
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,66 @@ | ||
using Content.Server.Popups; | ||
using Content.Shared.Actions; | ||
using Content.Shared.Actions.Events; | ||
using Content.Shared.Coordinates.Helpers; | ||
using Content.Shared.Maps; | ||
using Content.Shared.Physics; | ||
using Robust.Shared.Containers; | ||
using Robust.Shared.Map; | ||
|
||
namespace Content.Server.Abilities.XenoQeen | ||
{ | ||
public sealed class XenoQeenSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly PopupSystem _popupSystem = default!; | ||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!; | ||
[Dependency] private readonly TurfSystem _turf = default!; | ||
[Dependency] private readonly IMapManager _mapMan = default!; | ||
[Dependency] private readonly SharedContainerSystem _container = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
SubscribeLocalEvent<XenoQeenComponent, ComponentInit>(OnComponentInit); | ||
SubscribeLocalEvent<XenoQeenComponent, InvisibleWallActionEvent>(OnCreateTurret); | ||
} | ||
|
||
public override void Update(float frameTime) | ||
{ | ||
base.Update(frameTime); | ||
} | ||
private void OnComponentInit(EntityUid uid, XenoQeenComponent component, ComponentInit args) | ||
{ | ||
_actionsSystem.AddAction(uid, ref component.XenoTurretActionEntity, component.XenoTurretAction, uid); | ||
} | ||
private void OnCreateTurret(EntityUid uid, XenoQeenComponent component, InvisibleWallActionEvent args) | ||
{ | ||
if (!component.Enabled) | ||
return; | ||
|
||
if (_container.IsEntityOrParentInContainer(uid)) | ||
return; | ||
|
||
var xform = Transform(uid); | ||
// Get the tile in front of the Qeen | ||
var offsetValue = xform.LocalRotation.ToWorldVec(); | ||
var coords = xform.Coordinates.Offset(offsetValue).SnapToGrid(EntityManager, _mapMan); | ||
var tile = coords.GetTileRef(EntityManager, _mapMan); | ||
if (tile == null) | ||
return; | ||
|
||
// Check if the tile is blocked by a wall or mob, and don't create the wall if so | ||
if (_turf.IsTileBlocked(tile.Value, CollisionGroup.Impassable | CollisionGroup.Opaque)) | ||
{ | ||
_popupSystem.PopupEntity(Loc.GetString("create-turret-failed"), uid, uid); | ||
return; | ||
} | ||
|
||
_popupSystem.PopupEntity(Loc.GetString("create-turret"), uid); | ||
// Make sure we set the invisible wall to despawn properly | ||
Spawn(component.XenoTurret, _turf.GetTileCenter(tile.Value)); | ||
// Handle args so cooldown works | ||
args.Handled = true; | ||
} | ||
|
||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Resources/Locale/ru-RU/ADT/prototypes/Actions/XenoQeen.ftl
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,14 @@ | ||
ent-ActionXenoQeenTurret = Создать ксено турель. | ||
.desc = Создаёт перед вами ксену турель, если хватает места. | ||
create-turret-failed = Найдите другое место. | ||
create-turret = Арргхсс. Шшшшш! | ||
ent-ActionSpawnMobXenoSpitter = Призвать Плевальщик | ||
.desc = Родите Плевальщика, который будет плеваться! | ||
ent-ActionSpawnMobXenoPraetorian = Призвать Преторианеца | ||
.desc = Родите Преторианеца, который будет сражаться за вас! | ||
ent-ActionSpawnMobXenoDrone = Просто Дрон. Кому он нужен? | ||
.desc = Родите рабочего, Дрон. | ||
ent-ActionSpawnMobXenoRavager = Призвать Разрушителя | ||
.desc = Родите смерть во плоти! | ||
ent-ActionSpawnMobXenoRunner = Призвать Бегуна | ||
.desc = Родите самую быструю личинку! |
12 changes: 6 additions & 6 deletions
12
Resources/Locale/ru-RU/ss14-ru/prototypes/entities/mobs/npcs/xeno.ftl
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,109 @@ | ||
# Спавн турелей у королевы | ||
- type: entity | ||
id: ActionXenoQeenTurret | ||
name: Create Xeno turret | ||
description: Create an xeno turret in front of you, if placeable there. | ||
components: | ||
- type: InstantAction | ||
priority: -1 | ||
useDelay: 180 | ||
icon: | ||
sprite: Objects/Weapons/Guns/Turrets/xenoturret.rsi | ||
state: icon | ||
event: !type:InvisibleWallActionEvent | ||
# Я не смог сделать отдельный ивент для спавнта турели. Он не видел прототип ивента. | ||
|
||
- type: entity | ||
id: ActionSpawnMobXenoSpitter | ||
name: Spawn Spitter | ||
description: Give birth to Spitter who will spit! | ||
categories: [ HideSpawnMenu ] | ||
components: | ||
- type: WorldTargetAction | ||
useDelay: 240 | ||
range: 4 | ||
itemIconStyle: BigAction | ||
icon: | ||
sprite: Mobs/Aliens/Xenos/spitter.rsi | ||
state: crit | ||
event: !type:WorldSpawnSpellEvent | ||
prototypes: | ||
- id: MobXenoSpitter | ||
amount: 1 | ||
offset: 0, 1 | ||
|
||
- type: entity | ||
id: ActionSpawnMobXenoPraetorian | ||
name: Spawn Praetorian | ||
description: Give birth to a Praetorian who will fight for you! | ||
categories: [ HideSpawnMenu ] | ||
components: | ||
- type: WorldTargetAction | ||
useDelay: 300 | ||
range: 4 | ||
itemIconStyle: BigAction | ||
icon: | ||
sprite: Mobs/Aliens/Xenos/praetorian.rsi | ||
state: crit | ||
event: !type:WorldSpawnSpellEvent | ||
prototypes: | ||
- id: MobXenoPraetorian | ||
amount: 1 | ||
offset: 0, 1 | ||
|
||
- type: entity | ||
id: ActionSpawnMobXenoDrone | ||
name: Just a Drone. Who needs it? | ||
description: Give birth to a worker, Drone. | ||
categories: [ HideSpawnMenu ] | ||
components: | ||
- type: WorldTargetAction | ||
useDelay: 80 | ||
range: 4 | ||
itemIconStyle: BigAction | ||
icon: | ||
sprite: Mobs/Aliens/Xenos/drone.rsi | ||
state: crit | ||
event: !type:WorldSpawnSpellEvent | ||
prototypes: | ||
- id: MobXenoDrone | ||
amount: 1 | ||
offset: 0, 1 | ||
|
||
- type: entity | ||
id: ActionSpawnMobXenoRavager | ||
name: Spawn Ravager | ||
description: Give birth to death in the flesh! | ||
categories: [ HideSpawnMenu ] | ||
components: | ||
- type: WorldTargetAction | ||
useDelay: 480 | ||
range: 4 | ||
itemIconStyle: BigAction | ||
icon: | ||
sprite: Mobs/Aliens/Xenos/ravager.rsi | ||
state: crit | ||
event: !type:WorldSpawnSpellEvent | ||
prototypes: | ||
- id: MobXenoRavager | ||
amount: 1 | ||
offset: 0, 1 | ||
|
||
- type: entity | ||
id: ActionSpawnMobXenoRunner | ||
name: Spawn Runner | ||
description: Give birth to the fastest larva! | ||
categories: [ HideSpawnMenu ] | ||
components: | ||
- type: WorldTargetAction | ||
useDelay: 120 | ||
range: 4 | ||
itemIconStyle: BigAction | ||
icon: | ||
sprite: Mobs/Aliens/Xenos/runner.rsi | ||
state: crit | ||
event: !type:WorldSpawnSpellEvent | ||
prototypes: | ||
- id: MobXenoRunner | ||
amount: 1 | ||
offset: 0, 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
Binary file added
BIN
+668 Bytes
Resources/Textures/Objects/Weapons/Guns/Turrets/xenoturret.rsi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "icon" | ||
}, | ||
{ | ||
"name": "acid_turret", | ||
"directions": 4, | ||
|