Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Weighted Blankets and Blanket Variants/Snippets #74051

Merged
merged 9 commits into from
May 27, 2024
1 change: 1 addition & 0 deletions data/json/itemgroups/collections_domestic.json
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@
{ "item": "glowstick", "prob": 60, "charges": 1400 },
{ "item": "handflare", "prob": 40, "charges": 300 },
{ "item": "blanket", "prob": 10 },
{ "item": "blanket_weighted", "prob": 3 },
{ "item": "electric_blanket", "prob": 4 },
{ "item": "house_coat", "prob": 25 },
{ "item": "talking_doll", "prob": 65, "charges": [ 0, 100 ] },
Expand Down
1 change: 1 addition & 0 deletions data/json/itemgroups/furniture.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"entries": [
{ "item": "blanket", "prob": 2500 },
{ "item": "down_blanket", "prob": 1300 },
{ "item": "blanket_weighted", "prob": 650 },
{ "item": "pillow", "prob": 3000 },
{ "item": "down_pillow", "prob": 1500 },
{ "item": "electric_blanket", "prob": 400 },
Expand Down
90 changes: 89 additions & 1 deletion data/json/items/generic/bedding.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,95 @@
"covers": [ "torso", "arm_l", "arm_r", "hand_l", "hand_r", "leg_l", "leg_r", "foot_l", "foot_r" ]
}
],
"//": "Based on https://www.amazon.com/dp/B091DZVHX7 with the assumed material thickness of 0.8cm"
"//": "Based on https://www.amazon.com/dp/B091DZVHX7 with the assumed material thickness of 0.8cm",
"variants": [
{
"id": "blanket_makeshift",
"name": { "str": "makeshift blanket" },
"description": "A blanket made by you! Embrace your inner tailor.",
"expand_snippets": true,
"weight": 0
},
{
"id": "blanket_sports",
"name": { "str": "sports blanket" },
"description": "This blanket is official sports memorabilia, or so says the tag. It features the name and mascot of the <sports_teams>!",
"expand_snippets": true,
"weight": 50
},
{
"id": "blanket_sports_collectable",
"name": { "str": "collectable sports blanket" },
"//": "Comes out to be about 1% ish spawn, don't increase this, although it uses a joke about being more common I think it would be annoying for it to crop up too much.",
"description": "This blanket is an alleged collector's piece, featuring the name and mascot of the <sports_teams>! The tag explains that only 100,000 were made and reads: #<number><number><number><number><number>.",
"expand_snippets": true,
"weight": 10
},
{
"id": "blanket_geometric",
"name": { "str": "geometric blanket" },
"description": "A standard blanket, except that the stitching across the surface is patterned in <geometric_patterns>s.",
"expand_snippets": true,
"weight": 250
},
{
"id": "blanket_fluffy",
"name": { "str": "fluffy blanket" },
"description": "This blanket's tag lists it as \"the fluffiest blanket in the world\" and was made in the USA. Only moderately fluffy.",
"expand_snippets": true,
"weight": 50
},
{
"id": "blanket_floral",
"name": { "str": "floral blanket" },
"//": "Note to self, look up if ever popular is hyphenated. If you're seeing this tell me so I can remember to look.",
"description": "The ever popular floral print blanket. This one is patterned with <flowers>. Popular with grandmothers.",
"expand_snippets": true,
"weight": 250
},
{
"id": "blanket_cartoon",
"name": { "str": "cartoon blanket" },
"description": "A blanket adorned with a famous animated character! It depicts <cartoon_blanket>!",
"expand_snippets": true,
"weight": 50
}
]
},
{
"id": "blanket_weighted",
"type": "ARMOR",
"name": { "str": "weighted blanket" },
"description": "A thick, layered blanket with glass microbeads added to increase the weight.",
"weight": "5670 g",
"volume": "18000 ml",
"copy-from": "blanket",
"price": "30 USD",
"price_postapoc": "50 cent",
"symbol": "[",
"looks_like": "blanket",
"color": "blue",
"warmth": 60,
"material_thickness": 2,
"flags": [ "OVERSIZE", "OUTER", "ALLOWS_NATURAL_ATTACKS" ],
"armor": [
{
"encumbrance": 50,
"coverage": 100,
"covers": [ "torso", "arm_l", "arm_r", "hand_l", "hand_r", "leg_l", "leg_r", "foot_l", "foot_r" ]
}
],
"//": "Based vaguely on https://www.amazon.com/BETU-Weighted-Blanket-Blankets-Factory/dp/B08N66D947 the 60x80 12lb version.",
"variant_type": "generic",
"variants": [
{
"id": "blanket_weighted_geometric",
"name": { "str": "weighted geometric blanket" },
"description": "It's been stitched in a <geometric_patterns> pattern.",
"expand_snippets": true,
"append": true
}
]
},
{
"id": "down_blanket",
Expand Down
1 change: 1 addition & 0 deletions data/json/recipes/armor/other.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
},
{
"result": "blanket",
"variant": "blanket_makeshift",
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
"category": "CC_ARMOR",
Expand Down
88 changes: 88 additions & 0 deletions data/json/snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,94 @@
"category": "<statue_worthy_act>",
"text": [ "provided for our city in a time of need", "founded our great city" ]
},
{
"type": "snippet",
"category": "<sports_teams>",
"//": "These were initially made for sports team blankets, please include both a town, team name, and sport if you expand the snippets",
"text": [
{ "id": "team_1", "text": "Abbot Arctic Foxes hockey team" },
{ "id": "team_2", "text": "Derry Drakes soccer team" },
{ "id": "team_3", "text": "Eastport University field hockey team" },
{ "id": "team_4", "text": "Foxborough highschool wrestling team" },
{ "id": "team_5", "text": "Hudson Fighting Salmon football team" },
{ "id": "team_6", "text": "Lewiston Crows baseball team" },
{ "id": "team_7", "text": "Maxfield Moles rugby team" },
{ "id": "team_8", "text": "New Ashford Wildcats basketball team" },
{ "id": "team_9", "text": "North Kingston Angels hockey team" },
{ "id": "team_10", "text": "Osborn University Blobfish soccer team" },
{ "id": "team_11", "text": "Plainfield Pears highschool wrestling team" },
{ "id": "team_12", "text": "Salisbury Brahmin football team" },
{ "id": "team_13", "text": "Torrington Titans baseball team" },
{ "id": "team_14", "text": "Waitsfield Centurions rugby team" },
{ "id": "team_15", "text": "Woodford Corgis basketball team" }
]
},
{
"type": "snippet",
"category": "<geometric_patterns>",
"//": "Geometric patterns originally made for blankets, to represent their stitching patterns.",
"text": [
{ "id": "geo_shape_1", "text": "circle" },
{ "id": "geo_shape_2", "text": "diamond" },
{ "id": "geo_shape_3", "text": "hexagon" },
{ "id": "geo_shape_4", "text": "octagon" },
{ "id": "geo_shape_5", "text": "pentagon" },
{ "id": "geo_shape_6", "text": "square" },
{ "id": "geo_shape_7", "text": "triangle" }
]
},
{
"type": "snippet",
"category": "<flowers>",
"//": "Different kinds of flowers, originally intended for use with floral blankets. Additions should be plurals for this use-case, singular flower names should be made into a new snippet.",
"text": [
{ "id": "flower_1", "text": "carnations" },
{ "id": "flower_2", "text": "chrysanthemums" },
{ "id": "flower_3", "text": "daffodil" },
{ "id": "flower_4", "text": "dahlias" },
{ "id": "flower_5", "text": "daisies" },
{ "id": "flower_6", "text": "hybiscus" },
{ "id": "flower_7", "text": "lilies" },
{ "id": "flower_8", "text": "orchids" },
{ "id": "flower_9", "text": "poppies" },
{ "id": "flower_10", "text": "roses" },
{ "id": "flower_11", "text": "sunflowers" },
{ "id": "flower_12", "text": "tulips" }
]
},
{
"type": "snippet",
"category": "<cartoon_blanket>",
"//": "Descriptions of cartoon characters made for the cartoon blanket, probably won't make sense used elsewhere?",
"text": [
{
"id": "cartoon_blanket_1",
"text": "the famous Manspider, a quiet, nerdy spider that was bitten by a radioactive human"
},
{
"id": "cartoon_blanket_2",
"text": "the infamous pirate captain Iris Crane, the most beautiful, most daring, and most feared woman on the seven seas"
},
{
"id": "cartoon_blanket_3",
"text": "the three Mutant Squid Bros™, who live in a culvert by day and fight crime at night. Rumor had it that a fourth Bro would be added in an upcoming spinoff"
},
{
"id": "cartoon_blanket_4",
"text": "the Christmas Ghoul, who taught the world that our looks don't define our passions"
},
{ "id": "cartoon_blanket_5", "text": "the lovely Boston-Chan, the mascot of Boston AnimeCon" },
{
"id": "cartoon_blanket_6",
"text": "a famous man and woman from an anime, dressed in cowboy outfits. A speech blurb reads \"How y'all doin'?\""
},
{
"id": "cartoon_blanket_7",
"text": "a small robot, known only as T6-Zed49, who tackles tough political issues while exploring civilizations across the universe"
},
{ "id": "cartoon_blanket_8", "text": "a cartoon version of Mr. Smile and Laugh, a children's entertainer" }
]
},
{
"type": "snippet",
"category": "<dog_name>",
Expand Down
8 changes: 4 additions & 4 deletions tests/crafting_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static const recipe_id recipe_armguard_larmor( "armguard_larmor" );
static const recipe_id recipe_armguard_lightplate( "armguard_lightplate" );
static const recipe_id recipe_armguard_metal( "armguard_metal" );
static const recipe_id recipe_balclava( "balclava" );
static const recipe_id recipe_blanket( "blanket" );
static const recipe_id recipe_blanket_blanket_makeshift( "blanket_blanket_makeshift" );
static const recipe_id recipe_brew_mead( "brew_mead" );
static const recipe_id recipe_brew_rum( "brew_rum" );
static const recipe_id recipe_carver_off( "carver_off" );
Expand Down Expand Up @@ -1213,13 +1213,13 @@ TEST_CASE( "crafting_skill_gain", "[skill],[crafting],[slow]" )
{
SECTION( "lvl 0 -> 1" ) {
GIVEN( "nominal morale" ) {
test_skill_progression( recipe_blanket, 174, 0, true );
test_skill_progression( recipe_blanket_blanket_makeshift, 174, 0, true );
}
GIVEN( "high morale" ) {
test_skill_progression( recipe_blanket, 173, 50, true );
test_skill_progression( recipe_blanket_blanket_makeshift, 173, 50, true );
}
GIVEN( "very high morale" ) {
test_skill_progression( recipe_blanket, 172, 100, true );
test_skill_progression( recipe_blanket_blanket_makeshift, 172, 100, true );
}
}
SECTION( "lvl 1 -> 2" ) {
Expand Down
Loading