Skip to content

Commit

Permalink
fix: some furniture generates too many nails
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
casswedson committed Aug 30, 2022
1 parent b5e0cb5 commit 280a496
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions data/json/furniture_and_terrain/furniture-decorative.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] }
]
},
Expand Down Expand Up @@ -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 ] }
]
}
Expand Down
4 changes: 2 additions & 2 deletions data/json/furniture_and_terrain/furniture-recreation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] }
]
}
Expand All @@ -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 ] }
]
Expand Down
2 changes: 1 addition & 1 deletion data/json/furniture_and_terrain/terrain-floors-indoor.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 280a496

Please sign in to comment.