Skip to content

Commit

Permalink
Tool modern json2 (#37729)
Browse files Browse the repository at this point in the history
* Name to object, volume to string

* Name to object, flags to array, volume to string

* Correct volume on firecracker
  • Loading branch information
snipercup authored Feb 5, 2020
1 parent 6ede090 commit b612db3
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 41 deletions.
3 changes: 1 addition & 2 deletions data/json/items/items_holiday.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
{
"id": "plastic_jack_o_lantern_lit",
"type": "TOOL",
"name": "spooky jack o'lantern",
"name_plural": "jack o'lanterns",
"name": { "str": "spooky jack o'lantern", "str_pl": "jack o'lanterns" },
"description": "There is a thick LED candle inside the pumpkin face. It doesn't provide very much light, but it can burn for quite a long time. This candle is lit. The face shifts.",
"weight": "113 g",
"volume": "3964 ml",
Expand Down
6 changes: 2 additions & 4 deletions data/json/items/melee/swords_and_blades.json
Original file line number Diff line number Diff line change
Expand Up @@ -1474,8 +1474,7 @@
"id": "cs_lajatang_on",
"copy-from": "cs_lajatang_off",
"type": "TOOL",
"name": "chainsaw lajatang (on)",
"name_plural": "chainsaw lajatangs (on)",
"name": { "str": "chainsaw lajatang (on)", "str_pl": "chainsaw lajatangs (on)" },
"description": "A long wooden pole with chainsaws impractically attached to both ends. They are currently on and draining gasoline; use this item to turn them off.",
"bashing": 4,
"cutting": 140,
Expand Down Expand Up @@ -1590,8 +1589,7 @@
"id": "combatsaw_on",
"copy-from": "combatsaw_off",
"type": "TOOL",
"name": "combat chainsaw (on)",
"name_plural": "combat chainsaws (on)",
"name": { "str": "combat chainsaw (on)", "str_pl": "combat chainsaws (on)" },
"description": "This combat chainsaw is on, and is continuously draining gasoline. Use it to turn it off.",
"to_hit": -4,
"cutting": 82,
Expand Down
3 changes: 1 addition & 2 deletions data/json/items/tool/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@
{
"id": "e_handcuffs",
"type": "TOOL",
"name": "electronic handcuffs",
"name_plural": "electronic handcuffs",
"name": { "str": "electronic handcuffs", "str_pl": "electronic handcuffs" },
"description": "A pair of electronic handcuffs, used by police and riot bots to detain captives. Their continuous siren clearly identifies the wearer as an arrested criminal and alerts human police. Wait for their arrival, don't try to escape or to remove the cuffs - they will administer an electric shock.\nHowever, since the only police likely to respond are undead, you may have a long wait ahead, unless you get creative…",
"weight": "2000 g",
"volume": "250 ml",
Expand Down
28 changes: 10 additions & 18 deletions data/json/items/tool/explosives.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
"id": "c4armed",
"type": "TOOL",
"category": "weapons",
"name": "C-4 explosive (armed)",
"name_plural": "C-4 explosives (armed)",
"name": { "str": "C-4 explosive (armed)", "str_pl": "C-4 explosives (armed)" },
"description": "This is military grade RDX composition explosive. A label reads: \"Highly explosive, use with extreme caution!\" It comes with a small timer, which is currently ticking down.",
"weight": "1570 g",
"volume": "1 L",
Expand Down Expand Up @@ -134,8 +133,7 @@
"id": "dynamite_act",
"type": "TOOL",
"category": "weapons",
"name": "dynamite (lit)",
"name_plural": "dynamites (lit)",
"name": { "str": "dynamite (lit)", "str_pl": "dynamites (lit)" },
"description": "The fuse on this dynamite is lit and hissing. It'll explode any moment now.",
"weight": "1133 g",
"volume": "750 ml",
Expand Down Expand Up @@ -190,8 +188,7 @@
"id": "dynamite_bomb_act",
"type": "TOOL",
"category": "weapons",
"name": "dynamite bomb (lit)",
"name_plural": "dynamite bombs (lit)",
"name": { "str": "dynamite bomb (lit)", "str_pl": "dynamite bombs (lit)" },
"description": "The fuse on this dynamite bomb is lit and hissing. It'll explode any moment now.",
"weight": "2730 g",
"volume": "2000 ml",
Expand Down Expand Up @@ -301,8 +298,7 @@
"id": "fertilizer_bomb_act",
"type": "TOOL",
"category": "weapons",
"name": "fertilizer bomb (lit)",
"name_plural": "fertilizer bombs (lit)",
"name": { "str": "fertilizer bomb (lit)", "str_pl": "fertilizer bombs (lit)" },
"description": "The fuse on this fertilizer bomb is lit and hissing. It'll explode any moment now.",
"weight": "1133 g",
"volume": "750 ml",
Expand Down Expand Up @@ -344,11 +340,10 @@
{
"id": "firecracker_act",
"type": "TOOL",
"name": "firecracker (lit)",
"name_plural": "firecrackers (lit)",
"name": { "str": "firecracker (lit)", "str_pl": "firecrackers (lit)" },
"description": "A firecracker that has been lit; the fuse is hissing. Throw it quickly before it explodes.",
"weight": "3 g",
"volume": 0,
"volume": "10 ml",
"price": 0,
"to_hit": -3,
"bashing": 1,
Expand Down Expand Up @@ -380,11 +375,10 @@
{
"id": "firecracker_pack_act",
"type": "TOOL",
"name": "pack of firecrackers (lit)",
"name_plural": "packs of firecrackers (lit)",
"name": { "str": "pack of firecrackers (lit)", "str_pl": "packs of firecrackers (lit)" },
"description": "A pack of 25 firecrackers that has been lit; the fuse is hissing. Throw them quickly before the start to explode.",
"weight": "75 g",
"volume": 0,
"volume": "250 ml",
"price": 0,
"to_hit": -3,
"material": "paper",
Expand Down Expand Up @@ -902,8 +896,7 @@
"id": "mininuke_act",
"type": "TOOL",
"category": "weapons",
"name": "mininuke",
"name_plural": "mininukes",
"name": { "str": "mininuke", "str_pl": "mininukes" },
"//": "This is based on the Davy Crockett nuclear artillery shell, all other man-portable nuclear weapons have far too high a yield.",
"description": "This miniature nuclear bomb has a light blinking on the side, showing that it will soon explode. You should probably get far, far away from it.",
"weight": "23000 g",
Expand Down Expand Up @@ -960,8 +953,7 @@
"id": "molotov_lit",
"type": "TOOL",
"category": "weapons",
"name": "Molotov cocktail",
"name_plural": "Molotov cocktails",
"name": { "str": "Molotov cocktail" },
"description": "A bottle of flammable liquid with a flaming rag stoppered in its neck. Throwing it will shatter the bottle on impact and ignite a fireball. Dropping it will set you on fire, so don't do that unless you want to burn to death.",
"weight": "742 g",
"volume": "750 ml",
Expand Down
17 changes: 6 additions & 11 deletions data/json/items/tool/lighting.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@
{
"id": "candle_lit",
"type": "TOOL",
"name": "candle",
"name_plural": "candles",
"name": { "str": "candle", "str_pl": "candles" },
"description": "This is a thick candle. It doesn't provide very much light, but it can burn for quite a long time. This candle is lit.",
"weight": "100 g",
"volume": "250 ml",
Expand Down Expand Up @@ -266,8 +265,7 @@
"id": "gasoline_lantern_on",
"copy-from": "gasoline_lantern",
"type": "TOOL",
"name": "gasoline lantern (on)",
"name_plural": "gasoline lanterns (on)",
"name": { "str": "gasoline lantern (on)", "str_pl": "gasoline lanterns (on)" },
"description": "This is a small gasoline powered lantern. It does not provide much light, but it lasts a long time. It is turned on. Use it to turn it off.",
"turns_per_charge": 60,
"revert_to": "gasoline_lantern",
Expand Down Expand Up @@ -509,8 +507,7 @@
"id": "oil_lamp_on",
"copy-from": "oil_lamp",
"type": "TOOL",
"name": "oil lamp",
"name_plural": "oil lamps",
"name": { "str": "oil lamp" },
"description": "This is an oil fueled lamp. It does not provide much light, but it lasts a long time. It is turned on. Use it to turn it off.",
"turns_per_charge": 240,
"revert_to": "oil_lamp",
Expand Down Expand Up @@ -544,12 +541,11 @@
"id": "oxylamp_on",
"copy-from": "oxylamp",
"type": "TOOL",
"name": "acetylene lamp (on)",
"name_plural": "acetylene lamps (on)",
"name": { "str": "acetylene lamp (on)", "str_pl": "acetylene lamps (on)" },
"turns_per_charge": 240,
"revert_to": "oxylamp",
"use_action": { "menu_text": "Turn off", "type": "transform", "msg": "The %s is extinguished", "target": "oxylamp" },
"flags": "LIGHT_30"
"flags": [ "LIGHT_30" ]
},
{
"id": "reading_light",
Expand Down Expand Up @@ -670,8 +666,7 @@
{
"id": "torch_lit",
"type": "TOOL",
"name": "torch",
"name_plural": "torches",
"name": { "str": "torch", "str_pl": "torches" },
"description": "This is a large stick, wrapped in rags that are soaked with a flammable material. It is burning, producing plenty of light.",
"weight": "831 g",
"volume": "750 ml",
Expand Down
3 changes: 1 addition & 2 deletions data/json/items/tool/radio_tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
"id": "radio_car_on",
"copy-from": "radio_car",
"type": "TOOL",
"name": "RC car (on)",
"name_plural": "RC cars (on)",
"name": { "str": "RC car (on)", "str_pl": "RC cars (on)" },
"description": "This remote-controlled car is on, and draining its batteries just like a real electric car! Use a remote control to drive it around.",
"turns_per_charge": 5,
"use_action": "RADIOCARON",
Expand Down
3 changes: 1 addition & 2 deletions data/json/items/tool/woodworking.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
"id": "chainsaw_on",
"copy-from": "chainsaw_off",
"type": "TOOL",
"name": "chainsaw (on)",
"name_plural": "chainsaws (on)",
"name": { "str": "chainsaw (on)", "str_pl": "chainsaws (on)" },
"description": "This chainsaw is on and making a lot of noise. Use it to turn it off.",
"to_hit": -5,
"bashing": 4,
Expand Down

0 comments on commit b612db3

Please sign in to comment.