summaryrefslogtreecommitdiffstats
path: root/Common/Config/Config_LightFactory.sqf
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:41 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:55:41 +0300
commitdee52083d359434fc3ac51a871c1b836d092d2ac (patch)
tree89bbb6326348a99bcf4a68761bd0c9628b80d4bb /Common/Config/Config_LightFactory.sqf
downloada2wf_lingor-dee52083d359434fc3ac51a871c1b836d092d2ac.tar.gz
a2wf_lingor-dee52083d359434fc3ac51a871c1b836d092d2ac.tar.bz2
a2wf_lingor-dee52083d359434fc3ac51a871c1b836d092d2ac.zip
init
Diffstat (limited to 'Common/Config/Config_LightFactory.sqf')
-rw-r--r--Common/Config/Config_LightFactory.sqf32
1 files changed, 32 insertions, 0 deletions
diff --git a/Common/Config/Config_LightFactory.sqf b/Common/Config/Config_LightFactory.sqf
new file mode 100644
index 0000000..fd1e1db
--- /dev/null
+++ b/Common/Config/Config_LightFactory.sqf
@@ -0,0 +1,32 @@
+Private['_balancePrice','_c','_longestLightBuildTime','_u'];
+
+_balancePrice = 'WFBE_BALANCEPRICE' Call GetNamespace;
+
+/* WEST - Light */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Light_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTLIGHTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['LIGHT','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Light */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Light_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTLIGHTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['LIGHT','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+_longestLightBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestLightBuildTime) then {
+ _longestLightBuildTime = (_c select QUERYUNITTIME);
+ };
+
+ if (_balancePrice in [1,3]) then {
+ _c set [QUERYUNITPRICE, (_c select QUERYUNITPRICE)*2];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_LightFactory: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTLIGHTUNITS' Call GetNamespace) + ('WFBE_WESTLIGHTUNITS' Call GetNamespace));
+
+['WFBE_LONGESTLIGHTBUILDTIME',_longestLightBuildTime,true] Call SetNamespace;
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_LightFactory: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file