Compare commits

...

19 Commits

Author SHA1 Message Date
Isaac
8d9506a1cc fix: Additial special round fixes +semver:patch (#189) 2025-11-10 16:22:00 -08:00
MSWS
d9f49473eb fix: Additial special round fixes +semver:patch 2025-11-10 16:19:42 -08:00
Isaac
042c48c0a6 Fix logic of round conflicts (#188) 2025-11-10 15:34:58 -08:00
MSWS
c2ada273a8 Merge branch 'dev' of github.com:MSWS/TTT into dev 2025-11-10 15:32:40 -08:00
MSWS
deb2e1cab2 fix: Round confliction logic +semver:patch 2025-11-10 15:32:36 -08:00
MSWS
dfe86b0242 fix: Round confliction logic 2025-11-10 15:02:40 -08:00
Isaac
c40c89b624 Fix Vanilla Round Inversion (#187) 2025-11-10 14:48:30 -08:00
MSWS
eff68897a0 Merge branch 'dev' of github.com:MSWS/TTT into dev 2025-11-10 14:45:55 -08:00
MSWS
63afe31e3b fix: Vanilla round inverted +semver:patch 2025-11-10 14:45:48 -08:00
MSWS
a7fa2afe15 fix: Vanilla round invert 2025-11-10 14:45:34 -08:00
Isaac
1df2722ce7 Force rebuild for new major 2.0.0 (#186) 2025-11-10 14:39:02 -08:00
MSWS
7749deabd3 Force rebuild for new major 2.0.0 2025-11-10 14:36:18 -08:00
Isaac
9079fe6c41 BREAKING CHANGES: New Special Rounds and Updates +semver:major (#185)
## Shop
- Added the ability for multiple special rounds to occur at once
- Added Rich and Low Grav Rounds
- Overhauled the Poison Gun
  - Only pistol shots count towards poison bullet usage
  - Poison bullets will be silent when shot
- Item descriptions will now be printed upon purchase

## Fixes
- Reduced the volume of the Special Round cue
- Increased the strictness of Karma
- Miscellaneous bug fixes
2025-11-10 14:15:29 -08:00
MSWS
f8b67c5194 Update getmulti params 2025-11-10 13:56:03 -08:00
MSWS
77281aa8c6 Fix lowgrav convar fetching 2025-11-10 12:56:43 -08:00
MSWS
20497bbb4d Synchronize special round 2025-11-10 12:48:59 -08:00
Isaac
2b04486e65 feat: Add tripwire defuse reward (#179) 2025-11-08 22:33:44 -08:00
Isaac
3b97c77065 +semver:patch (#178) 2025-11-08 22:13:00 -08:00
Isaac
83715fff1f Station Stacking and Round Start Sound Cue
- Added special round start sound cue
- Multiple Damage / Hurt Stations will now stack their effects
2025-11-08 22:04:01 -08:00
6 changed files with 8 additions and 8 deletions

View File

@@ -34,8 +34,9 @@ public class GiveItemCommand(IServiceProvider provider) : ICommand {
List<IOnlinePlayer> targets = [executor];
Server.NextWorldUpdateAsync(() => {
var name = executor.Name;
if (info.ArgCount == 3) targets = finder.GetMulti(info.Args[2], out name);
var name = executor.Name;
if (info.ArgCount == 3)
targets = finder.GetMulti(info.Args[2], out name, executor);
foreach (var player in targets) shop.GiveItem(player, item);
info.ReplySync($"Gave item '{item.Name}' to {name}.");

View File

@@ -24,7 +24,7 @@ public class SpecialRoundCommand(IServiceProvider provider) : ICommand {
}
if (info.ArgCount == 1) {
tracker.TryStartSpecialRound();
Server.NextWorldUpdate(() => tracker.TryStartSpecialRound());
info.ReplySync("Started a random special round.");
return Task.FromResult(CommandResult.SUCCESS);
}

View File

@@ -28,7 +28,7 @@ public class LowGravRound(IServiceProvider provider)
var cvar = ConVar.Find("sv_gravity");
if (cvar == null) return;
originalGravity = cvar.GetPrimitiveValue<int>();
originalGravity = (int) Math.Round(cvar.GetPrimitiveValue<float>());
var newGravity = (int)(originalGravity * config.GravityMultiplier);
Server.NextWorldUpdate(()
=> Server.ExecuteCommand($"sv_gravity {newGravity}"));

View File

@@ -82,7 +82,7 @@ public class SpeedRound(IServiceProvider provider)
public void OnDeath(PlayerDeathEvent ev) {
var game = games.ActiveGame;
if (game == null) return;
if (Tracker.ActiveRounds.Contains(this)) return;
if (!Tracker.ActiveRounds.Contains(this)) return;
var victimRoles = roles.GetRoles(ev.Victim);
if (!victimRoles.Any(r => r is InnocentRole)) return;

View File

@@ -42,7 +42,7 @@ public class VanillaRound(IServiceProvider provider)
[UsedImplicitly]
[EventHandler(Priority = Priority.HIGH)]
public void OnPurchase(PlayerPurchaseItemEvent ev) {
if (Tracker.ActiveRounds.Contains(this)) return;
if (!Tracker.ActiveRounds.Contains(this)) return;
ev.IsCanceled = true;
messenger.Message(ev.Player, locale[RoundMsgs.VANILLA_ROUND_REMINDER]);

View File

@@ -86,8 +86,7 @@ public class SpecialRoundStarter(IServiceProvider provider)
var rounds = Provider.GetServices<ITerrorModule>()
.OfType<AbstractSpecialRound>()
.Where(r => r.Config.Weight > 0 && !exclude.Contains(r))
.Where(r
=> !exclude.Any(er => er.ConflictsWith(r) && !r.ConflictsWith(er)))
.Where(r => !exclude.Any(er => er.ConflictsWith(r) || r.ConflictsWith(er)))
.ToList();
if (rounds.Count == 0) return null;
var totalWeight = rounds.Sum(r => r.Config.Weight);