Advertisement
dannyvanlierop

Rx_Mutator_VoteSystem

Feb 23rd, 2017
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // *****************************************************************************
  2. //  * * * * * * * * * * * * Rx_Mutator_VoteSystem * * * * * * * * * * * * * *
  3. // *****************************************************************************
  4. class Rx_Mutator_VoteSystem extends UTMutator;
  5.  
  6. function bool CheckReplacement(Actor Other)
  7. {  
  8.     if(Other.IsA('Rx_TeamInfo'))
  9.     {
  10.         Rx_Game(WorldInfo.Game).PlayerControllerClass = class'Rx_Mutator_VoteSystem_Controller' ;
  11.     } return true;
  12. }
  13.  
  14. defaultproperties
  15. {
  16. }
  17.  
  18.  
  19. // *****************************************************************************
  20. //  * * * * * * * * * * Rx_Mutator_VoteSystem_Controller * * * * * * * * * * * *
  21. // *****************************************************************************
  22. //class Rx_Controller extends UTPlayerController;
  23. class Rx_Mutator_VoteSystem_Controller extends Rx_Controller;
  24.  
  25. function EnableVoteMenu(bool donate)
  26. {
  27.     // just in case, turn off previous one
  28.     DisableVoteMenu();
  29.  
  30.     if (!donate && WorldInfo.TimeSeconds < NextVoteTime)
  31.     {
  32.         ClientMessage("You must wait"@ int(NextVoteTime - WorldInfo.TimeSeconds) @"more seconds before you can start another vote.");
  33.         return;
  34.     }
  35.     if (donate) VoteHandler = new (self) class'Rx_CreditDonationHandler';
  36.     else VoteHandler = new (self) class'Rx_VoteMenuHandler_Ext';
  37.     VoteHandler.Enabled(self);
  38. }
  39.  
  40. defaultproperties
  41. {
  42.  
  43. }
  44.  
  45.  
  46.  
  47. // *****************************************************************************
  48. //  * * * * * * * * * * * * * Rx_VoteMenuHandler_Ext  * * * * * * * * * * * * *
  49. // *****************************************************************************
  50. //class Rx_VoteMenuHandler extends Object;
  51. class Rx_VoteMenuHandler_Ext extends Rx_VoteMenuHandler;
  52.  
  53. DefaultProperties
  54. {
  55. //  VoteChoiceClasses(0) = class'Rx_VoteMenuChoice_RestartMap'
  56. //  VoteChoiceClasses(1) = class'Rx_VoteMenuChoice_ChangeMap'
  57. //  VoteChoiceClasses(2) = class'Rx_VoteMenuChoice_Surrender'
  58. //  VoteChoiceClasses(3) = class'Rx_VoteMenuChoice_MineBan'
  59. //  VoteChoiceClasses(4) = class'Rx_VoteMenuChoice_RemoveBots'
  60. //  VoteChoiceClasses(5) = class'Rx_VoteMenuChoice_Kick'
  61. //  VoteChoiceClasses(6) = class'Rx_VoteMenuChoice_AddBots'
  62.     VoteChoiceClasses(7) = class'Rx_VoteMenuChoice_Survey'
  63.     VoteChoiceClasses(8) = class'Rx_VoteMenuChoice_ExtraChoice_Ext'
  64.     VoteChoiceClasses(9) = class'Rx_VoteMenuChoice_ExtraChoice_Ext'
  65. }
  66.  
  67.  
  68.  
  69.  
  70. // *****************************************************************************
  71. //  * * * * * * * * * * Rx_VoteMenuChoice_ExtraChoice_Ext * * * * * * * * * * *
  72. // *****************************************************************************
  73. class Rx_VoteMenuChoice_ExtraChoice_Ext extends Rx_VoteMenuChoice;
  74.  
  75. function Init()
  76. {
  77.     ToTeam = Handler.PlayerOwner.PlayerReplicationInfo.Team.TeamIndex;
  78.     Finish();
  79. }
  80.  
  81. function string ComposeTopString()
  82. {
  83.     return super.ComposeTopString() $ " is calling for turn mode1";
  84. }
  85.  
  86. function Execute(Rx_Game game)
  87. {
  88.     // Do something
  89. }
  90.  
  91. DefaultProperties
  92. {
  93.     PercentYesToPass=0.20f
  94.     MenuDisplayString = "ExtraChoice"
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement