a bit more work on the system to create a default character set and testable environment for that

This commit is contained in:
Sebastian Bularca
2026-03-22 18:11:58 +01:00
parent da74abb039
commit 47d30c0c49
16 changed files with 241 additions and 59 deletions

View File

@@ -2,16 +2,12 @@ using System;
namespace Nox.Game {
public static class DefaultCharacterSystemsFactory {
public static ICharacterSystems Create(CharacterBaseSettings characterBaseSettings, PerkRegistry perkRegistry, CharacterRegistry characterRegistry) {
IPerkFactory perkFactory = new PerkFactory(perkRegistry);
public static ICharacterSystems Create(CharacterBaseSettings characterBaseSettings, PerksRegistry perksRegistry, CharacterRegistry characterRegistry) {
IPerkFactory perkFactory = new PerkFactory(perksRegistry);
ICharacterAttributesFactory attributesFactory = new CharacterAttributesFactory(characterRegistry);
ICharacterStatsFactory statsFactory = new CharacterStatsFactory();
ICharacterFactory characterFactory = new CharacterFactory(attributesFactory, statsFactory, perkFactory);
IPartyFactory partyFactory = new PartyFactory(new PartyFactoryOptions {
minPartySize = 1,
maxPartySize = characterBaseSettings.maxPartySize,
enforceUniqueCharacterIds = true
});
IPartyFactory partyFactory = new PartyFactory(characterBaseSettings);
return new CharacterSystems(perkFactory, characterFactory, partyFactory);
}