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

Move ascii arts to their own file to avoid bloat #39847

Merged
merged 4 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
223 changes: 223 additions & 0 deletions data/json/ascii_arts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
[
{
"type": "ascii_art",
"id": "glass_bottle",
"picture": [
"",
"",
"",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>╔═╝ ╚═╗</color>",
" <color_light_cyan>╔╝</color> <color_white>#</color><color_light_cyan>╚╗</color>",
" <color_light_cyan>╔╝</color> #<color_white>#</color># <color_light_cyan>╚╗</color>",
" <color_light_cyan>║</color> #<color_white>##</color># <color_light_cyan>║</color>",
" <color_light_cyan>║</color> #<color_white>##</color># <color_light_cyan>║</color>",
" <color_light_cyan>║</color> #<color_white>##</color># <color_light_cyan>║</color>",
" <color_light_cyan>║</color> #<color_white>##</color># <color_light_cyan>║</color>",
" <color_light_cyan>║</color>#<color_white>##</color># <color_light_cyan>║</color>",
" <color_light_cyan>║</color>#<color_white>#</color># <color_light_cyan>║</color>",
" <color_light_cyan>║</color><color_white>#</color> <color_light_cyan>║</color>",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>║ ║</color>",
" <color_light_cyan>╚═══════════╝</color>"
]
},
{
"type": "ascii_art",
"id": "plastic_bottle",
"picture": [
"",
"",
"",
" <color_light_cyan>║ ║",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔╝ ╚╗",
" <color_light_cyan>╔╝ ╚╗",
" <color_light_cyan>╔╝ ╚╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔ ════ ╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔ ════ ╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔ ════ ╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔ ════ ╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔ ════ ╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╔ ════ ╗",
" <color_light_cyan>║ ║",
" <color_light_cyan>╚════════╝"
]
},
{
"type": "ascii_art",
"id": "cashcard",
"picture": [
"",
"",
"",
" <color_white>╔═══════════════════╗",
" <color_white>║ ║",
" <color_white>║</color> <color_yellow>╔═ ╔═╔═╗╔═║ ║</color> <color_white>║",
" <color_white>║</color> <color_yellow>║═ ┼ ║ ║═║╚╗║═║</color> <color_white>║",
" <color_white>║</color> <color_yellow>╚═ ╚═║ ║═╝║ ║</color> <color_white>║",
" <color_white>║ ║",
" <color_white>║ RIVTECH TRUST ║",
" <color_white>║ ║",
" <color_white>║ ║",
" <color_white>║ 555 993 55221 066 ║",
" <color_white>╚═══════════════════╝"
]
},
{
"type": "ascii_art",
"id": "ultra_light_battery",
"picture": [
"",
"",
" █████",
" ██████████",
" █████████████",
" ███████<color_yellow>─</color>███████",
" ███████████████",
" █████████████████",
" ███████████████████",
" ████<color_yellow>ULTRA∙LIGHT</color>████",
" ███████████████████",
" ███████████████████",
" █████████████████",
" █████████████████",
" ███████<color_yellow>┼</color>███████",
" █████████████",
" █████████",
" █████"
]
},
{
"type": "ascii_art",
"id": "ultra_light_battery_plut",
"picture": [
"",
"",
" <color_light_green>█████",
" ██████████",
" █████████████",
" ███████<color_yellow>─</color>███████",
" ███████████████",
" █████████████████",
" ███████████████████",
" ████<color_yellow>ULTRA∙LIGHT</color>████",
" ███████████████████",
" ███████████████████",
" █████████████████",
" █████████████████",
" ███████<color_yellow>┼</color>███████",
" █████████████",
" █████████",
" █████"
]
},
{
"type": "ascii_art",
"id": "light_battery",
"picture": [
"",
"",
" <color_white>┌ ^ ┐",
" │ <color_yellow>+</color> │",
" │ │",
" │ │",
" │ │",
" │ │",
" │ <color_yellow>-</color> │",
" └ - ┘"
]
},
{
"type": "ascii_art",
"id": "light_battery_plut",
"picture": [
"",
"",
" <color_light_green>┌ ^ ┐",
" │ <color_yellow>+</color> │",
" │ │",
" │ │",
" │ │",
" │ │",
" │ <color_yellow>-</color> │",
" └ - ┘"
]
},
{
"type": "ascii_art",
"id": "medium_battery",
"picture": [
"",
"",
" <color_white>┌ <color_yellow>-</color> ──── <color_yellow>^</color> ┐",
" │ │",
" │ │",
" │ <color_yellow>─ ┼</color> │",
" │ │",
" │ <color_yellow>MEDIUM</color> │",
" └──────────┘"
]
},
{
"type": "ascii_art",
"id": "medium_battery_plut",
"picture": [
"",
"",
" <color_light_green>┌ <color_yellow>-</color> ──── <color_yellow>^</color> ┐",
" │ │",
" │ │",
" │ <color_yellow>─ ┼</color> │",
" │ │",
" │ <color_yellow>MEDIUM</color> │",
" └──────────┘"
]
},
{
"type": "ascii_art",
"id": "heavy_battery",
"picture": [
"",
"",
" <color_white> ┌<color_yellow>-</color>┐ ┌<color_yellow>^</color>┐",
" ╔═ ═══════ ═╗",
" ║ ║",
" ║ ║",
" ║ <color_yellow>═ ╫</color> ║",
" ║ ║",
" ║ ║",
" ║ ║",
" ║ <color_yellow>HEAVY</color> ║",
" ╚═══════════════╝"
]
},
{
"type": "ascii_art",
"id": "heavy_battery_plut",
"picture": [
"",
"",
" <color_light_green> ┌<color_yellow>-</color>┐ ┌<color_yellow>^</color>┐",
" ╔═ ═══════ ═╗",
" ║ ║",
" ║ ║",
" ║ <color_yellow>═ ╫</color> ║",
" ║ ║",
" ║ ║",
" ║ ║",
" ║ <color_yellow>HEAVY</color> ║",
" ╚═══════════════╝"
]
}
]
8 changes: 8 additions & 0 deletions data/json/items/battery.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"category": "spare_parts",
"name": { "str": "ultra-light battery", "str_pl": "ultra-light batteries" },
"description": "This is a light battery cell designed for small size over everything else. It retains its universal compatibility, though.",
"ascii_picture": "ultra_light_battery",
"weight": "5 g",
"volume": "1 ml",
"price": 1500,
Expand All @@ -40,6 +41,7 @@
"category": "spare_parts",
"name": { "str": "ultra-light plutonium fuel battery", "str_pl": "ultra-light plutonium fuel batteries" },
"description": "This battery uses a thin plutonium-244 rod to stablize an exotic nanocompound. It is universally compatible with small devices. Although it stores a huge amount of power, it cannot be recharged.",
"ascii_picture": "ultra_light_battery_plut",
"weight": "80 g",
"volume": "1 ml",
"price": 15000,
Expand Down Expand Up @@ -78,6 +80,7 @@
"category": "spare_parts",
"name": { "str": "light battery", "str_pl": "light batteries" },
"description": "This is a light battery cell, universally compatible with all kinds of small devices.",
"ascii_picture": "light_battery",
"weight": "30 g",
"volume": "25ml",
"price": 3500,
Expand Down Expand Up @@ -114,6 +117,7 @@
"category": "spare_parts",
"name": { "str": "light plutonium fuel battery", "str_pl": "light plutonium fuel batteries" },
"description": "This battery uses a thin plutonium-244 rod to stabilize an exotic nanocompound. It is universally compatible with all kinds of personal electronic devices. Although it stores a huge amount of power, it cannot be recharged.",
"ascii_picture": "light_battery_plut",
"weight": "160 g",
"volume": "35ml",
"price": 50000,
Expand Down Expand Up @@ -152,6 +156,7 @@
"category": "spare_parts",
"name": { "str": "medium battery", "str_pl": "medium batteries" },
"description": "This is a medium battery cell, universally compatible with all kinds of appliances and power tools.",
"ascii_picture": "medium_battery",
"weight": "600 g",
"volume": "450ml",
"price": 10000,
Expand Down Expand Up @@ -188,6 +193,7 @@
"category": "spare_parts",
"name": { "str": "medium plutonium fuel battery", "str_pl": "medium plutonium fuel batteries" },
"description": "This battery uses a thin plutonium-244 rod to stablize an exotic nanocompound. It is universally compatible with all kinds of appliances and power tools. Although it stores a huge amount of power, it cannot be recharged.",
"ascii_picture": "medium_battery_plut",
"weight": "1000 g",
"volume": "525ml",
"price": 100000,
Expand Down Expand Up @@ -226,6 +232,7 @@
"category": "spare_parts",
"name": { "str": "heavy battery", "str_pl": "heavy batteries" },
"description": "This is a heavy battery cell, universally compatible with all kinds of industrial-grade equipment and large tools.",
"ascii_picture": "heavy_battery",
"weight": "1000 g",
"volume": "1225ml",
"price": 10000,
Expand Down Expand Up @@ -262,6 +269,7 @@
"category": "spare_parts",
"name": { "str": "heavy plutonium fuel battery", "str_pl": "heavy plutonium fuel batteries" },
"description": "This battery uses a thin plutonium-244 rod to stablize an exotic nanocompound. It is universally compatible with all kinds of industrial-grade equipment and large tools. Although it stores a huge amount of power, it cannot be recharged.",
"ascii_picture": "heavy_battery_plut",
"weight": "1600 g",
"volume": "1500ml",
"price": 100000,
Expand Down
2 changes: 2 additions & 0 deletions data/json/items/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
"to_hit": 1,
"bashing": 2,
"material": "glass",
"ascii_picture": "glass_bottle",
"symbol": ")",
"color": "cyan",
"contains": "750 ml",
Expand All @@ -225,6 +226,7 @@
"price_postapoc": 10,
"to_hit": 1,
"material": "plastic",
"ascii_picture": "plastic_bottle",
"symbol": ")",
"color": "light_cyan",
"contains": "500 ml",
Expand Down
1 change: 1 addition & 0 deletions data/json/items/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -2456,6 +2456,7 @@
"symbol": ",",
"color": "yellow",
"name": { "str": "cash card" },
"ascii_picture": "cashcard",
"description": "A yellow plastic card used to store money. These became popular once the government officially moved to all electronic money. It holds up to 2 million dollars.",
"price": 1000,
"price_postapoc": 0,
Expand Down
60 changes: 33 additions & 27 deletions doc/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Use the `Home` key to return to the top.
+ [Other formatting](#other-formatting)
- [Description and content of each JSON file](#description-and-content-of-each-json-file)
* [`data/json/` JSONs](#datajson-jsons)
+ [Ascii_arts](#ascii_arts)
+ [Body_parts](#body_parts)
+ [Bionics](#bionics)
+ [Dreams](#dreams)
Expand Down Expand Up @@ -183,6 +184,7 @@ Here's a quick summary of what each of the JSON files contain, broken down by fo
| Filename | Description
|--- |---
| anatomy.json | a listing of player body parts - do not edit
| ascii_arts.json | ascii arts for item descriptions
| bionics.json | bionics, does NOT include bionic effects
| body_parts.json | an expansion of anatomy.json - do not edit
| clothing_mods.json | definition of clothing mods
Expand Down Expand Up @@ -378,6 +380,36 @@ This section describes each json file and their contents. Each json has their ow

## `data/json/` JSONs

### Ascii_arts

| Identifier | Description
|--- |---
| id | Unique ID. Must be one continuous word, use underscores if necessary.
| picture | Array of string, each entry is a line of an ascii picture and must be at most 42 columns long.

```C++
{
"type": "ascii_art",
"id": "cashcard",
"picture": [
"",
"",
"",
" <color_white>╔═══════════════════╗",
" <color_white>║ ║",
" <color_white>║</color> <color_yellow>╔═ ╔═╔═╗╔═║ ║</color> <color_white>║",
" <color_white>║</color> <color_yellow>║═ ┼ ║ ║═║╚╗║═║</color> <color_white>║",
" <color_white>║</color> <color_yellow>╚═ ╚═║ ║═╝║ ║</color> <color_white>║",
" <color_white>║ ║",
" <color_white>║ RIVTECH TRUST ║",
" <color_white>║ ║",
" <color_white>║ ║",
" <color_white>║ 555 993 55221 066 ║",
" <color_white>╚═══════════════════╝"
]
}
```

### Body_parts

| Identifier | Description
Expand Down Expand Up @@ -1513,33 +1545,7 @@ See also VEHICLE_JSON.md
"symbol": "[", // The item symbol as it appears on the map. Must be a Unicode string exactly 1 console cell width.
"looks_like": "rag", // hint to tilesets if this item has no tile, use the looks_like tile
"description": "Socks. Put 'em on your feet.", // Description of the item
"ascii_picture": [
" ,,,,,,,,,,,,,",
" .;;;;;;;;;;;;;;;;;;;,.",
" .;;;;;;;;;;;;;;;;;;;;;;;;,",
".;;;;;;;;;;;;;;;;;;;;;;;;;;;;.",
";;;;;@;;;;;;;;;;;;;;;;;;;;;;;;' .............",
";;;;@@;;;;;;;;;;;;;;;;;;;;;;;;'.................",
";;;;@@;;;;;;;;;;;;;;;;;;;;;;;;'...................`",
";;;;@;;;;;;;;;;;;;;;@;;;;;;;'.....................",
" `;;;;;;;;;;;;;;;;;;;@@;;;;;'..................;....", // Ascii art that will be displayed at the bottom of the item description. Array of string with each element being a line of the picture. Lines longer than 42 characters won't display properly.
" `;;;;;;;;;;;;;;;;@@;;;;'....................;;...",
" `;;;;;;;;;;;;;@;;;;'...;.................;;....",
" `;;;;;;;;;;;;' ...;;...............;.....",
" `;;;;;;' ...;;..................",
" ;; ..;...............",
" ` ............",
" ` ......",
" ` ..",
" ` '",
" ` '",
" ` '",
" ` `",
" ` `,",
" `",
" `",
" `."
],
"ascii_picture": "ascii_socks", // Id of the asci_art used for this item
"phase": "solid", // (Optional, default = "solid") What phase it is
"weight": "350 g", // Weight, weight in grams, mg and kg can be used - "50 mg", "5 g" or "5 kg". For stackable items (ammo, comestibles) this is the weight per charge.
"volume": "250 ml", // Volume, volume in ml and L can be used - "50 ml" or "2 L". For stackable items (ammo, comestibles) this is the volume of stack_size charges.
Expand Down
Loading