From 369aff7e889c4e5c25f3b8061715f6db17ecc9cf Mon Sep 17 00:00:00 2001 From: snipercup <50166150+snipercup@users.noreply.github.com> Date: Wed, 5 Feb 2020 18:42:55 +0100 Subject: [PATCH 1/3] Name to object --- data/json/items/chemicals_and_resources.json | 9 +++------ data/json/items/resources/tailoring.json | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index 5aa7293aaf0de..395b4ed7835d8 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -800,8 +800,7 @@ "id": "chem_acetic_acid", "category": "chems", "price": 200, - "name": "acetic acid", - "name_plural": "acetic acid", + "name": { "str": "acetic acid", "str_pl": "acetic acid" }, "symbol": "~", "color": "white", "description": "Concentrated acetic acid, typically used as a chemical reagent and antifungal agent. Despite its horrid smell, it was used to prepare several types of perfumes, but would making perfume not be too fancy for postapocalyptic New England?", @@ -853,8 +852,7 @@ "id": "chem_anfo", "category": "chems", "price": 5000, - "name": "ANFO", - "name_plural": "ANFO", + "name": { "str": "ANFO", "str_pl": "ANFO" }, "symbol": "=", "color": "red", "description": "Several brownish pellets that were made by absorbing organic fuel on ammonium nitrate. This ammonium nitrate-fuel oil or ANFO, as it is called, mixture is a common industrial explosive due to its stability and low price. Burns fast, but needs an explosive primer to detonate.", @@ -907,8 +905,7 @@ "id": "chem_rdx", "category": "chems", "price": 7500, - "name": "RDX", - "name_plural": "RDX", + "name": { "str": "RDX", "str_pl": "RDX" }, "symbol": "=", "color": "white", "description": "Several off-white crystals of RDX or hexogen: a military-grade, shelf-stable high explosive. Can be cast into shaped charges or mixed with scrap to pepper the blast area with high-velocity shrapnel.", diff --git a/data/json/items/resources/tailoring.json b/data/json/items/resources/tailoring.json index cfeeb9801300a..0e96f775f4ee1 100644 --- a/data/json/items/resources/tailoring.json +++ b/data/json/items/resources/tailoring.json @@ -48,8 +48,7 @@ "id": "scrap_kevlar", "copy-from": "scrap_cotton", "type": "AMMO", - "name": "Kevlar scraps", - "name_plural": "Kevlar scraps", + "name": { "str": "Kevlar scraps", "str_pl": "Kevlar scraps" }, "description": "Oddly-shaped smallish bits of Kevlar fabric, waste material from tailoring projects. Normally it's disposed of, but since Kevlar would be very difficult to make in a post-apocalyptic world, it might be worth recycling it for Kevlar thread.", "price": 5, "material": "kevlar" From fe302dca10f1b21b440602bd3b02fd298b9be1db Mon Sep 17 00:00:00 2001 From: snipercup <50166150+snipercup@users.noreply.github.com> Date: Wed, 5 Feb 2020 18:46:41 +0100 Subject: [PATCH 2/3] Name to object --- data/json/items/chemicals_and_resources.json | 12 ++++-------- data/json/items/resources/metal.json | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index 395b4ed7835d8..cf35f681279a8 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -466,8 +466,7 @@ "id": "chem_aluminium_powder", "category": "chems", "price": 500, - "name": "aluminum powder", - "name_plural": "aluminum powder", + "name": { "str": "aluminum powder", "str_pl": "aluminum powder" }, "symbol": "=", "color": "white", "description": "A handful of finely ground aluminum powder. This strong reducing agent was used in combination with various oxidants for chemical welding and explosives alike. Just before the Cataclysm, however, it was the basis of virtually all commercial metallic-hued paints and anti-corrosive coatings.", @@ -620,8 +619,7 @@ "id": "chem_acetone", "category": "chems", "price": 50, - "name": "acetone", - "name_plural": "acetone", + "name": { "str": "acetone", "str_pl": "acetone" }, "symbol": "=", "color": "white", "description": "Acetone, best known as the primary constituent of most nail polish removers. Flammable and can be easily used for potent home-made explosives, as demonstrated by the terrorist attacks of 2016.", @@ -730,8 +728,7 @@ "id": "chem_ammonium_nitrate", "category": "chems", "price": 100, - "name": "ammonium nitrate", - "name_plural": "ammonium nitrate", + "name": { "str": "ammonium nitrate", "str_pl": "ammonium nitrate" }, "symbol": "=", "color": "white", "description": "A handful of ammonium nitrate. This white, crystalline powder is commonly used as a component of fertilizers and explosives. Could also be dissolved in water to sharply lower its temperature, but is there any use for this quality in this new world?", @@ -782,8 +779,7 @@ "id": "chem_aluminium_sulphate", "category": "chems", "price": 300, - "name": "aluminum sulfate", - "name_plural": "aluminum sulfate", + "name": { "str": "aluminum sulfate", "str_pl": "aluminum sulfate" }, "symbol": "=", "color": "white", "description": "Several crystals of aluminum sulfate. Historically, an agent for purifying water and as molluscicide, due to the fact that it degenerates their slime. Just before the Cataclysm, its main uses were for adjusting the acidity of the soil and as an additive to baking powder. If mixed with a strong acid, it could be used to saturate the soil with aluminum, causing all but the most resistant of plants to wither and die.", diff --git a/data/json/items/resources/metal.json b/data/json/items/resources/metal.json index 6043e46a9bb2a..499d96bdbf4b7 100644 --- a/data/json/items/resources/metal.json +++ b/data/json/items/resources/metal.json @@ -89,8 +89,7 @@ "id": "bismuth", "type": "AMMO", "category": "spare_parts", - "name": "bismuth", - "name_plural": "bismuth", + "name": { "str": "bismuth", "str_pl": "bismuth" }, "description": "A dense but brittle metal often used as an alternative to lead.", "weight": "2 g", "//": "Density 9.78g/cm³ ~ 2.4kg/250ml @ stack 1000 = 2g/unit", From 8a9b426948b9bfeb4aeb3a46ef71acdc3e9441fe Mon Sep 17 00:00:00 2001 From: snipercup <50166150+snipercup@users.noreply.github.com> Date: Wed, 5 Feb 2020 18:48:36 +0100 Subject: [PATCH 3/3] Name to object, double have decimal, flags to array --- data/json/items/ammo.json | 15 +++++++-------- data/json/items/chemicals_and_resources.json | 3 +-- data/json/items/fuel.json | 7 +++---- data/json/items/ranged/throwing.json | 3 +-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/data/json/items/ammo.json b/data/json/items/ammo.json index 41262366b7a28..8d412abf94521 100644 --- a/data/json/items/ammo.json +++ b/data/json/items/ammo.json @@ -4,12 +4,11 @@ "id": "battery", "category": "spare_parts", "price": 12000, - "name": "battery", - "name_plural": "batteries", + "name": { "str": "battery", "str_pl": "batteries" }, "symbol": "=", "color": "yellow", "description": "Some free-floating battery charge. This can be reloaded into rechargable battery cells, but can never be unloaded.", - "flags": "TRADER_AVOID", + "flags": [ "TRADER_AVOID" ], "material": "iron", "effects": [ "COOKOFF" ], "volume": "250 ml", @@ -17,7 +16,7 @@ "ammo_type": "battery", "count": 100, "//2": "1 battery is 1 kJ of energy. 40 batteries is an alkaline C-cell.", - "fuel": { "energy": 1 } + "fuel": { "energy": 1.0 } }, { "type": "TOOL", @@ -222,7 +221,7 @@ "ammo_type": "plutonium", "count": 5, "effects": [ "COOKOFF", "NEVER_MISFIRES" ], - "fuel": { "energy": 10 } + "fuel": { "energy": 10.0 } }, { "type": "AMMO", @@ -474,8 +473,8 @@ "flags": [ "UNRECOVERABLE" ], "fuel": { "//": "Compressed gaseous hydrogen has 9.2 MJ/L. This stuff has a very high energy density but is also bulky and explosive.", - "energy": 4000, - "explosion_data": { "chance_hot": 2, "chance_cold": 2, "factor": 1, "fiery": true, "size_factor": 0.15 } + "energy": 4000.0, + "explosion_data": { "chance_hot": 2, "chance_cold": 2, "factor": 1.0, "fiery": true, "size_factor": 0.15 } } }, { @@ -859,7 +858,7 @@ "ammo_type": "charcoal", "count": 250, "stack_size": 10, - "fuel": { "energy": 30 } + "fuel": { "energy": 30.0 } }, { "type": "AMMO", diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index cf35f681279a8..068c92fceb9f4 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -865,8 +865,7 @@ "id": "chem_black_powder", "category": "chems", "price": 2000, - "name": "black gunpowder", - "name_plural": "black gunpowder", + "name": { "str": "black gunpowder", "str_pl": "black gunpowder" }, "symbol": "=", "color": "dark_gray", "description": "A handful of black gunpowder, made by mixing charcoal and sulfur with saltpeter. Pretty useless for making modern cartridges, as the soot produced when it burns will quickly clog any firearm, but it could be used to make some vicious bombs.", diff --git a/data/json/items/fuel.json b/data/json/items/fuel.json index 83269a7369a35..29539ce9ae8eb 100644 --- a/data/json/items/fuel.json +++ b/data/json/items/fuel.json @@ -72,8 +72,7 @@ }, { "id": "biodiesel", - "name": "biodiesel", - "name_plural": "biodiesel", + "name": { "str": "biodiesel", "str_pl": "biodiesel" }, "copy-from": "diesel", "type": "AMMO", "description": "Vegetable oil- or animal fat-based diesel fuel consisting of long-chain alkyl (methyl, ethyl, or propyl) esters.", @@ -134,7 +133,7 @@ "ammo_type": "lamp_oil", "fuel": { "//": "Roughly equivalent to LPG", - "energy": 26, + "energy": 26.0, "explosion_data": { "chance_hot": 5, "chance_cold": 10, "factor": 0.2, "fiery": true, "size_factor": 0.1 } }, "range": 6, @@ -163,7 +162,7 @@ "ammo_type": "motor_oil", "fuel": { "//": "Roughly equivalent to LPG", - "energy": 26, + "energy": 26.0, "explosion_data": { "chance_hot": 5, "chance_cold": 10, "factor": 0.2, "fiery": true, "size_factor": 0.1 } }, "range": 6, diff --git a/data/json/items/ranged/throwing.json b/data/json/items/ranged/throwing.json index 2ea5a32feb150..bddf19574612d 100644 --- a/data/json/items/ranged/throwing.json +++ b/data/json/items/ranged/throwing.json @@ -3,8 +3,7 @@ "id": "bolas", "type": "AMMO", "category": "weapons", - "name": "bolas", - "name_plural": "bolases", + "name": { "str": "bolas", "str_pl": "bolases" }, "description": "Some ropes with weights, designed to tangle the legs of a target when thrown, usually at an animal. Used by the Gauchos of Argentina.", "weight": "400 g", "volume": "750 ml",