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

Processor boards dropped by Milspec Searchlights don't group with other ones or themselves #63333

Closed
anoobindisguise opened this issue Jan 29, 2023 · 1 comment · Fixed by #63429
Labels
(S2 - Confirmed) Bug that's been confirmed to exist

Comments

@anoobindisguise
Copy link
Contributor

Describe the bug

Processor boards dropped by Milspec Searchlights don't group together with processor boards obtained through other methods or other processor boards dropped by searchlights, creating bloated item lists that must be pagedowned through if the player accumulates many processor boards.

Steps to reproduce

  1. Debug spawn a bunch of processor boards.
  2. Debug spawn a bunch of milspec searchlights.
  3. Kill the milspec searchlights.
  4. Lump the milspec searchlight processor boards in with the "normal" processor boards.
  5. Observe them forming dozens of separate piles: 1 single pile for all the "normal" processor boards, and dozens of individual 1-2 piles of processor boards.

Expected behavior

Processor boards from milspec searchlights should group together with other processor boards and themselves.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.22000.1455 (21H2)
  • Game Version: f097346 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

No response

@anoobindisguise anoobindisguise added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jan 29, 2023
@andrei8l
Copy link
Contributor

/confirmed The variables used by the searchlight code aren't cleared on death

Screenshot from 2023-01-29 07-03-48

for( int i = 0; i < max_lamp_count; i++ ) {
item &settings = z->inv[i];
if( settings.get_var( "SL_POWER" ) == "OFF" ) {
return true;
}
const int rng_dir = rng( 0, 7 );
if( one_in( 5 ) ) {
if( !one_in( 5 ) ) {
settings.set_var( "SL_DIR", rng_dir );
} else {
const int rng_pref = rng( 0, 3 );
static const std::array<std::string, 4> settings_names = {{
"SL_PREFER_UP", "SL_PREFER_RIGHT", "SL_PREFER_DOWN", "SL_PREFER_LEFT"
}
};
if( settings.get_var( settings_names[rng_pref] ) == "TRUE" ) {
settings.set_var( "SL_DIR", rng_pref * 2 );
}
}
}
point p( zpos + point( settings.get_var( "SL_SPOT_X", 0 ), settings.get_var( "SL_SPOT_Y", 0 ) ) );

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants