tModLoader v0.11.8.9
A mod to make and play Terraria mods
ModWaterStyle.cs
Go to the documentation of this file.
1using Microsoft.Xna.Framework;
2
3namespace Terraria.ModLoader
4{
8 public abstract class ModWaterStyle
9 {
13 public Mod mod {
14 get;
15 internal set;
16 }
17
21 public string Name {
22 get;
23 internal set;
24 }
25
29 public int Type {
30 get;
31 internal set;
32 }
33
34 internal string texture;
35 internal string blockTexture;
36
40 public virtual bool Autoload(ref string name, ref string texture, ref string blockTexture) {
41 return mod.Properties.Autoload;
42 }
43
47 public virtual bool ChooseWaterStyle() {
48 return false;
49 }
50
54 public abstract int ChooseWaterfallStyle();
55
59 public abstract int GetSplashDust();
60
64 public abstract int GetDropletGore();
65
69 public virtual void LightColorMultiplier(ref float r, ref float g, ref float b) {
70 r = 0.88f;
71 g = 0.96f;
72 b = 1.015f;
73 }
74
78 public virtual Color BiomeHairColor() {
79 return new Color(28, 216, 94);
80 }
81 }
82
86 public class ModWaterfallStyle
87 {
91 public Mod mod {
92 get;
93 internal set;
94 }
95
99 public string Name {
100 get;
101 internal set;
102 }
103
107 public int Type {
108 get;
109 internal set;
110 }
111
112 internal string texture;
113
117 public virtual bool Autoload(ref string name, ref string texture) {
118 return mod.Properties.Autoload;
119 }
120
124 public virtual void AddLight(int i, int j) {
125 }
126
130 public virtual void ColorMultiplier(ref float r, ref float g, ref float b, float a) {
131 }
132 }
133}
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
Definition: Mod.cs:25
ModProperties Properties
Definition: Mod.cs:52
Represents a style of water that gets drawn, based on factors such as the background....
Definition: ModWaterStyle.cs:9
Mod mod
The mod that added this style of water.
int Type
The ID of the water style.
virtual Color BiomeHairColor()
Allows you to change the hair color resulting from the biome hair dye when this water style is in use...
virtual bool Autoload(ref string name, ref string texture, ref string blockTexture)
Allows you to automatically add a ModWaterStyle instead of using Mod.AddWaterStyle....
abstract int GetDropletGore()
The ID of the gore that represents droplets of water falling down from a block.
abstract int GetSplashDust()
The ID of the dust that is created when anything splashes in water.
virtual bool ChooseWaterStyle()
Whether the conditions have been met for this water style to be used. Typically Main....
string Name
The internal name of this water style.
abstract int ChooseWaterfallStyle()
The ID of the waterfall style the game should use when this water style is in use.
virtual void LightColorMultiplier(ref float r, ref float g, ref float b)
Allows you to modify the light levels of the tiles behind the water. The light color components will ...
Represents a style of waterfalls that gets drawn. This is mostly used to determine the color of the w...
virtual void AddLight(int i, int j)
Allows you to create light at a tile occupied by a waterfall of this style.
virtual void ColorMultiplier(ref float r, ref float g, ref float b, float a)
Allows you to determine the color multiplier acting on waterfalls of this style. Useful for waterfall...
string Name
The internal name of this waterfall style.
Mod mod
The mod that added this style of waterfall.
int Type
The ID of this waterfall style.
virtual bool Autoload(ref string name, ref string texture)
Allows you to automatically add a ModWaterfallStyle instead of using Mod.AddWaterfallStyle....
bool Autoload
Whether or not this mod will autoload content by default. Autoloading content means you do not need t...