Time |
Nick |
Message |
00:15 |
|
Guest63453 joined #minetest-mods |
01:15 |
|
kaeza joined #minetest-mods |
01:36 |
|
kaeza joined #minetest-mods |
01:49 |
|
kaeza_ joined #minetest-mods |
01:50 |
|
diemartin joined #minetest-mods |
10:23 |
|
PilzAdam joined #minetest-mods |
10:40 |
|
kaeza joined #minetest-mods |
11:08 |
|
PilzAdam joined #minetest-mods |
11:38 |
]||[ |
thexyz: im making a region protection mod, like the worldguard bukkit plugin |
11:38 |
]||[ |
the way im trying to do it is the user punches a block with "wand" as first position, and then punches second block and does a command like ./region define |
11:39 |
]||[ |
so im trying to use find_nodes_in_area to get all the nodes in the region and set their metadata |
11:39 |
]||[ |
though im not sure if its the correct way to do that either, i thought about using files or even lsqlite3 |
11:39 |
]||[ |
im really new to minetest and game related coding in general so its all kind of a new thing to me |
11:41 |
kaeza |
]||[, use the WorldEdit's way |
11:42 |
kaeza |
also, find_nodes_in_area is slow |
12:03 |
]||[ |
kaeza: whats worldedits way? |
12:03 |
]||[ |
i mean, ive used worldedit and know how it works from the player perspective |
12:04 |
]||[ |
just not from the code perspective |
12:04 |
kaeza |
]||[, it uses entities as markers |
12:04 |
]||[ |
hmmmm |
12:04 |
]||[ |
so then |
12:05 |
]||[ |
when i register on dignode, placenode, etc to check if its in a region or not, how do i actually check if the node is between those markers? the math is a little confusing to me |
12:34 |
kaeza |
one way would be having a table with all the defined regions |
12:34 |
kaeza |
and check it every time a player digs a node |
12:34 |
kaeza |
100% guaranteed to be slow |
12:35 |
kaeza |
node protection is not easy |
12:35 |
kaeza |
at least not making a high performance implementation |
12:35 |
]||[ |
yeah |
12:36 |
]||[ |
what i was going for with find_nodes_in_area was setting metadata to each node |
12:36 |
]||[ |
which would be slow making regions, but, theoretically not /that/ slow using them i guess |
12:36 |
kaeza |
well, that could be one, yes |
12:36 |
kaeza |
so ignore what I said :P |
12:37 |
]||[ |
heh |
12:37 |
]||[ |
the other problem with that |
12:37 |
]||[ |
is you cant simply delete a region that way |
12:37 |
]||[ |
and also, i dont like having mod data like that integrated into the world files |
12:37 |
]||[ |
its messy |
12:47 |
|
rubenwardy joined #minetest-mods |
13:18 |
|
PilzAdam joined #minetest-mods |
13:42 |
|
rubenwardy joined #minetest-mods |
13:44 |
|
rubenwardy joined #minetest-mods |
13:45 |
|
rubenwardy joined #minetest-mods |
13:46 |
|
rubenwardy joined #minetest-mods |
13:46 |
|
rubenwardy joined #minetest-mods |
14:46 |
|
BrandonReese joined #minetest-mods |
18:23 |
|
Exio joined #minetest-mods |
18:32 |
thexyz |
kaeza: that won't be slow |
18:33 |
thexyz |
at least, that won't be very slow |
20:50 |
|
diemartin joined #minetest-mods |
22:17 |
|
ch98 joined #minetest-mods |