Skip to content

Commit

Permalink
style(content): Convert technique and weapon_category JSON string…
Browse files Browse the repository at this point in the history
…s to arrays (#5577)

* style: Convert weapon_category JSON string to array

* style: Convert techniques JSON string to array

* docs: Update JSON info docs on item techniques
  • Loading branch information
sangh42 authored Oct 16, 2024
1 parent 4306da8 commit 8cadc6f
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion data/json/items/fake.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"description": "A system of surgical grade scalpels. They allow you to make precise cuts and can also be used as a high-quality butchering tool.",
"to_hit": 2,
"cutting": 8,
"techniques": "PRECISE",
"techniques": [ "PRECISE" ],
"flags": [ "TRADER_AVOID", "NO_DROP", "UNBREAKABLE_MELEE", "STAB" ],
"qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 5 ], [ "BUTCHER", 50 ] ]
},
Expand Down
10 changes: 5 additions & 5 deletions data/json/items/melee/spears_and_polearms.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"color": "brown",
"symbol": "/",
"material": [ "wood" ],
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"volume": "1750 ml",
"bashing": 4,
"cutting": 13,
Expand All @@ -91,7 +91,7 @@
"material": [ "wood", "iron" ],
"symbol": "/",
"color": "brown",
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"qualities": [ [ "COOK", 1 ] ],
"flags": [ "SPEAR", "REACH_ATTACK", "NONCONDUCTIVE", "SHEATH_SPEAR", "STAB" ]
},
Expand All @@ -112,7 +112,7 @@
"material": [ "wood", "iron" ],
"symbol": "/",
"color": "brown",
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"qualities": [ [ "CUT", 1 ], [ "COOK", 1 ] ],
"flags": [ "SPEAR", "REACH_ATTACK", "NONCONDUCTIVE", "SHEATH_SPEAR", "STAB" ]
},
Expand Down Expand Up @@ -331,7 +331,7 @@
"material": [ "steel", "wood" ],
"symbol": "/",
"color": "light_gray",
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", -42 ] ],
"flags": [ "REACH_ATTACK", "POLEARM", "NONCONDUCTIVE", "SHEATH_SPEAR", "FRAGILE_MELEE", "SPEAR" ]
},
Expand Down Expand Up @@ -438,7 +438,7 @@
"color": "brown",
"symbol": "/",
"material": [ "wood" ],
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"volume": "1 L",
"cutting": 11,
"thrown_damage": [ { "damage_type": "bash", "amount": 5 }, { "damage_type": "stab", "amount": 11 } ],
Expand Down
10 changes: 5 additions & 5 deletions data/json/items/melee/swords_and_blades.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"mod_target_category": [ [ "SUBMACHINE_GUNS" ], [ "RIFLES" ], [ "MACHINE_GUNS" ], [ "GATLING_GUNS" ], [ "SHOTGUNS" ], [ "M_XBOWS" ] ],
"mode_modifier": [ [ "REACH", "bayonet", 2, [ "MELEE", "REACH_ATTACK" ] ] ]
},
"techniques": "RAPID",
"techniques": [ "RAPID" ],
"qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 19 ] ],
"thrown_damage": [ { "damage_type": "stab", "amount": 14 } ],
"flags": [ "STAB", "DURABLE_MELEE", "SHEATH_KNIFE", "NPC_THROWN" ]
Expand Down Expand Up @@ -339,7 +339,7 @@
"material": "steel",
"symbol": "/",
"color": "dark_gray",
"techniques": "WBLOCK_2",
"techniques": [ "WBLOCK_2" ],
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", 15 ] ],
"flags": [ "DURABLE_MELEE", "SHEATH_SWORD", "NONCONDUCTIVE" ]
},
Expand Down Expand Up @@ -867,7 +867,7 @@
"material": "steel",
"symbol": "/",
"color": "dark_gray",
"techniques": "RAPID",
"techniques": [ "RAPID" ],
"qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 1 ], [ "BUTCHER", 18 ] ],
"flags": [ "STAB", "DURABLE_MELEE", "SHEATH_KNIFE", "NONCONDUCTIVE" ]
},
Expand Down Expand Up @@ -1021,7 +1021,7 @@
"material": "steel",
"symbol": "/",
"color": "dark_gray",
"techniques": "RAPID",
"techniques": [ "RAPID" ],
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", 8 ] ],
"flags": [ "STAB", "SHEATH_KNIFE" ]
},
Expand Down Expand Up @@ -1614,7 +1614,7 @@
"material": "steel",
"symbol": "/",
"color": "dark_gray",
"techniques": "WBLOCK_2",
"techniques": [ "WBLOCK_2" ],
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", 9 ] ],
"flags": [ "DURABLE_MELEE", "SHEATH_SWORD", "NONCONDUCTIVE" ]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/resources/wood.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"color": "brown",
"symbol": "/",
"material": [ "wood" ],
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"weight": "2250 g",
"volume": "3750 ml",
"bashing": 25,
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/firefighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"id": "ny_hook",
"type": "GENERIC",
"category": "tools",
"weapon_category": "HOOKED_POLES",
"weapon_category": [ "HOOKED_POLES" ],
"symbol": "/",
"color": "yellow",
"looks_like": "iceaxe",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/landscaping.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"symbol": "/",
"color": "brown",
"qualities": [ [ "DIG", 1 ] ],
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"use_action": "MAKEMOUND"
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/med.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"material": "steel",
"symbol": ",",
"color": "light_gray",
"techniques": "PRECISE",
"techniques": [ "PRECISE" ],
"qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 3 ] ],
"flags": [ "STAB", "SHEATH_KNIFE" ]
},
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/toiletries.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"material": "wood",
"symbol": "/",
"color": "light_gray",
"techniques": "WBLOCK_1",
"techniques": [ "WBLOCK_1" ],
"use_action": "MOP"
},
{
Expand Down
6 changes: 3 additions & 3 deletions data/json/items/tool/woodworking.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"ammo": "gasoline",
"charges_per_use": 50,
"max_charges": 450,
"techniques": "SWEEP",
"techniques": [ "SWEEP" ],
"qualities": [ [ "AXE", 4 ] ],
"use_action": {
"type": "transform",
Expand All @@ -75,7 +75,7 @@
"turns_per_charge": 4,
"charges_per_use": 0,
"revert_to": "chainsaw_off",
"techniques": "SWEEP",
"techniques": [ "SWEEP" ],
"qualities": [ [ "BUTCHER", -100 ] ],
"revert_msg": "Your chainsaw goes quiet",
"use_action": { "type": "transform", "target": "chainsaw_off", "msg": "You turn off the chainsaw." },
Expand Down Expand Up @@ -185,7 +185,7 @@
"color": "red",
"ammo": "battery",
"charges_per_use": 125,
"techniques": "SWEEP",
"techniques": [ "SWEEP" ],
"qualities": [ [ "AXE", 4 ] ],
"use_action": {
"type": "transform",
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/tool/workshop.json
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@
"material": [ "steel", "plastic" ],
"symbol": ";",
"color": "light_gray",
"techniques": "PRECISE",
"techniques": [ "PRECISE" ],
"qualities": [ [ "CUT", 1 ], [ "CUT_FINE", 2 ] ],
"flags": [ "STAB", "SHEATH_KNIFE" ]
},
Expand Down
4 changes: 2 additions & 2 deletions data/json/obsoletion/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@
"ammo": "gasoline",
"charges_per_use": 1,
"max_charges": 50,
"techniques": "WBLOCK_2",
"techniques": [ "WBLOCK_2" ],
"use_action": {
"type": "fireweapon_off",
"target_id": "firemachete_on",
Expand Down Expand Up @@ -1425,7 +1425,7 @@
"ammo": "gasoline",
"charges_per_use": 1,
"max_charges": 50,
"techniques": "WBLOCK_2",
"techniques": [ "WBLOCK_2" ],
"use_action": {
"type": "fireweapon_off",
"target_id": "broadfire_on",
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Magiclysm/items/ethereal_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
{
"type": "GENERIC",
"id": "stormglove",
"weapon_category": "FIST_WEAPONS",
"weapon_category": [ "FIST_WEAPONS" ],
"symbol": "3",
"color": "light_gray",
"name": { "str": "Stormfist" },
Expand Down
4 changes: 2 additions & 2 deletions data/mods/No_Hope/Items/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"ammo": [ "gasoline" ],
"charges_per_use": 1,
"max_charges": 50,
"techniques": "WBLOCK_2",
"techniques": [ "WBLOCK_2" ],
"use_action": {
"type": "fireweapon_off",
"target_id": "firemachete_on",
Expand Down Expand Up @@ -335,7 +335,7 @@
"ammo": [ "gasoline" ],
"charges_per_use": 1,
"max_charges": 50,
"techniques": "WBLOCK_2",
"techniques": [ "WBLOCK_2" ],
"use_action": {
"type": "fireweapon_off",
"target_id": "broadfire_on",
Expand Down
2 changes: 1 addition & 1 deletion doc/src/content/docs/en/mod/json/reference/json_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ gunmod_data:
"description": "A large stick, wrapped in gasoline soaked rags. This is burning, producing plenty of light", // In-game description
"price": 0, // Used when bartering with NPCs. Can use string "cent" "USD" or "kUSD".
"material": "wood", // Material types. See materials.json for possible options
"techniques": "FLAMING", // Combat techniques used by this tool
"techniques": [ "FLAMING" ], // Combat techniques used by this tool
"flags": "FIRE", // Indicates special effects
"weight": 831, // Weight, measured in grams
"volume": "1500 ml", // Volume, volume in ml and L can be used - "50 ml" or "2 L"
Expand Down

0 comments on commit 8cadc6f

Please sign in to comment.