Fixed several bugs when radio-modded explosives weren't detonating #34975
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
trigger_rc_items
andtrigger_radio_item
functions as my testing show that they effectively duplicated thesendRadioSignal
functionality and because they ain't used anywhere else in the code, they are redundant.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.
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.