fix: Converts ethics system to generic entity persistence (#1824)

### Summary

Converts ethics system to entity persistence and removes the persistence item.


### TODO

1. The enable/disable toggle doesn't propagate to all code that does Ethics checks (notoriety, pvp, etc).
2. We need commands to remove them from an ethic.
This commit is contained in:
Kamron Batman 2024-06-16 10:26:09 -07:00 • committed by GitHub
parent f87c8f73ab
commit 20596e52fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1327 additions and 1338 deletions

View file

@ -1,30 +1,29 @@
namespace Server.Ethics
namespace Server.Ethics;
public class EthicDefinition
{
public class EthicDefinition
public EthicDefinition(
int primaryHue, TextDefinition title, TextDefinition adjunct, TextDefinition joinPhrase,
Power[] powers
)
{
public EthicDefinition(
int primaryHue, TextDefinition title, TextDefinition adjunct, TextDefinition joinPhrase,
Power[] powers
)
{
PrimaryHue = primaryHue;
PrimaryHue = primaryHue;
Title = title;
Adjunct = adjunct;
Title = title;
Adjunct = adjunct;
JoinPhrase = joinPhrase;
JoinPhrase = joinPhrase;
Powers = powers;
}
public int PrimaryHue { get; }
public TextDefinition Title { get; }
public TextDefinition Adjunct { get; }
public TextDefinition JoinPhrase { get; }
public Power[] Powers { get; }
Powers = powers;
}
public int PrimaryHue { get; }
public TextDefinition Title { get; }
public TextDefinition Adjunct { get; }
public TextDefinition JoinPhrase { get; }
public Power[] Powers { get; }
}

View file

@ -1,22 +1,21 @@
namespace Server.Ethics
namespace Server.Ethics;
public class PowerDefinition
{
public class PowerDefinition
public PowerDefinition(int power, TextDefinition name, TextDefinition phrase, TextDefinition description)
{
public PowerDefinition(int power, TextDefinition name, TextDefinition phrase, TextDefinition description)
{
Power = power;
Power = power;
Name = name;
Phrase = phrase;
Description = description;
}
public int Power { get; }
public TextDefinition Name { get; }
public TextDefinition Phrase { get; }
public TextDefinition Description { get; }
Name = name;
Phrase = phrase;
Description = description;
}
}
public int Power { get; }
public TextDefinition Name { get; }
public TextDefinition Phrase { get; }
public TextDefinition Description { get; }
}