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

Vehicle minifreezer cannot be used on at all #25020

Closed
ghost opened this issue Aug 21, 2018 · 4 comments · Fixed by #25166
Closed

Vehicle minifreezer cannot be used on at all #25020

ghost opened this issue Aug 21, 2018 · 4 comments · Fixed by #25166
Labels
<Bug> This needs to be fixed Vehicles Vehicles, parts, mechanics & interactions

Comments

@ghost
Copy link

ghost commented Aug 21, 2018

Describe the bug
The minifreezer cannot be enabled through the vehicle menu.

To Reproduce
Steps to reproduce the behavior:

  1. Find a vehicle with a minifreezer, or create a vehicle and put on a minifreezer.
  2. Access vehicle controls or dashboard.
  3. The minifreezer can't be turned on; there's no option to do it.

Expected behavior
Because there are electronics controls for the minifridge, it's logical that there be some for the minifreezer. This bug also prevents the minifreezer from being used at all.

Screenshots

image

Versions and configuration(please complete the following information):

  • OS: Windows 10
  • Game Version: Can't say for sure because this was discovered on a Terminal build compiled directly from source. I think it's build 7720.
  • Graphics version: Terminal, but not relevant
  • Mods loaded: None other than default set
@Night-Pryanik Night-Pryanik added <Bug> This needs to be fixed Vehicles Vehicles, parts, mechanics & interactions labels Aug 21, 2018
@mlangsdorf
Copy link
Contributor

It installs to on, so it's got that going for it. There's also already a keybinding in data/raw/keybindings/vehicle.json, so this should be enough to fix it:

diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index b34a1f058b..1b4de4c7e3 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -726,6 +726,7 @@ void vehicle::set_electronics_menu_options( std::vector<uimenu_entry> &options,
     add_toggle( _( "stereo" ), keybind( "TOGGLE_STEREO" ), "STEREO" );
     add_toggle( _( "chimes" ), keybind( "TOGGLE_CHIMES" ), "CHIMES" );
     add_toggle( _( "fridge" ), keybind( "TOGGLE_FRIDGE" ), "FRIDGE" );
+    add_toggle( _( "freezer" ), keybind( "TOGGLE_FREEZER" ), "FREEZER" );
     add_toggle( _( "recharger" ), keybind( "TOGGLE_RECHARGER" ), "RECHARGE" );
     add_toggle( _( "plow" ), keybind( "TOGGLE_PLOW" ), "PLOW" );
     add_toggle( _( "reaper" ), keybind( "TOGGLE_REAPER" ), "REAPER" );

Someone can test it and submit the PR.

@nexusmrsep
Copy link
Contributor

Working on it, but tests detected yet another unforseen effect in which thawing from outside temperatures is competing with freezing effect of the freezer /fridge nulling each other out, unless one of them wins. Adding exclusion to that is under way, but since vehicle code is a spaghetti, this takes longer that expected. Kudos to @mlangsdorf for some good advice.

@CoroNaut
Copy link

As of 0.c-30780-gf121021 (build 7734), I can turn on and off the mini fridge with no problems and the items inside get cold. You require an electronics control unit, (not the regular vehicle controls).

@ghost
Copy link
Author

ghost commented Aug 22, 2018

The minifridge works fine, but the minifreezer does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
4 participants