Page 1 of 1

Mod reassigned

PostPosted: Sat Dec 22, 2012 17:11
by gbacon24
Mod moved to topic under Neuromancer

PostPosted: Sat Dec 22, 2012 17:27
by rubenwardy
you should give a description of what "phonics" are, or link to wikipedia

PostPosted: Sun Dec 23, 2012 00:15
by Neuromancer
Since I added code to make the nodes light up (and thus be replaced by another node), they have become extremely difficult to remove/dig.

I would have thought setting groups = {cracky=3, choppy=3, oddly_breakable_by_hand=3}, would have made them really easy to remove but that's not the case. I have to dig up half the countryside and get lucky and then sometimes the node gets dug. Any help is greatly appreciated.

minetest.register_node("phonics:a_active", {
description = "a_active",
tiles = {"a_active.png"},
light_source = 20,
is_ground_content = true,
groups = {cracky=3, choppy=3, oddly_breakable_by_hand=3},
sounds = default.node_sound_stone_defaults(),
})

I even tried the riven tool that gets rid of nodes with 1 hit, and that made it impossible to get rid of the letter node. I need some way of tracking what hit the node and then don't activate it, just get rid of it.

EDIT: LorenzoVulcan pointed me to the solution: get_wielded_item and get_wear:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_on_punchnode( function(pos, node, puncher)

    hit_with = puncher:get_wielded_item()
    wear=hit_with:get_wear()
    --print (temp["wear"])

if node.name == "phonics:c"
 then
     if wear == 0 then