Еще одни фиксы апстрима (#671)

* wizard appearance system refactor

* new helper method for drop anything from inventory

* fix wizard and nukie inventory saving

* remove wieldable from laser rifle

* replace comment with todo
This commit is contained in:
ThereDrD
2024-08-28 09:54:39 +03:00
committed by GitHub
parent 77574a28e7
commit 2fa46e0b3e
8 changed files with 101 additions and 13 deletions

View File

@@ -449,7 +449,6 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
if (nukeops.RoundEndBehavior == RoundEndBehavior.Nothing || nukeops.WinType == WinType.CrewMajor || nukeops.WinType == WinType.OpsMajor)
return;
// If there are any nuclear bombs that are active, immediately return. We're not over yet.
foreach (var nuke in EntityQuery<NukeComponent>())
{
@@ -519,6 +518,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
var profile = args.Session != null
? _prefs.GetPreferences(args.Session.UserId).SelectedCharacter as HumanoidCharacterProfile
: HumanoidCharacterProfile.RandomWithSpecies();
if (!_prototypeManager.TryIndex(profile?.Species ?? SharedHumanoidAppearanceSystem.DefaultSpecies, out SpeciesPrototype? species))
{
species = _prototypeManager.Index<SpeciesPrototype>(SharedHumanoidAppearanceSystem.DefaultSpecies);