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

Rewrite bionic fuel system. #60662

Closed
wants to merge 258 commits into from
Closed
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
a5afc1c
Merge branch 'CleverRaven:master' into veh-pow
Hirmuolio Aug 30, 2022
e222815
adjust electric vehicle tests
Hirmuolio Aug 30, 2022
9f0481c
mods
Hirmuolio Aug 30, 2022
d1373e6
mods
Hirmuolio Aug 30, 2022
0e1e438
rename some variables
Hirmuolio Aug 30, 2022
384c88c
cleanup
Hirmuolio Aug 30, 2022
b52b0d1
temp fix bionic
Hirmuolio Aug 30, 2022
857d853
temp fix treshold
Hirmuolio Aug 30, 2022
0b22c93
fuel tests
Hirmuolio Aug 30, 2022
0b2cf40
adjust mod
Hirmuolio Aug 30, 2022
c9c4a7a
adjust mod
Hirmuolio Aug 30, 2022
eb61f53
adjust mod
Hirmuolio Aug 30, 2022
b9b7be9
rename variable
Hirmuolio Aug 30, 2022
c5d889a
gasoline json
Hirmuolio Aug 31, 2022
f5b95b7
Split conditional_names COMPONENT_ID_SUBSTRING from COMPONENT_ID
PatrikLundell Aug 31, 2022
fade680
Matched whiskey on substring
PatrikLundell Aug 31, 2022
1bc15db
flags
Hirmuolio Aug 31, 2022
91a78b8
get fuels
Hirmuolio Aug 31, 2022
bf38498
remote ups
Hirmuolio Aug 31, 2022
871a544
veh and solar
Hirmuolio Aug 31, 2022
deb5ea1
auto toggle
Hirmuolio Aug 31, 2022
3efd03a
testing
Hirmuolio Aug 31, 2022
d813f8e
fueled bionic
Hirmuolio Aug 31, 2022
15727e7
cable vehicle
Hirmuolio Aug 31, 2022
111faf5
cable solar
Hirmuolio Aug 31, 2022
243e440
metaboilism
Hirmuolio Aug 31, 2022
9e98002
solar
Hirmuolio Aug 31, 2022
6947c9f
cleanup
Hirmuolio Aug 31, 2022
da84852
metaboilism messages
Hirmuolio Aug 31, 2022
a289fbc
remove old
Hirmuolio Aug 31, 2022
9decc6e
rename
Hirmuolio Aug 31, 2022
e695b07
combine with passive
Hirmuolio Aug 31, 2022
9125c54
fuel in bionic window
Hirmuolio Aug 31, 2022
edcb3da
remove fuel eating
Hirmuolio Aug 31, 2022
8e30d32
more tanks
Hirmuolio Aug 31, 2022
5b01e53
fix restriction
Hirmuolio Aug 31, 2022
2384f8f
fix restriction
Hirmuolio Aug 31, 2022
6899ceb
base test pocket
Hirmuolio Aug 31, 2022
d0a8af7
material limit
Hirmuolio Aug 31, 2022
941ce83
doc
Hirmuolio Aug 31, 2022
1dbfc57
more items
Hirmuolio Aug 31, 2022
6abe068
fuel from container pockets
Hirmuolio Aug 31, 2022
d30c99d
lint
Hirmuolio Aug 31, 2022
a980127
flat_set
Hirmuolio Sep 1, 2022
863b605
remove unused get_fuel_available
Hirmuolio Sep 1, 2022
0fde7da
remove unused
Hirmuolio Sep 1, 2022
aace1c8
remove unused
Hirmuolio Sep 1, 2022
a295c15
remove unused
Hirmuolio Sep 1, 2022
ae2a7a7
remove unused
Hirmuolio Sep 1, 2022
52185fb
astyle and tests
Hirmuolio Sep 1, 2022
0e93d3b
migration
Hirmuolio Sep 1, 2022
237db1b
mods
Hirmuolio Sep 1, 2022
90f8794
broken npc code
Hirmuolio Sep 1, 2022
7354245
remove autostart
Hirmuolio Sep 1, 2022
964184d
treshold improvements
Hirmuolio Sep 1, 2022
59da9fc
treshold for muscle
Hirmuolio Sep 1, 2022
5d7f27d
improved treshold
Hirmuolio Sep 1, 2022
248d2e3
add only missing
Hirmuolio Sep 1, 2022
d20df51
remnants of fuel eating
Hirmuolio Sep 1, 2022
8687e85
Remove redundant methods, constify
irwiss Aug 31, 2022
dda445f
Split functions and refactor UI
irwiss Aug 31, 2022
fce5953
Merge spilled out logic 1
irwiss Sep 6, 2022
2b72c50
Merge spilled out logic 2
irwiss Sep 6, 2022
44345c6
Move string parsing to savegame_json.cpp
irwiss Sep 6, 2022
90a8423
Tag loose vehicle test cases
irwiss Sep 6, 2022
ea8d478
Add tests for racking/unracking
irwiss Sep 6, 2022
1ec8e1b
Fix crash on batch crafting UI, add checks for handling nested recipes
ZeroInternalReflection Sep 7, 2022
df431b7
Add a debug check for crafting menu indentation
ZeroInternalReflection Sep 7, 2022
3a3d7a6
Merge branch 'master' into biofuel2
Hirmuolio Sep 8, 2022
55766bd
applies only to fueled
Hirmuolio Sep 8, 2022
3c2747b
fuel consumption display
Hirmuolio Sep 9, 2022
5faa981
unused
Hirmuolio Sep 9, 2022
cae55ca
itype
Hirmuolio Sep 9, 2022
06ecb40
Merge branch 'master' into biofuel2
Hirmuolio Sep 9, 2022
4f8af08
rename
Hirmuolio Sep 9, 2022
4fd4207
make tile retract option an integer to add auto mode
mlange-42 Sep 8, 2022
bb024cb
calculate retraction based on distance to player/center
mlange-42 Sep 8, 2022
c941d7f
add minimum and maximum retraction distance to tileset info JSON
mlange-42 Sep 9, 2022
08dda23
Add debug options for min and max retract distance (no effect yet)
mlange-42 Sep 9, 2022
9b470f8
allow debug options to overwrite tileset retract distances
mlange-42 Sep 9, 2022
722c04c
pass retract value as integer percentage instead of float
mlange-42 Sep 9, 2022
d4996e0
carble connection fixes
Hirmuolio Sep 9, 2022
659ac80
Make scrolling_text_view scrollbars draggable (#60006)
ZeroInternalReflection Sep 9, 2022
9a3da15
Merge pull request #60634 from irwiss/racking-refactors
dseguin Sep 9, 2022
3fbd02d
[DinoMod] monster mass (#60860)
LyleSY Sep 9, 2022
29bcf8a
add context for rock (#60883)
GuardianDll Sep 9, 2022
ae23f50
Add zombified llamas (#60388)
MNG-cataclysm Sep 9, 2022
9b3fc45
Move selection error popups out of select_crafting_recipe
ZeroInternalReflection Sep 9, 2022
cd9dfbe
Merge pull request #60819 from ZeroInternalReflection/CraftBatchIndents
dseguin Sep 9, 2022
8c2607e
Add obsolete filter paper recipe (#60886)
onura46 Sep 9, 2022
57e827d
Correct encumbrance for ballistic vests
anoobindisguise Sep 10, 2022
5e3803f
Routine i18n updates on 10 September 2022
BrettDong Sep 10, 2022
8f44037
Merge pull request #60891 from CleverRaven/i18n
Rivet-the-Zombie Sep 10, 2022
a8d46cb
make python linter happy, fix LGTM alerts
mlange-42 Sep 9, 2022
78647f5
Add veh_menu syntax sugar
irwiss Sep 8, 2022
ad2d5e9
Use veh_menu in vehicle::control_doors
irwiss Sep 8, 2022
e6058b4
Use veh_menu in vehicle::control_engines
irwiss Sep 8, 2022
a610b1a
Use veh_menu in vehicle::interact_with
irwiss Sep 8, 2022
e8582f8
Use veh_menu in vehicle::set_electronics_menu_options
irwiss Sep 8, 2022
c4e14c3
Use veh_menu in vehicle::use_controls
irwiss Sep 8, 2022
771baa9
Use veh_menu in vehicle::toggle_autopilot
irwiss Sep 8, 2022
2d78e16
Merge vehicle::use_controls into vehicle::interact_with
irwiss Sep 8, 2022
59b38db
Make electronics menu top level for 24802
irwiss Sep 8, 2022
bfb562d
Make appliance menu top level
irwiss Sep 8, 2022
5a82003
Fixes and tweaks
irwiss Sep 8, 2022
62c7c61
clang-tidy
irwiss Sep 9, 2022
7acce07
Jsonize vehicle keybindings, allow rebinding keys
irwiss Sep 9, 2022
20437d6
Deduplicate keybinds, add autoclave to spellchecker
irwiss Sep 9, 2022
5bea340
Use veh_menu in vehicle::build_bike_rack_menu
irwiss Sep 10, 2022
5b86aaa
Stop running appveyor builds because they're redundant with GHA builds.
akrieger Sep 10, 2022
f89b650
Serialize bike rack data as objects
irwiss Sep 10, 2022
900eaa9
Generate turret vehicle parts
irwiss Aug 21, 2022
f41f99e
Estimate turret looks_like
irwiss Aug 21, 2022
845bf1a
Allow turrets drain more than one resource
irwiss Aug 21, 2022
7871098
Hide migrated or blacklisted turrets from install
irwiss Aug 21, 2022
7f46505
Localize turret names using gun translations
irwiss Aug 21, 2022
f4a445d
Migrate turret vparts to generated ones
irwiss Aug 21, 2022
e1de800
Migrate vehicle prototypes to new turret vpart_ids
irwiss Aug 21, 2022
d6c4ecf
Flag guns not fit for turret parts with NO_TURRET
irwiss Aug 21, 2022
c699f50
Print part numbers list correctly in debugmsg
irwiss Sep 10, 2022
2a41ef0
Filter out vehicles not fully located on given rack
irwiss Sep 10, 2022
37e1d12
Reorder vehicle interact menus for convenience
irwiss Sep 10, 2022
f2e198a
Handle locked vehicles
irwiss Sep 10, 2022
da7253f
Remove semicolons for gcc9 test (-Werror=pedantic)
irwiss Sep 10, 2022
c2297b7
lower ratio to 0.4
anoobindisguise Sep 11, 2022
32b820a
Preliminary mapgen for the Portal Lab Entry Point
John-Candlebury Aug 10, 2022
75dd27f
Yrax themed decoration bits
John-Candlebury Aug 10, 2022
59029fe
Add a proper Yrax Monster faction and new monster
John-Candlebury Aug 10, 2022
74deb15
Merge pull request #60890 from anoobindisguise/anoobindisguise-ballis…
Rivet-the-Zombie Sep 11, 2022
b9a48fe
Merge pull request #60901 from akrieger/appvey-no-more
ZhilkinSerg Sep 11, 2022
abf8d29
[FEATURE] add cow armors (#60806)
leoCottret Sep 11, 2022
305ec2f
[Backrooms] Map extra fix and additions (#60895)
onura46 Sep 11, 2022
d4c5950
Merge pull request #60623 from PatrikLundell/dried_fruit
ZhilkinSerg Sep 11, 2022
b9c5366
[DinoMod] basement mapgen fixes (#60906)
LyleSY Sep 11, 2022
e9a88a3
Enables 'Cataclysm Windows build' on drafts
Stadler76 Sep 11, 2022
f5b184f
Merge pull request #60917 from Stadler76/windows-build-on-drafts
ZhilkinSerg Sep 11, 2022
a767990
Routine tileset updates on 11 September 2022
casswedson Sep 11, 2022
c435128
Update distorted segments
John-Candlebury Sep 11, 2022
22ee112
Final loot and map layout for the security checkpoint
John-Candlebury Sep 12, 2022
6901312
Rare Yrax Encounter within the glass
John-Candlebury Sep 12, 2022
5294356
Style Json
John-Candlebury Sep 12, 2022
6faa147
Ensure symmetrical yrax relationships
John-Candlebury Sep 12, 2022
7fc9830
Density and description fixes for Yrax scrap
John-Candlebury Sep 12, 2022
2924a24
Merge pull request #60933 from CleverRaven/tileset-updates
Rivet-the-Zombie Sep 12, 2022
4840ee2
Limbify/flagify field immunity (#60852)
Venera3 Sep 12, 2022
32a7873
Allow both mouse movement and click-and-drag without local keybinds (…
ZeroInternalReflection Sep 12, 2022
1f9244a
Cloth padded shirt (#60930)
Aerin-of-the-Toast Sep 12, 2022
100cad4
Jsonize electroreceptors (#60929)
irwiss Sep 12, 2022
c13c14f
docs: front and center screenshot of the game (#60927)
casswedson Sep 12, 2022
3aa5b5c
Fixing/expanding portal items (#60925)
Ramza13 Sep 12, 2022
5c50a13
Allow tileset Python files to work with env var `LIBVIPS_PATH` (#60923)
mlange-42 Sep 12, 2022
90957f0
Ma style and mana (#60922)
dikiy4eburator Sep 12, 2022
64b1a9f
[DinoMod] three ardent ankylosaurs (#60914)
LyleSY Sep 12, 2022
17a0b22
Call rebuild_vehicle_level_caches in grabbed_veh_move (#60911)
irwiss Sep 12, 2022
a81778e
Add source Creature to explosions (#60910)
irwiss Sep 12, 2022
6364450
Merge pull request #60881 from mlange-42/auto-retract
dseguin Sep 12, 2022
efc6797
Update integrated.json (#60880)
MNG-cataclysm Sep 12, 2022
16ddd83
Item Description Cleanup Project - Guns (#60872)
FoolsGold45 Sep 12, 2022
9346606
Fix helicopter total rotor area calculation (#60850)
SurFlurer Sep 12, 2022
7c264d1
Fix tile display of the FoodCo kitchen buddy appliance (#60947)
ZeroInternalReflection Sep 12, 2022
d6848fc
Make magiclysm auras compatible with power armor (#60783)
Dan1ss1mo Sep 12, 2022
cfab75c
Keybindings window tweak (#60774)
Night-Pryanik Sep 12, 2022
32fec4e
Merge pull request #60061 from John-Candlebury/portal-lab-sec
dseguin Sep 12, 2022
dc36ebc
Update appliances.json (#60944)
Fris0uman Sep 12, 2022
3184bb8
Merge pull request #60905 from irwiss/bike-rack-serialization
dseguin Sep 12, 2022
70cfd0c
Sheet Metal Armor Part 4: The Finale of the increasingly-inaccurately…
Aerin-of-the-Toast Sep 12, 2022
d9f3bb7
add very important body pillow variants (#60932)
Aerin-of-the-Toast Sep 12, 2022
6177df6
Update Nursing Home Parking Lot
pshepjr Sep 12, 2022
4307280
Update retirement_community.json
pshepjr Sep 12, 2022
dcce827
Update retirement_community.json
pshepjr Sep 13, 2022
795ceda
Update retirement_community.json
pshepjr Sep 13, 2022
3419f30
Update retirement_community.json
pshepjr Sep 13, 2022
23c8446
Adding myself to confirm bug list (#60950)
sadenar Sep 13, 2022
498591c
tweak: shorten confirmation command (#60954)
casswedson Sep 13, 2022
1459729
Graded steel weapons (#59254)
Drew4484 Sep 13, 2022
fee162e
make atomic coffee slightly more reasonable (#60765)
anoobindisguise Sep 13, 2022
12575b2
Beginner-level armor made of combined clothing (#60837)
anoobindisguise Sep 13, 2022
564b786
Merge pull request #60955 from pshepjr/Grandparents-Day-Update
Rivet-the-Zombie Sep 13, 2022
6e4d1f4
Rebuild active_item cache after refresh (#60952)
robob27 Sep 13, 2022
9c88952
[Backrooms] Mapgen Fix 2 (#60958)
onura46 Sep 13, 2022
f82499e
fix activation
Hirmuolio Sep 13, 2022
f78967c
description
Hirmuolio Sep 13, 2022
48da745
Spill overflow/MIGRATION pockets on map::actualize
irwiss Sep 13, 2022
e0368a7
Integrated armor fix
Venera3 Sep 13, 2022
5841700
Update JSON_FLAGS.md
Venera3 Sep 13, 2022
25a5ab3
Remove legacy_front() from vehicle_part::consume_energy()
irwiss Sep 13, 2022
c11a7eb
make the syringe a weapon
NetSysFire Sep 13, 2022
8ef2dff
Merge pull request #60968 from Venera3/integrated_armor_nodrop
dseguin Sep 14, 2022
ff902ca
Remove redundant medical threshold from Resilient and Solidly Built (…
actually-a-cat Sep 14, 2022
3facd43
fix gauntlets and sabatons (#60964)
Aerin-of-the-Toast Sep 14, 2022
fe88739
Merge pull request #60963 from irwiss/spill-migration
dseguin Sep 14, 2022
ec5e754
Merge pull request #60962 from Hirmuolio/radiomod
dseguin Sep 14, 2022
0262cf2
Set random cosmetic traits when beginning creation of custom characte…
Night-Pryanik Sep 14, 2022
913d296
Graded steel weapon recipes (#60574)
Drew4484 Sep 14, 2022
4014c11
Extended restriction for mandible guards
Termineitor244 Sep 14, 2022
7a68e8a
Add more detail to descriptions for the rail mounted mandible guard
Termineitor244 Sep 14, 2022
5dee013
Merge pull request #60975 from NetSysFire/syringe
Rivet-the-Zombie Sep 14, 2022
f858d91
add "MEDIEVAL_SWORDS" tag for Kelvinist Frostbind
Dan1ss1mo Sep 14, 2022
f8edfc9
Add "MEDIEVAL_SWORDS" tag for Gram
Dan1ss1mo Sep 14, 2022
1edc0a5
use height_3d also for background, not only for foreground (#60994)
mlange-42 Sep 14, 2022
96d8e49
Replace thermoplastic resin with plastic (#60985)
Drew4484 Sep 14, 2022
1e42103
More mission origin fixes (#60981)
Termineitor244 Sep 14, 2022
a76a1c0
Update TALK_valhallist_mechanic.json (#60980)
Maleclypse Sep 14, 2022
143d5fe
Merge pull request #59563 from irwiss/generic-vehicle-turrets
dseguin Sep 14, 2022
e3df56e
Merge pull request #60868 from irwiss/flatten-veh-controls-menu
dseguin Sep 14, 2022
b726ed9
Improved handling of frozen liquids (#60325)
EIIKaO Sep 14, 2022
1e53c81
Allow sharpened pipes to be used in Fencing (#61008)
CyrusJazzberry Sep 15, 2022
d8c671b
Force electronics controls to appear in appliance menu (#61012)
irwiss Sep 15, 2022
4c355cf
Merge pull request #60984 from Termineitor244/patch-2
dseguin Sep 15, 2022
e45cc06
Remove extra materials
Drew4484 Sep 15, 2022
84b5f32
Jsonify strange temple (#60046)
Night-Pryanik Sep 15, 2022
e6cf7e3
[Magiclysm] Make Summoning Great Again! (#60752)
GuardianDll Sep 15, 2022
1c57c32
Add electric spinning wheel, recipes, to itemgroups (#60646)
DPavonis Sep 15, 2022
8d60ecb
Merge pull request #61014 from Drew4484/Graded-steel-material-fix
Rivet-the-Zombie Sep 15, 2022
4e0d16f
[Magiclysm] Enchanted bracelets' flags tweaks (#60808)
catdach Sep 15, 2022
ca61b82
Add an I4 diesel engine (#60999)
Jarewill Sep 15, 2022
26433e5
sort
Hirmuolio Sep 15, 2022
fc2b611
Diesel engine fixes (#61019)
Jarewill Sep 15, 2022
91b1bbc
tests
Hirmuolio Sep 15, 2022
54274b0
muscle check
Hirmuolio Sep 15, 2022
fd75b9b
astyle
Hirmuolio Sep 15, 2022
6c18283
comment
Hirmuolio Sep 15, 2022
a1f3c19
cable test
Hirmuolio Sep 15, 2022
6a6772e
cable solar
Hirmuolio Sep 15, 2022
c81752b
better test
Hirmuolio Sep 15, 2022
6a176f0
Add origin documentation to mission_json.md (#60982)
Maleclypse Sep 15, 2022
1ddd834
Update game.cpp (#61024)
Night-Pryanik Sep 15, 2022
5f6a027
correct install parts for ammonia generator (#60104)
anoobindisguise Sep 15, 2022
873db84
Warped trees (#60936)
NetSysFire Sep 15, 2022
752dfa0
Fix the "Find Lab Tunnels" mission (#61000)
MNG-cataclysm Sep 15, 2022
a446e04
Tweak repair amount to match UI breakpoints (#60956)
irwiss Sep 15, 2022
b1e5ac1
More misc vehicle menu fixes (#61025)
irwiss Sep 16, 2022
c20efab
Random insect cleanup (#61023)
Karol1223 Sep 16, 2022
e483ae6
[DinoMod] dino skulls (#61006)
LyleSY Sep 16, 2022
8ffd7d9
Merge pull request #60996 from Dan1ss1mo/magiclysm_bladed_weapon_grou…
dseguin Sep 16, 2022
ace18ad
Curtains only indoors and street light over the road! -- Auto terrain…
mlange-42 Sep 16, 2022
c0a0f92
[Magiclysm] Add OVERSIZE to flesh pouch (#60931)
GuardianDll Sep 16, 2022
25237ca
fix: nerf ambulance drug spawns (#60974)
casswedson Sep 16, 2022
245b6e1
sort
Hirmuolio Sep 16, 2022
2157bc4
Emphasize pocket priority and choose pockets in order when filling co…
EIIKaO Sep 16, 2022
e5c3f5d
better cables
Hirmuolio Sep 16, 2022
71fbf3f
test empty battery
Hirmuolio Sep 16, 2022
eb6e69b
fix corpses being made out of "
Hirmuolio Sep 16, 2022
e785492
name typo
Hirmuolio Sep 16, 2022
5912aea
name typo
Hirmuolio Sep 16, 2022
4827c05
not npc usable now
Hirmuolio Sep 16, 2022
386ebbb
fuel saving ui
Hirmuolio Sep 16, 2022
ba78ebe
astyle
Hirmuolio Sep 16, 2022
1a3cfe6
Merge branch 'biofuel2' of https://github.com/Hirmuolio/Cataclysm-DDA…
Hirmuolio Sep 16, 2022
3f3f3b2
get fuels only when necessary
Hirmuolio Sep 16, 2022
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
16 changes: 8 additions & 8 deletions data/json/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@
"occupied_bodyparts": [ [ "torso", 20 ] ],
"fuel_options": [ "battery" ],
"fuel_efficiency": 1,
"fuel_capacity": 2000,
"time": "1 s",
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ]
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_TOGGLED", "BIONIC_NPC_USABLE" ],
Hirmuolio marked this conversation as resolved.
Show resolved Hide resolved
"passive_pseudo_items": [ "internal_battery_compartment" ]
},
{
"id": "bio_blade",
Expand Down Expand Up @@ -780,11 +780,11 @@
"description": "You burn alcohol as fuel in an extremely efficient reaction.",
"occupied_bodyparts": [ [ "torso", 20 ] ],
"fuel_options": [ "alcohol" ],
"fuel_capacity": 400,
"fuel_efficiency": 0.5,
"exothermic_power_gen": true,
"time": "1 s",
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF", "BIONIC_TOGGLED" ]
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF", "BIONIC_TOGGLED" ],
Hirmuolio marked this conversation as resolved.
Show resolved Hide resolved
"passive_pseudo_items": [ "internal_ethanol_tank" ]
},
{
"id": "bio_lampoil",
Expand All @@ -793,11 +793,11 @@
"description": "Slowly generates bionic power out of kerosene or motor oil.",
"occupied_bodyparts": [ [ "torso", 20 ] ],
"fuel_options": [ "lamp_oil", "motor_oil" ],
"fuel_capacity": 750,
"fuel_efficiency": 0.35,
"exothermic_power_gen": true,
"time": "5 s",
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF", "BIONIC_TOGGLED" ]
"flags": [ "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE", "BIONIC_SHOCKPROOF", "BIONIC_TOGGLED" ],
Hirmuolio marked this conversation as resolved.
Show resolved Hide resolved
"passive_pseudo_items": [ "internal_oil_tank" ]
},
{
"id": "bio_evap",
Expand Down Expand Up @@ -1674,11 +1674,11 @@
"occupied_bodyparts": [ [ "torso", 8 ] ],
"encumbrance": [ [ "torso", 5 ] ],
"fuel_options": [ "gasoline" ],
"fuel_capacity": 500,
"fuel_efficiency": 0.25,
"exothermic_power_gen": true,
"time": "1 s",
"flags": [ "BIONIC_TOGGLED", "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE" ]
"flags": [ "BIONIC_TOGGLED", "BIONIC_POWER_SOURCE", "BIONIC_NPC_USABLE" ],
Hirmuolio marked this conversation as resolved.
Show resolved Hide resolved
"passive_pseudo_items": [ "internal_gasoline_tank" ]
},
{
"id": "bio_syringe",
Expand Down
5 changes: 5 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2093,5 +2093,10 @@
"id": "SINGLE_USE",
"type": "json_flag",
"info": "This item is removed after use."
},
{
"id": "BIONIC_FUEL_SOURCE",
"type": "json_flag",
"info": "Contents of this item are used for fueling bionics."
}
]
99 changes: 99 additions & 0 deletions data/json/items/tool/integrated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[
{
"id": "internal_gasoline_tank",
"type": "GENERIC",
"category": "container",
"name": { "str": "internal gasoline tank" },
"description": "Internal tank for gasoline fuel cell bionic.",
"volume": "501 ml",
"weight": "1 g",
"price": 0,
"material": [ "plastic" ],
"symbol": "(",
"color": "magenta",
"flags": [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ],
"pocket_data": [
{
"pocket_type": "CONTAINER",
"watertight": true,
"rigid": true,
"max_contains_volume": "500 ml",
"max_item_volume": "32 ml",
"max_contains_weight": "1 kg",
"material_restriction": [ "gasoline" ]
}
]
},
{
"id": "internal_ethanol_tank",
"type": "GENERIC",
"category": "container",
"name": { "str": "internal ethanol tank" },
"description": "Internal ethanol tank for ethanol burner bionic.",
"volume": "401 ml",
"weight": "1 g",
"price": 0,
"material": [ "plastic" ],
"symbol": "(",
"color": "magenta",
"flags": [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ],
"pocket_data": [
{
"pocket_type": "CONTAINER",
"watertight": true,
"rigid": true,
"max_contains_volume": "400 ml",
"max_item_volume": "32 ml",
"max_contains_weight": "1 kg",
"material_restriction": [ "alcohol" ]
}
]
},
{
"id": "internal_oil_tank",
"type": "GENERIC",
"category": "container",
"name": { "str": "internal oil tank" },
"description": "Internal oil tank for oil generator bionic.",
"volume": "751 ml",
"weight": "1 g",
"price": 0,
"material": [ "plastic" ],
"symbol": "(",
"color": "magenta",
"flags": [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ],
"pocket_data": [
{
"pocket_type": "CONTAINER",
"watertight": true,
"rigid": true,
"max_contains_volume": "750 ml",
"max_item_volume": "32 ml",
"max_contains_weight": "1 kg",
"material_restriction": [ "lamp_oil", "motor_oil" ]
}
]
},
{
"id": "internal_battery_compartment",
"type": "TOOL",
"name": { "str": "internal battery compartment" },
"description": "Internal compartment for holding medium sized batteries for battery system bionic.",
"volume": "750 ml",
"weight": "1 g",
"price": 0,
"material": [ "plastic" ],
"symbol": "(",
"color": "magenta",
"flags": [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ],
"ammo": [ "battery" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_MEDIUM", "BATTERY_LIGHT" ],
"default_magazine": "medium_battery_cell"
}
]
}
]
9 changes: 0 additions & 9 deletions data/json/player_activities.json
Original file line number Diff line number Diff line change
Expand Up @@ -990,15 +990,6 @@
"based_on": "neither",
"no_resume": true
},
{
"id": "ACT_CONSUME_FUEL_MENU",
"type": "activity_type",
"activity_level": "NO_EXERCISE",
"verb": "consuming fuel",
"suspendable": false,
"based_on": "neither",
"no_resume": true
},
{
"id": "ACT_HACKING",
"type": "activity_type",
Expand Down
29 changes: 27 additions & 2 deletions data/mods/Magiclysm/bionics.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,35 @@
"description": "Embedded into your back and connected to your bionic power supply is a powerful spell focus able to consume blood from dead creatures to produce bionic power. It can store up to 100 mL of blood.",
"occupied_bodyparts": [ [ "torso", 8 ] ],
"fuel_options": [ "blood", "dragon_blood", "tainted_blood", "hblood" ],
"fuel_capacity": 100,
"fuel_efficiency": 0.6,
"exothermic_power_gen": true,
"time": "6 s",
"flags": [ "BIONIC_TOGGLED", "BIONIC_POWER_SOURCE" ]
"flags": [ "BIONIC_TOGGLED", "BIONIC_POWER_SOURCE" ],
"passive_pseudo_items": [ "integrated_blod_bank" ]
Hirmuolio marked this conversation as resolved.
Show resolved Hide resolved
},
{
"id": "integrated_blod_bank",
Hirmuolio marked this conversation as resolved.
Show resolved Hide resolved
"type": "GENERIC",
"category": "container",
"name": { "str": "internal blood bank" },
"description": "Internal tank for blood power generator bionic.",
"volume": "101 ml",
"weight": "1 g",
"price": 0,
"material": [ "plastic" ],
"symbol": "(",
"color": "magenta",
"flags": [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ],
"pocket_data": [
{
"pocket_type": "CONTAINER",
"watertight": true,
"rigid": true,
"max_contains_volume": "100 ml",
"max_item_volume": "32 ml",
"max_contains_weight": "1 kg",
"material_restriction": [ "blood", "dragon_blood", "tainted_blood", "hblood" ]
}
]
}
]
6 changes: 3 additions & 3 deletions data/mods/Magiclysm/materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
{ "fuel": 900, "smoke": 6, "burn": 3 }
],
"fuel_data": {
"energy": "50000000 kJ",
"energy": "50000 kJ",
"explosion_data": { "chance_hot": 20, "chance_cold": 1000, "factor": 0.2, "fiery": true, "size_factor": 0.1 }
}
},
Expand Down Expand Up @@ -247,14 +247,14 @@
{ "fuel": -50, "smoke": 2, "burn": 1 },
{ "fuel": -10, "smoke": 2, "burn": 2 }
],
"fuel_data": { "energy": "1000 kJ" }
"fuel_data": { "energy": "1 kJ" }
},
{
"type": "material",
"id": "tainted_blood",
"name": "Tainted blood",
"copy-from": "blood",
"fuel_data": { "energy": "5000 kJ" }
"fuel_data": { "energy": "5 kJ" }
},
{
"type": "material",
Expand Down
3 changes: 2 additions & 1 deletion doc/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3623,7 +3623,8 @@ Any Item can be a container. To add the ability to contain things to an item, yo
"ammo_restriction": { "ammotype": count }, // Restrict pocket to a given ammo type and count. This overrides mandatory volume, weight, watertight and airtight to use the given ammo type instead. A pocket can contain any number of unique ammo types each with different counts, and the container will only hold one type (as of now). If this is left out, it will be empty.
"flag_restriction": [ "FLAG1", "FLAG2" ], // Items can only be placed into this pocket if they have a flag that matches one of these flags.
"item_restriction": [ "item_id" ], // Only these item IDs can be placed into this pocket. Overrides ammo and flag restrictions.
// If both "flag_restriction" and "item_restriction" are used simultaneously then any item that matches either of them will be accepted.
"material_restriction": [ "material_id" ], // Only items that are mainly made of this material can enter.
// If multiple of "flag_restriction", "material_restriction" and "item_restriction" are used simultaneously then any item that matches any of them will be accepted.

"sealed_data": { "spoil_multiplier": 0.0 } // If a pocket has sealed_data, it will be sealed when the item spawns. The sealed version of the pocket will override the unsealed version of the same datatype.
}
Expand Down
19 changes: 4 additions & 15 deletions src/activity_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2523,12 +2523,7 @@ void consume_activity_actor::start( player_activity &act, Character &guy )
Character &player_character = get_player_character();
if( consume_location ) {
ret_val<edible_rating> ret = ret_val<edible_rating>::make_success();
if( refuel ) {
ret = player_character.can_consume_fuel( *consume_location );
} else {
ret = player_character.will_eat( *consume_location, true );
}

ret = player_character.will_eat( *consume_location, true );
if( !ret.success() ) {
canceled = true;
consume_menu_selections = std::vector<int>();
Expand All @@ -2539,11 +2534,7 @@ void consume_activity_actor::start( player_activity &act, Character &guy )
}
} else if( !consume_item.is_null() ) {
ret_val<edible_rating> ret = ret_val<edible_rating>::make_success();
if( refuel ) {
ret = player_character.can_consume_fuel( consume_item );
} else {
ret = player_character.will_eat( consume_item, true );
}
ret = player_character.will_eat( consume_item, true );
if( !ret.success() ) {
canceled = true;
consume_menu_selections = std::vector<int>();
Expand Down Expand Up @@ -2579,9 +2570,9 @@ void consume_activity_actor::finish( player_activity &act, Character & )
avatar &player_character = get_avatar();
if( !canceled ) {
if( consume_loc ) {
player_character.consume( consume_loc, /*force=*/true, refuel );
player_character.consume( consume_loc, /*force=*/true );
} else if( !consume_item.is_null() ) {
player_character.consume( consume_item, /*force=*/true, refuel );
player_character.consume( consume_item, /*force=*/true );
} else {
debugmsg( "Item location/name to be consumed should not be null." );
}
Expand Down Expand Up @@ -2629,7 +2620,6 @@ void consume_activity_actor::serialize( JsonOut &jsout ) const
jsout.member( "consume_menu_filter", consume_menu_filter );
jsout.member( "canceled", canceled );
jsout.member( "type", type );
jsout.member( "refuel", refuel );

jsout.end_object();
}
Expand All @@ -2648,7 +2638,6 @@ std::unique_ptr<activity_actor> consume_activity_actor::deserialize( JsonValue &
data.read( "consume_menu_filter", actor.consume_menu_filter );
data.read( "canceled", actor.canceled );
data.read( "type", actor.type );
data.read( "refuel", actor.refuel );

return actor.clone();
}
Expand Down
5 changes: 2 additions & 3 deletions src/activity_actor_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ class consume_activity_actor : public activity_actor
std::string consume_menu_filter;
bool canceled = false;
activity_id type;
bool refuel = false;
/**
* @pre @p other is a consume_activity_actor
*/
Expand All @@ -705,12 +704,12 @@ class consume_activity_actor : public activity_actor
consume_activity_actor( const item_location &consume_location,
std::vector<int> consume_menu_selections,
const std::vector<item_location> &consume_menu_selected_items,
const std::string &consume_menu_filter, activity_id type, bool refuel = false ) :
const std::string &consume_menu_filter, activity_id type ) :
consume_location( consume_location ),
consume_menu_selections( std::move( consume_menu_selections ) ),
consume_menu_selected_items( consume_menu_selected_items ),
consume_menu_filter( consume_menu_filter ),
type( type ), refuel( refuel ) {}
type( type ) {}

explicit consume_activity_actor( const item_location &consume_location ) :
consume_location( consume_location ), consume_menu_selections( std::vector<int>() ) {}
Expand Down
9 changes: 0 additions & 9 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ static const activity_id ACT_BUTCHER( "ACT_BUTCHER" );
static const activity_id ACT_BUTCHER_FULL( "ACT_BUTCHER_FULL" );
static const activity_id ACT_CONSUME_DRINK_MENU( "ACT_CONSUME_DRINK_MENU" );
static const activity_id ACT_CONSUME_FOOD_MENU( "ACT_CONSUME_FOOD_MENU" );
static const activity_id ACT_CONSUME_FUEL_MENU( "ACT_CONSUME_FUEL_MENU" );
static const activity_id ACT_CONSUME_MEDS_MENU( "ACT_CONSUME_MEDS_MENU" );
static const activity_id ACT_DISMEMBER( "ACT_DISMEMBER" );
static const activity_id ACT_DISSECT( "ACT_DISSECT" );
Expand Down Expand Up @@ -241,7 +240,6 @@ activity_handlers::do_turn_functions = {
{ ACT_CONSUME_FOOD_MENU, consume_food_menu_do_turn },
{ ACT_CONSUME_DRINK_MENU, consume_drink_menu_do_turn },
{ ACT_CONSUME_MEDS_MENU, consume_meds_menu_do_turn },
{ ACT_CONSUME_FUEL_MENU, consume_fuel_menu_do_turn },
{ ACT_VIEW_RECIPE, view_recipe_do_turn },
{ ACT_MOVE_LOOT, move_loot_do_turn },
{ ACT_ADV_INVENTORY, adv_inventory_do_turn },
Expand Down Expand Up @@ -308,7 +306,6 @@ activity_handlers::finish_functions = {
{ ACT_CONSUME_FOOD_MENU, eat_menu_finish },
{ ACT_CONSUME_DRINK_MENU, eat_menu_finish },
{ ACT_CONSUME_MEDS_MENU, eat_menu_finish },
{ ACT_CONSUME_FUEL_MENU, eat_menu_finish },
{ ACT_VIEW_RECIPE, view_recipe_finish },
{ ACT_WASH, washing_finish },
{ ACT_JACKHAMMER, jackhammer_finish },
Expand Down Expand Up @@ -2491,12 +2488,6 @@ void activity_handlers::consume_meds_menu_do_turn( player_activity *, Character
avatar_action::eat( player_character, game_menus::inv::consume_meds( player_character ) );
}

void activity_handlers::consume_fuel_menu_do_turn( player_activity *, Character * )
{
avatar &player_character = get_avatar();
avatar_action::eat( player_character, game_menus::inv::consume_fuel( player_character ), true );
}

void activity_handlers::view_recipe_do_turn( player_activity *act, Character *you )
{
if( !you->is_avatar() ) {
Expand Down
1 change: 0 additions & 1 deletion src/activity_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ void butcher_do_turn( player_activity *act, Character *you );
void chop_trees_do_turn( player_activity *act, Character *you );
void consume_drink_menu_do_turn( player_activity *act, Character *you );
void consume_food_menu_do_turn( player_activity *act, Character *you );
void consume_fuel_menu_do_turn( player_activity *act, Character *you );
void consume_meds_menu_do_turn( player_activity *act, Character *you );
void eat_menu_do_turn( player_activity *act, Character *you );
void fertilize_plot_do_turn( player_activity *act, Character *you );
Expand Down
Loading