Construct, Connective, and Build Helping

Post Reply
ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

Construct, Connective, and Build Helping

by ashenk69 » Post

The title gives none of these mods any justice, but I have been working on these for quite some time. I didn't want to clutter the forum with 3 mod posts so I just decided to combine these but I did put them in separate repositories so it is easy to download them.

License: WTFPL

CONSTRUCT
https://github.com/metalstache/construct
This is probably the largest out of the 3. It adds 2 constructs you can build; A furnace and a stockpile(aka chest) and also a hammer for building. The hammer is crafted by
I = Steel Ingot
S = Stick
| | I | |
| I | S | I |
| | S | |
The hammer allows you to create the constructs. To adjust the settings like which recipe and which corner you want to build from, open its menu by right clicking with it. This menu is created through the tools metadata so there is actually only one tool registered through minetest.
|0| |0|
|0|
|1| |0|
|stockpile|
Each corner button represents a corner and the center one determines the front or back. The bottom button is the current recipe used to check against. Click on it to open the recipe selection menu and choose which you want. When you build with the hammer there will be 3 particles that appear on the 3 expected outer sides of the corner. These are meant to help in where to hit it.

The 2 constructs are not normal crafting recipes but instead building recipes. To build a stockpile, build a 2x2x2 box of wooden planks. Then choose the recipe in your hammer, choose a position to build it from and then hit that corner. The furnace works the same way but requires a 3x3x3 of cobblestone with a torch placed in the middle block.
STOCKPILE
2x2x2
2 pages of inventory and also 2 sort functions. Vertical and Horizontal sorts.
Pipeworks Supported

FURNACE
3x3x3
Fuel burns for 2x longer.
Pipeworks Supported

CONNECTIVE
https://github.com/metalstache/connective
Creation of Minecraft's connective textures. Currently only wooden planks work. Pretty self explanatory. Default wood is overwritten to use its construct function to check for neighbors and then update its neighbors in return.

BUILD HELPING
https://github.com/metalstache/building_helper
A function that I think has needed to be put into Minetest for a while. There are really only 2 functions. These do not check in your hotbar so things in your hotbar will not be moved around only things in your bottom inventory.
BUILDING
When you run out of whatever you are building in your hand, this will look for a stack within your inventory and put it into your hand.
DIGGING
Similar to Building but works for tools. When a tool breaks it will be replaced if there is one in your inventory to replace it with.
The next 2 functions are only active during creative mode.
EYE DROPPER
When holding nothing, right click on a node and you will now be holding that node.
CLEAR INVENTORY
/invclear - clears the current player's inventory
Last edited by ashenk69 on Sat May 18, 2013 20:44, edited 1 time in total.

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Very nice and useful!

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Uh there is nothing iiiiiiiiin the reeeeeeeepos. Has thesssssssse been released yet??
Coding;
1X coding
3X debugging
12X tweaking to be just right

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Sorry for that, I forgot to publish them to GitHub. They should be there now.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

mine Mine ALL MINE!!!!!I love the wood.
Last edited by jojoa1997 on Wed Apr 24, 2013 03:33, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Building Helper: New warning function for tools that are about to break. Tools at 80% when used will display a warning texture below the cross-hair to remind the player their tool is close to breaking. If you are using a version that doesn't have hud support then remove the else if statement block that has the comment --HUD WARNING. Otherwise, it will crash every time your tool is about to break.

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post


ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Connective: Added 3d connective texture support. There isn't an implementation of it yet, but I plan on doing glass.

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Just found out through testing that glass connective won't be possible. Currently a drawtype of glasslike only accepts one texture. Even if a table is defined it only uses the first entry. The only way I could get it to work is if I set to a normal node but then you lose the affect of glasslike.

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Connective: I haven't commited this yet, but I have changed glass to work with the new glasslike-frame drawtype. I'll comment the code block out so it is more compatible with older versions. It would be useful if version checking would be implemented.
I have also been working on the 3D connective code. I found out that there are actually a lot more things I needed to do before it would work properly. I'm almost there though.

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

You can do

Code: Select all

if minetest.hud_add then

end
to check to see if the gui is available.
Last edited by rubenwardy on Mon Apr 29, 2013 16:54, edited 1 time in total.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

I'm not so sure you can do that check. The hud_add is a function within the player and not minetest. Unless I am wrong that block of code would actually never execute.

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

ashenk69 wrote:I'm not so sure you can do that check. The hud_add is a function within the player and not minetest. Unless I am wrong that block of code would actually never execute.
Do I have to write untested next to every script I give examples of?

Code: Select all

if player.hud_add then

end
then
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

It isn't that you should always write your code is untested, but when you write your statement with confidence that this is what you need to do to check for that. I took that as being code that you have tested and know works. I still haven't found a sure fire way of checking for HUD support or not.

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

Code: Select all

table:function()
is short hand for

Code: Select all

table.function(self)
self is a variable to the table.

In my pull request, you need to check if table.function exists, not execute it.
Because of this, table:function() would not work.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Thanks for that I didn't know that the ":" accessor was short hand for "." and self.

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

Build Helper: Added 2 new functions. Eye dropper lets you pick out nodes without having to dig them up. /invclear clears the players main inventory. Both of these functions are only usable in creative mode.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests