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

Add code generator for assets like tarmac #178

Open
1 of 3 tasks
jcphlux opened this issue Jan 6, 2023 · 0 comments
Open
1 of 3 tasks

Add code generator for assets like tarmac #178

jcphlux opened this issue Jan 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jcphlux
Copy link

jcphlux commented Jan 6, 2023

What type of feature request is this?

  • Mantle doesn't support a Roblox feature I would like to use
  • Mantle CLI improvement
  • Other

Describe your problem
While migrating from using Tarmac to Mantle the feature I miss is the code generator that would create an assets.lua file for simple referencing my assets in code.

Another reason this would be useful is when using remote state is can be difficult to get the asset ids.

Describe the solution you'd like
Might be as easy as reusing Tarmac code to generate the file.
The source on how Tormac did this is here.
codegen.rs

Add 2 setting to configure this option.

codegen = true
codegen-path = "src/ReplicatedStorage/Modules/assets.lua"

The output could look like this. Mimicking the path structure.

return {
	Image= {
		<asset_name>= "rbxassetid://<asset__id>",
		<asset_name>= "rbxassetid://<asset__id>",
	},
	Sound = {
		<asset_name>= "rbxassetid://<asset__id>",
	},
}
@jcphlux jcphlux added the enhancement New feature or request label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant