Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…n-Friendly-Chainsaw into upstream-sync-2
  • Loading branch information
DEATHB4DEFEAT committed Jan 22, 2024
2 parents c5b30f0 + 8f485ca commit 74cd28a
Show file tree
Hide file tree
Showing 71 changed files with 395 additions and 1,153,377 deletions.
16 changes: 8 additions & 8 deletions Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ public sealed class PostMapInitTest
//"Marathon",
//"Kettle",
"MeteorArena",
"Pebble", //DeltaV
"Edge", //DeltaV
"Shoukou", //DeltaV
"Tortuga", //DeltaV
"Arena", //DeltaV
"Asterisk", //DeltaV
"TheHive", //DeltaV
"Hammurabi" //DeltaV
// "Pebble", //DeltaV
// "Edge", //DeltaV
// "Shoukou", //DeltaV
// "Tortuga", //DeltaV
// "Arena", //DeltaV
// "Asterisk", //DeltaV
// "TheHive", //DeltaV
// "Hammurabi" //DeltaV
};

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Content.IntegrationTests/Tests/SaveLoadSaveTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ await server.WaitPost(() =>
await pair.CleanReturnAsync();
}

private const string TestMap = "Maps/pebble.yml";
private const string TestMap = "Maps/Test/dev_map.yml";

/// <summary>
/// Loads the default map, runs it for 5 ticks, then assert that it did not change.
Expand All @@ -106,7 +106,7 @@ public async Task LoadSaveTicksSavePebble()
var cfg = server.ResolveDependency<IConfigurationManager>();
Assert.That(cfg.GetCVar(CCVars.GridFill), Is.False);

// Load pebble.yml as uninitialized map, and save it to ensure it's up to date.
// Load TestMap as uninitialized map, and save it to ensure it's up to date.
server.Post(() =>
{
mapId = mapManager.CreateMap();
Expand Down
4 changes: 2 additions & 2 deletions Content.IntegrationTests/Tests/Slipping/SlippingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task BananaSlipTest()
#pragma warning restore NUnit2045

// Walking over the banana slowly does not trigger a slip.
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
await Move(DirectionFlag.East, 1f);
#pragma warning disable NUnit2045
Assert.That(Delta(), Is.LessThan(0.5f));
Expand All @@ -51,7 +51,7 @@ public async Task BananaSlipTest()
AssertComp<KnockedDownComponent>(false, Player);

// Moving at normal speeds does trigger a slip.
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Up);
await SetKey(EngineKeyFunctions.Walk, BoundKeyState.Down);
await Move(DirectionFlag.West, 1f);
Assert.That(sys.Slipped, Does.Contain(SEntMan.GetEntity(Player)));
AssertComp<KnockedDownComponent>(true, Player);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
namespace Content.Server.SimpleStation14.Speech.Components;

/// <summary>
/// Sends a random message from a list with a provided min/max time.
/// </summary>
[RegisterComponent]
public sealed partial class RandomBarkComponent : Component
{
// Should the message be sent to the chat log?
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool ChatLog = false;

// Minimum time an animal will go without speaking
[DataField, ViewVariables(VVAccess.ReadWrite)]
public int MinTime = 45;

// Maximum time an animal will go without speaking
[DataField, ViewVariables(VVAccess.ReadWrite)]
public int MaxTime = 350;

// Counter
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float BarkAccumulator = 8f;

// Multiplier applied to the random time. Good for changing the frequency without having to specify exact values
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float BarkMultiplier = 1f;

// List of things to be said. Filled with garbage to be modified by an accent, but can be specified in the .yml
[DataField, ViewVariables(VVAccess.ReadWrite)]
public IReadOnlyList<string> Barks = new[]
{
"Bark",
"Boof",
"Woofums",
"Rawrl",
"Eeeeeee",
"Barkums",
"Awooooooooooooooooooo awoo awoooo",
"Grrrrrrrrrrrrrrrrrr",
"Rarrwrarrwr",
"Goddamn I love gold fish crackers",
"Bork bork boof boof bork bork boof boof boof bork",
"Bark",
"Boof",
"Woofums",
"Rawrl",
"Eeeeeee",
"Barkums",
};
}
47 changes: 47 additions & 0 deletions Content.Server/SimpleStation14/Speech/Systems/RandomBarkSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using Content.Server.Chat.Systems;
using Content.Shared.Mind.Components;
using Robust.Shared.Random;
using Content.Server.SimpleStation14.Speech.Components;

namespace Content.Server.SimpleStation14.Speech.Systems;

public sealed class RandomBarkSystem : EntitySystem
{
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ChatSystem _chat = default!;
[Dependency] private readonly EntityManager _entity = default!;


public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<RandomBarkComponent, ComponentInit>(OnInit);
}


private void OnInit(EntityUid uid, RandomBarkComponent barker, ComponentInit args)
{
barker.BarkAccumulator = _random.NextFloat(barker.MinTime, barker.MaxTime)*barker.BarkMultiplier;
}

public override void Update(float frameTime)
{
base.Update(frameTime);

var query = EntityQueryEnumerator<RandomBarkComponent>();
while (query.MoveNext(out var uid, out var barker))
{
barker.BarkAccumulator -= frameTime;
if (barker.BarkAccumulator > 0)
continue;

barker.BarkAccumulator = _random.NextFloat(barker.MinTime, barker.MaxTime) * barker.BarkMultiplier;
if (_entity.TryGetComponent<MindContainerComponent>(uid, out var actComp) &&
actComp.HasMind)
continue;

_chat.TrySendInGameICMessage(uid, _random.Pick(barker.Barks), InGameICChatType.Speak, barker.ChatLog ? ChatTransmitRange.Normal : ChatTransmitRange.HideChat);
}
}
}
2 changes: 1 addition & 1 deletion Content.Shared/Movement/Components/InputMoverComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public sealed partial class InputMoverComponent : Component

