-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Port-Morale-System
- Loading branch information
Showing
206 changed files
with
710 additions
and
252 deletions.
There are no files selected for viewing
5 changes: 2 additions & 3 deletions
5
...idgeLoader/Cartridges/GlimmerMonitorUi.cs → ...idgeLoader/Cartridges/GlimmerMonitorUi.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../Cartridges/GlimmerMonitorUiFragment.xaml → .../Cartridges/GlimmerMonitorUiFragment.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rtridges/GlimmerMonitorUiFragment.xaml.cs → ...rtridges/GlimmerMonitorUiFragment.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
Content.Server/Botany/Components/TeleportingTraitComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace Content.Server.Botany | ||
{ | ||
[RegisterComponent] | ||
|
||
public sealed partial class TeleportingTraitComponent : Component | ||
{ | ||
/// <summary> | ||
/// Teleportation radius of produce. | ||
/// </summary> | ||
[DataField] | ||
public float ProduceTeleportRadius; | ||
|
||
/// <summary> | ||
/// How much to divide the potency. | ||
/// </summary> | ||
[DataField] | ||
public float PotencyDivide = 10f; | ||
|
||
/// <summary> | ||
/// Potency of fruit. | ||
/// </summary> | ||
[DataField] | ||
public float Potency; | ||
|
||
/// <summary> | ||
/// Chance of deletion. | ||
/// </summary> | ||
[DataField] | ||
public float DeletionChance = .5f; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Robust.Shared.Random; | ||
using Content.Shared.Slippery; | ||
using Content.Server.Fluids.EntitySystems; | ||
using Content.Shared.Chemistry.Components; | ||
using Content.Shared.Popups; | ||
|
||
namespace Content.Server.Botany.Systems; | ||
|
||
public sealed class TeleportingTraitSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedTransformSystem _xform = default!; | ||
[Dependency] private readonly IRobustRandom _random = default!; | ||
[Dependency] private readonly SharedPopupSystem _popup = default!; | ||
[Dependency] private readonly PuddleSystem _puddle = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<TeleportingTraitComponent, SlipEvent>(Teleport); | ||
} | ||
|
||
// sets the potency and the radius | ||
public static void SetPotencyRadius(float seedPotency, TeleportingTraitComponent comp) | ||
{ | ||
comp.Potency = seedPotency; | ||
comp.ProduceTeleportRadius = comp.Potency / comp.PotencyDivide; | ||
} | ||
|
||
// teleports both the produce and the foolish fool who slipped on it to a random postion limited by the radius | ||
private void Teleport(EntityUid uid, TeleportingTraitComponent comp, ref SlipEvent args) | ||
{ | ||
var coordinates = Transform(uid).Coordinates; | ||
_xform.SetCoordinates(uid, coordinates.Offset(_random.NextVector2(comp.ProduceTeleportRadius))); | ||
_popup.PopupEntity(Loc.GetString("teleporting-trait-component-slipped"), args.Slipped, args.Slipped, PopupType.SmallCaution); | ||
_xform.SetCoordinates(args.Slipped, coordinates.Offset(_random.NextVector2(comp.ProduceTeleportRadius))); | ||
VanishProbablity(uid, comp); | ||
} | ||
|
||
// chance of being deleted and then spawnin the goop | ||
private void VanishProbablity(EntityUid uid, TeleportingTraitComponent comp) | ||
{ | ||
if (!_random.Prob(comp.DeletionChance)) | ||
return; | ||
Solution vanishSolution = new(); | ||
vanishSolution.AddReagent("Slime", comp.Potency / 2); | ||
_puddle.TrySpillAt(uid, vanishSolution, out _); | ||
QueueDel(uid); | ||
} | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rasen/Chat/TelepathicRepeaterComponent.cs → ...erver/Chat/TelepathicRepeaterComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
Content.Server/Traits/Assorted/TraitSpeedModifierComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Content.Server.Traits.Assorted; | ||
|
||
/// <summary> | ||
/// This component is used for traits that modify movement speed. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class TraitSpeedModifierComponent : Component | ||
{ | ||
[DataField(required: true)] | ||
public float WalkModifier = 1.0f; | ||
|
||
[DataField(required: true)] | ||
public float SprintModifier = 1.0f; | ||
} |
Oops, something went wrong.