This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
forked from new-frontiers-14/frontier-station-14
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from Corvax-Frontier/Up010624
Up010624
- Loading branch information
Showing
341 changed files
with
4,609 additions
and
1,551 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
Content.Server/Explosion/Components/RepeatingTriggerComponent.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,25 @@ | ||
using Content.Server.Explosion.EntitySystems; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; | ||
|
||
namespace Content.Server.Explosion.Components; | ||
|
||
/// <summary> | ||
/// Constantly triggers after being added to an entity. | ||
/// </summary> | ||
[RegisterComponent, Access(typeof(TriggerSystem))] | ||
[AutoGenerateComponentPause] | ||
public sealed partial class RepeatingTriggerComponent : Component | ||
{ | ||
/// <summary> | ||
/// How long to wait between triggers. | ||
/// The first trigger starts this long after the component is added. | ||
/// </summary> | ||
[DataField] | ||
public TimeSpan Delay = TimeSpan.FromSeconds(1); | ||
|
||
/// <summary> | ||
/// When the next trigger will be. | ||
/// </summary> | ||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] | ||
public TimeSpan NextTrigger; | ||
} |
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
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
37 changes: 37 additions & 0 deletions
37
Content.Shared/Weapons/Ranged/Components/ActionGunComponent.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,37 @@ | ||
using Content.Shared.Actions; | ||
using Content.Shared.Weapons.Ranged.Systems; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Weapons.Ranged.Components; | ||
|
||
/// <summary> | ||
/// Lets you shoot a gun using an action. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, Access(typeof(ActionGunSystem))] | ||
public sealed partial class ActionGunComponent : Component | ||
{ | ||
/// <summary> | ||
/// Action to create, must use <see cref="ActionGunShootEvent"/>. | ||
/// </summary> | ||
[DataField(required: true)] | ||
public EntProtoId Action = string.Empty; | ||
|
||
[DataField] | ||
public EntityUid? ActionEntity; | ||
|
||
/// <summary> | ||
/// Prototype of gun entity to spawn. | ||
/// Deleted when this component is removed. | ||
/// </summary> | ||
[DataField(required: true)] | ||
public EntProtoId GunProto = string.Empty; | ||
|
||
[DataField] | ||
public EntityUid? Gun; | ||
} | ||
|
||
/// <summary> | ||
/// Action event for <see cref="ActionGunComponent"/> to shoot at a position. | ||
/// </summary> | ||
public sealed partial class ActionGunShootEvent : WorldTargetActionEvent; |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
using Content.Shared.Weapons.Ranged.Components; | ||
|
||
|
||
namespace Content.Shared.Weapons.Ranged.Events; | ||
|
||
/// <summary> | ||
|
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,41 @@ | ||
using Content.Shared.Actions; | ||
using Content.Shared.Weapons.Ranged.Components; | ||
|
||
namespace Content.Shared.Weapons.Ranged.Systems; | ||
|
||
public sealed class ActionGunSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly SharedActionsSystem _actions = default!; | ||
[Dependency] private readonly SharedGunSystem _gun = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<ActionGunComponent, MapInitEvent>(OnMapInit); | ||
SubscribeLocalEvent<ActionGunComponent, ComponentShutdown>(OnShutdown); | ||
SubscribeLocalEvent<ActionGunComponent, ActionGunShootEvent>(OnShoot); | ||
} | ||
|
||
private void OnMapInit(Entity<ActionGunComponent> ent, ref MapInitEvent args) | ||
{ | ||
if (string.IsNullOrEmpty(ent.Comp.Action)) | ||
return; | ||
|
||
_actions.AddAction(ent, ref ent.Comp.ActionEntity, ent.Comp.Action); | ||
ent.Comp.Gun = Spawn(ent.Comp.GunProto); | ||
} | ||
|
||
private void OnShutdown(Entity<ActionGunComponent> ent, ref ComponentShutdown args) | ||
{ | ||
if (ent.Comp.Gun is {} gun) | ||
QueueDel(gun); | ||
} | ||
|
||
private void OnShoot(Entity<ActionGunComponent> ent, ref ActionGunShootEvent args) | ||
{ | ||
if (TryComp<GunComponent>(ent.Comp.Gun, out var gun)) | ||
_gun.AttemptShoot(ent, ent.Comp.Gun.Value, gun, args.Target); | ||
} | ||
} | ||
|
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,4 @@ | ||
- files: ["lateraligator.ogg"] | ||
license: "CC-BY-3.0" | ||
copyright: "Later Alligator By Silverman Sound Studios. Converted to mono ogg" | ||
source: "https://soundcloud.com/silvermansound/later-alligator" |
Binary file not shown.
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
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 |
---|---|---|
|
@@ -57,5 +57,3 @@ | |
name: Toby Fox - Undertale | ||
path: | ||
path: /Audio/Jukebox/undertale.ogg | ||
|
||
|
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
Oops, something went wrong.