Skip to content

Commit

Permalink
Ranged weapon updates and DDA fixes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chaosvolt committed Sep 18, 2022
1 parent 867e474 commit b75196d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions MST_Extra/items/ranged.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"durability": 6,
"clip_size": 1,
"reload": 100,
"flags": [ "RELOAD_AND_SHOOT", "NEVER_JAMS", "PRIMITIVE_RANGED_WEAPON" ],
"flags": [ "WATERPROOF_GUN", "RELOAD_AND_SHOOT", "NEVER_JAMS", "PRIMITIVE_RANGED_WEAPON" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "atlatl": 1 } } ]
},
{
Expand Down Expand Up @@ -48,6 +48,6 @@
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "bolt": 1 } } ],
"reload": 300,
"valid_mod_locations": [ [ "underbarrel", 1 ], [ "sights", 1 ], [ "accessories", 2 ] ],
"flags": [ "PRIMITIVE_RANGED_WEAPON" ]
"flags": [ "WATERPROOF_GUN", "NEVER_JAMS", "PRIMITIVE_RANGED_WEAPON" ]
}
]
18 changes: 8 additions & 10 deletions MST_Extra/items/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,10 @@
"volume": "11250 ml",
"bashing": 10,
"to_hit": -5,
"use_action": {
"type": "unfold_vehicle",
"vehicle_name": "makeshift_sled_vehicle",
"unfold_msg": "You unfold and deploy the makeshift sled.",
"moves": 200
"use_action": [ "UNFOLD_GENERIC" ],
"variables": {
"vehicle_name": "Makeshift Sled",
"folded_parts": "[{\"id\":\"makeshift_sled_frame_part\",\"base\":{\"typeid\":\"makeshift_sled_frame_item\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":0},{\"id\":\"makeshift_sled_runner_part\",\"base\":{\"typeid\":\"makeshift_sled_runners_item\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":0},{\"id\":\"makeshift_sled_basket_part\",\"base\":{\"typeid\":\"makeshift_sled_basket_item\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":0}]"
}
},
{
Expand All @@ -104,11 +103,10 @@
"volume": "68 L",
"bashing": 20,
"to_hit": -10,
"use_action": {
"type": "unfold_vehicle",
"vehicle_name": "log_canoe_vehicle",
"unfold_msg": "You deploy the log canoe.",
"moves": 100
"use_action": [ "UNFOLD_GENERIC" ],
"variables": {
"vehicle_name": "Log Canoe",
"folded_parts": "[{\"id\":\"log_frame_part\",\"base\":{\"typeid\":\"log_frame_item\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":0},{\"id\":\"hand_paddles\",\"base\":{\"typeid\":\"hand_paddles\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":0},{\"id\":\"log_frame_part\",\"base\":{\"typeid\":\"log_frame_item\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":1},{\"id\":\"log_frame_part\",\"base\":{\"typeid\":\"log_frame_item\",\"item_tags\":[\"VEHICLE\"]},\"mount_dx\":0,\"mount_dy\":-1}]"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions MST_Extra_BN/items/ranged.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"durability": 6,
"clip_size": 1,
"reload": 100,
"flags": [ "RELOAD_AND_SHOOT", "NEVER_JAMS", "PRIMITIVE_RANGED_WEAPON" ]
"flags": [ "WATERPROOF_GUN", "RELOAD_AND_SHOOT", "NEVER_JAMS", "PRIMITIVE_RANGED_WEAPON" ]
},
{
"id": "crossbow_makeshift",
Expand All @@ -46,6 +46,6 @@
"clip_size": 1,
"reload": 300,
"valid_mod_locations": [ [ "underbarrel", 1 ], [ "sights", 1 ], [ "accessories", 2 ] ],
"flags": [ "PRIMITIVE_RANGED_WEAPON" ]
"flags": [ "WATERPROOF_GUN", "NEVER_JAMS", "PRIMITIVE_RANGED_WEAPON" ]
}
]

0 comments on commit b75196d

Please sign in to comment.