Mod reassigned

gbacon24
New member
 
Posts: 1
Joined: Sat Dec 22, 2012 17:02

Mod reassigned

by gbacon24 » Sat Dec 22, 2012 17:11

Mod moved to topic under Neuromancer
Last edited by gbacon24 on Fri Dec 28, 2012 14:07, edited 1 time in total.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sat Dec 22, 2012 17:27

you should give a description of what "phonics" are, or link to wikipedia
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Dec 23, 2012 00:15

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
Last edited by Neuromancer on Sun Dec 23, 2012 14:52, edited 1 time in total.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 13 guests

cron