Фиксы в основном (#495)

* - fix: No concealed rune interaction.

* - fix: Wizard rule min players.

* - add: Holosign stuff.

* - add: Don't despawn dragon.

* - tweak: Implants.

* - fix: Hijack.

* - remove: Hardsuit objective.

* - fix: Holosigns.

* - fix: Fix chair rotation.

* - fix: No shooting while delayed.

* - fix: Changeling felinid polymorph.

* - fix: Fix stuck in container in container.

* - fix: Fix flash in containers.

* - fix: Whistle chameleon.

* - fix: Loc.

* - fix: No shooting in body bags.

* - fix: Error.

* - fix: Ling felinid fix attempt 2.
This commit is contained in:
Aviu00
2024-07-25 13:32:56 +00:00
committed by GitHub
parent 4b486a9641
commit f9224ea2f5
20 changed files with 80 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server._White.Cult.GameRule;
using Content.Server._White.Mood;
using Content.Server._White.Other.FastAndFuriousSystem;
using Content.Server._White.Wizard;
using Content.Server.Abilities.Felinid;
using Content.Server.Administration.Systems;
using Content.Server.Bible.Components;
using Content.Server.Body.Components;
@@ -1008,6 +1009,12 @@ public sealed partial class ChangelingSystem
_actionContainerSystem.TransferAllActionsFiltered(target, polymorphEntity.Value, polymorphEntity.Value);
_action.GrantContainedActions(polymorphEntity.Value, polymorphEntity.Value);
if (!TryComp(polymorphEntity.Value, out FelinidComponent? felinid))
return polymorphEntity;
_action.SetCharges(felinid.HairballAction, 0);
_action.SetEnabled(felinid.HairballAction, false);
return polymorphEntity;
}

View File

@@ -78,6 +78,8 @@ public sealed partial class DragonSystem : EntitySystem
}
}
continue; // WD EDIT, Don't despawn dragon
// At max rifts
if (comp.Rifts.Count >= RiftsAllowed)
continue;

View File

