mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-17 21:17:44 +01:00
add more IPC calls, adjust revertable to clear the state after a revert.
This commit is contained in:
parent
d4529edba6
commit
3c56124705
2 changed files with 102 additions and 29 deletions
|
|
@ -19,12 +19,22 @@ namespace Glamourer.Designs
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool RevertByNameWithoutApplication(string actorName)
|
||||
{
|
||||
if (!Saves.ContainsKey(actorName))
|
||||
return false;
|
||||
|
||||
Saves.Remove(actorName);
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Revert(Character actor)
|
||||
{
|
||||
if (!Saves.TryGetValue(actor.Name.ToString(), out var save))
|
||||
return false;
|
||||
|
||||
save.Apply(actor);
|
||||
Saves.Remove(actor.Name.ToString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue