Jofairden / EvenMoreModifiers

A mod for Terraria that adds a system for Modifiers that can apply to items giving various bonuses
https://zond.tech/emm/
Other
20 stars 10 forks source link

Implement better control over modifier effects (glowmask/shader) #38

Open Jofairden opened 5 years ago

Jofairden commented 5 years ago

It was suggested it would be useful if effects could be applied based on different scenarios, not just always be applied if a certain modifier is present. For example when an item is being charged.

Jofairden commented 5 years ago

Currently f23ac88 implement some increase in control via new property classes Most notably control over which layers to draw (subject/glow/shader) Example skipping drawing subject: (useful if drawing in front layer)

        public override ShaderEntity GetShaderEntity(Item item)
        {
            return new ShaderEntity(item,
                GameShaders.Armor.GetShaderIdFromItemId(ItemID.StardustDye),
                Color.LightSkyBlue,
                props: ShaderGraphicsProperties.Builder
                    .WithDrawLayer(ShaderDrawLayer.Front)
                    .WithShaderDrawStyle(new NormalShaderDrawStyle())
                    .SkipDrawingSubject(true)
                    .Build()
            );
        }

Other uses: SkipDrawingShader, SkipDrawingGlowmask, SkipDrawing