Search found 96 matches
- Tue May 11, 2021 08:58
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Talking about GitHub: first thing Microsoft did when bought it is to suspend my old account with minetest mods so I have to create a new one. And talking about Microsoft: dear Jeffrey from a Mojang support still doesn't answer my request to migrate the Minecraft accounts I bought in 2010 to a new em...
- Tue May 11, 2021 05:07
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Because Typescript is licensed under Apache License 2.0 and it makes writing bad JavaScript code harder. And because it is a superset of JavaScript in the first place, you could compile it down to JavaScript anyway. I get that Microsoft bad and all, but there's no good reason to snub good software ...
- Sat Feb 13, 2021 19:14
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
How do I doHybrid Dog wrote: ↑Sat Feb 13, 2021 17:49How does MoonScript compare to JavaScript?
https://moonscript.org/
Code: Select all
setTimeout(function(){console.log("Hello World")},1000)
- Tue Jan 05, 2021 12:32
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
If you honestly think that code snippet is qualified as "simple", then you really shouldn't be criticizing Lua. I actually said that there is no need to go behind these three keywords to understand the code unless something is broken and you really need to go deep into. If it's such "...
- Tue Jan 05, 2021 09:29
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
return this.#data = [{}] .concat(Object.keys(this.#data).sort((a,b) => {return this.#data[b][field]-this.#data[a][field]})) .reduce((acc,key) => { acc[key] = this.#data[key]; return acc }) Just from a cursory glance, that looks like spaghetti code with all kinds of obtuse JS-specific notations. Tha...
- Mon Jan 04, 2021 18:38
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
In my view, that's the way it should be done. If I were to implement this scoring system in Perl, I would do it that way as well. Hash tables in many scripting language are not directly sortable. It's not is if there's significant overhead in storing a temporary list of keys. We're not running on a...
- Mon Jan 04, 2021 10:21
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Heck, I even improved this example by making the data structure private to the class along with methods to manipulate the data, which is how classes should be designed. Since we are making a prototype I'd call it a "premature privatization" similar to "premature optimization". B...
- Sun Jan 03, 2021 16:15
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Although it would be cool if minetest had a shop where mod makers could sell their mods and support the core minetest development and infrastructure with a share of their revenue but I'll guess you won't like that idea either.
- Sun Jan 03, 2021 16:09
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Impressive how drkwv consistently has such bad takes That's not even an argument. "I don't like your thoughts". Um, guess that's ok. I wish you a happy new year and stuff. Maybe someday you will see it at another angle and change your opinion. Probably my english is not good enough. I wil...
- Sun Jan 03, 2021 12:44
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Lua (5.1) is a very well designed language, a description of its entire grammar fits on one side of a business card, a runtime binary can fit in 64K and compiles on just about anything. "Brainfuck" language has even smaller syntax and (I believe) even smaller binary! Why choose Lua over B...
- Sun Jan 03, 2021 09:54
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Also Python has some perverted overcomplicated module system. You cannot simply dofile() there. At least I failed to do so and ended up with a 2k-lines-one-file-application (because I was need things to be done in the first place). Now my one an only python microservice will be rewritten on JavaScri...
- Sat Jan 02, 2021 23:48
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
PascalCasing and camelCasing are deliberate coding styles. These are just excuses for someone's OCD. If I'd like to "obey the rules" I'd probably write directly in the bytecode. But I want a language, something that is made for humans. And humans tend to use these variants as well (and I'...
- Sat Jan 02, 2021 13:00
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
Indeed. However, it has "True" and "False" constants ;) I wonder why not "truE" and "falsE". That's some fancy constants too! But not so fancy as ipairs. Ahh, those lovely ipairs. They could improve it also in a python-way by making it an "Ipairs" o...
- Sat Jan 02, 2021 11:15
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
[duplicate post]
- Sat Jan 02, 2021 10:33
- Forum: Feature Discussion
- Topic: JavaScript for moddding
- Replies: 85
- Views: 13266
Re: JavaScript for moddding
As for now both LUA and JS suck. They added tons of new syntax in JS which sucks. For example classes: WTF??? I'd say to consider coffeescript but it sucks A LOT too (although has a good parts which gone wrong). And PLEASE GOD no Python. Never. Python is a language which doesn't even have "true...
- Sun Sep 15, 2019 12:00
- Forum: Partly official engine development
- Topic: Lame question from a non-C programmer.
- Replies: 1
- Views: 1212
Lame question from a non-C programmer.
I was thinking about making a script that generates Lua API diagram based on parsing the minetest code, but simple search of "register_entity" in minetest-master for something to start with didn't bring me anything satitfying. Did you guys use some special tools to work with the project or...
- Sun Sep 08, 2019 13:12
- Forum: Modding Discussion
- Topic: How to activate player fly mode by a lua code?
- Replies: 6
- Views: 1220
Re: How to activate player fly mode by a lua code?
I have found out it is possible to do by attaching a player to an object. So I created a small mod library that provides an interface for it. Although it's working, I still believe that it would've been better to make it by manipulating fly+noclip modes since this mod just duplicates a feature that ...
- Sat Sep 07, 2019 14:13
- Forum: Modding Discussion
- Topic: How to activate player fly mode by a lua code?
- Replies: 6
- Views: 1220
Re: How to activate player fly mode by a lua code?
You can set gravity individually for a player: player:set_physics_override({jump=0}). I am less sure for the noclip mode. Have you tried changing the player's collision box? Although I've managed to simulate the derised using this code: local players = {} -- Create a block. minetest.register_node(m...
- Sun Sep 01, 2019 17:56
- Forum: Modding Discussion
- Topic: How to activate player fly mode by a lua code?
- Replies: 6
- Views: 1220
How to activate player fly mode by a lua code?
I want when a player hits a specific block, put (and even force) him into a fly+noclip mode. Is this possible?
- Sat Jul 20, 2019 08:32
- Forum: Modding Discussion
- Topic: How do I check if minetest node/item is registered (exists)?
- Replies: 7
- Views: 1244
- Fri Jul 19, 2019 21:44
- Forum: Modding Discussion
- Topic: How do I check if minetest node/item is registered (exists)?
- Replies: 7
- Views: 1244
How do I check if minetest node/item is registered (exists)?
Hello. I need something like this:
How do I test if item is registered?
Code: Select all
if minetest.item_is_registered("default:cobble") then
minetest.override_item("default:cobble", ...)
end
- Sat Jan 13, 2018 20:09
- Forum: Mod Releases
- Topic: [Mod] Brilliant Blocks [1.1] [brillantblocks]
- Replies: 14
- Views: 8915
Re: [Mod] Brilliant Blocks [1.1] [brillantblocks]
Dropbox download link is broken too.
- Thu Jan 11, 2018 19:12
- Forum: Mod Releases
- Topic: [Mod] Alternative Trunks [0.1.6] [altertrunks]
- Replies: 54
- Views: 17405
Re: [Mod] Alternative Trunks [0.1.6] [altertrunks]
Download links aren't working.
- Sat Dec 09, 2017 19:11
- Forum: Mod Releases
- Topic: [Mod] Hard Trees [hardtrees]
- Replies: 13
- Views: 6736
Re: [Mod] Hard Trees [0.2] [hardtrees]
Download links are broken. Could you please fix it?
- Sat Dec 09, 2017 15:48
- Forum: Mod Releases
- Topic: [Mod] Birthstones [birthstones]
- Replies: 29
- Views: 18114
Re: [Mod] Birthstones [birthstones]
Nice mod. I like the ore textures. Some gem blocks colours are also nice. It was a bit disappointing that it is impossible to put gems itself on the ground as a standalone block.