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

Better highlight examples or prepare a small tutorial for block categories #2435

Open
Cervator opened this issue Aug 8, 2016 · 2 comments
Open
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. Category: Doc Requests, Issues and Changes targeting javadoc and module documentation Status: Needs Investigation Requires to be debugged or checked for feasibility, etc.

Comments

@Cervator
Copy link
Member

Cervator commented Aug 8, 2016

As visible in recent PR #2434 we do have support for attaching plain String categories to blocks that then in turn can be used in logic like the amount of damage a specific tool can do to blocks in a particular. The PR affects one current example where we have three different "tiers" of blocks with differing hardness then matching tools that would be able to damage the higher tier blocks (while trivializing lower tiers).

However, the system isn't widely in use and I'm not sure we really have any conventions on how to apply it or any good practices to encourage use. Probably some more examples (for instance in the Sample module) would be good, or ideally a small tutorial that covers basic usage and possible extensions like adding later content in separate modules that fit well with an earlier system.

It reminds me of the "tagging" system in Spawning / Portals. Rather than hard coding expected creature names or required components simply use String mapping between categories. Block categories more or less offer the same to make different kinds of wood blocks all act the same when faced with a wood-chopping axe. I just don't think we have it well documented anywhere.

If we can put this kind of system to good use it also brings up whether we should keep some kind of index of said categories. Any attempt to maintain such an index manually would be doomed to inaccuracy, but it is something that could be automated if needed.

@Cervator Cervator added Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Category: Doc Requests, Issues and Changes targeting javadoc and module documentation Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. labels Aug 8, 2016
@oniatus
Copy link
Contributor

oniatus commented Aug 16, 2016

Have a look at TutorialAssetSystem/wiki/Add-New-Item.

May need some better formatting or structure but at least the feature is covered by the tutorial 😎 .
I updated the affected section with a note, that multiple types can be defined per block.

@skaldarnar
Copy link
Member

Can we make the categories assets of some sorts? The zones of dynamic cities would be a similar use case which relies on plain strings atm. It would be beneficial to have proper mechanisms for module prefixes, comparison (case insensitive), etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. Category: Doc Requests, Issues and Changes targeting javadoc and module documentation Status: Needs Investigation Requires to be debugged or checked for feasibility, etc.
Projects
None yet
Development

No branches or pull requests

3 participants