added Character Setup (#511)
* added Character Setup * whoops * reverted unrelated changes * Made everything work post-rebase * Removed unused PreferencesChanged event * nope, don't need this * HumanoidProfileEditorPanel -> HumanoidProfileEditor * Set initial data for hair pickers * Fixed nullable warning * Renamed LooksComponent -> HumanoidAppearanceComponent * Renamed LooksComponentState -> HumanoidAppearanceComponentState * Final renaming maybe * Use a human-like dummy instead of a real human * Change preferences structs back to classes
This commit is contained in:
committed by
Pieter-Jan Briers
parent
d03da83fda
commit
a4e369e629
@@ -18,7 +18,10 @@ namespace Content.Server.Database
|
||||
|
||||
public Prefs GetPlayerPreferences(string username)
|
||||
{
|
||||
return _prefsCtx.Preferences.SingleOrDefault(p => p.Username == username);
|
||||
return _prefsCtx
|
||||
.Preferences
|
||||
.Include(p => p.HumanoidProfiles)
|
||||
.SingleOrDefault(p => p.Username == username);
|
||||
}
|
||||
|
||||
public void SaveSelectedCharacterIndex(string username, int slot)
|
||||
@@ -45,6 +48,7 @@ namespace Content.Server.Database
|
||||
.SingleOrDefault(h => h.Slot == newProfile.Slot);
|
||||
if (!(oldProfile is null)) prefs.HumanoidProfiles.Remove(oldProfile);
|
||||
prefs.HumanoidProfiles.Add(newProfile);
|
||||
_prefsCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public void DeleteCharacterSlot(string username, int slot)
|
||||
|
||||
Reference in New Issue
Block a user