Skip to content

Commit

Permalink
Merge branch 'master' into 186-webui-notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Muparadzi authored Nov 6, 2024
2 parents 612262b + 0daa857 commit 65db791
Show file tree
Hide file tree
Showing 33 changed files with 5,598 additions and 99 deletions.
1 change: 1 addition & 0 deletions src/Application/Common/Services/IGameModeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ internal class GameModeService : IGameModeService
{ GameModeAlias.D, GameMode.CRPGSkirmish },
{ GameModeAlias.F, GameMode.CRPGTeamDeathmatch },
{ GameModeAlias.Z, GameMode.CRPGUnknownGameMode },
{ GameModeAlias.G, GameMode.CRPGCaptain },
};
public GameMode GameModeByInstanceAlias(GameModeAlias alias)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<InvariantGlobalization>true</InvariantGlobalization>

<!-- Use Bannerlord version + cRPG version for the revision number -->
<Version>1.2.11.108</Version>
<Version>1.2.11.109</Version>
<!-- Flag to enable to add revision id to the assembly version -->
<SourceControlInformationFeatureSupported>true</SourceControlInformationFeatureSupported>
<IncludeSourceRevisionInInformationalVersion>true</IncludeSourceRevisionInInformationalVersion>
Expand Down
4 changes: 3 additions & 1 deletion src/Domain/Entities/GameServers/GameMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ public enum GameMode
CRPGDTV,
CRPGDuel,
CRPGSiege,
CRPGSkirmish,
CRPGTeamDeathmatch,
CRPGSkirmish,
CRPGUnknownGameMode,
CRPGCaptain,
}

public enum GameModeAlias
Expand All @@ -21,4 +22,5 @@ public enum GameModeAlias
E,
F,
Z,
G,
}
2 changes: 1 addition & 1 deletion src/Module.Editor/SubModule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Module>
<Name value="cRPG Editor"/>
<Id value="cRPG Editor"/>
<Version value="v1.2.11.108"/>
<Version value="v1.2.11.109"/>
<ModuleCategory value="Singleplayer"/>
<DependedModules>
<DependedModule Id="Native" DependentVersion="v1.2.11" Optional="false"/>
Expand Down
29 changes: 29 additions & 0 deletions src/Module.Server/Common/CrpgServerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public static void Init()
public static int RewardTick { get; private set; } = 60;
public static bool TeamBalanceOnce { get; private set; }
public static bool FrozenBots { get; private set; } = false;
public static int ControlledBotsCount { get; private set; } = 0;
public static int BaseNakedEquipmentValue { get; private set; } = 10000;
public static Tuple<TimeSpan, TimeSpan, TimeZoneInfo>? HappyHours { get; private set; }

[UsedImplicitly]
Expand Down Expand Up @@ -64,6 +66,33 @@ private static void SetServerExperienceMultiplier(string? multiplierStr)
Debug.Print($"Set server multiplier to {multiplier}");
}

[UsedImplicitly]
[ConsoleCommandMethod("crpg_base_naked_equipment_value", "Sets the equipment value of a naked character. used to combat dagger builds in captain.")]
private static void SetBaseNakedEquipmentValue(string? baseNakedEquipmentValueStr)
{
if (baseNakedEquipmentValueStr == null || !int.TryParse(baseNakedEquipmentValueStr, out int baseNakedEquipmentValue))
{
Debug.Print($"Invalid Controlled Bots Count: {baseNakedEquipmentValueStr}");
return;
}

ControlledBotsCount = baseNakedEquipmentValue;
Debug.Print($"Sets baseNakedEquipmentValue to {baseNakedEquipmentValue}");
}

[ConsoleCommandMethod("crpg_controlled_bots_count", "Sets ControlledBotsCount in captain and battle.")]
private static void SetControlledBotsCount(string? botsCountStr)
{
if (botsCountStr == null || !int.TryParse(botsCountStr, out int botsCount))
{
Debug.Print($"Invalid Controlled Bots Count: {botsCountStr}");
return;
}

ControlledBotsCount = botsCount;
Debug.Print($"Sets ControlledBotsCount to {botsCount}");
}

[UsedImplicitly]
[ConsoleCommandMethod("crpg_reward_tick", "Sets the reward tick duration in seconds for Conquest/Siege/Team Deatmatch.")]
private static void SetRewardTick(string? rewardTickStr)
Expand Down
Loading

0 comments on commit 65db791

Please sign in to comment.