@@ -17,7 +17,9 @@ using Content.Shared.Traits.Assorted;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.StatusEffect;
using Content.Shared.Examine;
using Content.Shared.Hands.Components;
using Robust.Server.Audio;
using Robust.Server.Containers;
using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Random;
@@ -40,6 +42,7 @@ namespace Content.Server.Flash
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[Dependency] private readonly FlashSoundSuppressionSystem _flashSoundSuppressionSystem = default!;
[Dependency] private readonly ContainerSystem _container = default!;
public override void Initialize()
{
@@ -162,6 +165,14 @@ namespace Content.Server.Flash
var statusEffectsQuery = GetEntityQuery<StatusEffectsComponent>();
var damagedByFlashingQuery = GetEntityQuery<DamagedByFlashingComponent>();
// WD START
var flashInContainer =
_container.TryGetOuterContainer(source.Owner, transform, out var flashContainer);
if (flashInContainer && HasComp<HandsComponent>(flashContainer!.Owner))
flashInContainer = false;
// WD END
foreach (var entity in _entityLookup.GetEntitiesInRange(transform.Coordinates, range))
{
if (!_random.Prob(probability))
@@ -171,6 +182,16 @@ namespace Content.Server.Flash
if (!statusEffectsQuery.HasComponent(entity) && !damagedByFlashingQuery.HasComponent(entity))
continue;
// WD START
var entityInContainer = _container.TryGetContainingContainer(entity, out var entityContainer);
if (flashInContainer != entityInContainer)
continue;
if (flashInContainer && flashContainer != entityContainer)
continue;
// WD END
// Check for entites in view
// put damagedByFlashingComponent in the predicate because shadow anomalies block vision.
if (!_examine.InRangeUnOccluded(entity, mapPosition, range, predicate: (e) => damagedByFlashingQuery.HasComponent(e)))

View File

@@ -14,7 +14,7 @@ namespace Content.Server.Holosign
/// How much charge a single use expends.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField]
public int Uses = 10;
public int Uses = 6;
[ViewVariables(VVAccess.ReadWrite), DataField]
public List<EntityUid?> Signs = new();

View File

@@ -5,6 +5,7 @@ using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Popups;
using Content.Shared.Storage;
using Content.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Server.Holosign;
@@ -13,6 +14,7 @@ public sealed class HolosignSystem : EntitySystem
{
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly UseDelaySystem _useDelay = default!;
public override void Initialize()
{
@@ -61,7 +63,10 @@ public sealed class HolosignSystem : EntitySystem
return;
}
if (args.Handled || !args.CanReach || HasComp<StorageComponent>(args.Target))
if (args.Handled || !args.CanReach || args.Target != null)
return;
if (TryComp(uid, out UseDelayComponent? useDelay) && !_useDelay.TryResetDelay((uid, useDelay), true))
return;
if (component.Signs.Count >= component.Uses) // wd edit

View File

@@ -102,6 +102,8 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem
BreakOnDamage = true,
BreakOnMove = true,
NeedHand = true,
BreakOnHandChange = true, // WD EDIT
MovementThreshold = 0.01f,
};
if (!_doAfter.TryStartDoAfter(args))

View File

@@ -82,7 +82,7 @@ public sealed class HijackShuttleConditionSystem : EntitySystem
if (!isHumanoid) // Only humanoids count as enemies
continue;
var isAntagonist = _role.MindIsAntagonist(mindId);
var isAntagonist = _role.MindIsAntagonist(crewMindId);
if (isAntagonist) // Allow antagonist
continue;

View File

@@ -75,6 +75,13 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
_sawmill = _logManager.GetSawmill("Wizard");
}
protected override void Added(EntityUid uid, WizardRuleComponent component, GameRuleComponent gameRule, GameRuleAddedEvent args)
{
base.Added(uid, component, gameRule, args);
gameRule.MinPlayers = component.MinPlayers;
}
private void OnObjectivesTextGetInfo(Entity<WizardRuleComponent> ent, ref ObjectivesTextGetInfoEvent args)
{
args.Minds = ent.Comp.WizardMinds;

View File

@@ -86,10 +86,10 @@ public abstract partial class SharedBuckleSystem : EntitySystem
case StrapPosition.None:
break;
case StrapPosition.Stand:
_standing.Stand(buckleUid);
_standing.Stand(buckleUid, unbuckle: false);
break;
case StrapPosition.Down:
_standing.Down(buckleUid, false, false);
_standing.Down(buckleUid, false, false, false);
break;
}
}

View File

@@ -186,7 +186,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
return false;
}
Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, standingState);
Down(uid, true, behavior != DropHeldItemsBehavior.NoDrop, true, standingState);
return true;
}
// WD EDIT END
@@ -203,6 +203,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
EntityUid uid,
bool playSound = true,
bool dropHeldItems = true,
bool unbuckle = true, // WD EDIT
StandingStateComponent? standingState = null,
AppearanceComponent? appearance = null,
HandsComponent? hands = null)
@@ -292,7 +293,8 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
EntityUid uid,
StandingStateComponent? standingState = null,
AppearanceComponent? appearance = null,
bool force = false)
bool force = false,
bool unbuckle = true) // WD EDIT
{
if (!Resolve(uid, ref standingState, false))
return false;
@@ -300,7 +302,7 @@ public abstract partial class SharedStandingStateSystem : EntitySystem
// Optional component.
Resolve(uid, ref appearance, false);
if (TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT
if (unbuckle && TryComp(uid, out BuckleComponent? buckle) && buckle.Buckled && !_buckle.TryUnbuckle(uid, uid, buckleComp: buckle)) // WD EDIT
return false;
if (standingState.CurrentState is StandingState.Standing)

View File

@@ -361,7 +361,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
return false;
}
if (_container.IsEntityInContainer(target))
if (_container.IsEntityInContainer(target) && !_container.ContainsEntity(target, user)) // WD EDIT
{
if (_container.TryGetOuterContainer(target,Transform(target) ,out var container) &&
!HasComp<HandsComponent>(container.Owner))

View File

@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using Content.Shared._White.Containers;
using Content.Shared._White.Events;
using Content.Shared._White.WeaponModules;
using Content.Shared.ActionBlocker;
@@ -230,7 +231,12 @@ public abstract partial class SharedGunSystem : EntitySystem
private void AttemptShoot(EntityUid user, EntityUid gunUid, GunComponent gun)
{
if (gun.FireRateModified <= 0f ||
!_actionBlockerSystem.CanAttack(user))
!_actionBlockerSystem.CanAttack(user) || TryComp(gunUid, out UseDelayComponent? useDelay) &&
_useDelay.IsDelayed((gunUid, useDelay))) // WD EDIT
return;
if (Containers.TryGetOuterContainer(user, Transform(user), out var container) &&
HasComp<ShootBlockerContainerComponent>(container.Owner)) // WD
return;
var toCoordinates = gun.ShootCoordinates;

View File

@@ -1,6 +1,7 @@
using Content.Shared.Coordinates;
using Content.Shared.Humanoid;
using Content.Shared.Interaction.Events;
using Content.Shared.Polymorph.Components;
using Content.Shared.Stealth.Components;
using JetBrains.Annotations;
using Robust.Shared.Timing;
@@ -54,6 +55,9 @@ public sealed class WhistleSystem : EntitySystem
if (TryComp(iterator, out stealth) && stealth.Enabled)
continue;
if (HasComp<ChameleonDisguisedComponent>(iterator)) // WD
continue;
//We don't want to ping user of whistle
if (iterator.Owner == owner)
continue;

View File

@@ -0,0 +1,6 @@
namespace Content.Shared._White.Containers;
[RegisterComponent]
public sealed partial class ShootBlockerContainerComponent : Component
{
}

View File

@@ -11,10 +11,10 @@ public sealed class ConcealableSystem : EntitySystem
base.Initialize();
SubscribeLocalEvent<ConcealableComponent, ExamineAttemptEvent>(OnExamine);
SubscribeLocalEvent<ConcealableComponent, InteractionAttemptEvent>(OnInteract);
SubscribeLocalEvent<ConcealableComponent, GettingInteractedWithAttemptEvent>(OnInteract);
}
private void OnInteract(Entity<ConcealableComponent> ent, ref InteractionAttemptEvent args)
private void OnInteract(Entity<ConcealableComponent> ent, ref GettingInteractedWithAttemptEvent args)
{
if (ent.Comp is {Concealed: true, ExaminableWhileConcealed: false})
args.Cancel();

View File

@@ -39,4 +39,4 @@ latejoin-arrivals-direction = A shuttle transferring you to your station will ar
latejoin-arrivals-direction-time = A shuttle transferring you to your station will arrive in {$time}.
preset-not-enough-ready-players = Can't start {$presetName}. Requires {$minimumPlayers} players but we have {$readyPlayersCount}.
preset-no-one-ready = Can't start {$presetName}. No players are ready.
preset-no-one-ready = Can't start. No players are ready.

View File

@@ -8,6 +8,7 @@
storedRotation: -90
- type: HolosignProjector
- type: UseDelay
delay: 0.5
- type: ContainerContainer
containers:
cell_slot: !type:ContainerSlot

View File

@@ -86,6 +86,7 @@
paper_label: !type:ContainerSlot
- type: StaticPrice
price: 50
- type: ShootBlockerContainer
- type: entity
id: BodyBagFolded

View File

@@ -13,7 +13,7 @@
CaptainIDStealObjective: 1
CMOHyposprayStealObjective: 1
#CMOCrewMonitorStealObjective: 1
RDHardsuitStealObjective: 1
#RDHardsuitStealObjective: 1
NukeDiskStealObjective: 1
MagbootsStealObjective: 1
CorgiMeatStealObjective: 1
@@ -137,7 +137,7 @@
weights:
CaptainIDStealObjectiveCh: 1
CMOHyposprayStealObjectiveCh: 1
RDHardsuitStealObjectiveCh: 1
#RDHardsuitStealObjectiveCh: 1
NukeDiskStealObjectiveCh: 1
MagbootsStealObjectiveCh: 1
CorgiMeatStealObjectiveCh: 1

View File

@@ -9,7 +9,7 @@
weights:
CaptainIDStealObjectiveWiz: 1
CMOHyposprayStealObjectiveWiz: 1
RDHardsuitStealObjectiveWiz: 1
#RDHardsuitStealObjectiveWiz: 1
NukeDiskStealObjectiveWiz: 1
MagbootsStealObjectiveWiz: 1
CorgiMeatStealObjectiveWiz: 1