From 280a496f9223828a9f7205a97764727c9e2e058f Mon Sep 17 00:00:00 2001 From: casswedson <58050969+casswedson@users.noreply.github.com> Date: Mon, 29 Aug 2022 19:10:31 -0500 Subject: [PATCH] fix: some furniture generates too many nails while digging around looking for a cause of many, many nails spawning in a farm house or something I found that smashing certain furniture gave you 100x times of what it was supposed to give. also deconstructing base carpets results in many, many nails simple bug related to spawning items with a large default `count` and `stack_size` with `count` in itemgroups or some other method of spawning items use `charges` when spawning nails as a product of smashing furniture grep around for bash and deconstruct arrays, looking for mentions of nails and `count` --- data/json/furniture_and_terrain/furniture-decorative.json | 4 ++-- data/json/furniture_and_terrain/furniture-recreation.json | 4 ++-- data/json/furniture_and_terrain/terrain-floors-indoor.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/json/furniture_and_terrain/furniture-decorative.json b/data/json/furniture_and_terrain/furniture-decorative.json index 704490c7ef034..54032908d7b5f 100644 --- a/data/json/furniture_and_terrain/furniture-decorative.json +++ b/data/json/furniture_and_terrain/furniture-decorative.json @@ -246,7 +246,7 @@ "sound_fail": "thump.", "items": [ { "item": "pine_bough", "count": [ 4, 6 ] }, - { "item": "nail", "count": [ 5, 14 ] }, + { "item": "nail", "charges": [ 5, 14 ] }, { "item": "stick", "count": [ 1, 3 ] } ] }, @@ -287,7 +287,7 @@ "sound_fail": "thump.", "items": [ { "item": "pine_bough", "count": [ 4, 6 ] }, - { "item": "nail", "count": [ 5, 14 ] }, + { "item": "nail", "charges": [ 5, 14 ] }, { "item": "stick", "count": [ 1, 3 ] } ] } diff --git a/data/json/furniture_and_terrain/furniture-recreation.json b/data/json/furniture_and_terrain/furniture-recreation.json index f0a22167f65a9..9163fec618dcb 100644 --- a/data/json/furniture_and_terrain/furniture-recreation.json +++ b/data/json/furniture_and_terrain/furniture-recreation.json @@ -599,7 +599,7 @@ "sound_fail": "whump.", "items": [ { "item": "2x4", "count": [ 2, 4 ] }, - { "item": "nail", "count": [ 5, 18 ] }, + { "item": "nail", "charges": [ 5, 18 ] }, { "item": "splinter", "count": [ 5, 17 ] } ] } @@ -623,7 +623,7 @@ "sound_fail": "thump!", "items": [ { "item": "2x4", "count": [ 2, 4 ] }, - { "item": "nail", "count": [ 5, 18 ] }, + { "item": "nail", "charges": [ 5, 18 ] }, { "item": "splinter", "count": [ 5, 17 ] }, { "item": "scrap", "count": [ 15, 60 ] } ] diff --git a/data/json/furniture_and_terrain/terrain-floors-indoor.json b/data/json/furniture_and_terrain/terrain-floors-indoor.json index efa40cfc0d806..71e0664a5479c 100644 --- a/data/json/furniture_and_terrain/terrain-floors-indoor.json +++ b/data/json/furniture_and_terrain/terrain-floors-indoor.json @@ -669,7 +669,7 @@ "str_min_supported": 100, "items": [ { "item": "cotton_patchwork", "count": [ 10, 20 ] }, { "item": "nail", "charges": [ 1, 3 ] } ] }, - "deconstruct": { "items": [ { "item": "r_carpet", "count": 1 }, { "item": "nail", "count": [ 2, 5 ] } ], "ter_set": "t_floor" } + "deconstruct": { "items": [ { "item": "r_carpet", "count": 1 }, { "item": "nail", "charges": [ 2, 5 ] } ], "ter_set": "t_floor" } }, { "type": "terrain",