Demiplan polishing (#524)

* 10 -> 20 sharpening stone durability

* auto destroy demiplans try 2 (better)

* start demiplan protection time

* buying demiplan key

* increase island size
This commit is contained in:
Ed
2024-11-01 09:23:22 +03:00
committed by GitHub
parent 5c4b5d1572
commit f9fea9e6ed
19 changed files with 201 additions and 94 deletions

View File

@@ -2,10 +2,12 @@ using Content.Server.Flash;
using Content.Server.Procedural;
using Content.Shared._CP14.Demiplane;
using Content.Shared._CP14.Demiplane.Components;
using Content.Shared.Popups;
using Robust.Server.Audio;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
namespace Content.Server._CP14.Demiplane;
@@ -21,6 +23,8 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly AudioSystem _audio = default!;
[Dependency] private readonly FlashSystem _flash = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
public override void Initialize()
{
@@ -28,6 +32,7 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
InitGeneration();
InitConnections();
InitStabilization();
SubscribeLocalEvent<CP14DemiplaneComponent, ComponentShutdown>(OnDemiplanShutdown);
}
@@ -37,8 +42,8 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
base.Update(frameTime);
UpdateGeneration(frameTime);
UpdateStabilization(frameTime);
}
/// <summary>
/// Teleports the entity inside the demiplane, to one of the random entry points.
/// </summary>
@@ -61,10 +66,6 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
_transform.SetCoordinates(entity.Value, targetCoord);
_audio.PlayGlobal(demiplane.Comp.ArrivalSound, entity.Value);
var ev = new CP14DemiplanEntityEnterEvent(entity.Value);
RaiseLocalEvent(demiplane, ev);
return true;
}
@@ -93,9 +94,6 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
_transform.SetCoordinates(entity.Value, targetCoord);
_audio.PlayGlobal(demiplane.Comp.DepartureSound, entity.Value);
var ev = new CP14DemiplanEntityLeaveEvent(entity.Value);
RaiseLocalEvent(demiplane, ev);
return true;
}