fnc_shield_getTextureSet.sqf 995 B

123456789101112131415161718192021222324252627
  1. params["_type"];
  2. #define REPUBLIC_LOW_HEALTH_TEXTURE "\RD501_Vehicles\static\shields\shared\rd501_shield_rep_low.paa"
  3. #define REPUBLIC_NORMAL_TEXTURE "\RD501_Vehicles\static\shields\shared\rd501_shield_rep_normal.paa"
  4. #define CIS_LOW_HEALTH_TEXTURE "\RD501_Vehicles\static\shields\shared\rd501_shield_cis_low.paa"
  5. #define CIS_NORMAL_TEXTURE "\RD501_Vehicles\static\shields\shared\rd501_shield_cis_normal.paa"
  6. private _lowHealthTexture = "";
  7. private _normalHealthTexture = "";
  8. switch (_type) do {
  9. case "REPUBLIC": {
  10. _lowHealthTexture = REPUBLIC_LOW_HEALTH_TEXTURE;
  11. _normalHealthTexture = REPUBLIC_NORMAL_TEXTURE;
  12. };
  13. case "CIS": {
  14. _lowHealthTexture = CIS_LOW_HEALTH_TEXTURE;
  15. _normalHealthTexture = CIS_NORMAL_TEXTURE;
  16. };
  17. default {
  18. diag_log format["[RD501][Shield] Invalid type '%1' specified, defaulting to 'REPUBLIC'", _type];
  19. _lowHealthTexture = REPUBLIC_LOW_HEALTH_TEXTURE;
  20. _normalHealthTexture = REPUBLIC_NORMAL_TEXTURE;
  21. };
  22. };
  23. [_lowHealthTexture, _normalHealthTexture];