Time |
Nick |
Message |
00:03 |
|
SFENCE joined #minetest |
00:05 |
|
diceLibrarian2 joined #minetest |
00:20 |
|
SFENCE joined #minetest |
00:41 |
|
SFENCE joined #minetest |
00:45 |
|
diceLibrarian2 joined #minetest |
00:57 |
|
diceLibrarian2 joined #minetest |
01:06 |
|
sivarajan joined #minetest |
01:08 |
|
ShadowBot joined #minetest |
01:17 |
|
SFENCE joined #minetest |
01:35 |
|
ShadowBot joined #minetest |
01:37 |
|
SFENCE joined #minetest |
01:55 |
|
liceDibrarian joined #minetest |
02:00 |
|
ShadowBot joined #minetest |
02:10 |
|
SFENCE joined #minetest |
02:22 |
|
lemonzest joined #minetest |
02:29 |
|
ShadowBot joined #minetest |
02:32 |
|
SFENCE joined #minetest |
02:46 |
|
SFENCE joined #minetest |
02:59 |
|
lemonzest joined #minetest |
03:09 |
|
ShadowBot joined #minetest |
03:36 |
|
SFENCE joined #minetest |
04:00 |
|
MTDiscord joined #minetest |
04:12 |
|
SFENCE joined #minetest |
05:03 |
|
SFENCE joined #minetest |
05:23 |
|
SFENCE joined #minetest |
05:26 |
|
gregon joined #minetest |
05:27 |
|
tarsovbak joined #minetest |
05:42 |
|
SFENCE joined #minetest |
05:47 |
|
tarsovbak joined #minetest |
05:47 |
|
gregon joined #minetest |
05:53 |
|
lemonzest joined #minetest |
06:06 |
|
SFENCE joined #minetest |
06:26 |
|
SFENCE joined #minetest |
06:44 |
|
SFENCE joined #minetest |
07:07 |
|
SFENCE joined #minetest |
07:26 |
|
SFENCE joined #minetest |
07:35 |
|
TomTom joined #minetest |
07:43 |
|
SFENCE joined #minetest |
07:49 |
|
SFENCE joined #minetest |
08:04 |
|
SliverFlowCipher joined #minetest |
08:24 |
|
SFENCE joined #minetest |
08:27 |
|
mrkubax10 joined #minetest |
08:29 |
|
oneeyedalien joined #minetest |
08:29 |
|
mrkubax10 joined #minetest |
08:40 |
|
Glaedr joined #minetest |
08:42 |
|
SpaceManiac joined #minetest |
08:50 |
|
SFENCE joined #minetest |
09:10 |
|
SFENCE joined #minetest |
09:17 |
|
Talkless joined #minetest |
09:28 |
|
SFENCE joined #minetest |
09:46 |
|
SFENCE joined #minetest |
10:11 |
|
SFENCE joined #minetest |
10:18 |
|
jaca122 joined #minetest |
10:40 |
|
SFENCE joined #minetest |
11:09 |
|
SFENCE joined #minetest |
11:30 |
|
SFENCE joined #minetest |
11:37 |
|
down200 joined #minetest |
11:46 |
|
tarsovbak joined #minetest |
11:49 |
|
gregon joined #minetest |
11:52 |
|
SFENCE joined #minetest |
12:05 |
|
down200 joined #minetest |
12:10 |
|
silverwolf73828 joined #minetest |
12:13 |
|
SFENCE joined #minetest |
12:31 |
|
mrkubax10 joined #minetest |
12:32 |
|
Thelie joined #minetest |
12:35 |
|
down200 joined #minetest |
12:37 |
|
SFENCE joined #minetest |
12:37 |
|
ireallyhateirc joined #minetest |
12:38 |
|
cranez joined #minetest |
12:47 |
|
down200 joined #minetest |
12:56 |
|
SFENCE joined #minetest |
13:15 |
|
SFENCE joined #minetest |
13:32 |
|
SFENCE joined #minetest |
13:52 |
|
SFENCE joined #minetest |
14:29 |
|
Verticen joined #minetest |
14:29 |
|
SFENCE joined #minetest |
14:41 |
|
tarsovbak joined #minetest |
14:41 |
|
gregon joined #minetest |
14:47 |
|
SFENCE joined #minetest |
14:57 |
|
SFENCE joined #minetest |
15:07 |
|
tarsovbak joined #minetest |
15:09 |
|
gregon joined #minetest |
15:18 |
|
lemonzest joined #minetest |
15:30 |
|
SFENCE joined #minetest |
15:47 |
|
tarsovbak joined #minetest |
15:47 |
|
gregon joined #minetest |
15:57 |
|
SFENCE joined #minetest |
16:07 |
|
fluxionary_ joined #minetest |
16:32 |
|
SFENCE joined #minetest |
16:39 |
|
SliverFlowCipher joined #minetest |
16:58 |
|
SFENCE joined #minetest |
17:11 |
|
ireallyhateirc joined #minetest |
17:17 |
|
SFENCE joined #minetest |
17:18 |
|
Thelie joined #minetest |
17:20 |
|
SpaceManiac joined #minetest |
17:37 |
|
SpaceManiac joined #minetest |
17:37 |
|
SFENCE joined #minetest |
17:48 |
|
bodiccea joined #minetest |
18:12 |
|
SFENCE joined #minetest |
18:32 |
|
SFENCE joined #minetest |
18:38 |
|
jaca122 joined #minetest |
19:08 |
|
SFENCE joined #minetest |
19:18 |
|
bodiccea_ joined #minetest |
19:28 |
|
SFENCE joined #minetest |
19:46 |
|
SFENCE joined #minetest |
19:58 |
|
SFENCE joined #minetest |
20:09 |
|
Adamsky joined #minetest |
20:15 |
Adamsky |
Hi. I'm new to modding and I'm trying to add a sword that breaks after not that many uses. Inside of tool_capabilities, I'm setting punch_attack_uses = 3 but not matter what value I set it to, it doesn't seem to affect the durabilitity of the sword. Also, under groupcaps, I'm setting snappy uses to 3 which does affect its durability when breaking things, but not attacking. Is there something I'm missing? |
20:17 |
|
SFENCE joined #minetest |
20:29 |
Krock |
Adamsky: https://github.com/minetest/minetest_game/blob/master/mods/default/tools.lua#L381 |
20:29 |
Krock |
the "uses" param defines how often it can be used |
20:31 |
Krock |
see lua_api.md for documentation |
20:33 |
Adamsky |
That's what I'm doing. It works when breaking things, like leaves, but it doesn't change how many times I can hit things until it breaks, and punch_attack_uses has no effect (that I can discern). |
20:34 |
Mantar |
lua_api, under Tool capabilities definition, says: * Punch attack uses (until the tool breaks) |
20:34 |
Mantar |
so if it's not working that's either a bug in MT or a bug in lua_apil.md |
20:36 |
|
SFENCE joined #minetest |
20:38 |
|
YuGiOhJCJ joined #minetest |
20:58 |
|
SFENCE joined #minetest |
21:17 |
frostsnow |
Adamsky: As I recall, 'punch_attack_uses' is a newer attribute, and previously mods added wear themselves by overridding on_...hit(), I think. So the entity you're hitting would need to be refactored to make use of the new attribute. |
21:19 |
|
SFENCE joined #minetest |
21:20 |
frostsnow |
Ah, 'on_punch()' is what the LUA entities use |
21:31 |
Adamsky |
As a workaround, should I, say, override on_use to have it add wear there? |
21:35 |
frostsnow |
I don't think I've tried that, and I'm not sure how it'd apply to tools. I think the mod will set the wear on the item directly so you'd have to somehow detect that and then change it. And beware the tool will insta-break when it hits max wear. |
21:40 |
|
SFENCE joined #minetest |
21:56 |
cheapie |
Hmm, some change semi-recently seems to have made entity movement with the player attached work a lot better on slow processors. Not sure what the change was, but it's nice to see anyway. |
21:59 |
|
SFENCE joined #minetest |
22:13 |
|
Thelie joined #minetest |
22:14 |
|
SpaceManiac joined #minetest |
22:14 |
Adamsky |
The Creatura mob API seems to add wear to whatever item hit a creature. Is there a way to avoid this so I can control how quickly my weapons wear? |
22:16 |
|
liceDibrarian joined #minetest |
22:18 |
|
SFENCE joined #minetest |
22:21 |
|
SpaceMan1ac joined #minetest |
22:23 |
|
liceDibrarian joined #minetest |
22:29 |
|
SpaceManiac joined #minetest |
22:33 |
|
panwolfram joined #minetest |
22:36 |
|
SFENCE joined #minetest |
22:42 |
Adamsky |
If I'm overriding the on_use function for a tool, how do I call the original on_use before writing my code (i.e. I want a sword to act like a sword normally, but then have something else happen after I attack something with it). |
22:43 |
cheapie |
You should be able to grab the original on_use out of minetest.registered_<whatever> before you override it, then store it somewhere. |
22:50 |
|
liceDibrarian joined #minetest |
22:54 |
|
SFENCE joined #minetest |
22:54 |
Adamsky |
That doesn't seem to work, since the original on_use is nil. I need to get the original function that would run instead if on_use is nil. |
23:01 |
|
bdju joined #minetest |
23:05 |
|
Eragon joined #minetest |
23:12 |
|
SFENCE joined #minetest |
23:19 |
|
liceDibrarian joined #minetest |
23:29 |
|
SFENCE joined #minetest |
23:33 |
|
cryne joined #minetest |
23:47 |
|
SFENCE joined #minetest |