Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. /**
  2. * ExileClient_system_radiation_thread_update
  3. *
  4. * Exile Mod
  5. * www.exilemod.com
  6. * © 2015 Exile Mod Team
  7. *
  8. * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10. */
  11.  
  12. private["_distance","_damage"];
  13. ExilePlayerRadiationLastCheck = ExilePlayerRadiation;
  14. ExilePlayerRadiation = 0;
  15. {
  16. _distance = (_x select 0) distance (getPosASL player);
  17. if (_distance < (_x select 2)) exitWith
  18. {
  19. if (_distance < (_x select 1)) then
  20. {
  21. ExilePlayerRadiation = 1;
  22. }
  23. else
  24. {
  25. ExilePlayerRadiation = 1 - ((_distance - (_x select 1)) / ((_x select 2) - (_x select 1)));
  26. };
  27. if (ExilePlayerRadiation > 0.7) then
  28. {
  29. playSound [format ["Exile_Sound_GeigerCounter_High0%1", 1 + (floor random 3)], true];
  30. _damage = 1/(1*60) * 2;
  31. }
  32. else
  33. {
  34. if (ExilePlayerRadiation > 0.3) then
  35. {
  36. playSound [format ["Exile_Sound_GeigerCounter_Medium0%1", 1 + (floor random 3)], true];
  37. _damage = 1/(3*60) * 2;
  38. }
  39. else
  40. {
  41. playSound [format ["Exile_Sound_GeigerCounter_Low0%1", 1 + (floor random 3)], true];
  42. _damage = 1/(5*60) * 2;
  43. };
  44. };
  45. if !("Exile_Headgear_GasMask" in (assignedItems player)) then
  46. {
  47. player setDamage ((damage player) + _damage);
  48. };
  49. if ("Exile_Headgear_GasMask" in (assignedItems player)) then
  50. {
  51. player setDamage ((damage player) + _damage * .01);
  52. };
  53. };
  54. }
  55. forEach ExileContaminatedZones;
  56. if !(ExilePlayerRadiation isEqualTo ExilePlayerRadiationLastCheck) then
  57. {
  58. ExilePostProcessing_RadiationColor ppEffectAdjust
  59. [
  60. 1,
  61. linearConversion [0, 1, ExilePlayerRadiation, 1, 1.3],
  62. linearConversion [0, 1, ExilePlayerRadiation, 0, -0.05],
  63. [0,0,0,0],
  64. [1.5,1.3,1,1 - ExilePlayerRadiation],
  65. [0.8,0.5,0.9,0],
  66. [0,0,0,0,0,0,4]
  67. ];
  68. ExilePostProcessing_RadiationColor ppEffectCommit 2;
  69. ExilePostProcessing_RadiationChroma ppEffectAdjust [0.02 * ExilePlayerRadiation,0.02 * ExilePlayerRadiation,true];
  70. ExilePostProcessing_RadiationChroma ppEffectCommit 2;
  71. ExilePostProcessing_RadiationFilm ppEffectAdjust [ExilePlayerRadiation,8.39,8,0.9,0.9,true];
  72. ExilePostProcessing_RadiationFilm ppEffectCommit 2;
  73. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement