File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -719,46 +719,38 @@ th_enable_transfer_mp_to_sailors_decision = {
719719th_export_root_variable_into_foreign = {
720720 #This function counts your own variable, which is made for counting, down while increasing the counter variable of $who$
721721 #Useful if you need to convert variables from a province scope into a country's variable
722- while = {
723- limit = {
724- check_variable = {
725- which = $root_variable$
726- value = 1
727- }
722+ set_variable = {
723+ which = $foreign_variable$_transfer
724+ which = $root_variable$
725+ }
726+ $who$ = {
727+ set_variable = {
728+ which = $foreign_variable$_transfer
729+ which = PREV
728730 }
729- $who$ = {
730- change_variable = {
731- which = $foreign_variable$
732- value = 1
733- }
734- }
735- subtract_variable = {
736- which = $root_variable$
737- value = 1
731+ set_variable = {
732+ which = $foreign_variable$
733+ which = $foreign_variable$_transfer
738734 }
739735 }
740736}
741737
742738th_import_foreign_variable_into_root = {
743- while = {
744- limit = {
745- $who$ = {
746- check_variable = {
747- which = $foreign_variable$
748- value = 1
749- }
750- }
739+ $who$ = {
740+ set_variable = {
741+ which = $root_variable$_transfer
742+ which = $foreign_variable$
751743 }
752- $who$ = {
753- subtract_variable = {
754- which = $foreign_variable$
755- value = 1
744+ PREV = {
745+ set_variable = {
746+ which = $root_variable$_transfer
747+ which = PREV
756748 }
757749 }
758- change_variable = {
759- which = $root_variable$
760- value = 1
761- }
750+ }
751+ set_variable = {
752+ which = $root_variable$
753+ which = $root_variable$_transfer
762754 }
763755}
764756
You can’t perform that action at this time.
0 commit comments