mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-19 22:17:44 +01:00
Current state.
This commit is contained in:
parent
7a602d6ec5
commit
81059411e5
42 changed files with 913 additions and 320 deletions
|
|
@ -125,6 +125,33 @@ public class StateApplier(
|
|||
return data;
|
||||
}
|
||||
|
||||
public void ChangeBonusItem(ActorData data, BonusItemFlag slot, PrimaryId id, Variant variant)
|
||||
{
|
||||
var item = new CharacterArmor(id, variant, StainIds.None);
|
||||
foreach (var actor in data.Objects.Where(a => a.IsCharacter))
|
||||
{
|
||||
var mdl = actor.Model;
|
||||
if (!mdl.IsHuman)
|
||||
continue;
|
||||
|
||||
_updateSlot.UpdateBonusSlot(actor.Model, slot, item);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ChangeBonusItem(ActorData,BonusItemFlag,PrimaryId,Variant)"/>
|
||||
public ActorData ChangeBonusItem(ActorState state, BonusItemFlag slot, bool apply)
|
||||
{
|
||||
// If the source is not IPC we do not want to apply restrictions.
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
{
|
||||
var item = state.ModelData.BonusItem(slot);
|
||||
ChangeBonusItem(data, slot, item.ModelId, item.Variant);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Change the stain of a single piece of armor or weapon.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue