Skip to content

Commit 9b16e16

Browse files
authored
Merge pull request #1679 from ss14Starlight/starlight-dev
Stable Patch
2 parents 04977af + 8758e7a commit 9b16e16

41 files changed

Lines changed: 388 additions & 209 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Content.IntegrationTests/Tests/_Starlight/Thaven/MoodTests.cs renamed to Content.IntegrationTests/Tests/_StarLight/Thaven/MoodTests.cs

File renamed without changes.

Content.Server/GameTicking/Presets/GamePresetPrototype.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,5 @@ public sealed partial class GamePresetPrototype : IPrototype
4040
/// </summary>
4141
[DataField("supportedMaps", customTypeSerializer: typeof(PrototypeIdSerializer<GameMapPoolPrototype>))]
4242
public string? MapPool;
43-
44-
//starlight start
45-
[DataField("voteCooldown")]
46-
public int VoteCooldown = 2; // How many rounds before this preset can be voted for again.
47-
//starlight end
4843
}
4944
}

Content.Server/Spider/SpiderSystem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ private void OnSpawnNet(EntityUid uid, SpiderComponent component, SpiderWebActio
8484
_popup.PopupEntity(Loc.GetString("spider-web-action-success"), args.Performer, args.Performer);
8585
args.Handled = true;
8686
}
87-
else
87+
else if (!component.OneWebSpawn)
8888
_popup.PopupEntity(Loc.GetString("spider-web-action-fail"), args.Performer, args.Performer);
89+
else
90+
_popup.PopupEntity(Loc.GetString("spider-web-action-fail-single"), args.Performer, args.Performer);
8991
}
9092

9193
private bool SpawnWeb(Entity<SpiderComponent> ent, EntityCoordinates coords)

Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public sealed partial class VoteManager
3636
private RoleSystem? _roleSystem;
3737
private GameTicker? _gameTicker;
3838

39-
private readonly Dictionary<string, int> _presetCooldown = new();
40-
4139
private static readonly Dictionary<StandardVoteType, CVarDef<bool>> VoteTypesToEnableCVars = new()
4240
{
4341
{StandardVoteType.Restart, CCVars.VoteRestartEnabled},
@@ -222,23 +220,12 @@ private void NotifyNotEnoughGhostPlayers(int ghostPercentageRequirement, int rou
222220

223221
private void CreatePresetVote(ICommonSession? initiator)
224222
{
225-
//starlight start
226-
var presets = GetGamePresets();
227-
228-
//add the secret prototype
229-
if (_prototypeManager.TryIndex<GamePresetPrototype>("Secret", out var secretPreset))
230-
{
231-
presets.Add(secretPreset, Loc.GetString("ui-vote-secret-map"));
232-
}
233-
//starlight end
234-
235-
/* starlight disable
236-
var presets = new Dictionary<GamePresetPrototype, string>();
223+
var presets = new Dictionary<string, string>();
237224
presets.Add("Secret", Loc.GetString("ui-vote-secret-map"));
238225
foreach (var preset in GetGamePresets())
239226
{
240227
presets.Add(preset.Key, preset.Value);
241-
} */
228+
}
242229

243230
var alone = _playerManager.PlayerCount == 1 && initiator != null;
244231
var options = new VoteOptions
@@ -265,38 +252,20 @@ private void CreatePresetVote(ICommonSession? initiator)
265252
vote.OnFinished += (_, args) =>
266253
{
267254
string picked;
268-
GamePresetPrototype pickedPreset; //starlight
269255
if (args.Winner == null)
270256
{
271-
picked = (string)_random.Pick(args.Winners);
272-
pickedPreset = presets.FirstOrDefault(p => p.Key.ID == picked).Key; //starlight
257+
picked = (string) _random.Pick(args.Winners);
273258
_chatManager.DispatchServerAnnouncement(
274-
Loc.GetString("ui-vote-gamemode-tie", ("picked", Loc.GetString(pickedPreset.ModeTitle)))); //starlight edit
259+
Loc.GetString("ui-vote-gamemode-tie", ("picked", Loc.GetString(presets[picked]))));
275260
}
276261
else
277262
{
278-
picked = (string)args.Winner;
279-
pickedPreset = presets.FirstOrDefault(p => p.Key.ID == picked).Key; //starlight
263+
picked = (string) args.Winner;
280264
_chatManager.DispatchServerAnnouncement(
281-
Loc.GetString("ui-vote-gamemode-win", ("winner", Loc.GetString(pickedPreset.ModeTitle)))); //starlight edit
265+
Loc.GetString("ui-vote-gamemode-win", ("winner", Loc.GetString(presets[picked]))));
282266
}
283267
_adminLogger.Add(LogType.Vote, LogImpact.Medium, $"Preset vote finished: {picked}");
284268
var ticker = _entityManager.EntitySysManager.GetEntitySystem<GameTicker>();
285-
//starlight, keep track of cooldowns
286-
//subtract 1 from all keys EXCEPT the one we picked
287-
foreach (var key in _presetCooldown.Keys.ToList())
288-
{
289-
if (key != picked)
290-
{
291-
_presetCooldown[key]--;
292-
if (_presetCooldown[key] <= 0)
293-
_presetCooldown.Remove(key);
294-
}
295-
}
296-
297-
//add the key we picked to the cooldown list
298-
_presetCooldown.Add(picked, pickedPreset.VoteCooldown);
299-
//starlight end
300269
ticker.SetGamePreset(picked);
301270
};
302271
}
@@ -632,9 +601,9 @@ private void TimeoutStandardVote(StandardVoteType type)
632601
DirtyCanCallVoteAll();
633602
}
634603

635-
private Dictionary<GamePresetPrototype, string> GetGamePresets()
604+
private Dictionary<string, string> GetGamePresets()
636605
{
637-
var presets = new Dictionary<GamePresetPrototype, string>();
606+
var presets = new Dictionary<string, string>();
638607

639608
var prototypeId = _cfg.GetCVar(StarlightCCVars.RoundVotingChancesPrototype);
640609

@@ -657,12 +626,6 @@ private Dictionary<GamePresetPrototype, string> GetGamePresets()
657626
if (_playerManager.PlayerCount > (preset.MaxPlayers ?? int.MaxValue))
658627
continue;
659628

660-
//STARLIGHT
661-
//check if its on the cooldown list
662-
if (_presetCooldown.ContainsKey(preset.ID))
663-
continue;
664-
//STARLIGHT END
665-
666629
if (chancesPrototype.Chances.TryGetValue(preset.ID, out var chance))
667630
{
668631
validPresets.Add((preset, chance));
@@ -678,7 +641,7 @@ private Dictionary<GamePresetPrototype, string> GetGamePresets()
678641
var selectedPresets = SelectPresetsByChance(validPresets, _cfg.GetCVar(StarlightCCVars.RoundVotingCount));
679642
foreach (var preset in selectedPresets)
680643
{
681-
presets[preset.preset] = preset.preset.ModeTitle;
644+
presets[preset.preset.ID] = preset.preset.ModeTitle;
682645
}
683646

684647
return presets;

Content.Server/Voting/Managers/VoteManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ private bool CanCallVote(
363363
if (voteType == StandardVoteType.Preset)
364364
{
365365
var presets = GetGamePresets();
366-
if (presets.Count == 1 && presets.First().Key.ID == _entityManager.System<GameTicker>().Preset?.ID) //starlight edit
366+
if (presets.Count == 1 && presets.Select(x => x.Key).Single() == _entityManager.System<GameTicker>().Preset?.ID)
367367
return false;
368368
}
369369

Content.Server/_Starlight/Antags/Actions/EMPScreamSystem.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
using Robust.Shared.Audio;
77
using Robust.Shared.Player;
88
using Robust.Server.Audio;
9+
using Content.Shared.Actions;
10+
using Content.Shared.Charges.Systems;
911

1012
namespace Content.Server._Starlight.Antags.Actions;
1113

1214
public sealed partial class EMPScreamSystem : EntitySystem
1315
{
16+
[Dependency] private readonly SharedChargesSystem _chargesSystem = default!;
1417
[Dependency] private readonly EmpSystem _emp = default!;
1518
[Dependency] private readonly TransformSystem _transform = default!;
1619
[Dependency] private readonly ISharedPlayerManager _player = default!;
@@ -26,6 +29,10 @@ public override void Initialize()
2629

2730
private void OnEMPScream(EMPScreamEvent ev)
2831
{
32+
if (ev.Handled || _chargesSystem.GetCurrentCharges(ev.Action.Owner) == 0)
33+
return;
34+
35+
ev.Handled = true;
2936
var uid = ev.Performer;
3037

3138
ScreamEffect(uid, ev.Power, ev.ScreamSound);

Content.Server/_Starlight/TextToSpeech/TTSSystem.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,18 @@ private async void OnClientOptionTTS(ClientOptionTTSEvent ev, EntitySessionEvent
8585
_ignoredRecipients.Add(args.SenderSession);
8686
}
8787

88+
// Removes all [tag] and [/tag] style markup
89+
private static string StripRichTextTags(string text) =>
90+
TagStripperRegex().Replace(text, "");
91+
8892
private void OnRadioReceiveEvent(RadioSpokeEvent args)
8993
{
9094
if (!_isEnabled
9195
|| args.Message.Length > MaxChars)
9296
return;
9397

98+
args.Message = StripRichTextTags(args.Message);
99+
94100
_chime.TryGetSenderHeadsetChime(args.Source, out var chime);
95101

96102
if (!TryComp(args.Source, out TextToSpeechComponent? senderComponent)
@@ -392,4 +398,6 @@ private string ReplaceAbbreviations(Match word)
392398

393399
[GeneratedRegex(@"(?<![a-zA-Zа-яёА-ЯЁ0-9])([a-zA-Zа-яёА-ЯЁ]+|(\(•`ω´•\)|;;w;;|owo|UwU|>w<|\^w\^))(?![a-zA-Zа-яёА-ЯЁ0-9])", RegexOptions.IgnoreCase | RegexOptions.Multiline, "en-US")]
394400
private static partial Regex SymbolFilter();
401+
[GeneratedRegex(@"\[[^\]]*\]")]
402+
private static partial Regex TagStripperRegex();
395403
}

Content.Shared/_Starlight/Actions/Jump/JumpSystem.cs renamed to Content.Shared/_Starlight/Actions/Jump/SharedJumpSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void Jump(Entity<JumpComponent> ent, EntityCoordinates targetCoords, floa
125125
vector = Vector2.Normalize(vector) * distance.Value;
126126

127127
if (ent.Comp.ActionEntity != null)
128-
_action.SetCooldown(ent.Comp.ActionEntity.Value, _timing.CurTime, _timing.CurTime + TimeSpan.FromSeconds(ent.Comp.Cooldown));
128+
_action.SetUseDelay(ent.Comp.ActionEntity.Value, TimeSpan.FromSeconds(ent.Comp.Cooldown));
129129

130130
_throwing.TryThrow(ent.Owner, vector, baseThrowSpeed: speed, doSpin: false);
131131

Resources/Changelog/ChangelogStarlight.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14600,5 +14600,158 @@ Entries:
1460014600
id: 144002
1460114601
time: '2025-09-17T16:58:28.000000+00:00'
1460214602
url: https://github.com/ss14Starlight/space-station-14/pull/1440
14603+
- author: STARLIGHT TEAM
14604+
changes:
14605+
- message: Temporarily switch back to starlight vulpkanin stats
14606+
type: Tweak
14607+
id: 166800
14608+
time: '2025-09-18T19:52:00.000000+00:00'
14609+
url: https://github.com/ss14Starlight/space-station-14/pull/1668
14610+
- author: STARLIGHT TEAM
14611+
changes:
14612+
- message: Bold for Bold
14613+
type: Fix
14614+
id: 167000
14615+
time: '2025-09-18T20:25:30.000000+00:00'
14616+
url: https://github.com/ss14Starlight/space-station-14/pull/1670
14617+
- author: Arkanic, Walksanatora
14618+
changes:
14619+
- message: Fix vulpkanin displacements, fix incorrect hair displacements
14620+
type: Fix
14621+
id: 165700
14622+
time: '2025-09-17T15:06:54.000000+00:00'
14623+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14624+
- author: Arkanic, Walksanatora
14625+
changes:
14626+
- message: Fix vulpkanin wagging, fix vulpkanin growling accent
14627+
type: Fix
14628+
id: 165701
14629+
time: '2025-09-17T15:06:54.000000+00:00'
14630+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14631+
- author: Arkanic, Walksanatora
14632+
changes:
14633+
- message: Fix vulpkanin eyes being wizden vulp eyes (sleepy)
14634+
type: Fix
14635+
id: 165702
14636+
time: '2025-09-17T15:06:54.000000+00:00'
14637+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14638+
- author: Arkanic, Walksanatora
14639+
changes:
14640+
- message: Fix default vulpkanin markings to prevent character changes after update
14641+
type: Fix
14642+
id: 165703
14643+
time: '2025-09-17T15:06:54.000000+00:00'
14644+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14645+
- author: Arkanic, Walksanatora
14646+
changes:
14647+
- message: Switch back to SL vulpkanin screams
14648+
type: Fix
14649+
id: 165704
14650+
time: '2025-09-17T15:06:54.000000+00:00'
14651+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14652+
- author: Arkanic, Walksanatora
14653+
changes:
14654+
- message: Fix vulpkanin hair showing when wearing hardsuits
14655+
type: Fix
14656+
id: 165705
14657+
time: '2025-09-17T15:06:54.000000+00:00'
14658+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14659+
- author: Arkanic, Walksanatora
14660+
changes:
14661+
- message: Switch back to using SL markings where duplicates exist
14662+
type: Tweak
14663+
id: 165706
14664+
time: '2025-09-17T15:06:54.000000+00:00'
14665+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14666+
- author: Arkanic, Walksanatora
14667+
changes:
14668+
- message: Add missing emotes back to vulpkanin, fix creampie sprites
14669+
type: Fix
14670+
id: 165707
14671+
time: '2025-09-17T15:06:54.000000+00:00'
14672+
url: https://github.com/ss14Starlight/space-station-14/pull/1657
14673+
- author: CorruptOmega
14674+
changes:
14675+
- message: Satanic Bible visual has been flipped upside down.
14676+
type: Tweak
14677+
id: 159100
14678+
time: '2025-09-17T15:29:24.000000+00:00'
14679+
url: https://github.com/ss14Starlight/space-station-14/pull/1591
14680+
- author: Killer Tamashi
14681+
changes:
14682+
- message: Added Security shuttle "SEC-657 'Pursuit"
14683+
type: Add
14684+
id: 134800
14685+
time: '2025-09-17T16:07:35.000000+00:00'
14686+
url: https://github.com/ss14Starlight/space-station-14/pull/1348
14687+
- author: CorruptOmega
14688+
changes:
14689+
- message: CentComm Communication paper to the document printer
14690+
type: Add
14691+
id: 147200
14692+
time: '2025-09-17T16:21:14.000000+00:00'
14693+
url: https://github.com/ss14Starlight/space-station-14/pull/1472
14694+
- author: walksanatora
14695+
changes:
14696+
- message: New wizard spell that randomizes all spoken and understood languages
14697+
across everyone in the game. really should not spite your new god.
14698+
type: Add
14699+
id: 142700
14700+
time: '2025-09-17T16:25:10.000000+00:00'
14701+
url: https://github.com/ss14Starlight/space-station-14/pull/1427
14702+
- author: Rinary
14703+
changes:
14704+
- message: Fixed emp scream & jump cooldowns.
14705+
type: Fix
14706+
id: 166600
14707+
time: '2025-09-18T21:46:21.000000+00:00'
14708+
url: https://github.com/ss14Starlight/space-station-14/pull/1666
14709+
- author: Rinary
14710+
changes:
14711+
- message: Changed poison web injection from 2 to 0.5.
14712+
type: Tweak
14713+
id: 166601
14714+
time: '2025-09-18T21:46:21.000000+00:00'
14715+
url: https://github.com/ss14Starlight/space-station-14/pull/1666
14716+
- author: Rinary
14717+
changes:
14718+
- message: Changed white spider battery from 200 to 150 and charge rate from 25
14719+
to 10.
14720+
type: Tweak
14721+
id: 166602
14722+
time: '2025-09-18T21:46:21.000000+00:00'
14723+
url: https://github.com/ss14Starlight/space-station-14/pull/1666
14724+
- author: Rinary
14725+
changes:
14726+
- message: Fixed spider popup, now it separated and part with directions will be
14727+
popuped only when your spider can spawn more than one web in one action.
14728+
type: Fix
14729+
id: 166603
14730+
time: '2025-09-18T21:46:21.000000+00:00'
14731+
url: https://github.com/ss14Starlight/space-station-14/pull/1666
14732+
- author: Rinary
14733+
changes:
14734+
- message: Changed web spinning cooldown from 25 to 15, but terror spiders web condition
14735+
target web count changed from 24 to 36.
14736+
type: Tweak
14737+
id: 166604
14738+
time: '2025-09-18T21:46:21.000000+00:00'
14739+
url: https://github.com/ss14Starlight/space-station-14/pull/1666
14740+
- author: Conflee
14741+
changes:
14742+
- message: Changed pricing of some restock crates to be more reasonable. If the
14743+
resell price was close to the buy price, I made them cost slightly more. If
14744+
the resell price was way under the buy price, I made them cost slightly less.
14745+
type: Tweak
14746+
id: 166200
14747+
time: '2025-09-18T22:21:33.000000+00:00'
14748+
url: https://github.com/ss14Starlight/space-station-14/pull/1662
14749+
- author: Conflee
14750+
changes:
14751+
- message: Fixed infinite money glitch with restock crates in cargo
14752+
type: Fix
14753+
id: 166201
14754+
time: '2025-09-18T22:21:33.000000+00:00'
14755+
url: https://github.com/ss14Starlight/space-station-14/pull/1662
1460314756
Order: -1
1460414757

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
spider-web-action-fail-single = You can't place webs here!

0 commit comments

Comments
 (0)