Skip to content

Commit

Permalink
Merge pull request #355 from Fansana/master
Browse files Browse the repository at this point in the history
Floofstation Release V3
  • Loading branch information
FoxxoTrystan authored Nov 15, 2024
2 parents 2c7ef14 + 2e39a10 commit 95e093a
Show file tree
Hide file tree
Showing 16 changed files with 3,790 additions and 6,136 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ concurrency: commit_action
on:
pull_request_target:
types: [closed]
branches:
- stable

env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Arcade/BlockGame/BlockGame.Ui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private void InputTick(float frameTime)
/// <param name="message">The message to broadcase to all players/spectators.</param>
private void SendMessage(BoundUserInterfaceMessage message)
{
_uiSystem.ServerSendUiMessage(_entityManager.GetEntity(message.Entity), BlockGameUiKey.Key, message);
_uiSystem.ServerSendUiMessage(_owner, BlockGameUiKey.Key, message);
}

/// <summary>
Expand All @@ -167,7 +167,7 @@ private void SendMessage(BoundUserInterfaceMessage message)
/// <param name="actor">The target recipient.</param>
private void SendMessage(BoundUserInterfaceMessage message, EntityUid actor)
{
_uiSystem.ServerSendUiMessage(_entityManager.GetEntity(message.Entity), BlockGameUiKey.Key, message, actor);
_uiSystem.ServerSendUiMessage(_owner, BlockGameUiKey.Key, message, actor);
}

/// <summary>
Expand Down
57 changes: 57 additions & 0 deletions Content.Server/AutoVote/AutoVoteSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Robust.Shared.Configuration;
using Content.Server.Voting.Managers;
using Content.Shared.GameTicking;
using Content.Shared.Voting;
using Content.Shared.CCVar;
using Robust.Server.Player;
using Content.Server.GameTicking;

namespace Content.Server.AutoVote;

public sealed class AutoVoteSystem : EntitySystem
{
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] public readonly IVoteManager _voteManager = default!;
[Dependency] public readonly IPlayerManager _playerManager = default!;

public bool _shouldVoteNextJoin = false;

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

SubscribeLocalEvent<RoundRestartCleanupEvent>(OnReturnedToLobby);
SubscribeLocalEvent<PlayerJoinedLobbyEvent>(OnPlayerJoinedLobby);
}

public void OnReturnedToLobby(RoundRestartCleanupEvent ev)
{
CallAutovote();
}

public void OnPlayerJoinedLobby(PlayerJoinedLobbyEvent ev)
{
if (_shouldVoteNextJoin)
{
CallAutovote();
_shouldVoteNextJoin = false;
}
}

private void CallAutovote()
{
if (!_cfg.GetCVar(CCVars.AutoVoteEnabled))
return;

if (_playerManager.PlayerCount == 0)
{
_shouldVoteNextJoin = true;
return;
}

if (_cfg.GetCVar(CCVars.MapAutoVoteEnabled))
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
if (_cfg.GetCVar(CCVars.PresetAutoVoteEnabled))
_voteManager.CreateStandardVote(null, StandardVoteType.Map);
}
}
7 changes: 1 addition & 6 deletions Content.Server/Dragon/DragonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ public override void Update(float frameTime)

comp.RiftAccumulator += frameTime;

// Delete it, naughty dragon!
if (comp.RiftAccumulator >= comp.RiftMaxAccumulator)
{
Roar(uid, comp);
QueueDel(uid);
}

}
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Power/Pow3r/BatteryRampPegSolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void Tick(float frameTime, PowerState state, IParallelManager parallel)
// suppliers + discharger) Then decide based on total layer size whether its worth parallelizing that
// layer?
_networkJob.Networks = group;
parallel.ProcessNow(_networkJob, group.Count);
parallel.ProcessSerialNow(_networkJob, group.Count);
}

ClearBatteries(state);
Expand Down
26 changes: 24 additions & 2 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2062,13 +2062,13 @@ public static readonly CVarDef<string>
*/

/// <summary>
/// Time that players have to wait before rules can be accepted.
/// Time that players have to wait before rules can be accepted.
/// </summary>
public static readonly CVarDef<float> RulesWaitTime =
CVarDef.Create("rules.time", 60f, CVar.SERVER | CVar.REPLICATED);

