Skip to content

Commit

Permalink
a bunch of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AwareFoxy committed Nov 6, 2024
1 parent 05b6514 commit d503b22
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 65 deletions.
27 changes: 0 additions & 27 deletions Content.Server/Backmen/Arrivals/CentcommSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
using Content.Shared.Backmen.CentComm;
using Content.Shared.Cargo.Components;
using Content.Shared.CCVar;
using Content.Shared.Emag.Components;
using Content.Shared.Emag.Systems;
using Content.Shared.GameTicking;
using Content.Shared.Random;
using Content.Shared.Random.Helpers;
Expand Down Expand Up @@ -74,7 +72,6 @@ public override void Initialize()
SubscribeLocalEvent<RoundStartingEvent>(OnCentComInit, before: new[] { typeof(EmergencyShuttleSystem) });
SubscribeLocalEvent<RoundEndedEvent>(OnCentComEndRound);
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnCleanup);
SubscribeLocalEvent<ShuttleConsoleComponent, GotEmaggedEvent>(OnShuttleConsoleEmaged);
SubscribeLocalEvent<FTLCompletedEvent>(OnFTLCompleted);
SubscribeLocalEvent<FtlCentComAnnounce>(OnFtlAnnounce);
SubscribeLocalEvent<LoadingMapsEvent>(OnLoadingMaps);
Expand Down Expand Up @@ -166,30 +163,6 @@ private void OnFTLCompleted(ref FTLCompletedEvent ev)
[ValidatePrototypeId<EntityPrototype>]
private const string StationShuttleConsole = "ComputerShuttle";

private void OnShuttleConsoleEmaged(Entity<ShuttleConsoleComponent> ent, ref GotEmaggedEvent args)
{
if (Prototype(ent)?.ID != StationShuttleConsole)
{
return;
}

if (!this.IsPowered(ent, EntityManager))
return;

var shuttle = Transform(ent).GridUid;
if (!HasComp<ShuttleComponent>(shuttle))
return;

if (!(HasComp<CargoShuttleComponent>(shuttle) || HasComp<SalvageShuttleComponent>(shuttle)))
return;

_audio.PlayPvs(SparkSound, ent);
_popupSystem.PopupEntity(Loc.GetString("shuttle-console-component-upgrade-emag-requirement"), ent);
args.Handled = true;
EnsureComp<AllowFtlToCentComComponent>(shuttle.Value); // для обновления консоли нужно чтобы компонент был до вызыва RefreshShuttleConsoles
_console.RefreshShuttleConsoles();
}

private void OnGridFillChange(bool obj)
{
if (obj)
Expand Down
1 change: 1 addition & 0 deletions Resources/Maps/Shuttles/ert_corvaxcentcomm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ entities:
chunkSize: 4
- type: GasTileOverlay
- type: RadiationGridResistance
- type: AllowFtlToCentCom
- proto: AirAlarm
entities:
- uid: 7657
Expand Down
65 changes: 27 additions & 38 deletions Resources/Maps/corvax_centcomm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ meta:
format: 6
postmapinit: false
tilemap:
0: Space
55: FloorAstroGrass
36: FloorBlue
2: FloorDark
Expand Down Expand Up @@ -5799,8 +5800,6 @@ entities:
- 0
- 0
chunkSize: 4
- type: BecomesStation
id: centcommcorvax
- uid: 5
components:
- type: MetaData
Expand Down Expand Up @@ -8425,6 +8424,25 @@ entities:
rot: 1.5707963267948966 rad
pos: 28.5,32.5
parent: 2
- proto: BaseAdvancedPen
entities:
- uid: 394
components:
- type: Transform
rot: -1.5707963267948966 rad
pos: 74.00797,12.565628
parent: 2
- uid: 395
components:
- type: Transform
pos: 57.72277,46.028847
parent: 2
- uid: 396
components:
- type: Transform
rot: 3.141592653589793 rad
pos: 37.62642,48.595196
parent: 2
- proto: BaseComputer
entities:
- uid: 397
Expand Down Expand Up @@ -26919,11 +26937,6 @@ entities:
- type: Transform
pos: 61.476036,44.66785
parent: 2
- type: UserInterface
actors:
enum.StorageUiKey.Key:
- invalid
- type: ActiveUserInterface
- proto: FoodBoxDonut
entities:
- uid: 3424
Expand Down Expand Up @@ -40238,6 +40251,13 @@ entities:
- type: Transform
pos: 62.5473,33.443535
parent: 2
- proto: MaterialReclaimer
entities:
- uid: 4942
components:
- type: Transform
pos: 37.5,56.5
parent: 2
- proto: Mattress
entities:
- uid: 4943
Expand Down Expand Up @@ -41421,25 +41441,6 @@ entities:
- type: Physics
canCollide: False
- type: InsideEntityStorage
- proto: Pen
entities:
- uid: 394
components:
- type: Transform
rot: -1.5707963267948966 rad
pos: 74.00797,12.565628
parent: 2
- uid: 395
components:
- type: Transform
pos: 57.72277,46.028847
parent: 2
- uid: 396
components:
- type: Transform
rot: 3.141592653589793 rad
pos: 37.62642,48.595196
parent: 2
- proto: PenCap
entities:
- uid: 5033
Expand Down Expand Up @@ -46244,18 +46245,6 @@ entities:
- type: Transform
pos: 62.5,31.5
parent: 2
- proto: SpawnPointCCOperator
entities:
- uid: 4942
components:
- type: Transform
pos: 74.5,38.5
parent: 2
- uid: 7129
components:
- type: Transform
pos: 74.5,34.5
parent: 2
- proto: SpeedLoaderMagnumAP
entities:
- uid: 2534
Expand Down

0 comments on commit d503b22

Please sign in to comment.