Monkeylord has active sonar even when it is on land
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
**Describe the bug**
The Monkeylord's sonar works even when it is on land despite the code [here](https://github.com/FAForever/fa/blob/develop/units/URL0402/URL0402_script.lua#L60-L68). These lines of code do not have any effect, and it is because [the Monkeylord's Sonar is an ActiveIntel](https://github.com/FAForever/fa/blob/develop/units/URL0402/URL0402_unit.bp#L271-L273) and [ActiveIntel cannot be disabled](https://github.com/FAForever/fa/blob/eed79a150b828d0c3fcf08ca62fcb0566d3681e7/lua/sim/Unit.lua#L3034-L3037).
**To Reproduce**
Spawn monkeylord on land, spawn hover or naval units on water within monkeylord's sonar range, you will be able to see the sonar 'blips' of the units on water.
**Expected behavior**
The sonar should only be active when the monkeylord is in the water.
**Screenshots**
https://user-images.githubusercontent.com/91282973/207291078-f1f40d50-8366-47ec-9a43-326e97891e92.mp4
**Additional context**
-The purpose of the `ActiveIntel` here is to prevent the sonar from turning off during a powerstall, see [relevant commit](https://github.com/FAForever/fa/commit/9aa42e94631321d31436f2b812df6334fb9e8323).
-However there is an [older commit](https://github.com/FAForever/fa/commit/21b563d1d0e2ac61055fcd59e05706f23639b5b3) that disabled the sonar while on land.
I am not sure if there is a way to keep the sonar on during a powerstall & off while on land, would probably require some scripting for the Monkeylord, the sonar-disable-on-land commit is older so I presumed that would take priority but it's been so long since either commit this might be a balance team decision?
==**tl;dr**==
The sonar is never off even on Land as an unintended consequence of a commit that prevents the sonar from turning off during a powerstall.
Either [the `ActiveIntel`](https://github.com/FAForever/fa/blob/develop/units/URL0402/URL0402_unit.bp#L271-L273) should be removed, or [the script code ](https://github.com/FAForever/fa/blob/develop/units/URL0402/URL0402_script.lua#L60-L68)that attempts to toggle the sonar when the Monkeylord enters/exits the water should be removed - or a script that turns off sonar outside of water, but keeps it on during a power stall, must be written.
Contributor guide
Assessment
This issue has not been assessed yet.