Joeb7919
Terrarian
Hello all, I am tired of having to build elaborate liquid generating constructions that barely work or are extremely slow and get patched out. So I am trying to make a mod to help those of us who like to build things with actual liquids in and around them, IE underwater/lava/honey/shimmer housing. Or even attach a switch to and create a lava trap for enemies when they enter a hallway.
So I am trying to create statues that generate liquids and absorb liquids. Using example mod I figured out how to create my statues and get them to generate stuff, but I cant' figure out what I am missing to get water from it. Physical items in game come out no problem. But not liquids.
My goal is basically create a statue that is the same as bottomless buckets and/or sponges, but placeable and can simply attach a timer or switch to for activation. Something like the pumps, but not reliant on each other, make one that generates and one that absorbs, but separate things that dont have to be connected. Would be even better if they could somehow be manipulated with a selector to choose what they spawn. Similar to how the wrench can right click and have several options. for wires or cutters.
But suffice it to say it is beyond my meager knowledge and I am hoping someone here could help point me in the right direction and not just say go learn all of C# and .Net.
By the way, here is what I tried for water generation, it generates something since when activated standing next to it gives the pickup sound, but nothing is added to inventory.
if (Main.rand.NextFloat() < .95f)
{
if (Wiring.CheckMech(x, y, 0) && Item.MechSpawn(spawnX, spawnY, LiquidID.Water))
{
int id = LiquidID.Water;
Item.NewItem(entitySource, (int)spawnX, (int)spawnY - -20, 0, 0, id, 1, false, 0, false);
}
}
I have not even started on something that could remove liquids. But figured it would be easier to ask for both and incase someone knows a way to do the selection thing.
Thanks for any help in advance.
So I am trying to create statues that generate liquids and absorb liquids. Using example mod I figured out how to create my statues and get them to generate stuff, but I cant' figure out what I am missing to get water from it. Physical items in game come out no problem. But not liquids.
My goal is basically create a statue that is the same as bottomless buckets and/or sponges, but placeable and can simply attach a timer or switch to for activation. Something like the pumps, but not reliant on each other, make one that generates and one that absorbs, but separate things that dont have to be connected. Would be even better if they could somehow be manipulated with a selector to choose what they spawn. Similar to how the wrench can right click and have several options. for wires or cutters.
But suffice it to say it is beyond my meager knowledge and I am hoping someone here could help point me in the right direction and not just say go learn all of C# and .Net.
By the way, here is what I tried for water generation, it generates something since when activated standing next to it gives the pickup sound, but nothing is added to inventory.
if (Main.rand.NextFloat() < .95f)
{
if (Wiring.CheckMech(x, y, 0) && Item.MechSpawn(spawnX, spawnY, LiquidID.Water))
{
int id = LiquidID.Water;
Item.NewItem(entitySource, (int)spawnX, (int)spawnY - -20, 0, 0, id, 1, false, 0, false);
}
}
I have not even started on something that could remove liquids. But figured it would be easier to ask for both and incase someone knows a way to do the selection thing.
Thanks for any help in advance.