mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-03 01:03:41 -04:00
Reorganize all observatory core projects into monorepo (#25)
* chore: move all observatory repos to core * only save journal folder on change, don't constantly re-check during monitoring * chore: monorepo project changes * chore: monorepo migration
This commit is contained in:
47
ObservatoryFramework/Files/Journal/Startup/Reputation.cs
Normal file
47
ObservatoryFramework/Files/Journal/Startup/Reputation.cs
Normal file
@ -0,0 +1,47 @@
|
||||
namespace Observatory.Framework.Files.Journal
|
||||
{
|
||||
public class Reputation : JournalBase
|
||||
{
|
||||
public float Empire { get; init; }
|
||||
|
||||
public float Federation { get; init; }
|
||||
|
||||
public float Independent { get; init; }
|
||||
|
||||
public float Alliance { get; init; }
|
||||
|
||||
public string EmpireText()
|
||||
{
|
||||
return GetReputationText(Empire);
|
||||
}
|
||||
|
||||
public string FederationText()
|
||||
{
|
||||
return GetReputationText(Federation);
|
||||
}
|
||||
|
||||
public string IndependentText()
|
||||
{
|
||||
return GetReputationText(Independent);
|
||||
}
|
||||
|
||||
public string AllianceText()
|
||||
{
|
||||
return GetReputationText(Alliance);
|
||||
}
|
||||
|
||||
private string GetReputationText(float rep)
|
||||
{
|
||||
string text = rep switch
|
||||
{
|
||||
float r when r > 90 => "allied",
|
||||
float r when r > 35 => "friendly",
|
||||
float r when r > 4 => "cordial",
|
||||
float r when r > -35 => "neutral",
|
||||
float r when r > -90 => "unfriendly",
|
||||
_ => "hostile",
|
||||
};
|
||||
return text;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user