2 using System.Collections.Generic;
7 using Microsoft.Xna.Framework;
23 public Mod Mod {
get;
internal set; }
25 Mod ILoadableContentSetter.Mod
30 public uint Type {
get;
internal set; }
32 uint ILoadableContentSetter.Type
37 public new string Name => GetType().Name;
38 public virtual string UniqueName =>
string.Empty;
39 public string GetFormattedUniqueName() => !
string.IsNullOrEmpty(UniqueName) ? $
"\"{UniqueName}\"" :
string.Empty;
41 public virtual GlowmaskEntity GetGlowmaskEntity(Item item) => null;
42 public virtual ShaderEntity GetShaderEntity(Item item) => null;
59 Properties = GetModifierProperties(ctx.
Item).
Build();
60 return ctx.
Item.maxStack <= 1 && CanRoll(ctx);
84 public virtual bool PostRoll(
ModifierContext ctx, IEnumerable<Modifier> rolledModifiers)
92 public virtual void Apply(Item item)
119 public new virtual void Load(Item item, TagCompound tag)
127 public virtual void Save(Item item, TagCompound tag)
132 public sealed
override bool Autoload(ref
string name) =>
false;
133 public sealed
override bool InstancePerEntity =>
true;
134 public sealed
override bool CloneNewInstances =>
true;
138 base.SetDefaults(item);
144 return base.ChoosePrefix(item, rand);
148 public sealed
override GlobalItem Clone(Item item, Item itemClone) => base.Clone(item, itemClone);
150 public sealed
override void ExtractinatorUse(
int extractType, ref
int resultType, ref
int resultStack)
158 public sealed
override void AnglerChat(
int type, ref
string chat, ref
string catchLocation)
162 public sealed
override void OnCraft(Item item, Recipe recipe)
170 public sealed
override void ArmorArmGlowMask(
int slot, Player drawPlayer,
float shadow, ref
int glowMask, ref Color color)
174 public sealed
override void DrawArmorColor(EquipType type,
int slot, Player drawPlayer,
float shadow, ref Color color, ref
int glowMask, ref Color glowMaskColor)
178 public sealed
override bool DrawBody(
int body) => base.DrawBody(body);
180 public sealed
override void DrawHair(
int head, ref
bool drawHair, ref
bool drawAltHair)
184 public sealed
override void DrawHands(
int body, ref
bool drawHands, ref
bool drawArms)
188 public sealed
override bool DrawHead(
int head) => base.DrawHead(head);
189 public sealed
override bool DrawLegs(
int legs,
int shoes) => base.DrawLegs(legs, shoes);
190 public sealed
override Vector2? HoldoutOffset(
int type) => base.HoldoutOffset(type);
191 public sealed
override Vector2? HoldoutOrigin(
int type) => base.HoldoutOrigin(type);
192 public sealed
override bool IsAnglerQuestAvailable(
int type) => base.IsAnglerQuestAvailable(type);
193 public sealed
override string IsArmorSet(Item head, Item body, Item legs) => base.IsArmorSet(head, body, legs);
195 public sealed
override string IsVanitySet(
int head,
int body,
int legs) => base.IsVanitySet(head, body, legs);
198 public sealed
override void LoadLegacy(Item item, BinaryReader reader)
202 public sealed
override bool NeedsSaving(Item item) => base.NeedsSaving(item);
203 public sealed
override GlobalItem NewInstance(Item item) => base.NewInstance(item);
205 public sealed
override void OpenVanillaBag(
string context, Player player,
int arg)
209 public sealed
override bool PreOpenVanillaBag(
string context, Player player,
int arg) => base.PreOpenVanillaBag(context, player, arg);
216 public sealed
override TagCompound Save(Item item) => base.Save(item);
218 public sealed
override void SetMatch(
int armorSlot,
int type,
bool male, ref
int equipSlot, ref
bool robes)
230 public sealed
override bool WingUpdate(
int wings, Player player,
bool inUse) => base.WingUpdate(wings, player, inUse);
sealed override void DrawHands(int body, ref bool drawHands, ref bool drawArms)
Defines a modifier, which is an unloaded GlobalItem Making it a GlobalItem gives easy access to all h...
sealed override void PreUpdateVanitySet(Player player, string set)
Defines a context in which a Modifier might be rolled Which fields are available (not null) depends o...
The ModifierPropertiesBuilder implements the builder pattern for ModifierProperties It provides a str...
sealed override void AnglerChat(int type, ref string chat, ref string catchLocation)
ModifierProperties Properties
sealed override void SetMatch(int armorSlot, int type, bool male, ref int equipSlot, ref bool robes)
sealed override void ArmorArmGlowMask(int slot, Player drawPlayer, float shadow, ref int glowMask, ref Color color)
sealed override void UpdateVanitySet(Player player, string set)
Defines a Shader entity, part of GraphicsEntity<T> The entity defines a particular 'shader' "of" the ...
virtual void Clone(ref Modifier clone)
Allows modders to do custom cloning here Happens after default cloning, which clones various info (mo...
virtual void Apply(Item item)
Allows modders to do something when this modifier is applied If a modder needs ModPlayer hooks...
sealed override void ArmorSetShadows(Player player, string set)
Defines the properties of a modifier
sealed override void SetDefaults(Item item)
virtual void Roll(ModifierContext ctx, IEnumerable< Modifier > rolledModifiers)
Allows modders to do something when the modifier is rolled in the given context The passed rolledModi...
sealed override void LoadLegacy(Item item, BinaryReader reader)
sealed override int ChoosePrefix(Item item, UnifiedRandom rand)
sealed override void CaughtFishStack(int type, ref int stack)
sealed override void UpdateArmorSet(Player player, string set)
Defines a Glowmask entity, part of GraphicsEntity The entity defines a particular 'glowmask' "of" the...
sealed override void ExtractinatorUse(int extractType, ref int resultType, ref int resultStack)
sealed override void DrawArmorColor(EquipType type, int slot, Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor)
sealed override void OpenVanillaBag(string context, Player player, int arg)
Defines a piece of loadable content The interface is used in classes where the deriving class already...
static ModifierPropertiesBuilder Builder
sealed override void DrawHair(int head, ref bool drawHair, ref bool drawAltHair)
virtual void Save(Item item, TagCompound tag)
Allows modder to do custom saving here Use the given TC to put data you want to save, which can be loaded using Load(Item,TagCompound)
sealed override void OnCraft(Item item, Recipe recipe)
virtual new void Load(Item item, TagCompound tag)
Allows modder to do custom loading here Use the given TC to pull data you saved using Save(Item...