Skip to content

Commit

Permalink
Rework wallet pocket restrictions (CleverRaven#65937)
Browse files Browse the repository at this point in the history
* add *_SHAPED flags

* assign *_SHAPED flags

* convert item_restriction to matching flag_restriction

* add *_SHAPED flags to JSON_FLAGS.md

* fix `wallet_large` card sleeves pocket
  • Loading branch information
MrDraMaster authored May 31, 2023
1 parent d422a41 commit b7ff804
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 227 deletions.
20 changes: 20 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2144,5 +2144,25 @@
{
"id": "ELECTRONIC",
"type": "json_flag"
},
{
"id": "CREDIT_CARD_SHAPED",
"type": "json_flag",
"restriction": "Item must be shaped like a credit card"
},
{
"id": "BANK_NOTE_SHAPED",
"type": "json_flag",
"restriction": "Item must be shaped like a bank note"
},
{
"id": "COIN_SHAPED",
"type": "json_flag",
"restriction": "Item must be shaped like a coin"
},
{
"id": "BANK_NOTE_STRAP_SHAPED",
"type": "json_flag",
"restriction": "Item must be shaped like a bank note strap"
}
]
1 change: 1 addition & 0 deletions data/json/items/book/maps.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"color": "blue",
"volume": "10 ml",
"weight": "10 g",
"flags": [ "CREDIT_CARD_SHAPED" ],
"use_action": {
"type": "reveal_map",
"radius": 90,
Expand Down
1 change: 1 addition & 0 deletions data/json/items/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,7 @@
"max_item_length": "26 cm"
}
],
"flags": [ "BANK_NOTE_SHAPED" ],
"properties": [ [ "burst_when_filled", "75" ] ]
},
{
Expand Down
1 change: 1 addition & 0 deletions data/json/items/fluff.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"volume": "5 ml",
"price": 800,
"price_postapoc": 0,
"flags": [ "BANK_NOTE_SHAPED" ],
"material": [ "paper" ],
"symbol": "*",
"color": "light_gray"
Expand Down
209 changes: 15 additions & 194 deletions data/json/items/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"price": 0,
"price_postapoc": 0,
"material": [ "paper" ],
"flags": [ "TRADER_AVOID" ],
"flags": [ "TRADER_AVOID", "CREDIT_CARD_SHAPED" ],
"weight": "3 g",
"volume": "5 ml"
},
Expand Down Expand Up @@ -3221,7 +3221,7 @@
"price": 1000,
"price_postapoc": 0,
"material": [ "plastic" ],
"flags": [ "NO_UNLOAD", "NO_RELOAD", "TRADER_AVOID" ],
"flags": [ "NO_UNLOAD", "NO_RELOAD", "TRADER_AVOID", "CREDIT_CARD_SHAPED" ],
"weight": "3 g",
"volume": "5 ml",
"to_hit": -3,
Expand Down Expand Up @@ -3279,7 +3279,7 @@
"price": 500,
"price_postapoc": 0,
"material": [ "plastic" ],
"flags": [ "MISSION_ITEM" ],
"flags": [ "MISSION_ITEM", "CREDIT_CARD_SHAPED" ],
"weight": "6 g",
"volume": "5 ml",
"to_hit": -3
Expand All @@ -3304,7 +3304,7 @@
"price": 500,
"price_postapoc": 0,
"material": [ "plastic" ],
"flags": [ "GAS_DISCOUNT", "DISCOUNT_VALUE_1" ],
"flags": [ "GAS_DISCOUNT", "DISCOUNT_VALUE_1", "CREDIT_CARD_SHAPED" ],
"weight": "6 g",
"volume": "5 ml",
"to_hit": -3
Expand All @@ -3320,7 +3320,7 @@
"price": 500,
"price_postapoc": 0,
"material": [ "plastic" ],
"flags": [ "GAS_DISCOUNT", "DISCOUNT_VALUE_2" ],
"flags": [ "GAS_DISCOUNT", "DISCOUNT_VALUE_2", "CREDIT_CARD_SHAPED" ],
"weight": "6 g",
"volume": "5 ml",
"to_hit": -3
Expand All @@ -3336,7 +3336,7 @@
"price": 500,
"price_postapoc": 0,
"material": [ "plastic" ],
"flags": [ "GAS_DISCOUNT", "DISCOUNT_VALUE_3" ],
"flags": [ "GAS_DISCOUNT", "DISCOUNT_VALUE_3", "CREDIT_CARD_SHAPED" ],
"weight": "6 g",
"volume": "5 ml",
"to_hit": -3
Expand Down Expand Up @@ -3783,19 +3783,7 @@
"max_contains_weight": "60 g",
"max_contains_volume": "150 ml",
"moves": 100,
"item_restriction": [
"FMCNote",
"signed_chit",
"family_photo",
"money_one",
"money_two",
"money_five",
"money_ten",
"money_twenty",
"money_fifty",
"money_hundred",
"condom"
]
"flag_restriction": [ "BANK_NOTE_SHAPED" ]
},
{
"//": "Card Sleeves",
Expand All @@ -3804,32 +3792,7 @@
"max_contains_weight": "60 g",
"max_contains_volume": "150 ml",
"moves": 100,
"item_restriction": [
"cash_card",
"gasdiscount_silver",
"gasdiscount_gold",
"gasdiscount_platinum",
"id_science",
"id_military",
"id_industrial",
"fp_loyalty_card",
"scorecard",
"robofac_test_data",
"icon",
"labmap",
"id_science_visitor_1",
"id_science_transport_1",
"id_science_maintenance_green",
"id_science_maintenance_yellow",
"id_science_maintenance_blue",
"id_science_security_yellow",
"id_science_security_magenta",
"id_science_security_black",
"id_science_mutagen_green",
"id_science_mutagen_pink",
"id_science_mutagen_cyan",
"id_science_medical_red"
]
"flag_restriction": [ "CREDIT_CARD_SHAPED" ]
},
{
"//": "Coin Purse",
Expand All @@ -3838,19 +3801,7 @@
"max_contains_weight": "600 g",
"max_contains_volume": "150 ml",
"moves": 200,
"item_restriction": [
"FMCNote",
"RobofacCoin",
"FlatCoin",
"coin_penny",
"coin_nickel",
"coin_dime",
"coin_quarter",
"coin_half_dollar",
"coin_dollar",
"coin_silver",
"coin_gold"
]
"flag_restriction": [ "COIN_SHAPED" ]
}
]
},
Expand Down Expand Up @@ -3891,19 +3842,7 @@
"max_contains_weight": "80 g",
"max_contains_volume": "175 ml",
"moves": 100,
"item_restriction": [
"FMCNote",
"signed_chit",
"family_photo",
"money_one",
"money_two",
"money_five",
"money_ten",
"money_twenty",
"money_fifty",
"money_hundred",
"condom"
]
"flag_restriction": [ "BANK_NOTE_SHAPED" ]
},
{
"//": "Card Sleeves",
Expand All @@ -3912,32 +3851,7 @@
"max_contains_weight": "80 g",
"max_contains_volume": "175 ml",
"moves": 100,
"item_restriction": [
"cash_card",
"gasdiscount_silver",
"gasdiscount_gold",
"gasdiscount_platinum",
"id_science",
"id_military",
"id_industrial",
"fp_loyalty_card",
"scorecard",
"robofac_test_data",
"icon",
"labmap",
"id_science_visitor_1",
"id_science_transport_1",
"id_science_maintenance_green",
"id_science_maintenance_yellow",
"id_science_maintenance_blue",
"id_science_security_yellow",
"id_science_security_magenta",
"id_science_security_black",
"id_science_mutagen_green",
"id_science_mutagen_pink",
"id_science_mutagen_cyan",
"id_science_medical_red"
]
"flag_restriction": [ "CREDIT_CARD_SHAPED" ]
},
{
"//": "Coin Purse",
Expand All @@ -3946,19 +3860,7 @@
"max_contains_weight": "600 g",
"max_contains_volume": "175 ml",
"moves": 200,
"item_restriction": [
"FMCNote",
"RobofacCoin",
"FlatCoin",
"coin_penny",
"coin_nickel",
"coin_dime",
"coin_quarter",
"coin_half_dollar",
"coin_dollar",
"coin_silver",
"coin_gold"
]
"flag_restriction": [ "COIN_SHAPED" ]
}
]
},
Expand Down Expand Up @@ -3996,18 +3898,7 @@
"max_contains_weight": "600 g",
"max_contains_volume": "500 ml",
"moves": 400,
"item_restriction": [
"cash_card",
"gasdiscount_silver",
"gasdiscount_gold",
"gasdiscount_platinum",
"id_science",
"id_military",
"id_industrial",
"fp_loyalty_card",
"robofac_test_data",
"condom"
]
"flag_restriction": [ "BANK_NOTE_SHAPED", "CREDIT_CARD_SHAPED" ]
}
],
"armor": [ { "encumbrance": 2, "coverage": 100, "covers": [ "torso" ], "specifically_covers": [ "torso_neck" ] } ],
Expand Down Expand Up @@ -4037,40 +3928,7 @@
"max_contains_weight": "60 g",
"max_contains_volume": "150 ml",
"moves": 100,
"item_restriction": [
"cash_card",
"gasdiscount_silver",
"gasdiscount_gold",
"gasdiscount_platinum",
"id_science",
"id_military",
"id_industrial",
"fp_loyalty_card",
"robofac_test_data",
"icon",
"labmap",
"FMCNote",
"signed_chit",
"family_photo",
"money_one",
"money_two",
"money_five",
"money_ten",
"money_twenty",
"condom",
"id_science_visitor_1",
"id_science_transport_1",
"id_science_maintenance_green",
"id_science_maintenance_yellow",
"id_science_maintenance_blue",
"id_science_security_yellow",
"id_science_security_magenta",
"id_science_security_black",
"id_science_mutagen_green",
"id_science_mutagen_pink",
"id_science_mutagen_cyan",
"id_science_medical_red"
]
"flag_restriction": [ "BANK_NOTE_SHAPED", "CREDIT_CARD_SHAPED" ]
}
],
"armor": [ { "encumbrance": 0, "covers": [ "torso" ], "specifically_covers": [ "torso_neck" ] } ],
Expand Down Expand Up @@ -4292,44 +4150,7 @@
"max_contains_weight": "2 kg",
"max_contains_volume": "1 L",
"moves": 100,
"item_restriction": [
"money_one",
"money_two",
"money_five",
"money_ten",
"money_twenty",
"money_fifty",
"money_hundred",
"FMCNote",
"money_strap_one",
"money_strap_two",
"money_strap_five",
"money_strap_ten",
"money_strap_twenty",
"money_strap_fifty",
"money_strap_hundred",
"money_strap_FMCNote",
"money_bundle_one",
"money_bundle_two",
"money_bundle_five",
"money_bundle_ten",
"money_bundle_twenty",
"money_bundle_fifty",
"money_bundle_hundred",
"money_bundle_FMCNote",
"coin_penny",
"coin_nickel",
"coin_dime",
"coin_quarter",
"coin_half_dollar",
"coin_dollar",
"coin_wrapper",
"coin_silver",
"coin_gold",
"RobofacCoin",
"FlatCoin",
"survnote"
]
"flag_restriction": [ "BANK_NOTE_SHAPED", "BANK_NOTE_STRAP_SHAPED", "COIN_SHAPED", "CREDIT_CARD_SHAPED" ]
}
],
"melee_damage": { "bash": 12 }
Expand Down
Loading

0 comments on commit b7ff804

Please sign in to comment.