Closed michail-nikolaev closed 10 years ago
Perhaps something in the config for vehicles along the lines of
class CfgVehicles
{
class Land
{
tf_hasLRradio = 0;
};
class Car;
class specificCar: Car
{
tf_hasLRradio = 1;
};
};
(I'm not entirely sure of the exact hierarchy) A similar system could be used for backpack radios.
Currently we have function to check for inheritance (because we need to support mods too). I think we just check hmmwv base class.
Also, some kind of vehicle setVariable["tf_hasRadio", true, true] is enough
Wouldn't
if (getNumber(configFile >> "CfgVehicles" >> _this >> "tf_hasLRradio") == 1) exitWith { true };
Be faster than looping through an array of all supported types? Also to have to edit a script file to add every supported vehicle mod seems a bit unnecessary, rather than providing the option for those respective modders to specify that the vehicle has a LR radio.
Yep, maybe you right. But it also requires to override correct values in config for vanilla vehicles...
Will it possible to override config to get same logic as here - https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/master/arma3/%40task_force_radio/addons/task_force_radio/functions/fn_hasVehicleRadio.sqf
also, not every car have radio (civilian have not). And such config entries should be added to task_force_radio_items to allow easy debugging using the debug mission
It is possible to add config entries to any config class. So it would be entirely possible to get the same logic. I'll throw together a prototype and send it to you on Skype soon.
This should be closed due to https://github.com/michail-nikolaev/task-force-arma-3-radio/pull/361 Although perhaps providing an optional config .pbo for it but could be entirely separate.
Hm... From some point it is bad - we can't support any vehicle from separated addon.... Need to think here....
Well we have provided the means, it is up to those specific mod developers to choose to support TFAR or not. Even then we have provided means for mission makers to specify if a vehicle has a radio.
Yes, but at the same time it will cool to have some way to provide support for mod (for example Arma 3 Samples Mod) without waiting for original author and additional mini-mod with config...
But also: https://imagizer.imageshack.us/v2/1051x731q90/571/lmxa.jpg (http://forums.bistudio.com/showthread.php?168333-A3C-Name-Tag-Mod&p=2554330#post2554330)
it will be not easy to ask every mod maker to add additional support :)
Got an idea: if no tf_hasLRradio value in vehicle class "specificCar" check for same variable in class "TFAR_specificCar". So, we'll able to add first support for mods which may be overrided by author.
What do think?
That wouldn't be able to work, because tf_hasLRradio is set to 0 in the most base class that all other vehicle classes extend from, so tf_hasLRradio is defined for every class. And I'm not sure you can check if a specific class overrides a config entry.
Not sure what to do here... Another moment: if some addon maker will set config flag for "Car" to zero value - we'll get conflict.....
While no direct support has been added, external mods are now supported. Also mission makers are also supported with vehicle setVariable ["tf_hasLRradio", true, true]
Yes, we need to add property without "api" prefix
this issue is finally closeable :)
@kavinsky not yet, we need to test our API by this mod
http://www.armaholic.com/page.php?id=24518
Also, add way to force radio in vechicle