Advertisement
Guest User

Untitled

a guest
Aug 5th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.81 KB | None | 0 0
  1. --Config file made for Nanaki's Fleet Mod
  2. --This file has all the spawn rate values from now on -
  3. --instead them being in all individual sw3 system files.
  4.  
  5. --DD.MM.YY
  6. --12.06.2016: Increased Wait-time.
  7. --08.10.2016: Added Conditional Values.
  8. --04.08.2017: Fixed ConditionalQLEnable stopping the script's routine.
  9.  
  10. --Fleet Mod Config (Systems, Waittimes, allowance, CopyAttributeFrom(System), Conditional Quest Label Enable, Conditional Quest Label Name, Conditional Quest Label Expected Value(if the value matches the expected value, then proceed))
  11. __Fleet_Mod_Config = {
  12. --  SYSTEM NAME,           InitialWait,            IntervalWait,        Allow,          CopyAttributeFrom(Optional),        ConditionalQLEnable,        ConditionalQLName,          ConditionalQLExpectedValue
  13. --  {"Dionis",                  110,                  140,              "True",                 "Ahilles"},
  14.     {"Ahilles",                 110,                  140,              "True"},
  15.     {"Altair",                  140,                  130,              "True"},
  16.     {"Altrabon",                130,                  170,              "True"},
  17.     {"Alzed",                   100,                  120,              "False"},
  18.     {"Angarsk",                 120,                  180,              "False"},
  19.     {"Areko",                   130,                  110,              "True"},
  20.     {"Argon",                   140,                  160,              "True"},
  21.     {"Ashelon",                 180,                  150,              "True"},
  22.     {"Aurora",                  100,                  100,              "True"},
  23.     {"Avalon",                  120,                  130,              "True"},
  24.     {"B_leftera1",              150,                  170,              "False"},
  25.     {"B_leftera2",              150,                  170,              "False"},
  26.     {"B_leftera3",              150,                  170,              "False"},
  27.     {"Callipso",                100,                  120,              "True"},
  28.     {"Corrino",                 100,                  110,              "True"},
  29.     {"Dalled",                  100,                  100,              "True"},
  30.     {"Danstag",                 100,                  110,              "True"},
  31.     {"Debris1",                 120,                  130,              "True"},
  32.     {"Debris2",                 140,                  130,              "True"},
  33.     {"Debris3",                 130,                  130,              "True"},
  34.     {"Debris4",                 130,                  130,              "True"},
  35.     {"Debris6",                 100,                  130,              "True"},
  36.     {"Deosis",                  100,                  110,              "True"},
  37.     {"Dionis",                  150,                  160,              "True",                 "",                                 "True",             "Blow",                         "Blowed"},
  38.     {"Dosis",                   120,                  120,              "True"},
  39.     {"Egleon",                  110,                  100,              "True"},
  40.     {"Elinor",                  100,                  100,              "True"},
  41.     {"Elio",                    100,                  130,              "True"},
  42.     {"El_ariash",               100,                  140,              "True"},
  43.     {"Endoria1",                100,                  100,              "True"},
  44.     {"Endoria2",                120,                  100,              "True"},
  45.     {"Ergelan",                 120,                  120,              "True"},
  46.     {"Eridan",                  110,                  120,              "False"},
  47.     {"Escaflon",                110,                  130,              "True"},
  48.     {"Farles",                  100,                  130,              "True"},
  49.     {"Fiasar",                  100,                  140,              "True"},
  50.     {"Fort_russ",               120,                  150,              "True"},
  51.     {"Fronn",                   100,                  160,              "True"},
  52.     {"Gaeon",                   120,                  120,              "False"},
  53.     {"Gaoba",                   110,                  110,              "True"},
  54.     {"Gideon",                  120,                  140,              "False"},
  55.     {"Golkonda",                120,                  120,              "True"},
  56.     {"Gredos",                  100,                  120,              "True"},
  57.     {"Hafa",                    100,                  130,              "False"},
  58.     {"Hanoi",                   100,                  150,              "True"},
  59.     {"Haron",                   100,                  120,              "False"},
  60.     {"Heos",                    150,                  180,              "True"},
  61.     {"Kadenoa",                 130,                  170,              "True"},
  62.     {"Kadi",                    120,                  100,              "True"},
  63.     {"Kassilia",                110,                  120,              "True"},
  64.     {"Kitaro",                  100,                  130,              "True"},
  65.     {"Kondel",                  110,                  120,              "True"},
  66.     {"Kron",                    110,                  180,              "True"},
  67.     {"Kruger",                  100,                  160,              "True"},
  68.     {"Lasad",                   100,                  170,              "True"},
  69.     {"Lidau",                   100,                  170,              "True"},
  70.     {"Llanovar1",               120,                  140,              "True"},
  71.     {"Llanovar2",               120,                  140,              "True"},
  72.     {"Moscowia",                100,                  130,              "True"},
  73.     {"ND",                      100,                  150,              "True"},
  74.     {"NJ1",                     120,                  140,              "True"},
  75.     {"NJ2",                     120,                  140,              "True"},
  76.     {"NJ3",                     120,                  140,              "True"},
  77.     {"NK",                      100,                  140,              "True"},
  78.     {"Pandora",                 150,                  170,              "True"},
  79.     {"Pegas",                   130,                  130,              "True"},
  80.     {"Poseidon",                120,                  180,              "True"},
  81.     {"Prien",                   130,                  140,              "True"},
  82.     {"Proserpina",              100,                  130,              "True"},
  83.     {"Shula",                   120,                  140,              "True"},
  84.     {"Simeiz",                  200,                  240,              "False"},
  85.     {"Solncevka",               120,                  170,              "True"},
  86.     {"Solpuga",                 110,                  150,              "True"},
  87.     {"Sunji",                   130,                  160,              "True"},
  88.     {"Taira",                   140,                  120,              "True"},
  89.     {"Tarrot",                  140,                  110,              "True"},
  90.     {"Torr",                    150,                  125,              "True"},
  91.     {"Ule",                     200,                  110,              "True"},
  92.     {"Valensia",                100,                  120,              "True"},
  93.     {"Vuadil",                  120,                  140,              "True"},
  94.     {"Vulcan",                  120,                  180,              "False"},
  95.     {"x244",                    140,                  200,              "True"},
  96.     {"x297",                    140,                  200,              "True"},
  97.     {"xb13",                    120,                  110,              "True"},
  98.     {"xb15",                    120,                  110,              "True"},
  99.     {"xb17",                    130,                  110,              "True"},
  100.     {"xb19",                    140,                  120,              "True"},
  101.     {"xk10",                    140,                  150,              "True"},
  102.     {"xk16",                    150,                  160,              "True"},
  103.     {"xt05",                    100,                  120,              "True"},
  104.     {"xt11",                    120,                  120,              "True"},
  105.     {"xt17",                    110,                  100,              "True"},
  106.     {"xt20",                    120,                  130,              "True"},
  107.     {"xt23",                    120,                  140,              "True"},
  108.     {"xt24",                    110,                  150,              "True"},
  109.     {"xt26",                    120,                  130,              "True"},
  110.     {"xt27",                    130,                  130,              "True"},
  111.     {"xt39",                    160,                  100,              "True"},
  112.     {"xt41",                    170,                  120,              "True"},
  113.     {"xt45",                    240,                  140,              "True"},
  114.     {"xt52",                    170,                  140,              "True"},
  115.     {"xt54",                    130,                  130,              "False"},
  116.     {"xt81",                    120,                  100,              "True"},
  117.     {"xt86",                    150,                  190,              "True"},
  118.     {"xt93",                    120,                  150,              "True"},
  119.     {"Zebos",                   120,                  200,              "True"},
  120.     {"Earth",                   100,                  100,              "False"},
  121.     {"DisonSphere",             100,                  100,              "False"},
  122.     {"Precursors",              100,                  100,              "False"},
  123.    
  124.     --Custom Systems
  125.     {"Inv_Aliens",              120,                  100,              "True"},
  126.     {"Inv_BER",                 120,                  100,              "True"},
  127.     {"Inv_GREYS",               120,                  100,              "True"},
  128.     {"Inv_HUNTER",              120,                  100,              "True"},
  129.     {"Inv_INOCO",               120,                  100,              "True"},
  130.     {"Inv_NAVY",                120,                  100,              "True"},
  131.     {"Inv_NESF",                120,                  100,              "True"},
  132.     {"Inv_PATROL",              120,                  100,              "True"},
  133.     {"Inv_PIRATES",             120,                  100,              "True"},
  134.     {"Inv_PRECURSORS",          120,                  100,              "True"},
  135.     {"Inv_REBEL",               120,                  100,              "True"},
  136.     {"Inv_TEMPLARS",            120,                  100,              "True"},
  137.     {"Inv_TRADE",               120,                  100,              "True"},
  138.     {"Inv_TRADE_SOS",           120,                  100,              "True"},
  139.     {"Inv_TRIAD",               120,                  100,              "True"},
  140.     {"Inv_UFT",                 120,                  100,              "True"},
  141.     {"Inv_USS",                 120,                  100,              "True"},
  142.     {"SW2_Areko",               120,                  120,              "True"},
  143.     {"SW2_Lasad",               120,                  120,              "True"},
  144.     {"SW2_Tarrot",              120,                  120,              "True"},
  145.     {"SW3EXP_BareX",            110,                  150,              "False"},
  146.     {"SW3EXP_Sternschnuppe",    110,                  140,              "False"},
  147.     {"SW3EXP_TE_HeavensGate",   100,                  100,              "True"},
  148.     {"SW3EXP_TE_XEON",          150,                  150,              "True"},
  149.     {"SW3EXP_TE_Tesla",         180,                  360,              "True"},
  150.     {"SW3EXP_TE_Nanite",        130,                  420,              "True"},
  151.     {"SW3EXP_TE_GodsThrone",    130,                  420,              "True"},
  152.     {"SW3EXP_TE_GodsThrone_Inner",  130,              420,              "False"},
  153.     {"SW3EXP_TRZ_Zero",         100,                  120,              "True"},
  154.     {"SW3EXP_TRZ_Z49511",       80,                   110,              "True"},
  155.     {"SW3EXP_TRZ_Z999",         120,                  90,               "True"},
  156.     {"SW3EXP_TRZ_ZNULL",        80,                   80,               "True"},
  157.     {"SW3EXP_Tunguska",         130,                  140,              "True"},
  158.     {"SW3EXP_xb19_1",           100,                  100,              "False"},
  159.     {"SW3EXP_xt256",            100,                  100,              "False"},
  160.     {"SW3EXP_PREC_Echo",        120,                  140,              "False"},
  161.     {"SW3EXP_UB1",              100,                  100,              "False"},
  162.     {"SW1_level_1_01",          110,                  120,              "False"},
  163.     {"SysM_Kobra",              120,                  140,              "True"},
  164.     {"SW3CINEMA",               120,                  90,               "False"},
  165.     {"SW3CINEMA_GREENSCREEN",   120,                  90,               "False"},
  166.     {"PRESTUS_xt79",             90,                  90,               "True"},
  167.     {"PRESTUS_Tandrum",          70,                  80,               "True"},
  168.    
  169.     --Template
  170.     {"_template_",              100,                  100,              "True"}
  171. };
  172.  
  173.  
  174. -- Config
  175. __FM_EnableDelayedStart = FALSE; --Delays the Initialization of Random Contacts
  176. __FM_SecondsDelay = 10;
  177.  
  178. __FM_EnableModifier = TRUE;     --Enables the wait-time modifier.
  179. __FM_ModifierLowest = -50;
  180. __FM_ModifierHighest = 40;
  181. __FM_Modifier = random(__FM_ModifierLowest, __FM_ModifierHighest);
  182.  
  183. __FM_EnableExtendedLog = TRUE;  --Enables the serialization of the Config into a file.
  184.  
  185. -- Vars
  186. __FM_Temp_IniW = 0;
  187. __FM_Temp_IntW = 0;
  188.  
  189. function StartRandomContactsNEW(System)
  190.     LOG("SW3EXP::ScriptingSystem: New Random Contacts Initializing");
  191.     for Systems, CurSystem in __Fleet_Mod_Config do
  192.         --Player System
  193.         if System == strlower(CurSystem[1]) then
  194.             LOG("SW3EXP::ScriptingSystem: System Found");
  195.            
  196.             --Random Contacts Allowed
  197.             if CurSystem[4] == "True" then
  198.                 LOG("SW3EXP::ScriptingSystem: Random Contacts are Allowed ["..System.."]");
  199.                
  200.                 --CopyAttributeFrom is Enabled
  201.                 if (CurSystem[5]=="") then
  202.                     LOG("SW3EXP::ScriptingSystem: Copying Attributes");
  203.                    
  204.                     for Systems2, CurSystem2 in __Fleet_Mod_Config do
  205.                         if (CurSystem2[1] == CurSystem[5]) then
  206.                        
  207.                             --ConditionalQLEnable is Enabled
  208.                             if (CurSystem[6]=="True") then
  209.                                 LOG("SW3EXP::ScriptingSystem: RC Data Has Condition["..CurSystem[1].."]");
  210.                                 if (MGQL(CurSystem[7])==CurSystem[8]) then --Check of Condition
  211.                                     LOG("SW3EXP::ScriptingSystem: RC Data Conditional Value Matches. at System["..CurSystem[1].."], exected condition was ["..MGQL(CurSystem[7]).."], and the given condition was ["..CurSystem[8].."]");
  212.                                     --Modifier Disabled
  213.                                     if not __FM_EnableModifier == TRUE then
  214.                                    
  215.                                         --Is Not Delayed
  216.                                         if not (__FM_EnableDelayedStart)==TRUE then
  217.                                             StartRandomContacts(tonumber(CurSystem2[2]), tonumber(CurSystem2[3]));
  218.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  219.                                         else -- Is Delayed
  220.                                             __FM_Temp_IniW = tonumber(CurSystem[2]);
  221.                                             __FM_Temp_IntW = tonumber(CurSystem[3]);
  222.                                             Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  223.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  224.                                         end;--Delayment
  225.                                        
  226.                                     else --Modifier Enabled
  227.                                         --Is Not Delayed
  228.                                         if not (__FM_EnableDelayedStart)==TRUE then
  229.                                             StartRandomContacts(tonumber(CurSystem2[2])+__FM_Modifier, tonumber(CurSystem2[3])+__FM_Modifier);
  230.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  231.                                         else -- Is Delayed
  232.                                             __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
  233.                                             __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
  234.                                             Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  235.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  236.                                         end;--Delayment
  237.                                    
  238.                                     end;--Modifier
  239.                                 else
  240.                                     --Condition is Different than Expected.
  241.                                     LOG("SW3EXP::ScriptingSystem: RC Data Conditional Difference detected! at System["..CurSystem[1].."], exected condition was ["..MGQL(CurSystem[7]).."], but the given condition was ["..CurSystem[8].."]");
  242.                                 end;--Check of Condition
  243.                             else--ConditionalQLEnable is Disabled
  244.                                     --Modifier Disabled
  245.                                     if not __FM_EnableModifier == TRUE then
  246.                                    
  247.                                         --Is Not Delayed
  248.                                         if not (__FM_EnableDelayedStart)==TRUE then
  249.                                             StartRandomContacts(tonumber(CurSystem2[2]), tonumber(CurSystem2[3]));
  250.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  251.                                         else -- Is Delayed
  252.                                             __FM_Temp_IniW = tonumber(CurSystem[2]);
  253.                                             __FM_Temp_IntW = tonumber(CurSystem[3]);
  254.                                             Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  255.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  256.                                         end;--Delayment
  257.                                        
  258.                                     else --Modifier Enabled
  259.                                         --Is Not Delayed
  260.                                         if not (__FM_EnableDelayedStart)==TRUE then
  261.                                             StartRandomContacts(tonumber(CurSystem2[2])+__FM_Modifier, tonumber(CurSystem2[3])+__FM_Modifier);
  262.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  263.                                         else -- Is Delayed
  264.                                             __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
  265.                                             __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
  266.                                             Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  267.                                             LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  268.                                         end;--Delayment
  269.                                    
  270.                                     end;--Modifier
  271.                                 LOG("SW3EXP::ScriptingSystem: RC Data has no Condition at System["..CurSystem[1].."]");
  272.                             end;--ConditionalQLEnable is Enabled
  273.                         end;
  274.  
  275.                     end;
  276.                    
  277.                 --CopyAttributeFrom is Disabeld
  278.                 else
  279.                     LOG("SW3EXP::ScriptingSystem: Not Copying Attributes");
  280.                        
  281.                     --ConditionalQLEnable is Enabled
  282.                     if (CurSystem[6]=="True") then
  283.                         LOG("SW3EXP::ScriptingSystem: RC Data Has Condition["..CurSystem[1].."]");
  284.                         if (MGQL(CurSystem[7])==CurSystem[8]) then --Check of Condition
  285.                             LOG("SW3EXP::ScriptingSystem: RC Data Conditional Value Matches. at System["..CurSystem[1].."], expected condition was ["..MGQL(CurSystem[7]).."], and the given condition was ["..CurSystem[8].."]");
  286.                             --Modifier Disabled
  287.                             if not __FM_EnableModifier == TRUE then
  288.                                 --Is Not Delayed
  289.                                 if not (__FM_EnableDelayedStart)==FALSE then
  290.                                     StartRandomContacts(tonumber(CurSystem[2]), tonumber(CurSystem[3]));
  291.                                     LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  292.                                 else -- Is Delayed
  293.                                     __FM_Temp_IniW = tonumber(CurSystem[2]);
  294.                                     __FM_Temp_IntW = tonumber(CurSystem[3]);
  295.                                     Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  296.                                     LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  297.                                 end;--Delayment
  298.                             else--Modifier Enabled
  299.                                 --Is Not Delayed
  300.                                 if not (__FM_EnableDelayedStart)==FALSE then
  301.                                     StartRandomContacts(tonumber(CurSystem[2])+__FM_Modifier, tonumber(CurSystem[3])+__FM_Modifier);
  302.                                     LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  303.                                 else -- Is Delayed
  304.                                     __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
  305.                                     __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
  306.                                     Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  307.                                     LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  308.                                 end;--Delayment
  309.                             end;--Modifier
  310.                         else
  311.                             --Condition is Different than Expected.
  312.                             LOG("SW3EXP::ScriptingSystem: RC Data Conditional Value Mismatch detected! at System["..CurSystem[1].."], expected condition was ["..MGQL(CurSystem[7]).."], but the given condition was ["..CurSystem[8].."]");
  313.                         end;--Check of Condition
  314.                     else--ConditionalQLEnable is Disabled
  315.                         LOG("SW3EXP::ScriptingSystem: RC Data has no Condition at System["..CurSystem[1].."]");
  316.                         --Modifier Disabled
  317.                         if not __FM_EnableModifier == TRUE then
  318.                        
  319.                             --Is Not Delayed
  320.                             if not (__FM_EnableDelayedStart)==TRUE then
  321.                                 StartRandomContacts(tonumber(CurSystem2[2]), tonumber(CurSystem2[3]));
  322.                                 LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  323.                             else -- Is Delayed
  324.                                 __FM_Temp_IniW = tonumber(CurSystem[2]);
  325.                                 __FM_Temp_IntW = tonumber(CurSystem[3]);
  326.                                 Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  327.                                 LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  328.                             end;--Delayment
  329.                            
  330.                         else --Modifier Enabled
  331.                             --Is Not Delayed
  332.                             if not (__FM_EnableDelayedStart)==TRUE then
  333.                                 StartRandomContacts(tonumber(CurSystem2[2])+__FM_Modifier, tonumber(CurSystem2[3])+__FM_Modifier);
  334.                                 LOG("SW3EXP::ScriptingSystem: StartRandomContacts() Executed. "..tonumber(CurSystem2[2]).." "..tonumber(CurSystem2[3]));
  335.                             else -- Is Delayed
  336.                                 __FM_Temp_IniW = tonumber(CurSystem[2])+__FM_Modifier;
  337.                                 __FM_Temp_IntW = tonumber(CurSystem[3])+__FM_Modifier;
  338.                                 Timer_Seq(__FM_SecondsDelay, FM_DelayedStartContacts());
  339.                                 LOG("SW3EXP::ScriptingSystem: StartRandomContacts() with Delay Executed.");
  340.                             end;--Delayment
  341.                        
  342.                         end;--Modifier
  343.                     end;--ConditionalQLEnable is Enabled
  344.                 end;
  345.                    
  346.                 LOG("SW3EXP::ScriptingSystem: Finalized RC Data. Systemname["..CurSystem[1].."], InitialWait["..CurSystem[2].."], IntervalWait["..CurSystem[3].."], Allow["..CurSystem[4].."]");
  347.             end;
  348.            
  349.             if CurSystem[4] == "False" then
  350.                 LOG("SW3EXP::ScriptingSystem: Random Contacts are NOT Allowed ["..System.."]");
  351.             end;
  352.  
  353.         end;
  354.     end;
  355.    
  356.     if (__FM_EnableExtendedLog)==TRUE then
  357.         local game_path = GetUserFolder();
  358.         local input_filename = game_path.."Autogen/_AUTO_FM.lua";
  359.         SaveToFile(input_filename, __Fleet_Mod_Config, "FM_CONFIG");
  360.     end;
  361. end;
  362.  
  363. function FM_DelayedStartContacts()
  364.     LOG("SW3EXP::ScriptingSystem: Executing StartRandomContacts");
  365.     StartRandomContacts(__FM_Temp_IniW, __FM_Temp_IntW);
  366.     LOG("SW3EXP::ScriptingSystem: Executed StartRandomContacts");
  367. end;
  368.  
  369. function FM_AllowRandomContacts(System, Value)
  370. -- Values,
  371. -- True
  372. -- False
  373.     for Systems, CurSystem in __Fleet_Mod_Config do
  374.         if CurSystem[1]==System then
  375.             -- System Found
  376.             CurSystem[4] = Value;
  377.         end;
  378.     end;
  379. end;
  380.  
  381. function FM_SetInitialWait(System, Value)
  382. -- Values,
  383. -- Any Number
  384.     for Systems, CurSystem in __Fleet_Mod_Config do
  385.         if CurSystem[1]==System then
  386.             -- System Found
  387.             CurSystem[2] = Value;
  388.         end;
  389.     end;
  390. end;
  391.  
  392. function FM_SetIntervalWait(System, Value)
  393. -- Values,
  394. -- Any Number
  395.     for Systems, CurSystem in __Fleet_Mod_Config do
  396.         if CurSystem[1]==System then
  397.             -- System Found
  398.             CurSystem[3] = Value;
  399.         end;
  400.     end;
  401. end;
  402.  
  403. function FM_AddSystem(System, InitialWait, IntervalWait, Allow, CopyAttributeFrom)
  404.     tinsert(__Fleet_Mod_Config, System);
  405.     for Systems, CurSystem in __Fleet_Mod_Config do
  406.         CurSystem[2] = InitialWait;
  407.         CurSystem[3] = IntervalWait;
  408.         CurSystem[4] = Allow;
  409.     end;
  410.     if (CopyAttributeFrom) then
  411.         __Fleet_Mod_Config[5] = CopyAttributeFrom;
  412.     end;
  413. end;
  414.  
  415. function FM_RemoveSystem(System)
  416.     local CountNumber = 0;
  417.     for Systems, CurSystem in __Fleet_Mod_Config do
  418.         if CurSystem[1]==System then
  419.             -- System Found
  420.             remove(__Fleet_Mod_Config, CountNumber);
  421.         end;
  422.         CountNumber = CountNumber + 1;
  423.     end;
  424. end;
  425.  
  426. --ToDo: Add Functions:
  427. --                      FM_SetParameter(System, Parameter) Parameters: "-D(Debug), -F(Fast), -V(Default), -X(CopyAttributeIsNotAllowed)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement