forked from Vault-Overseers/nuclear-14
-
Notifications
You must be signed in to change notification settings - Fork 13
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 #58 from Corvax-Frontier/Up050824
Up050824
- Loading branch information
Showing
887 changed files
with
40,691 additions
and
33,946 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
Content.Client/IconSmoothing/ClientRandomIconSmoothSystem.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,29 @@ | ||
using Content.Shared.IconSmoothing; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.IconSmoothing; | ||
|
||
public sealed class ClientRandomIconSmoothSystem : SharedRandomIconSmoothSystem | ||
{ | ||
[Dependency] private readonly IconSmoothSystem _iconSmooth = default!; | ||
[Dependency] private readonly AppearanceSystem _appearance = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<RandomIconSmoothComponent, AppearanceChangeEvent>(OnAppearanceChange); | ||
} | ||
|
||
private void OnAppearanceChange(Entity<RandomIconSmoothComponent> ent, ref AppearanceChangeEvent args) | ||
{ | ||
if (!TryComp<IconSmoothComponent>(ent, out var smooth)) | ||
return; | ||
|
||
if (!_appearance.TryGetData<string>(ent, RandomIconSmoothState.State, out var state, args.Component)) | ||
return; | ||
|
||
smooth.StateBase = state; | ||
_iconSmooth.SetStateBase(ent, smooth, state); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Content.Shared.IconSmoothing; | ||
using Robust.Shared.Random; | ||
|
||
namespace Content.Server.IconSmoothing; | ||
|
||
public sealed partial class RandomIconSmoothSystem : SharedRandomIconSmoothSystem | ||
{ | ||
[Dependency] private readonly IRobustRandom _random = default!; | ||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<RandomIconSmoothComponent, MapInitEvent>(OnMapInit); | ||
} | ||
|
||
private void OnMapInit(Entity<RandomIconSmoothComponent> ent, ref MapInitEvent args) | ||
{ | ||
if (ent.Comp.RandomStates.Count == 0) | ||
return; | ||
|
||
var state = _random.Pick(ent.Comp.RandomStates); | ||
_appearance.SetData(ent, RandomIconSmoothState.State, state); | ||
} | ||
} |
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,16 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.IconSmoothing; | ||
|
||
/// <summary> | ||
/// Allow randomize StateBase of IconSmoothComponent for random visual variation | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class RandomIconSmoothComponent : Component | ||
{ | ||
/// <summary> | ||
/// StateBase will be randomly selected from this list. Allows to randomize the visual. | ||
/// </summary> | ||
[DataField(required: true)] | ||
public List<string> RandomStates = new(); | ||
} |
12 changes: 12 additions & 0 deletions
12
Content.Shared/IconSmoothing/SharedRandomIconSmoothSystem.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,12 @@ | ||
using Robust.Shared.Serialization; | ||
|
||
namespace Content.Shared.IconSmoothing; | ||
|
||
public abstract class SharedRandomIconSmoothSystem : EntitySystem | ||
{ | ||
} | ||
[Serializable, NetSerializable] | ||
public enum RandomIconSmoothState : byte | ||
{ | ||
State | ||
} |
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
Binary file added
BIN
+42.3 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Junk_Wall_Gate_B_Close_01.ogg
Binary file not shown.
Binary file added
BIN
+28.7 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Junk_Wall_Gate_B_Open_01.ogg
Binary file not shown.
Binary file added
BIN
+55.1 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Metal_Bay_Door_Close_01.ogg
Binary file not shown.
Binary file added
BIN
+44.5 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Metal_Bay_Door_Open_01.ogg
Binary file not shown.
Binary file added
BIN
+27.3 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Metal_Jail_Swing_Close_01.ogg
Binary file not shown.
Binary file added
BIN
+33.6 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Metal_Jail_Swing_Open_01.ogg
Binary file not shown.
Binary file added
BIN
+46.4 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_PodProtectron_Close_01.ogg
Binary file not shown.
Binary file added
BIN
+28.3 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_PodProtectron_Open_01.ogg
Binary file not shown.
Binary file added
BIN
+38.3 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Vault_Door_Vertical_Close_A_01.ogg
Binary file not shown.
Binary file added
BIN
+31.5 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Vault_Door_Vertical_Open_A_01.ogg
Binary file not shown.
Binary file added
BIN
+194 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Vault_Gear_Door_Open_2D_01.ogg
Binary file not shown.
Binary file added
BIN
+134 KB
Resources/Audio/_Nuclear14/Effects/Doors/DRS_Vault_Gear_Door_Open_3D_01.ogg
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- files: ["DRS_Junk_Wall_Gate_B_Close_01.ogg", "DRS_Junk_Wall_Gate_B_Open_01.ogg", "DRS_Metal_Bay_Door_Close_01.ogg", "DRS_Metal_Bay_Door_Open_01.ogg", "DRS_Metal_Jail_Swing_Close_01.ogg", "DRS_Metal_Jail_Swing_Open_01.ogg", "DRS_PodProtectron_Close_01.ogg", "DRS_PodProtectron_Open_01.ogg", "DRS_Vault_Door_Vertical_Close_A_01.ogg", "DRS_Vault_Door_Vertical_Open_A_01.ogg", "DRS_Vault_Gear_Door_Open_2D_01.ogg", "DRS_Vault_Gear_Door_Open_3D_01.ogg"] | ||
license: "CC-BY-NC-SA-3.0" | ||
copyright: "Bethesda Softworks, from fallout 4. Converted from WAV to OGG. License unconfirmed Fair use?" | ||
source: "https://www.youtube.com/watch?v=xTvducynPKQ" |
Oops, something went wrong.