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

Fixed several bugs when radio-modded explosives weren't detonating #34975

Merged
merged 3 commits into from Oct 24, 2019
Merged

Fixed several bugs when radio-modded explosives weren't detonating #34975

merged 3 commits into from Oct 24, 2019

Conversation

Night-Pryanik
Copy link
Contributor

Summary

SUMMARY: Bugfixes "Fixed several bugs when radio-modded explosives weren't detonating."

Purpose of change

Closes #20384 - Detonating bombs in RC cars is bugged.

Describe the solution

  • Removed trigger_rc_items and trigger_radio_item functions as my testing show that they effectively duplicated the sendRadioSignal functionality and because they ain't used anywhere else in the code, they are redundant.
  • Added a check for radio-containers (RC cars) with embedded radio-modded explosives in player's possession. The game will forbid detonating these containers in this case.
  • Replaced scanning for items in player inventory with checking for 30-tile radius around player.
    First, this fixed a bug when radio-modded explosive didn't detonate if it was placed in a RC car and then was taken back and you click on a button on RC control.
    Second, this means limited range of radio controls (30 tiles) instead of previous unlimited range.
    Third, this means scanning all items in huge radius. This might possibly negatively affect performance, but it should only happen on activating radio controls, which is a rare case AFAIK, so IMO it's not a big issue.
  • Other small fixes here and there (typos fixing, period in the end of the sentence, int-to-string conversion simplification etc)

Describe alternatives you've considered

None.

Testing

A LOT.
Tested by wielding radio-modded grenade and RC car with this grenade and activating radio controls.
Tested by placing and throwing grenade and RC car and activating controls.
Tested by placing grenade in RC car and then taking it back and activating controls.
Tested by linking grenade to red signal and activating green signal.
Tested by linking both grenade and RC car with grenade to the same signal and activating it.
As far as I can tell, all is working as it should.

Additional context

None.

@Night-Pryanik Night-Pryanik added Items / Item Actions / Item Qualities Items and how they work and interact <Bugfix> This is a fix for a bug (or closes open issue) labels Oct 23, 2019
@ZhilkinSerg ZhilkinSerg merged commit 3677d07 into CleverRaven:master Oct 24, 2019
@Night-Pryanik Night-Pryanik deleted the grenade branch October 24, 2019 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detonating bombs in RC cars is bugged
2 participants