Твики (#575)

* faster skates

* better rotation for RCD

* remove WarpPoint component from station beacon

* cleanup

* add robust singulo

* buff land mines

* better l6

* wd edit

* removing embed projectiles faster now

* da ebanniy rot ya vse pereputal
This commit is contained in:
ThereDrD
2024-08-20 04:01:10 +03:00
committed by GitHub
parent 39e89210d8
commit 33d969b36d
12 changed files with 64 additions and 45 deletions

View File

@@ -122,11 +122,7 @@ public sealed class SingularitySystem : SharedSingularitySystem
/// <param name="singularity">The state of the singularity to set the energy of.</param>
public void SetEnergy(EntityUid uid, float value, SingularityComponent? singularity = null)
{
if(!Resolve(uid, ref singularity))
return;
var oldValue = singularity.Energy;
if (oldValue == value)
if (!Resolve(uid, ref singularity))
return;
singularity.Energy = value;
@@ -154,13 +150,14 @@ public sealed class SingularitySystem : SharedSingularitySystem
/// <param name="singularity">The state of the singularity to adjust the energy of.</param>
public void AdjustEnergy(EntityUid uid, float delta, float min = float.MinValue, float max = float.MaxValue, bool snapMin = true, bool snapMax = true, SingularityComponent? singularity = null)
{
if(!Resolve(uid, ref singularity))
if (!Resolve(uid, ref singularity))
return;
var newValue = singularity.Energy + delta;
if((!snapMin && newValue < min)
|| (!snapMax && newValue > max))
if ((!snapMin && newValue < min) || (!snapMax && newValue > max))
return;
SetEnergy(uid, MathHelper.Clamp(newValue, min, max), singularity);
}