Skip to content

Commit

Permalink
Merge pull request #77273 from Milopetilo/general-palette
Browse files Browse the repository at this point in the history
Add a few palettes for more general parameter use
  • Loading branch information
Maleclypse authored Oct 24, 2024
2 parents 3edfea1 + 7efaae6 commit 19807c7
Showing 1 changed file with 114 additions and 0 deletions.
114 changes: 114 additions & 0 deletions data/json/mapgen_palettes/common_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
[
{
"type": "palette",
"id": "parametrized_walls_palette",
"//": "Intended as a palette for randomized interior and exterior walls",
"parameters": {
"interior_wall_type": {
"type": "ter_str_id",
"default": {
"distribution": [
[ "t_wall_b", 1 ],
[ "t_wall_g", 1 ],
[ "t_wall_p", 1 ],
[ "t_wall_P", 1 ],
[ "t_wall_r", 1 ],
[ "t_wall_w", 6 ],
[ "t_wall_y", 1 ],
[ "t_wall_gray", 1 ],
[ "t_wall_brown", 1 ],
[ "t_wall_cyan", 1 ],
[ "t_wall_black", 1 ],
[ "t_wall_orange", 1 ]
]
}
},
"exterior_wall_type": {
"type": "ter_str_id",
"default": {
"distribution": [
[ "t_brick_wall", 6 ],
[ "t_rock_wall", 3 ],
[ "t_wall_wood", 3 ],
[ "t_concrete_wall", 4 ],
[ "t_adobe_brick_wall", 1 ]
]
}
}
},
"terrain": {
"|": { "param": "interior_wall_type", "fallback": "t_wall_w" },
"#": { "param": "exterior_wall_type", "fallback": "t_brick_wall" }
}
},
{
"type": "palette",
"id": "parametrized_fences_palette",
"//": "Intended as a palette for randomized fences",
"parameters": {
"fence_type": {
"type": "ter_str_id",
"default": {
"distribution": [
[ "t_splitrail_fence", 3 ],
[ "t_chainfence", 2 ],
[ "t_fence", 2 ],
[ "t_privacy_fence", 1 ],
[ "t_drystone_wall_half", 1 ]
]
}
}
},
"terrain": {
"Ŧ": { "param": "fence_type", "fallback": "t_fence" },
"ɤ": {
"switch": { "param": "fence_type", "fallback": "t_fence" },
"cases": {
"t_splitrail_fence": "t_splitrail_fencegate_c",
"t_chainfence": "t_chaingate_c",
"t_fence": "t_fencegate_c",
"t_privacy_fence": "t_privacy_fencegate_c",
"t_drystone_wall_half": "t_chaingate_l"
}
}
}
},
{
"type": "palette",
"id": "parametrized_linoleum_palette",
"//": "Intended as a palette for randomized fences",
"parameters": {
"linoleum_color": { "type": "ter_str_id", "default": { "distribution": [ [ "t_linoleum_gray", 1 ], [ "t_linoleum_white", 1 ] ] } }
},
"terrain": { "~": { "param": "linoleum_color", "fallback": "t_linoleum_gray" } }
},
{
"type": "palette",
"id": "parametrized_carpets_palette",
"//": "Use to randomly assign carpet colors",
"parameters": {
"carpet_color_type": {
"type": "ter_str_id",
"default": {
"distribution": [ [ "t_carpet_red", 1 ], [ "t_carpet_green", 1 ], [ "t_carpet_purple", 1 ], [ "t_carpet_yellow", 1 ] ]
}
}
},
"terrain": { "=": { "param": "carpet_color_type", "fallback": "t_carpet_red" } }
},
{
"type": "palette",
"id": "parametrized_carpets_nest_palette",
"//": "Use to randomly assign carpet colors(for use in carpets that only occur in nested mapgen)",
"parameters": {
"carpet_color_type": {
"type": "ter_str_id",
"scope": "nest",
"default": {
"distribution": [ [ "t_carpet_red", 1 ], [ "t_carpet_green", 1 ], [ "t_carpet_purple", 1 ], [ "t_carpet_yellow", 1 ] ]
}
}
},
"terrain": { "=": { "param": "carpet_color_type", "fallback": "t_carpet_red" } }
}
]

0 comments on commit 19807c7

Please sign in to comment.