/// <summary>
/// Don't show rules to localhost/loopback interface.
/// Don't show rules to localhost/loopback interface.
/// </summary>
public static readonly CVarDef<bool> RulesExemptLocal =
CVarDef.Create("rules.exempt_local", true, CVar.SERVERONLY);
Expand Down Expand Up @@ -2640,5 +2640,27 @@ public static readonly CVarDef<float>
CVarDef.Create("ghost.allow_same_character", false, CVar.SERVERONLY);

#endregion

/*
* AUTOVOTE SYSTEM
*/

/// <summary>
/// Enables the automatic voting system.
/// </summary>
public static readonly CVarDef<bool> AutoVoteEnabled =
CVarDef.Create("vote.autovote_enabled", true, CVar.SERVERONLY); // Floof enabled by default

/// <summary>
/// Automatically make map votes on return to lobby? Requires auto voting to be enabled.
/// </summary>
public static readonly CVarDef<bool> MapAutoVoteEnabled =
CVarDef.Create("vote.map_autovote_enabled", true, CVar.SERVERONLY);

/// <summary>
/// Automatically make preset votes on return to lobby? Requires auto voting to be enabled.
/// </summary>
public static readonly CVarDef<bool> PresetAutoVoteEnabled =
CVarDef.Create("vote.preset_autovote_enabled", true, CVar.SERVERONLY);
}
}
75 changes: 75 additions & 0 deletions Resources/Changelog/Floof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1408,3 +1408,78 @@ Entries:
id: 188
time: '2024-11-05T00:33:06.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/328
- author: SleepyScarecrow
changes:
- type: Tweak
message: Tweaked Dark Oasis Recipe
id: 181
time: '2024-11-11T06:50:56.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/341
- author: Fansana
changes:
- type: Fix
message: Fixed block game UI!
id: 189
time: '2024-11-13T22:20:32.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/348
- author: fenndragon
changes:
- type: Tweak
message: Tweaked Price
id: 190
time: '2024-11-14T09:55:10.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/353
- author: Memeji
changes:
- type: Fix
message: Gladiators can no longer have bionics.
- type: Tweak
message: Bionic arm cannot opened powered doors. Cost reduced to 6 instead of 8.
id: 191
time: '2024-11-14T09:55:48.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/343
- author: Fansana
changes:
- type: Tweak
message: Tweaked game mode votes
id: 192
time: '2024-11-14T09:57:52.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/350
- author: fenndragon
changes:
- type: Remove
message: Removed timer from dragon gameplay
id: 193
time: '2024-11-14T18:02:17.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/352
- author: Fansana
changes:
- type: Fix
message: Fixed the power flickers!
id: 194
time: '2024-11-14T18:03:44.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/354
- author: fenndragon
changes:
- type: Add
message: Added Leash anchor to Space drakes
- type: Tweak
message: 'Tweaked the name of Space drakes '
id: 195
time: '2024-11-14T18:05:25.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/349
- author: Memeji
changes:
- type: Tweak
message: Removed nicotine from Interdynes and replaced it with iron and dylovene.
id: 196
time: '2024-11-14T18:06:38.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/344
- author: Fansana
changes:
- type: Add
message: Added auto vote system
id: 197
time: '2024-11-14T23:20:24.0000000+00:00'
url: https://github.com/Fansana/floofstation1/pull/351

Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ghost-role-information-ifrit-name = Ifrit
ghost-role-information-ifrit-description = Listen to your owner. Don't tank damage. Punch people hard.
ghost-role-information-space-dragon-name = Space dragon
ghost-role-information-space-dragon-description = Call in 3 carp rifts and take over this quadrant! You have only 5 minutes in between each rift before you will disappear.
ghost-role-information-space-dragon-description = create 3 carp rifts and protect your nest!
ghost-role-information-space-dragon-dungeon-description = Defend the expedition dungeon with your fishy comrades!
ghost-role-information-cluwne-name = Cluwne
Expand Down
Loading

0 comments on commit 95e093a

Please sign in to comment.