Всякое (#104)

* - tweak: Revert mistakes.

* - tweak: Limit tempgun max temperature.

* - tweak: Gamemode tweaks.

* - tweak: Shuttle aren't messy anymore.

* - tweak: Vent critters spawn tweaks.

* - tweak: No stamina cost for mining weapons.

* - tweak: Better block.

* - add: Cool attack animations.

* - fix: Fix sprite.

* - add: Stun baton now shows charge.

* - tweak: Add cult to all in once.
This commit is contained in:
Aviu00
2024-02-21 16:52:25 +09:00
committed by GitHub
parent 6a22647864
commit c0cb414f17
14 changed files with 111 additions and 35 deletions

View File

@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Server.GameTicking.Rules.Components;
using Content.Server.Station.Components;
using Robust.Shared.Collections;
@@ -107,6 +108,12 @@ public abstract partial class GameRuleSystem<T> where T: IComponent
targetGrid = RobustRandom.Pick(possibleTargets);
foreach (var target in possibleTargets.Where(HasComp<BecomesStationComponent>)) // WD
{
targetGrid = target;
break;
}
if (!TryComp<MapGridComponent>(targetGrid, out var gridComp))
return false;

View File

@@ -13,6 +13,7 @@ using Content.Server.Revolutionary;
using Content.Server.Revolutionary.Components;
using Content.Server.Roles;
using Content.Server.RoundEnd;
using Content.Server.StationEvents.Components;
using Content.Shared.Chat;
using Content.Shared.Database;
using Content.Shared.Humanoid;
@@ -51,6 +52,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
[Dependency] private readonly SharedStunSystem _stun = default!;
[Dependency] private readonly RoundEndSystem _roundEnd = default!;
[Dependency] private readonly AudioSystem _audioSystem = default!;
[Dependency] private readonly GameTicker _gameTicker = default!; // WD
[ValidatePrototypeId<NpcFactionPrototype>]
public const string RevolutionaryNpcFaction = "Revolutionary";
@@ -87,8 +89,13 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
if (CheckCommandLose())
{
// _roundEnd.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, component.ShuttleCallTime);
_roundEnd.EndRound(); // WD EDIT
// WD EDIT START
// Basically check for all in once gamemode
if (_gameTicker.GetActiveGameRules().Where(HasComp<RampingStationEventSchedulerComponent>).Any())
_roundEnd.DoRoundEndBehavior(RoundEndBehavior.ShuttleCall, component.ShuttleCallTime);
else
_roundEnd.EndRound();
// WD EDIT END
GameTicker.EndGameRule(uid, gameRule);
}
}

View File

@@ -27,6 +27,9 @@ public sealed class VentCrittersRule : StationEventSystem<VentCrittersRuleCompon
var validLocations = new List<EntityCoordinates>();
while (locations.MoveNext(out _, out _, out var transform))
{
if (!HasComp<BecomesStationComponent>(transform.GridUid)) // WD EDIT
continue;
if (CompOrNull<StationMemberComponent>(transform.GridUid)?.Station == station)
{
validLocations.Add(transform.Coordinates);

View File

@@ -1,3 +1,5 @@
using Content.Shared.Atmos;
namespace Content.Server._White.ChangeTemperatureOnCollide;
[RegisterComponent]
@@ -6,6 +8,12 @@ public sealed partial class ChangeTemperatureOnCollideComponent : Component
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float Temperature;
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MinTemperature = Atmospherics.TCMB;
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MaxTemperature = 450;
[DataField]
public string FixtureID = "projectile";
}

View File

@@ -1,6 +1,5 @@
using Content.Server.Temperature.Components;
using Content.Server.Temperature.Systems;
using Content.Shared.Atmos;
using Robust.Shared.Physics.Events;
namespace Content.Server._White.ChangeTemperatureOnCollide;
@@ -24,7 +23,16 @@ public sealed class ChangeTemperatureOnCollideSystem : EntitySystem
if (!TryComp(args.OtherEntity, out TemperatureComponent? temperature))
return;
_temperature.ForceChangeTemperature(args.OtherEntity,
MathF.Max(Atmospherics.TCMB, temperature.CurrentTemperature + component.Temperature), temperature);
var curTemp = temperature.CurrentTemperature;
var newTemp = curTemp + component.Temperature;
if (curTemp < component.MinTemperature)
newTemp = MathF.Max(curTemp, newTemp);
else if (curTemp > component.MaxTemperature)
newTemp = MathF.Min(curTemp, newTemp);
else
newTemp = Math.Clamp(newTemp, component.MinTemperature, component.MaxTemperature);
_temperature.ForceChangeTemperature(args.OtherEntity, newTemp, temperature);
}
}