Demiplane fixes (#632)

* limit demiplace wshwooshing by interaction range, fix global gibbing

* Update base.yml

* fix #521
This commit is contained in:
Ed
2024-12-06 17:16:38 +03:00
committed by GitHub
parent 64df860b50
commit 02cbeee6dc
6 changed files with 20 additions and 6 deletions

View File

@@ -67,8 +67,8 @@ public sealed partial class CP14DemiplaneSystem
while (query.MoveNext(out var uid, out var stabilizer, out var xform))
{
TryTeleportOutDemiplane(demiplane, uid);
_body.GibBody(uid);
if (TryTeleportOutDemiplane(demiplane, uid))
_body.GibBody(uid);
}
QueueDel(demiplane);

View File

@@ -44,6 +44,7 @@ public sealed partial class CP14DemiplaneSystem : CP14SharedDemiplaneSystem
UpdateGeneration(frameTime);
UpdateStabilization(frameTime);
}
/// <summary>
/// Teleports the entity inside the demiplane, to one of the random entry points.
/// </summary>

View File

@@ -1,4 +1,5 @@
using Content.Server._CP14.Demiplane;
using Content.Server.Interaction;
using Content.Server.Mind;
using Content.Server.Popups;
using Content.Shared._CP14.Demiplane;
@@ -19,8 +20,8 @@ public sealed partial class CP14DemiplaneTravelingSystem : EntitySystem
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly MindSystem _mind = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly InteractionSystem _interaction = default!;
public override void Initialize()
{
@@ -43,6 +44,7 @@ public sealed partial class CP14DemiplaneTravelingSystem : EntitySystem
passWay.NextTimeTeleport = _timing.CurTime + passWay.Delay;
//Get all teleporting entities
HashSet<EntityUid> teleportedEnts = new();
var nearestEnts = _lookup.GetEntitiesInRange(uid, passWay.Radius);
foreach (var ent in nearestEnts)
@@ -53,6 +55,9 @@ public sealed partial class CP14DemiplaneTravelingSystem : EntitySystem
if (!_mind.TryGetMind(ent, out var mindId, out var mind))
continue;
if (!_interaction.InRangeUnobstructed(ent, uid))
continue;
teleportedEnts.Add(ent);
}
@@ -61,6 +66,7 @@ public sealed partial class CP14DemiplaneTravelingSystem : EntitySystem
teleportedEnts.Remove(_random.Pick(teleportedEnts));
}
//Aaaand teleport it
var map = Transform(uid).MapUid;
if (TryComp<CP14DemiplaneComponent>(map, out var demiplan))
{
@@ -101,7 +107,6 @@ public sealed partial class CP14DemiplaneTravelingSystem : EntitySystem
private void RadiusMapInit(Entity<CP14DemiplaneRadiusTimedPasswayComponent> radiusPassWay, ref MapInitEvent args)
{
radiusPassWay.Comp.NextTimeTeleport = _timing.CurTime + radiusPassWay.Comp.Delay;
//Popup caution here
}
private void OnOpenRiftInteractDoAfter(Entity<CP14DemiplaneRiftOpenedComponent> passWay, ref CP14DemiplanPasswayUseDoAfter args)

View File

@@ -136,15 +136,19 @@
- TemporaryBlindness
- Pacified
- StaminaModifier
- type: ComplexInteraction
- Flashed
- RadiationProtection
- Drowsiness
- Adrenaline
- type: Body
prototype: CP14Human
requiredLegs: 2
- type: Identity
- type: Hands
- type: ComplexInteraction
- type: Inventory
- type: InventorySlots
- type: FloatingVisuals
#- type: FloatingVisuals
- type: Climbing
- type: Cuffable
- type: Ensnareable

View File

@@ -46,6 +46,7 @@
solutionName: vat
injectOnly: false
ignoreMobs: true
ignoreClosed: false
minTransferAmount: 10
maxTransferAmount: 100
transferAmount: 15
@@ -138,6 +139,7 @@
solutionName: mortar
injectOnly: false
ignoreMobs: true
ignoreClosed: false
minTransferAmount: 1
maxTransferAmount: 10
transferAmount: 5
@@ -209,6 +211,7 @@
solutionName: vial
injectOnly: false
ignoreMobs: true
ignoreClosed: false
minTransferAmount: 0.25
maxTransferAmount: 1
transferAmount: 0.25

View File

@@ -25,6 +25,7 @@
solutionName: bucket
injectOnly: false
ignoreMobs: true
ignoreClosed: false
minTransferAmount: 1
maxTransferAmount: 50
transferAmount: 50