Bob-Murphy / A3-Antistasi-1.4

Please go to the newly formed organization. The project will be continued there.
https://github.com/official-antistasi-community/A3-Antistasi-1.4
MIT License
9 stars 6 forks source link

AI Repair radio tower mission #65

Open SonorousMeerkat opened 5 years ago

SonorousMeerkat commented 5 years ago

This is an odd one since it is from the code, but there is a mission for the ai repairing radio towers that is similar to the ammo truck mission.

I can't see it being called in the mission request scripting. this may be the cause of someone asking if radio towers don't get repaired anymore.

I certainly haven't seen this mission trigger at all.

PoweredByPot commented 5 years ago

Good find, I certainly remember seeing this mission occur at one point but it was quite a while. I'll go dig through the old versions and see if we can't locate the missing section.

PoweredByPot commented 5 years ago

It turns out that this mission is actually called during the tax loop. if ((count antennasDead > 0) and (not(["REP"] call BIS_fnc_taskExists))) then { _potentials = []; { _markerX = [markersX, _x] call BIS_fnc_nearestPosition; if ((sidesX getVariable [_markerX,sideUnknown] == Occupants) and (spawner getVariable _markerX == 2)) exitWith { _potentials pushBack [_markerX,_x]; }; } forEach antennasDead; if (count _potentials > 0) then { _potential = selectRandom _potentials; [[_potential select 0,_potential select 1],"REP_Antenna"] call A3A_fnc_scheduler; }; }

I will add some debug text in there and run it on my testing box here in a couple of hours and see if I can at least verify that destroyed towers are being added, or that the check is even being made at all.

Will report back if I find fun things.

Edit: sorry the formatting of copied code is so crap, resourcecheck.sqf starting at line 160

PoweredByPot commented 5 years ago

I've found what I think is the issue and I am working on testing the fix.