burli wrote:How can I add "shift click" to move item stacks between inventories like in the chest? I can't find any reason why it works for a chest, but not in my mod
You need to set up a list ring in your formspec definition.
burli wrote:How can I add "shift click" to move item stacks between inventories like in the chest? I can't find any reason why it works for a chest, but not in my mod
You need to set up a list ring in your formspec definition.
Is fog configurable now ?
I found something Spoiler
but I am new on github and misunderstand do it means implemented or not.
I am a noob.still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch ))) MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
Any good way to find out if player's wielded item is a tool (and not a block)?
Any good way to find out which of the registered items are tools (basically, get a list of available tools)?
There is minetest.registered_tools which is a table of all the registered tools. You can read this table to get, well, all registered tools. You can also iterate over the table and compare to the currently wielded item.
local wielditem_is_tool = function(player)
local registered_tools = minetest.registered_tools
local wielded_item_name = player:......... -- whatever you have to do when
-- you want to get the currently
-- wielded item name
for name,definition in pairs(registered_tools) do
if name == wielded_item_name then return true end
end
return false
end
Call with wielditem_is_tool(player) to get either true (wielded item is a registered tool) or false (wielded item is not a registered tool).
Linuxdirk wrote:There is minetest.registered_tools
Oh, great! This perfectly answers my second question. Thank you!
Still, is it possible to get player's wielded item and check for it's parameters? All I discovered up to this point is that tools have a tool_capabilities parameter, but I can't figure out how to check whether it's set...
I don't see particle rotation property (something like angleStartByX etc or angleStaticX)
am I missing it somewhere ?
And what about glow and blend ? Where is it's description described ?
I am a noob.still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch ))) MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
Any good way to find out if player's wielded item is a tool (and not a block)?
Any good way to find out which of the registered items are tools (basically, get a list of available tools)?
There is minetest.registered_tools which is a table of all the registered tools. You can read this table to get, well, all registered tools. You can also iterate over the table and compare to the currently wielded item.
local wielditem_is_tool = function(player)
local registered_tools = minetest.registered_tools
local wielded_item_name = player:......... -- whatever you have to do when
-- you want to get the currently
-- wielded item name
for name,definition in pairs(registered_tools) do
if name == wielded_item_name then return true end
end
return false
end
Call with wielditem_is_tool(player) to get either true (wielded item is a registered tool) or false (wielded item is not a registered tool).
Nyarg wrote:I don't see particle rotation property (something like angleStartByX etc or angleStaticX)
am I missing it somewhere ?
No, it does not exist. Particles are either - always facing the player no matter the angle, or - always facing the player but vertical (rotating horizontal).
Nyarg wrote:And what about glow and blend ? Where is it's description described ?
Glow is implemented, blend was cut and is not implemented.
@nyarg, on your pos on the previous page
You are registering an entity inside a callback. You should never do this.
Because you misuse the API, you get an error.
I think you rather want to add an entity into the world at this place.
minetest.add_entity()
Lua is great! List of my mods
I like singing. I like dancing. I like ... niyummm...
Three questions, I think they are all impossible, but that's what this forum is for...pro coders solving my noobish problems.
1. How would I go about setting a node to be collidable with all but one other node? To be more specfic, I want node a to be able to go through node b, but I don't want node c, or any other node, to be able to go through node b. I also want to be able to build on node b.... soo I'm confused.
2. Can I make a node able to travel up after taking a certain action, such as right clicking the node.
3. How would I go about generating a realm in the sky? For example, rather than in caverealms where the realms are spawned underground, is it possible to do that in the sky?
Now...I realize this makes the mod impossible for servers to add, because they would have to make a new world for this addition. Is there any alternative that achieves the same goal?
I am new to Lua coding, and Mt modding in general. I do have a bit of c++ experience. Not as much as most though. Thanks for reading and I hope you have some answers for me.
If this mod idea doesn't work, I will happily move on over to something else, maybe I shouldn't try something so big for my first mod, but I think I have an idea of how to develop this.
RealGoldenHart wrote:1. How would I go about setting a node to be collidable with all but one other node? To be more specfic, I want node a to be able to go through node b, but I don't want node c, or any other node, to be able to go through node b. I also want to be able to build on node b.... soo I'm confused.
Nodes can't move. Period.
Nodes can temporarily fall, but they'll stop as soon as they hit another (non-air) node.
RealGoldenHart wrote:2. Can I make a node able to travel up after taking a certain action, such as right clicking the node.
Nodes can't move. Period.
You can fake movement by removing the node at position A, and then making a new node that looks just like it at position B. It will look like it moved, but it didn't.
You may find some usable code in the Pontoons mod. I recall it is used to make under water builds float to the surface and become floating buildings. But, I think that mod converted the building to an entity, floated the entity up, and then converted it back to nodes. It is entirely possible that it will not be of any use to you. There was a distinct stopping point for the events to occur; that is when the entity had air above in instead of water. I don't know how you can change the code to suit your purposes.
Give a man a fish, feed him for a day. Give a kid a fish, it's going to die.