-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic Appliance implementation (#51286)
* Implement APPLIANCE flag * Don't show non appliance parts when trying to install on a powergrid * Don't show vehicle information on a power grid * Add json to be able to start power grid * Don't show the vehicle menu on appliances * Simplify construction code * Can place place appliances from contruction menu, fridge exemple * Tweak appliance interact code * Add a fridge appliance * Appliance tag on vehicle * Missing definition of has_tag and add_tag * Can plug aplliance into nearby vehicle * Don't drop the power cord * Name appliance with the name of the part installed
- Loading branch information
Showing
16 changed files
with
235 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[ | ||
{ | ||
"type": "GENERIC", | ||
"id": "fridge", | ||
"looks_like": "minifridge", | ||
"symbol": "F", | ||
"color": "light_blue", | ||
"name": { "str": "fridge" }, | ||
"description": "A fridge for keeping food cool. Provides some insulation from outside weather.", | ||
"longest_side": "1700 mm", | ||
"insulation": 10, | ||
"volume": "800 L", | ||
"weight": "70 kg", | ||
"pocket_data": [ | ||
{ | ||
"pocket_type": "CONTAINER", | ||
"rigid": true, | ||
"watertight": true, | ||
"max_contains_volume": "700 L", | ||
"max_contains_weight": "400 kg" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "TOOL", | ||
"id": "power_cord", | ||
"name": { "str": "power cord" }, | ||
"description": "A power cord, like you've seen many times before: it's a short multi-stranded copper cord with power outlet at the end.", | ||
"to_hit": 1, | ||
"color": "dark_gray", | ||
"symbol": "&", | ||
"material": [ "steel", "plastic" ], | ||
"volume": "500 ml", | ||
"weight": "75 g", | ||
"bashing": 2, | ||
"category": "tools", | ||
"price": 1, | ||
"price_postapoc": 100, | ||
"max_charges": 3, | ||
"initial_charges": 3, | ||
"use_action": [ "CABLE_ATTACH" ], | ||
"flags": [ "CABLE_SPOOL", "POWER_CORD" ] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"type": "vehicle_part", | ||
"id": "ap_fridge", | ||
"name": { "str": "fridge" }, | ||
"symbol": "H", | ||
"looks_like": "f_fridge", | ||
"categories": [ "cargo" ], | ||
"color": "light_blue", | ||
"broken_symbol": "#", | ||
"broken_color": "light_blue", | ||
"damage_modifier": 80, | ||
"durability": 100, | ||
"description": "A fridge. When turned on, it will cool the food inside, extended the time until the food spoils.", | ||
"//": "Use average consumption, not the max on the appliance rating plate. 30W ~ 260kWh per annum", | ||
"epower": -30, | ||
"size": 300, | ||
"item": "fridge", | ||
"location": "center", | ||
"requirements": { | ||
"install": { "skills": [ [ "mechanics", 3 ] ], "time": "60 m", "using": [ [ "vehicle_wrench_2", 1 ] ] }, | ||
"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", "CTRL_ELECTRONIC" ], | ||
"breaks_into": [ | ||
{ "item": "steel_lump", "count": [ 8, 13 ] }, | ||
{ "item": "steel_chunk", "count": [ 8, 13 ] }, | ||
{ "item": "scrap", "count": [ 8, 13 ] }, | ||
{ "item": "hose", "prob": 50 }, | ||
{ "item": "motor_tiny", "prob": 25 } | ||
], | ||
"damage_reduction": { "all": 32 } | ||
}, | ||
{ | ||
"type": "vehicle_part", | ||
"id": "power_cord", | ||
"name": { "str": "power cord" }, | ||
"symbol": "{", | ||
"categories": [ "other" ], | ||
"color": "yellow", | ||
"broken_symbol": "s", | ||
"broken_color": "dark_gray", | ||
"damage_modifier": 10, | ||
"epower": 0, | ||
"//": "Epower for POWER_TRANSFER stuff is how much percentage-wise loss there is in transmission", | ||
"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", | ||
"flags": [ "NOINSTALL", "NO_UNINSTALL", "UNMOUNT_ON_DAMAGE", "UNMOUNT_ON_MOVE", "POWER_TRANSFER" ] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.