Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Feb 4, 2024
1 parent d692878 commit 48f907f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4 deletions.
24 changes: 24 additions & 0 deletions Content.Server/Backmen/Arrivals/AutoRespawnSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Content.Server.GameTicking;
using Content.Server.Ghost.Roles;
using Content.Server.Ghost.Roles.Components;
using Robust.Shared.Console;

namespace Content.Server.Backmen.Arrivals;

public sealed class AutoRespawnSystem : EntitySystem
{
[Dependency] private readonly GameTicker _ticker = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<BkmRespawnerComponent, TakeGhostRoleEvent>(OnRequestRespawn, before: new []{ typeof(GhostRoleSystem) });
}

private void OnRequestRespawn(Entity<BkmRespawnerComponent> ent, ref TakeGhostRoleEvent args)
{
args.TookRole = true;
_ticker.Respawn(args.Player);
}
}
7 changes: 7 additions & 0 deletions Content.Server/Backmen/Arrivals/BkmRespawnerComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Server.Backmen.Arrivals;

[RegisterComponent]
public sealed partial class BkmRespawnerComponent : Component
{

}
2 changes: 1 addition & 1 deletion Content.Server/Backmen/StationAI/AiEyeMover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public AiEyeMover(EntityManager entityManager, AICameraSystem cameraSystem, Enti
var core = Eye.Comp.AiCore.Value;

var gridUid = NewPosition.GetGridUid(_entityManager);
;

if (gridUid == null || _transform.GetMoverCoordinates(core).GetGridUid(_entityManager) != gridUid)
{
_entityManager.QueueDeleteEntity(Eye);
Expand Down
4 changes: 2 additions & 2 deletions Resources/Maps/Backmen/bargevsship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ entities:
- type: MetaData
name: TeamA
- type: Transform
pos: -96.517395,0.43276936
pos: -600.517395,100.43276936
parent: 1
- type: MapGrid
chunks:
Expand Down Expand Up @@ -466,7 +466,7 @@ entities:
- type: MetaData
name: TeamB
- type: Transform
pos: 300.4826,0.43276936
pos: 600.4826,-100.43276936
parent: 1
- type: MapGrid
chunks:
Expand Down
22 changes: 21 additions & 1 deletion Resources/Prototypes/Backmen/Catalog/vessel/ship_vs_shop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
- type: vessel
- type: entity
id: SpawnPointReturnToMenu
name: return to menu
suffix: admeme
parent: MarkerBase
components:
- type: GhostRole
name: Респавн в меню
description: выкинет в меню
rules: В БОЙ СОЛДАТ!
- type: GhostTakeoverAvailable
- type: BkmRespawner
- type: Sprite
sprite: Markers/jobs.rsi
layers:
- state: green
- sprite: Mobs/Animals/regalrat.rsi
state: icon


- type: vessel
id: ToteTeam1
name: Красный бомбардир МК1
description: тут ваша реклама
Expand Down

0 comments on commit 48f907f

Please sign in to comment.