-
Notifications
You must be signed in to change notification settings - Fork 284
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
Overhaul range weapons infrastructure #1857
Overhaul range weapons infrastructure #1857
Conversation
data/json/items/classes/range.json
Outdated
@@ -0,0 +1,40 @@ | |||
[ | |||
{ | |||
"abstract": "range_base", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like "muscle_ranged_base"? "ranged_base" could mean guns as well.
"reload_noise_volume": 3, | ||
"color": "yellow", | ||
"ammo": "arrow", | ||
"valid_mod_locations": [ [ "underbarrel", 1 ], [ "sights", 1 ], [ "accessories", 2 ], [ "stabilizer", 1 ], [ "dampening", 1 ] ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Common flags could also go here. I'm pretty sure that all bows will have "FIRE_TWOHAND" and "WATER_FRIENDLY". First for obvious reasons, second because the flag covers failure to fire a chemical propellant gun under water.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some bows are not water_friendly (compound ones), alright I made the changes, I'm done for this PR
Clang-tidy:
|
Some mods may act weird without the hardcode, but we can't really do anything here. Except maybe announcing it on the discord - I'll try that. |
Belated thought: which of the bow flags and ammo effects will crossbows be expected to have? Because the removal of hardcoded flag injection reminds me, crossbows probably USED to benefit from this old hardcoded too because back in the old day they had the archery skill. Another overlooked consequence of CleverRaven/Cataclysm-DDA#21545 probably? |
So it turns out a long-forgotten side effect of CleverRaven/Cataclysm-DDA#21545 was breaking the janky hardcoded injection of certain flags and ammo effects into cataclysmbnteam/Cataclysm-BN#1857 makes this more important in BN but implemented same general changes to both versions in case DDA ever notices that function (and it's been about 5 years so literally everyone evidently never noticed any changes to crossbow behavior). Also updated the deployable vehicles in DDA version, as CleverRaven/Cataclysm-DDA#59572 updated folding vehicles. While a great idea on paper, in practice they somehow managed to invent a form of JSON that's even MORE of an unreadable mess than vehicle JSON is, with making folded_parts something you have to work with to implement deployable vehicles now.
Summary
Infrastructure "Overhaul range weapons infrastructure"
Purpose of change
-->
Describe the solution
For now:
Describe alternatives you've considered
Playing the game instead.
Testing
I fixed all loading errors and compared a few range weapons/ammoes from an experimental version of the game and this branch.
Although some flags don't appear (in the item description) in both cases so I'll suppose it worked.