Skip to content
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
19 changes: 19 additions & 0 deletions data/json/items/book/electronics.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,25 @@
"time": "45 m",
"fun": 1
},
{
"id": "exodii_wiring_kit_reference",
"type": "BOOK",
"category": "manuals",
"name": { "str_sp": "CBM interface wiring reference" },
"description": "A printed technical reference for the Exodii's CBM interface wire kit using numerous alien symbols along with Anglic terminology. Thankfully someone's hand-written a legend for those symbols and terms along the margins, but it'll still take significant electronics knowledge to decipher this document.",
"weight": "30 g",
"volume": "400 ml",
"price_postapoc": 5000,
"material": [ "paper" ],
"symbol": "?",
"color": "light_green",
"skill": "electronics",
"required_level": 4,
"max_level": 4,
"intelligence": 10,
"time": "30 m",
"fun": -1
},
{
"abstract": "schematics_generic",
"type": "BOOK",
Expand Down
9 changes: 9 additions & 0 deletions data/json/items/toolmod.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"description": "This device replaces conventional battery connections with a connector port that can plug into a UPS. Any device modified with this can be used without a battery as long as you have a charged UPS with you.",
"flags": [ "USE_UPS", "NO_UNLOAD", "NO_RELOAD" ]
},
{
"id": "battery_bionic",
"copy-from": "mod_battery",
"type": "TOOLMOD",
"category": "spare_parts",
"name": { "str": "bionic power conversion mod" },
"description": "This kit permanently replaces conventional battery connections with the circuitry and cable required to draw power from a Standard Neurobionics Interface (SNI). Any device modified with this is powered by your own bionic power storage instead of conventional batteries.",
"flags": [ "USES_BIONIC_POWER", "NO_UNLOAD", "NO_RELOAD" ]
},
{
"id": "magazine_battery_mod",
"copy-from": "mod_battery",
Expand Down
1 change: 1 addition & 0 deletions data/json/npcs/exodii/exodii_merchant_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
{ "group": "EXODII_CBM_Store_tier1_extra", "rigid": true, "trust": 1 },
{ "group": "EXODII_CBM_Store_Tier2", "rigid": true, "trust": 10 },
{ "group": "EXODII_CBM_Store_Tier3", "rigid": true, "trust": 20, "strict": true },
{ "group": "EXODII_Store_Salvage_Tech", "rigid": true, "trust": 20 },
{ "group": "EXODII_CBM_Store_Tier4", "rigid": true, "trust": 40, "strict": true }
],
"carry_override": "NC_EXODII_TYPE_1_carried",
Expand Down
10 changes: 10 additions & 0 deletions data/json/npcs/exodii/exodii_merchant_itemlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,5 +274,15 @@
[ "bio_railgun", 15 ],
[ "bio_shockwave", 10 ]
]
},
{
"type": "item_group",
"id": "EXODII_Store_Salvage_Tech",
"//": "At this point the Exodii trust you enough to sell you the materials to bootstrap some of their salvaged tech onto your own tech.",
"subtype": "collection",
"items": [
{ "item": "exodii_wiring_kit_reference", "prob": 100 },
{ "item": "exodii_wire_kit", "prob": 100, "count": [ 1, 4 ] }
]
}
]
22 changes: 22 additions & 0 deletions data/json/recipes/electronics/toolmod.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@
],
"components": [ [ [ "power_supply", 1 ] ], [ [ "scrap", 4 ] ], [ [ "cable", 10 ] ] ]
},
{
"result": "battery_bionic",
"type": "recipe",
"activity_level": "LIGHT_EXERCISE",
"category": "CC_ELECTRONIC",
"subcategory": "CSC_ELECTRONIC_COMPONENTS",
"skill_used": "electronics",
"difficulty": 5,
"time": "15 m",
"reversible": true,
"decomp_learn": 4,
"autolearn": false,
"book_learn": [ [ "exodii_wiring_kit_reference", 4 ] ],
"using": [ [ "soldering_standard", 24 ] ],
"qualities": [ { "id": "SCREW", "level": 1 } ],
"proficiencies": [
{ "proficiency": "prof_elec_soldering" },
{ "proficiency": "prof_elec_circuits" },
{ "proficiency": "prof_elec_semiconductors" }
],
"components": [ [ [ "power_supply", 1 ] ], [ [ "exodii_wire_kit", 1 ] ] ]
},
{
"result": "magazine_battery_mod",
"type": "recipe",
Expand Down
7 changes: 4 additions & 3 deletions src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5867,9 +5867,10 @@ cata::optional<int> iuse::toolmod_attach( Character *p, item *it, bool, const tr
}

auto filter = [&it]( const item & e ) {
// don't allow ups battery mods on a UPS or UPS-powered tools
if( it->has_flag( flag_USE_UPS ) &&
( e.has_flag( flag_IS_UPS ) || e.has_flag( flag_USE_UPS ) ) ) {
// don't allow ups or bionic battery mods on a UPS or UPS-powered/bionic-powered tools
if( ( it->has_flag( flag_USE_UPS ) || it->has_flag( flag_USES_BIONIC_POWER ) ) &&
( e.has_flag( flag_IS_UPS ) || e.has_flag( flag_USE_UPS ) ||
e.has_flag( flag_USES_BIONIC_POWER ) ) ) {
return false;
}

Expand Down