mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-23 16:07:44 +01:00
Add owned NPC button for automation identifiers.
This commit is contained in:
parent
65e33d91ac
commit
d104b794ae
4 changed files with 31 additions and 9 deletions
|
|
@ -20,6 +20,7 @@ public class IdentifierDrawer
|
|||
public ActorIdentifier PlayerIdentifier { get; private set; } = ActorIdentifier.Invalid;
|
||||
public ActorIdentifier RetainerIdentifier { get; private set; } = ActorIdentifier.Invalid;
|
||||
public ActorIdentifier MannequinIdentifier { get; private set; } = ActorIdentifier.Invalid;
|
||||
public ActorIdentifier OwnedIdentifier { get; private set; } = ActorIdentifier.Invalid;
|
||||
|
||||
public IdentifierDrawer(ActorManager actors, DictWorld dictWorld, DictModelChara dictModelChara, DictBNpcNames bNpcNames, DictBNpc bNpc,
|
||||
HumanModelList humans)
|
||||
|
|
@ -60,6 +61,9 @@ public class IdentifierDrawer
|
|||
public bool CanSetNpc
|
||||
=> NpcIdentifier.IsValid;
|
||||
|
||||
public bool CanSetOwned
|
||||
=> OwnedIdentifier.IsValid;
|
||||
|
||||
private void UpdateIdentifiers()
|
||||
{
|
||||
if (ByteString.FromString(_characterName, out var byteName))
|
||||
|
|
@ -67,6 +71,11 @@ public class IdentifierDrawer
|
|||
PlayerIdentifier = _actors.CreatePlayer(byteName, _worldCombo.CurrentSelection.Key);
|
||||
RetainerIdentifier = _actors.CreateRetainer(byteName, ActorIdentifier.RetainerType.Bell);
|
||||
MannequinIdentifier = _actors.CreateRetainer(byteName, ActorIdentifier.RetainerType.Mannequin);
|
||||
|
||||
if (_humanNpcCombo.CurrentSelection.Kind is ObjectKind.EventNpc or ObjectKind.BattleNpc)
|
||||
OwnedIdentifier = _actors.CreateOwned(byteName, _worldCombo.CurrentSelection.Key, _humanNpcCombo.CurrentSelection.Kind, _humanNpcCombo.CurrentSelection.Ids[0]);
|
||||
else
|
||||
OwnedIdentifier = ActorIdentifier.Invalid;
|
||||
}
|
||||
|
||||
NpcIdentifier = _humanNpcCombo.CurrentSelection.Kind is ObjectKind.EventNpc or ObjectKind.BattleNpc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue