Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update some textures in lua_api.md #14583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

someone-aka-sum1
Copy link
Contributor

@someone-aka-sum1 someone-aka-sum1 commented Apr 23, 2024

Add the default image prefix where still missing, make a few other examples functional as well

Add image prefixes where still missing, make some other examples functional as well
@sfan5
Copy link
Member

sfan5 commented Apr 23, 2024

These are just examples so they don't necessarily need to match any existing textures in e.g. Minetest Game.

@Zughy Zughy added the Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines label Apr 23, 2024
@someone-aka-sum1
Copy link
Contributor Author

I understand, but this allows anyone who downloads minetest to try them out. Besides, other examples do use textures from the default game.

@wsor4035
Copy link
Contributor

wsor4035 commented Apr 24, 2024

minetest game isnt even the default anymore, nor is it packaged with minetest anymore. perhaps if we wanted to suggest good texturenames, should name the examples something like modname_texturename.extension

@SmallJoker
Copy link
Member

mymod_grass.png would be better than grass.png because it implies that you should adhere to the recommended texture naming convention.

@someone-aka-sum1
Copy link
Contributor Author

someone-aka-sum1 commented Apr 24, 2024

I agree that it makes sense to specify the texture naming convention in the docs, but it also makes sense for examples themselves to use concrete, widely-available textures.

Using default textures in modifier examples enables (most) developers to use them verbatim in order to get a sense for the effect of those modifiers. It's not like a developer would know how to replace a template, but would be confused as to how to replace a concrete texture, right?

I must say I find this pushback of yours on a trivial edit such as this peculiar. After all, I'm not the first to use default textures for examples. Unless I'm missing something, using default textures seems logical to me

@appgurueu
Copy link
Contributor

I understand why someone would have a problem with the current examples, since they seem to encourage bad practice.

However, I'm not a fan of the proposed changes for the very same reason. Minetest Game has no special status anymore. Unnecessary dependencies on default are a bad thing. Modders should be aware of where their textures are coming from; usually, modders will want to supply their own textures. It needs to be clear that it is (usually) not the engine's job to provide a texture, but rather that of a mod or game, which need not be Minetest Game. To a new modder, the default_ prefix will be just confusing and look like leftover cruft from an engine - game separation which has long been done.

I think making it clear that these names are placeholders, and encouraging following naming conventions by adding a mymod_ prefix as others have suggested, is the best way forward.

A simple s/default_/mymod_/g (restricted to the changed lines) should do the job.


ps.

I must say I find this pushback of yours on a trivial edit such as this peculiar.

This line of argumentation leads nowhere: If this edit is trivial, the push"back" is as trivially unwarranted as the push"front".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Documentation Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants