Skip to content

Commit

Permalink
Don't drop the power cord
Browse files Browse the repository at this point in the history
  • Loading branch information
Fris0uman committed Oct 10, 2021
1 parent 3162765 commit 3c52ad1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 5 deletions.
24 changes: 24 additions & 0 deletions data/json/recipes/recipe_vehicle.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,30 @@
[ [ "plastic_chunk", 8 ] ]
]
},
{
"result": "fridge",
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
"copy-from": "minifridge",
"skills_required": [ "fabrication", 4 ],
"proficiencies": [ { "proficiency": "prof_plasticworking", "required": false, "time_multiplier": 1.1, "learning_time_multiplier": 0.1 } ],
"qualities": [
{ "id": "HAMMER", "level": 2 },
{ "id": "SAW_M", "level": 1 },
{ "id": "DRILL", "level": 1 },
{ "id": "SCREW", "level": 1 },
{ "id": "WRENCH", "level": 1 }
],
"components": [
[ [ "sheet_metal", 20 ] ],
[ [ "condensor_coil", 1 ] ],
[ [ "evaporator_coil", 1 ] ],
[ [ "thermostat", 1 ] ],
[ [ "motor_small", 1 ] ],
[ [ "refrigerant_tank", 1 ] ],
[ [ "plastic_chunk", 16 ] ]
]
},
{
"result": "mountable_heater",
"type": "recipe",
Expand Down
6 changes: 2 additions & 4 deletions data/json/vehicleparts/appliances.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_wrench_2", 1 ] ] },
"repair": { "skills": [ [ "mechanics", 4 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] }
},
"flags": [ "CARGO", "OBSTACLE", "FRIDGE", "COVERED", "ENABLED_DRAINS_EPOWER", "APPLIANCE" ],
"flags": [ "CARGO", "OBSTACLE", "FRIDGE", "COVERED", "ENABLED_DRAINS_EPOWER", "APPLIANCE", "CTRL_ELECTRONIC" ],
"breaks_into": [
{ "item": "steel_lump", "count": [ 8, 13 ] },
{ "item": "steel_chunk", "count": [ 8, 13 ] },
Expand All @@ -47,8 +47,6 @@
"durability": 120,
"description": "A power cord sticking out of an appliance. You need to plug it in a powered grid for the appliance to work properly.",
"item": "power_cord",
"requirements": { "removal": { "time": "5 s" } },
"flags": [ "NOINSTALL", "UNMOUNT_ON_DAMAGE", "UNMOUNT_ON_MOVE", "POWER_TRANSFER" ],
"breaks_into": [ { "item": "cable", "charges": [ 1, 10 ] }, { "item": "plastic_chunk", "count": [ 1, 2 ] } ]
"flags": [ "NOINSTALL","NO_UNINSTALL", "UNMOUNT_ON_DAMAGE", "UNMOUNT_ON_MOVE", "POWER_TRANSFER" ]
}
]
4 changes: 4 additions & 0 deletions data/json/vehicleparts/vp_flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@
"id": "NOINSTALL",
"type": "json_flag"
},
{
"id": "NO_UNINSTALL",
"type": "json_flag"
},
{
"id": "OBSTACLE",
"type": "json_flag"
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6230,7 +6230,7 @@ void vehicle::shed_loose_parts()
tow_data.clear_towing();
}
const vehicle_part *part = &parts[elem];
if( !magic ) {
if( !magic && !part->properties_to_item().has_flag( flag_id( "POWER_CORD" ) ) ) {
item drop = part->properties_to_item();
here.add_item_or_charges( global_part_pos3( *part ), drop );
}
Expand Down

0 comments on commit 3c52ad1

Please sign in to comment.