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

Inactive industries make inappropriate/unlogical sounds #7703

Closed
Wuzzy2 opened this issue Aug 19, 2019 · 3 comments · Fixed by #7752
Closed

Inactive industries make inappropriate/unlogical sounds #7703

Wuzzy2 opened this issue Aug 19, 2019 · 3 comments · Fixed by #7752

Comments

@Wuzzy2
Copy link

@Wuzzy2 Wuzzy2 commented Aug 19, 2019

Version of OpenTTD

1.8.0

Expected result

Industries make no sound effects if they are “inactive”. Inactive means:

  • If the industry has a potential output: That output is 0
  • If the industry has no output (e.g. power plant): Nothing has been delivered to it in the recent past (<3 months or so)

Example:

  • A paper mill with 0 paper production
  • A power plant with no coal input in the last 3 months

Actual result

Several secondary industries make inappropriate/misleading sounds when they have no production / no input:

  • Paper mill (saw sound)
  • Sawmill in temperate climate (saw sound)
  • Factory (factory line sound)
  • Power plant (electricity sound)
  • Food factory?
  • Possibly others?

All these particular sounds suggests these industries are active, while in fact they aren't. For instance, the sawmill sounds don't make sense when there's no wood.

Steps to reproduce

  1. Play OpenTTD
  2. Pan camera to any inactive industry and listen
@Wuzzy2

This comment has been minimized.

Copy link
Author

@Wuzzy2 Wuzzy2 commented Aug 19, 2019

Okay, the power plant one might be arguable, I'm fine if you reject that one. I noticed the electricity sound is linked with a graphical effect as well. This should be taken into consideration.

@Wuzzy2

This comment has been minimized.

Copy link
Author

@Wuzzy2 Wuzzy2 commented Aug 19, 2019

Oh, I want to add: An industry is also (obviously) inactive while under construction. I noticed that industries under construction also make their industry sound.

@nielsmh

This comment has been minimized.

Copy link
Contributor

@nielsmh nielsmh commented Sep 8, 2019

Some places to start at:

case GFX_POWERPLANT_SPARKS:
if (Chance16(1, 3)) {
if (_settings_client.sound.ambient) SndPlayTileFx(SND_0C_ELECTRIC_SPARK, tile);
AddAnimatedTile(tile);
}
break;

OpenTTD/src/industry_cmd.cpp

Lines 1124 to 1133 in e441447

/* play a sound? */
if ((i->counter & 0x3F) == 0) {
uint32 r;
uint num;
if (Chance16R(1, 14, r) && (num = indsp->number_of_sounds) != 0 && _settings_client.sound.ambient) {
SndPlayTileFx(
(SoundFx)(indsp->random_sounds[((r >> 16) * num) >> 16]),
i->location.tile);
}
}

The Industry::cargo_last_accepted_at and Industry::last_month_production fields are probably useful as well.

abmyii added a commit to abmyii/OpenTTD that referenced this issue Sep 28, 2019
@TrueBrain TrueBrain added the pinned label Sep 28, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 6, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 6, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 6, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 6, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 6, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 7, 2019
abmyii added a commit to abmyii/OpenTTD that referenced this issue Oct 9, 2019
nielsmh added a commit that referenced this issue Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.