-
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.
Merge branch 'master' into darobotochkiii
- Loading branch information
Showing
43 changed files
with
1,337 additions
and
50 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; | ||
} | ||
|
||
} | ||
} |
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
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 = Родите самую быструю личинку! |
5 changes: 5 additions & 0 deletions
5
Resources/Locale/ru-RU/ADT/prototypes/Entities/Objects/Materials/shards.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,5 @@ | ||
ent-ADTShardGlassReinforcedPlasma = осколок закалённого плазменного стекла | ||
.desc = Небольшой осколок плазменного стекла. | ||
ent-ADTShardGlassReinforcedUran = осколок закалённого уранового стекла | ||
.desc = Небольшой осколок уранового стекла. |
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: 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 |
Oops, something went wrong.