official-antistasi-community / A3-Antistasi

Antistasi Community Version - work in progress - Discord https://discord.com/invite/TYDwCRKnKX
https://antistasi.de
Other
227 stars 155 forks source link

[Bug]: hasARadio check function doesn't detect Unsung radios #2655

Closed jaj22 closed 1 year ago

jaj22 commented 1 year ago

hasARadio checks for TFAR_ in the assigned item class strings, but the Unsung radios are named UNS_ItemRadio_T884_TFAR and UNS_ItemRadio_PRC_90_TFAR and so fail the detection. This means that vanilla Unsung players cannot recruit high command squads.

This seems like a terrible check so might look into improving it rather than adding another string.

Lazejun commented 1 year ago

The Option to just use "AllRadios" -------> Everything in the Radioslot/Every TFAR Capable Radio.

But for some reason Hakon didnt like the check for an Array.

HakonRydland commented 1 year ago

all radio slot items should have the config property simulation = "ItemRadio"; for TFAR these config entries are present:

tf_additional_channel = 1;
tf_dialog = "anprc148jem_radio_dialog";
tf_dialogUpdate = "call TFAR_fnc_updateSWDialogToChannel;";
tf_encryptionCode = "tf_independent_radio_code";
tf_parent = "TFAR_anprc148jem";
tf_prototype = 1;
tf_range = 5000;
tf_subtype = "digital";

that should cover vanilla radio items and tfar compat, not sure if the radio vest items are actual radios in vanilla... ACRE support could also be added while were at it

jaj22 commented 1 year ago

Fixed for now. Consider improving this function after 2.14.