public const float LerpTime = 1.0f;

public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) == 0x0;
public bool Sprinting => (HeldMoveButtons & MoveButtons.Walk) != 0x0;

[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool CanMove { get; set; } = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public sealed partial class MovementSpeedModifierComponent : Component
public const float DefaultFriction = 20f;
public const float DefaultFrictionNoInput = 20f;

public const float DefaultBaseWalkSpeed = 2.5f;
public const float DefaultBaseSprintSpeed = 4.5f;
public const float DefaultBaseWalkSpeed = 3f;
public const float DefaultBaseSprintSpeed = 5f;

[AutoNetworkedField, ViewVariables]
public float WalkSpeedModifier = 1.0f;
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Parkstation

![GithubAction](https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/actions/workflows/yaml-linter.yml/badge.svg)
![GithubAction](https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/actions/workflows/validate-rgas.yml/badge.svg)
![GithubAction](https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/actions/workflows/validate_mapfiles.yml/badge.svg)
![GithubAction](https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/actions/workflows/build-test-debug.yml/badge.svg)
![GithubAction](https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/actions/workflows/build-test-release.yml/badge.svg)
![GithubAction](https://github.com/Simple-Station/Parkstation-Friendly-Chainsaw/actions/workflows/test-packaging.yml/badge.svg)

## Links

[Discord](https://discord.gg/49KeKwXc8g) | [Steam](https://store.steampowered.com/app/2585480/Space_Station_Multiverse/) | [Standalone](https://spacestationmultiverse.com/downloads/)
Expand Down
34 changes: 34 additions & 0 deletions Resources/Changelog/SimpleStation14Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,37 @@ Entries:
message: Added way too many markings to list here
id: 4
time: '2024-01-18T07:00:43.0000000+00:00'
- author: DEATHB4DEFEAT
changes:
- type: Tweak
message: Changed most playtime requirements
id: 5
time: '2024-01-18T08:09:49.0000000+00:00'
- author: DEATHB4DEFEAT
changes:
- type: Add
message: Animals will no longer be a silent, soulless shell
id: 6
time: '2024-01-18T08:52:58.0000000+00:00'
- author: DEATHB4DEFEAT
changes:
- type: Tweak
message: Renamed Shiva to Geoff
id: 7
time: '2024-01-18T09:53:54.0000000+00:00'
- author: DEATHB4DEFEAT
changes:
- type: Tweak
message: >-
The station's crew hivemind has decided to slow down their movement and
enjoy The Park instead of sprinting everywhere
id: 8
time: '2024-01-18T10:25:15.0000000+00:00'
- author: DEATHB4DEFEAT
changes:
- type: Tweak
message: >-
Your friendly plant people have realized the immense weight of their
roots and have slown down their movement a significant amount!
id: 9
time: '2024-01-18T10:46:50.0000000+00:00'
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/escape-menu/ui/options-menu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ui-options-function-move-up = Move Up
ui-options-function-move-left = Move Left
ui-options-function-move-down = Move Down
ui-options-function-move-right = Move Right
ui-options-function-walk = Walk
ui-options-function-walk = Run
ui-options-function-camera-rotate-left = Rotate left
ui-options-function-camera-rotate-right = Rotate right
Expand Down
10 changes: 7 additions & 3 deletions Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ ghost-role-information-behonker-description = You are an antagonist, bring death
ghost-role-information-Death-Squad-name = Death Squad Operative
ghost-role-information-Death-Squad-description = One of Nanotrasen's top internal affairs agents. Await orders from CentComm or an official.
ghost-role-information-Shiva-name = Shiva
ghost-role-information-Shiva-description = Shiva, the stations first defender. Help the Head of Security in their work
ghost-role-information-Shiva-rules = Protect security staff and the crew from danger. Stay with Security staff or around the Security department, try to disable criminals and not kill them if the situation allows for it.
ghost-role-information-Cak-name = Cak
ghost-role-information-Cak-description = You are the chef's favorite child. You're a living cake cat.
ghost-role-information-Cak-rules = You are a living edible sweet cat. Your task is to find your place in this world where everything wants to eat you.
Expand All @@ -204,6 +208,6 @@ ghost-role-information-BreadDog-name = BreadDog
ghost-role-information-BreadDog-description = You are the chef's favorite child. You're a living bread dog.
ghost-role-information-BreadDog-rules = You're an edible dog made of bread. Your task is to find your place in this world where everything wants to eat you.
ghost-role-information-Shiva-name = Shiva
ghost-role-information-Shiva-description = Shiva, the stations first defender. Help the Head of Security in their work
ghost-role-information-Shiva-rules = Protect security staff and the crew from danger. Stay with Security staff or around the Security department, try to disable criminals and not kill them if the situation allows for it.
ghost-role-information-Shiva-name = Geoff
ghost-role-information-Shiva-description = Geoff, the stations best friend. Help the Head of Security in their work.
ghost-role-information-Shiva-rules = Bring joy to the Security crew and remove any fear of spiders from everyone else.
Loading

0 comments on commit 74cd28a

Please sign in to comment.