示例#1
0
 internal void onRevolutionWon()
 {
     //demobilize();
     //_isInRevolt = false;
     if (targetReform == null) // meaning separatism
     {
         var separatists = targetReformValue as Separatism;
         separatists.Country.onSeparatismWon(Country);
         if (!separatists.Country.isAI())
         {
             Message.NewMessage("", "Separatists won revolution - " + separatists.Country.FullName, "hmm", false);
         }
     }
     else
     {
         targetReform.setValue(targetReformValue);
     }
     foreach (var pop in members)
     {
         pop.loyalty.Add(Options.PopLoyaltyBoostOnRevolutionWon);
         pop.loyalty.clamp100();
     }
     killMovement();
     //Country.movements.Remove(this);
 }
示例#2
0
 internal void onRevolutionWon(bool setReform)
 {
     siegeCapitalTurns = 0;
     _isInRevolt       = false;
     if (targetReform == null) // meaning separatism
     {
         OnSeparatistsWon();
     }
     else
     {
         if (setReform)
         {
             targetReform.setValue(getGoal());//to avoid recursion
             if (!Country.isAI())
             {
                 Message.NewMessage("Rebels won", "Now you have " + targetReformValue, "Ok", false, Game.Player.Capital.getPosition());
             }
         }
     }
     foreach (var pop in members)
     {
         pop.loyalty.Add(Options.PopLoyaltyBoostOnRevolutionWon);
         pop.loyalty.clamp100();
     }
     killMovement();
 }
示例#3
0
 internal void onRevolutionWon()
 {
     //demobilize();
     //_isInRevolt = false;
     if (targetReform == null) // meaning separatism
     {
         var separatists = targetReformValue as Separatism;
         separatists.getCountry().onSeparatismWon(getPlaceDejure());
         if (!separatists.getCountry().isAI())
         {
             new Message("", "Separatists won revolution - " + separatists.getCountry().getDescription(), "hmm");
         }
     }
     else
     {
         targetReform.setValue(targetReformValue);
     }
     foreach (var pop in members)
     {
         pop.loyalty.add(Options.PopLoyaltyBoostOnRevolutionWon);
         pop.loyalty.clamp100();
     }
     killMovement();
     //getPlaceDejure().movements.Remove(this);
 }
示例#4
0
 void changeReformValue()
 {
     if (selectedReform != null && selectedReformValue != null && selectedReformValue != selectedReform.getValue())
     {
         selectedReform.setValue(selectedReformValue);
         MainCamera.refreshAllActive();
     }
 }
示例#5
0
 void setNewReform()
 {
     if (selectedReform != null && selectedReformValue != null && selectedReformValue != selectedReform.getValue())
     {
         selectedReform.setValue(selectedReformValue);
         refresh(true);
         if (MainCamera.buildPanel.isActiveAndEnabled)
         {
             MainCamera.buildPanel.refresh();
         }
         if (MainCamera.populationPanel.isActiveAndEnabled)
         {
             MainCamera.populationPanel.refresh();
         }
         if (MainCamera.factoryPanel.isActiveAndEnabled)
         {
             MainCamera.factoryPanel.refresh();
         }
     }
 }