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

Overhaul vehicle part installation [RDY] #16280

Merged
merged 36 commits into from
Apr 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
976291c
Rework vehicle_selector to traverse all parts
mugling Apr 19, 2016
7a9a898
Drop function deprecated by visitable interface
mugling Apr 19, 2016
dbfe267
Deprecate item::has_quality
mugling Apr 19, 2016
d169da4
Visitable interface supports tool qualities
mugling Apr 19, 2016
ef8e8b5
Vehicle parts can provide tool qualities
mugling Apr 19, 2016
8bab031
Implement max_quality for visitable interface
mugling Apr 19, 2016
13b09de
Encapsulate lifting strength requirements
mugling Apr 19, 2016
be1e9ac
Overhaul installation requirements
mugling Apr 19, 2016
3ea8809
Add folding engine crane
mugling Apr 19, 2016
4bb4ef8
Prevent lifting ourselves
mugling Apr 19, 2016
b7adbd2
Fix broken conditional
mugling Apr 19, 2016
83fb8b4
Rescale TOOL_LIFT_FACTOR to 500kg per unit
mugling Apr 19, 2016
0799db1
Add different types of crane
mugling Apr 19, 2016
6f7bddd
Support lifting of vehicles when changing wheels
mugling Apr 19, 2016
284e767
Rescale JACK capacities
mugling Apr 19, 2016
8658093
Cap JACK requirements for arbitrarily large vehicles
mugling Apr 19, 2016
d2bd29e
Short-circuit evaluation is more efficient
mugling Apr 19, 2016
fad5c2b
Simplify display of requirements
mugling Apr 20, 2016
7768b3c
Fix visitable interface
mugling Apr 20, 2016
826c124
Provide separate values for JACK
mugling Apr 20, 2016
54963e0
Add excavator and overhaul public works vehicles
mugling Apr 20, 2016
9ec51a8
Fix calculation of maximum installation weight
mugling Apr 20, 2016
ccf460d
Add makeshift jack
mugling Apr 20, 2016
59dae1d
Increase weights of some parts
mugling Apr 20, 2016
fbc1a63
Increase range of vehicle cranes
mugling Apr 20, 2016
4a49134
Fix astyle
mugling Apr 20, 2016
c047287
Support dumping of vehicle weights
mugling Apr 20, 2016
06d24c0
Increase HP for heavy duty frames
mugling Apr 20, 2016
cbe6fed
Support dumping of vehicle parts
mugling Apr 20, 2016
6ac9fa8
Rebalance crafting rigs
mugling Apr 20, 2016
8810013
Adjust carrying/lifting weights
mugling Apr 20, 2016
50b9603
Fix regression of DIG qualities
mugling Apr 20, 2016
e731f45
Fix visitable<T>::max_quality() when quality not found
mugling Apr 20, 2016
7899828
Final balancing of craft rigs
mugling Apr 20, 2016
f537def
Fix positional format string
mugling Apr 20, 2016
c382737
Defang changes
mugling Apr 20, 2016
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
1 change: 1 addition & 0 deletions data/json/itemgroups/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"items": [
[ "forge", 100 ],
[ "jack", 100 ],
[ "jack_small", 100 ],
[ "oxy_torch", 100 ],
[ "polisher", 100 ],
[ "welder", 100 ]
Expand Down
45 changes: 45 additions & 0 deletions data/json/items/tool/workshop.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,49 @@
[
{
"id": "jack",
"type": "TOOL",
"name": "bottle jack",
"description": "A portable hydraulic bottle jack rated to lift 3 metric tonnes.",
"material": "steel",
"symbol": ";",
"color": "light_gray",
"weight": 11974,
"volume": 6,
"price": 18000,
"bashing": 8,
"to_hit": -2,
"qualities": [ ["JACK", 6 ] ]
},
{
"id": "jack_makeshift",
"type": "TOOL",
"name": "makeshift jack",
"description": "A poorly constructed improvised scissor jack rated to lift 500kg if you're brave enough to use it.",
"material": "steel",
"symbol": ";",
"color": "light_gray",
"weight": 1800,
"volume": 4,
"price": 800,
"bashing": 4,
"to_hit": -2,
"qualities": [ ["JACK", 1 ] ]
},
{
"id": "jack_small",
"type": "TOOL",
"name": "scissor jack",
"description": "A small scissor jack rated to lift one metric tonne.",
"material": "steel",
"symbol": ";",
"color": "light_gray",
"weight": 1200,
"volume": 3,
"price": 5000,
"bashing": 4,
"to_hit": -2,
"qualities": [ ["JACK", 2 ] ]
},
{
"id": "oxy_torch",
"type": "TOOL",
Expand Down
13 changes: 0 additions & 13 deletions data/json/items/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -7229,19 +7229,6 @@
"use_action": { "type": "knife" },
"qualities": [["CUT", 1], ["BUTCHER", 19]]
},
{
"id": "jack",
"type": "TOOL",
"symbol": ";",
"color": "light_gray",
"name": "jack",
"description": "This is a common hydraulic jack, used when changing tires.",
"price": 5000,
"material": "steel",
"weight": 11974,
"volume": 5,
"bashing": 8
},
{
"id": "scythe",
"type": "TOOL",
Expand Down
28 changes: 28 additions & 0 deletions data/json/items/vehicle/engineering.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"id": "cantilever_medium",
"type": "GENERIC",
"category": "veh_parts",
"name": "steel boom",
"description": "A large rigid steel boom. If attached to a frame it could be used for lifting.",
"price": 23400,
"weight": 31600,
"volume": 50,
"material": "steel",
"symbol": "&",
"color": "dark_gray"
},
{
"id": "cantilever_small",
"type": "GENERIC",
"category": "veh_parts",
"name": "telescopic cantilever",
"description": "A small steel telescoping cantilever. If attached to a frame it could be used for lifting.",
"price": 7900,
"weight": 12000,
"volume": 12,
"material": "steel",
"symbol": "&",
"color": "dark_gray"
}
]
50 changes: 50 additions & 0 deletions data/json/items/vehicle/rigs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[
{
"abstract": "vehicle_rig",
"type": "GENERIC",
"category": "veh_parts",
"name": "vehicle crafting rig",
"weight": 40000,
"volume": 80,
"price": 40000,
"material": "steel",
"symbol": "&",
"color": "light_cyan"
},
{
"id": "chemlab",
"copy-from": "vehicle_rig",
"type": "GENERIC",
"name": "onboard chemistry lab",
"description": "Assembled from a chemistry set attached to a complex wiring harness, it is well suited to most any chemistry project you could imagine. Unable to utilize standard batteries, it requires an external supply of electricity to operate."
},
{
"id" : "craftrig",
"copy-from": "vehicle_rig",
"type": "GENERIC",
"name": "FOODCO kitchen buddy",
"name_plural": "FOODCO kitchen buddies",
"description": "Assembled from a set of instructions you found in an old book of DIY projects, the *FOODCO kitchen buddy* claims to be *the perfect solution to all your home-cooking needs!*. While it is surprisingly handy for vacuum-sealing as well as dehydrating food, the cheery sales pitch neglected to mention A - how awkward the damn thing is, B - That you still need a normal kitchen and C - how it doesn't take batteries. You're going to have to weld it to a vehicle, or something else with a supply of electricity, if you want to use it. In addition to the food preservation features, it also has a water-purification system, a drawer for holding extra tools, and for some insane reason, a press and die set for hand-loading ammunition."
},
{
"id": "forgerig",
"copy-from": "vehicle_rig",
"type": "GENERIC",
"name": "vehicle forge rig",
"description": "A forge rig made to run off a vehicle's storage battery with integrated tool storage for metalworking equipment."
},
{
"id": "kitchen_unit",
"copy-from": "vehicle_rig",
"type": "GENERIC",
"name": "RV kitchen unit",
"description": "A vehicle mountable electric range and sink unit with integrated tool storage for cooking utensils."
},
{
"id": "weldrig",
"copy-from": "vehicle_rig",
"type": "GENERIC",
"name": "vehicle welding rig",
"description": "A welding rig made to run off a vehicle's storage battery. It has a soldering iron attachment for delicate work, and a compartment to store your extra tools in."
}
]
74 changes: 1 addition & 73 deletions data/json/items/vehicle_parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"id" : "hdframe",
"name" : "heavy duty frame",
"description" : "A large, reinforced steel frame, used in military vehicle construction.",
"weight" : 60000,
"weight" : 100000,
"to_hit" : -6,
"color" : "green",
"symbol" : "]",
Expand Down Expand Up @@ -808,78 +808,6 @@
"category" : "veh_parts",
"price" : 3000
},
{
"type":"GENERIC",
"id" : "kitchen_unit",
"name" : "RV kitchen unit",
"description" : "A vehicle mountable electric range and sink unit with integrated tool storage for cooking utensils.",
"weight" : 102058,
"to_hit" : -2,
"color" : "light_cyan",
"symbol" : "&",
"material" : ["steel"],
"volume" : 80,
"category" : "veh_parts",
"price" : 40000
},
{
"type":"GENERIC",
"id" : "weldrig",
"name" : "vehicle welding rig",
"description" : "A welding rig made to run off a vehicle's storage battery. It has a soldering iron attachment for delicate work, and a compartment to store your extra tools in.",
"weight" : 16789,
"to_hit" : -2,
"color" : "light_red",
"symbol" : "&",
"material" : ["steel"],
"volume" : 80,
"category" : "veh_parts",
"price" : 40000
},
{
"type":"GENERIC",
"id" : "forgerig",
"name" : "vehicle forge rig",
"description" : "A forge rig made to run off a vehicle's storage battery. Used for forging tools in a vehicle.",
"weight" : 10000,
"to_hit" : -2,
"color" : "light_gray",
"symbol" : "&",
"material" : ["steel"],
"volume" : 24,
"bashing" : 8,
"category" : "veh_parts",
"price" : 40000
},
{
"type":"GENERIC",
"id" : "craftrig",
"name" : "FOODCO kitchen buddy",
"name_plural" : "FOODCO kitchen buddies",
"description" : "Assembled from a set of instructions you found in an old book of DIY projects, the *FOODCO kitchen buddy* claims to be *the perfect solution to all your home-cooking needs!*. While it is surprisingly handy for vacuum-sealing as well as dehydrating food, the cheery sales pitch neglected to mention A - how awkward the damn thing is, B - That you still need a normal kitchen and C - how it doesn't take batteries. You're going to have to weld it to a vehicle, or something else with a supply of electricity, if you want to use it. In addition to the food preservation features, it also has a water-purification system, a drawer for holding extra tools, and for some insane reason, a press and die set for hand-loading ammunition.",
"weight" : 27976,
"to_hit" : -2,
"color" : "light_green",
"symbol" : "&",
"material" : ["steel", "plastic"],
"volume" : 111,
"category" : "veh_parts",
"price" : 40000
},
{
"type":"GENERIC",
"id" : "chemlab",
"name" : "onboard chemistry lab",
"description" : "Assembled from a chemistry set attached to a complex wiring harness, it is well suited to most any chemistry project you could imagine. Unable to utilize standard batteries, it requires an external supply of electricity to operate.",
"weight" : 19124,
"to_hit" : -2,
"color" : "yellow",
"symbol" : "&",
"material" : ["iron", "glass"],
"volume" : 92,
"category" : "veh_parts",
"price" : 40000
},
{
"type":"GENERIC",
"id": "veh_tracker",
Expand Down
64 changes: 64 additions & 0 deletions data/json/recipes/other/tool.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,68 @@
[
{
"result": "jack",
"type": "recipe",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"difficulty": 5,
"skills_required": [ "mechanics", 3 ],
"time": 300000,
"book_learn": [ [ "manual_mechanics", 3 ] , [ "manual_fabrication", 5 ] , [ "textbook_fabrication", 5 ] ],
"qualities": [
{ "id":"HAMMER", "level": 3 }
],
"tools": [
[ ["tongs", -1 ] ],
[ ["chisel", -1 ] ],
[ ["anvil", -1 ] ],
[ ["crucible", -1 ], ["crucible_clay", -1] ],
[ ["swage", -1 ] ],
[ ["forge", 200 ], [ "oxy_torch", 40 ] ]
],
"components": [ [ [ "steel_lump", 1 ], [ "steel_chunk", 4 ], [ "scrap", 12 ] ] ]
},
{
"result": "jack_makeshift",
"type": "recipe",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"difficulty": 2,
"skills_required": [ "mechanics", 1 ],
"time": 100000,
"book_learn": [ [ "manual_mechanics", 1 ] , [ "manual_fabrication", 2 ] , [ "textbook_fabrication", 2 ] ],
"qualities":[
{ "id": "SAW_M", "level": 1 },
{ "id": "SCREW", "level": 1 },
{ "id": "WRENCH", "level": 1 }
],
"components": [
[ [ "pipe", 4 ] ],
[ [ "scrap", 2 ] ]
]
},
{
"result": "jack_small",
"type": "recipe",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_TOOLS",
"skill_used": "fabrication",
"difficulty": 3,
"skills_required": [ "mechanics", 2 ],
"time": 200000,
"book_learn": [ [ "manual_mechanics", 2 ] , [ "manual_fabrication", 3 ] , [ "textbook_fabrication", 3 ] ],
"qualities":[
{ "id": "SAW_M_FINE", "level": 1 },
{ "id": "SCREW", "level": 1 },
{ "id": "WRENCH", "level": 1 }
],
"tools": [ [ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ], [ "oxy_torch", 20 ] ] ],
"components": [
[ [ "pipe", 4 ] ],
[ [ "scrap", 2 ] ]
]
},
{
"result": "still",
"type": "recipe",
Expand Down
52 changes: 52 additions & 0 deletions data/json/recipes/other/vehicle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{
"result": "cantilever_medium",
"type" : "recipe",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "mechanics",
"skills_required": [ "fabrication", 3 ],
"difficulty": 5,
"time": 360000,
"book_learn": [ [ "textbook_fabrication", 6 ] , [ "textbook_mechanics", 5 ] ],
"qualities": [
{ "id": "HAMMER", "level": 2 },
{ "id": "SAW_M", "level": 1 },
{ "id": "WRENCH", "level": 2 }
],
"tools": [
[ [ "goggles_welding", -1 ] ],
[ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ] ]
],
"components": [
[ [ "pipe", 32 ] ],
[ [ "steel_chunk", 8 ], [ "scrap", 24 ] ],
[ [ "chain", 1 ] ]
]
},
{
"result": "cantilever_small",
"type" : "recipe",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_VEHICLE",
"skill_used": "mechanics",
"skills_required": [ "fabrication", 2 ],
"difficulty": 2,
"time": 60000,
"book_learn": [ [ "textbook_fabrication", 4 ] , [ "textbook_mechanics", 2 ] , [ "manual_mechanics", 2 ] ],
"qualities": [
{ "id": "HAMMER", "level": 2 },
{ "id": "SAW_M", "level": 1 },
{ "id": "WRENCH", "level": 2 }
],
"tools": [
[ [ "goggles_welding", -1 ] ],
[ [ "welder", 50 ], [ "welder_crude", 75 ], [ "toolset", 75 ] ]
],
"components": [
[ [ "pipe", 8 ] ],
[ [ "steel_chunk", 2 ], [ "scrap", 6 ] ],
[ [ "wire", 8 ] ]
]
}
]
Loading