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

Make descriptions for item variants optional. #78956

Open
Uwuewsky opened this issue Jan 5, 2025 · 1 comment
Open

Make descriptions for item variants optional. #78956

Uwuewsky opened this issue Jan 5, 2025 · 1 comment
Labels
<Suggestion / Discussion> Talk it out before implementing

Comments

@Uwuewsky
Copy link
Contributor

Uwuewsky commented Jan 5, 2025

Is your feature request related to a problem? Please describe.

Right now the description for the gun variant is mandatory, not having it will cause a loading error. As an example:

{
"id": "briefcase_smg",
"copy-from": "hk_mp5k",
"looks_like": "hk_briefcase",
"type": "GUN",
"name": { "str": "MP5 operational briefcase" },
"description": "A hard-sided briefcase with a trigger in the handle and a concealed hole in the side. To fire the internally mounted MP5K-PDW, one braces the briefcase at the waist, ensures the hole is pointed at the enemy, and squeezes the trigger. Precision and handling are severely hampered by the shape of the briefcase, but if you need to 'hand over the goods' or look low profile while bodyguarding, this is your gun. When the briefcase is open, the MP5 may be reloaded or dismounted.",
"variant_type": "gun",
"variants": [
{
"id": "briefcase_smg",
"name": { "str": "H&K operational briefcase" },
"description": "A hard-sided briefcase with a trigger in the handle and a concealed hole in the side. To fire the internally mounted MP5K-PDW, one braces the briefcase at the waist, ensures the hole is pointed at the enemy, and squeezes the trigger. Precision and handling are severely hampered by the shape of the briefcase, but if you need to 'hand over the goods' or look low profile while bodyguarding, this is your gun. When the briefcase is open, the MP5 may be reloaded or dismounted."
}
],

I'm making a patch so that almost every weapon has a generic and specific brand name, and I don't want to write descriptions for them yet. So far I have automatically copied the descriptions into the variants, but it would be better if it could be omitted entirely so as not to bloat the files.

Solution you would like.

 "name": { "str": "MP5 operational briefcase" }, 
 "description": "A hard-sided briefcase with a trigger in the handle and a concealed hole in the side.  To fire the internally mounted MP5K-PDW, one braces the briefcase at the waist, ensures the hole is pointed at the enemy, and squeezes the trigger.  Precision and handling are severely hampered by the shape of the briefcase, but if you need to 'hand over the goods' or look low profile while bodyguarding, this is your gun.  When the briefcase is open, the MP5 may be reloaded or dismounted.", 
 "variant_type": "gun", 
 "variants": [ 
   { 
     "id": "briefcase_smg", 
     "name": { "str": "H&K operational briefcase" }
   } 
 ], 

Describe alternatives you have considered.

Also make the ID field optional if there is only one variant? By default it could be the same as the parent.

Additional context

No response

@Uwuewsky Uwuewsky added the <Suggestion / Discussion> Talk it out before implementing label Jan 5, 2025
@ZhilkinSerg
Copy link
Contributor

What's the point to have a variant w/o a distinct description?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

2 participants