Time |
Nick |
Message |
01:19 |
|
SwissalpS joined #luanti |
01:53 |
|
FileX joined #luanti |
03:29 |
|
SwissalpS joined #luanti |
03:34 |
|
SFENCE_arch joined #luanti |
04:00 |
|
MTDiscord joined #luanti |
06:36 |
sfan5 |
CSM does not have http support, correct |
06:38 |
MTDiscord |
<redundantcc> Does it not, man all the cool stuff is missing from cam. |
06:38 |
MTDiscord |
<redundantcc> *csm, my auto correct strikes again. |
08:03 |
|
SwissalpS joined #luanti |
08:13 |
|
Talkless joined #luanti |
08:46 |
[MatrxMT] |
<leca> Quick question: how do I prevent a player form placing a node? |
08:46 |
[MatrxMT] |
<leca> BG: I have a node that a player should have limited amount per world, for example 5 nodes per world. |
08:46 |
[MatrxMT] |
<leca> I made in player's meta count of owned nodes and increment it every time in ``after_place_node``. How I need to check if the limit is hit and prevent player from placing it. |
08:46 |
[MatrxMT] |
<leca> I tried making ``remove_node(pos)`` and ``return true`` so that itemstack would not be decremented, but I feel like it's the wrong way to do so.. |
08:46 |
[MatrxMT] |
<leca> Any other elegant solutions or I should stick with it? |
08:46 |
[MatrxMT] |
<leca> Quick question: how do I prevent a player form placing a node? |
08:46 |
[MatrxMT] |
<leca> BG: I have a node that a player should have limited amount per world, for example 5 nodes per world. |
08:46 |
[MatrxMT] |
<leca> I made in player's meta count of owned nodes and increment it every time in `after_place_node`. Now I need to check if the limit is hit and prevent player from placing it. |
08:46 |
[MatrxMT] |
<leca> I tried making `remove_node(pos)` and `return true` so that itemstack would not be decremented, but I feel like it's the wrong way to do so.. |
08:46 |
[MatrxMT] |
<leca> Any other elegant solutions or I should stick with it? |
08:50 |
MTDiscord |
<redundantcc> you can use: core.register_on_protection_violation and core.record_protection_violation |
08:50 |
MTDiscord |
<redundantcc> but I pay be over kill |
09:34 |
sfan5 |
those two functions won't help |
09:34 |
sfan5 |
maybe you mean core.is_protected? |
09:35 |
MTDiscord |
<redundantcc> Maybe, I am very sleep deprived rn. |
09:35 |
MTDiscord |
<redundantcc> Got work in the morning |
09:35 |
MTDiscord |
<redundantcc> But the library needs writing, so yeah.. |
09:36 |
[MatrxMT] |
<leca> Won't be that another bad practice? I'm not protecting a zone, I need to prevent a player from placing a node. But if there's no any other solutions, I'll check it out |
09:37 |
sfan5 |
the correct solution is to override the node's on_place and defer to core.item_place if the placement is to be allowed |
09:38 |
MTDiscord |
<redundantcc> Isn't there a global on_place that would catch all nodes? |
09:40 |
sfan5 |
core.register_on_placenode runs afterwards |
09:41 |
[MatrxMT] |
<leca> As far as I know, the placer is not available in on_place, is it? |
09:41 |
sfan5 |
why not? |
09:43 |
sfan5 |
the placer is right there in the parameters |
09:44 |
[MatrxMT] |
<leca> Oh I thought about on_construct, sorry |
09:45 |
[MatrxMT] |
<leca> Thanks for the directions! |
09:48 |
|
YuGiOhJCJ joined #luanti |
10:03 |
|
Noisytoot joined #luanti |
10:07 |
|
mrkubax10 joined #luanti |
10:31 |
|
gregon joined #luanti |
10:32 |
|
gregon left #luanti |
11:21 |
|
ln5 joined #luanti |
11:26 |
|
FileX joined #luanti |
11:28 |
|
turtleman joined #luanti |
11:29 |
|
Guest43 joined #luanti |
12:29 |
|
Eragon joined #luanti |
12:52 |
|
cheek_pain joined #luanti |
13:26 |
|
Kimapr_ joined #luanti |
13:34 |
|
kimapr joined #luanti |
13:35 |
|
SFENCE_arch joined #luanti |
13:45 |
|
kimapr joined #luanti |
13:45 |
|
SFENCE joined #luanti |
13:47 |
|
Kimapr_ joined #luanti |
13:57 |
|
SFENCE joined #luanti |
14:01 |
|
SFENCE joined #luanti |
15:04 |
|
jaca122 joined #luanti |
15:40 |
|
simon816 joined #luanti |
15:41 |
|
ireallyhateirc joined #luanti |
16:01 |
|
Kimapr_ joined #luanti |
16:34 |
|
Kimapr_ joined #luanti |
17:14 |
|
Glaedr joined #luanti |
17:38 |
|
jonadab joined #luanti |
17:40 |
|
Kimapr_ joined #luanti |
17:40 |
|
definitelya joined #luanti |
18:19 |
|
chilledfrogs joined #luanti |
19:37 |
|
ireallyhateirc joined #luanti |
19:47 |
|
independent56 joined #luanti |
19:48 |
independent56 |
i'm running a server but it's public port is not 30000 yet servers.luanti.net thinks it is. The internal port is 30000 but a tunnel has forced it to chang |
19:48 |
independent56 |
actually let me quickly reconfigure the internal prot to match the exterior and see if that fixes it |
19:53 |
bgstack15 |
Internal port: so either on a host behind NAT (e.g., on a computer connected to your ISP router), or in a container. I had to modify the serverlist code for my own instance so it would not get confused by the container's internal default port of 30000. The right thing for you to do is reconfigure the internal port to match the exterior, as you said you are doing. |
19:53 |
independent56 |
omg i fixd it |
19:53 |
independent56 |
yep, thanks1 |
19:53 |
bgstack15 |
Congrats! |
22:04 |
|
Kimapr joined #luanti |
22:35 |
|
panwolfram joined #luanti |
23:05 |
|
Eragon joined #luanti |