-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Mounted flamethrowers don't see fuel tanks as ammo #44672
Comments
mounted flamethrowers are still unusable |
This happens because the flamethrower has a diff --git a/src/turret.cpp b/src/turret.cpp
index f4fa694b1d..e897ce0227 100644
--- a/src/turret.cpp
+++ b/src/turret.cpp
@@ -153,10 +153,17 @@ std::set<itype_id> turret_data::ammo_options() const
} else {
for( const auto &e : veh->fuels_left() ) {
const itype *fuel = item::find_type( e.first );
- if( fuel->ammo && part->base.ammo_types().count( fuel->ammo->type ) &&
- e.second >= part->base.ammo_required() ) {
-
- opts.insert( fuel->get_id() );
+ if( fuel->ammo ) {
+ std::size_t count = 0;
+ const itype_id mag_type = part->base.magazine_default();
+ if( mag_type.is_null() ) {
+ count = part->base.ammo_types().count( fuel->ammo->type );
+ } else {
+ count = item( mag_type ).ammo_types().count( fuel->ammo->type );
+ }
+ if( count && e.second >= part->base.ammo_required() ) {
+ opts.insert( fuel->get_id() );
+ }
}
}
} However, I'm not sure that this should be allowed. Can our unspecified, unmodified flamethrower feed from an unpressurized tank? IMO a better solution is to remove the Any thoughts? |
I agree with you that your proposed better solution is a better solution. |
Thanks for the temporary fix. I'd also be good with your proposed solution, though I do appreciate the current distinction between base flamethrower and RM451 flamethrower so perhaps two recipes? Alternately, adding a distinct vehicle mounted pressurized tank that could apply to both flamethrowers and water cannons with a |
what if we add a fuel pump part that can be installed on a turret using a tiny electric motor that can take fuel from an unpressurized tank to a turret? Or, better yet, https://cdda-trunk.chezzo.com/pump_complex Bonus points if it can be activated from the vehicle control menu and you can choose which type of fuel to use. Water turrets should be able to shoot any kind of liquid and flamethrowers should only be able to use gasoline and napalm. We could make the high-pressure pump installed on the same tile as the tank instead of the turret, that would prevent having to make a pressurized tank of each size. If we did it on the tank instead of the turret, we could prevent siphoning of pressurized fuel (napalm, acetalyne) from a vehicle tank to a magazine unless the high-pressure pump is present. |
Game version:
Experimentals from b545981 through the last month if not more
Operating system:
Arch Linux 5.8.13
Tiles or curses:
Curses
Mods active:
Aftershock
Blaze Industries
C.R.I.T
Stats through skills
Expected behavior
Vehicle-mounted flamethrowers (or mounted RM451 flamethrowers) should see built-in tanks of gasoline/napalm and use them as fuel.
Actual behavior
Flamethrowers think they have no ammo and have no way to be manually loaded and/or fired
Steps to reproduce the behavior
Build a vehicle containing a tank with flammable liquid, turret mount, mounted flamethrower, and optionally a turret control unit. Attempt to fire in any mode/configuration.
The text was updated successfully, but these errors were encountered: