From d75512882820c3fd2bf0e71be5bacb86f242c451 Mon Sep 17 00:00:00 2001 From: Maarten Bezemer Date: Mon, 21 Oct 2024 16:36:13 +0200 Subject: [PATCH] Release 2.0.0 / Support Facorio 2.0 --- .luarc.json | 3 +- changelog.txt | 5 ++ control.lua | 10 ++-- graphics/logo-24.png | Bin 0 -> 482 bytes graphics/logo-32.png | Bin 0 -> 634 bytes graphics/logo.png | Bin 1665 -> 0 bytes graphics/pause-camera-24.png | Bin 0 -> 505 bytes graphics/pause-camera-32.png | Bin 0 -> 651 bytes graphics/pause-camera.png | Bin 3091 -> 0 bytes graphics/play-white.png | Bin 435 -> 0 bytes graphics/take-screenshot-24.png | Bin 0 -> 528 bytes graphics/take-screenshot-32.png | Bin 0 -> 630 bytes graphics/take-screenshot.png | Bin 2403 -> 0 bytes info.json | 6 +- migrations/tlbe-0.2.1.lua | 6 +- migrations/tlbe-1.0.0.lua | 6 +- migrations/tlbe.1.1.1.lua | 6 +- migrations/tlbe.1.2.0.lua | 4 +- migrations/tlbe.1.3.1.lua | 4 +- migrations/tlbe.1.4.2.lua | 6 +- migrations/tlbe.1.4.3.lua | 8 +-- migrations/tlbe.1.4.4.lua | 4 +- migrations/tlbe.1.4.5.lua | 4 +- prototypes/shortcuts.lua | 102 ++++---------------------------- prototypes/signal.lua | 58 ++++++++++-------- prototypes/sprites.lua | 55 ----------------- prototypes/styles.lua | 4 +- scripts/camera.lua | 2 +- scripts/config.lua | 4 +- scripts/gui.lua | 82 ++++++++++++------------- scripts/main.lua | 14 ++--- tests/camera.lua | 20 +++---- tests/main.lua | 8 +-- tests/surface.lua | 6 +- tests/tracker-base.lua | 16 ++--- tests/tracker-cityblock.lua | 44 ++++++++------ tests/tracker-player.lua | 6 +- tests/tracker-rocket.lua | 10 ++-- 38 files changed, 196 insertions(+), 307 deletions(-) create mode 100644 graphics/logo-24.png create mode 100644 graphics/logo-32.png delete mode 100644 graphics/logo.png create mode 100644 graphics/pause-camera-24.png create mode 100644 graphics/pause-camera-32.png delete mode 100644 graphics/pause-camera.png delete mode 100755 graphics/play-white.png create mode 100644 graphics/take-screenshot-24.png create mode 100644 graphics/take-screenshot-32.png delete mode 100644 graphics/take-screenshot.png diff --git a/.luarc.json b/.luarc.json index bde783a..ff67fe2 100644 --- a/.luarc.json +++ b/.luarc.json @@ -6,6 +6,7 @@ ], "hint.enable": false, "diagnostics.globals": [ - "os" + "os", + "storage" ] } \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 37a8029..9c27787 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.0 +Date: 21-10-204 + Features: + - Support Factorio 2.0 (I did not check with Space Age playthrough, so there might be bugs!) +--------------------------------------------------------------------------------------------------- Version: 1.5.2 Date: 21-10-204 Minor Features: diff --git a/control.lua b/control.lua index 4db8e0f..4936743 100644 --- a/control.lua +++ b/control.lua @@ -18,14 +18,14 @@ local function init_new_player(index, player) -- initialize player(s) when mod is loaded into existing game player.print("init_new_player") TLBE.Config.reload({ player_index = index }) - TLBE.GUI.initialize(player, global.playerSettings[index]) + TLBE.GUI.initialize(player, storage.playerSettings[index]) player.print({ "mod-loaded" }, { r = 1, g = 0.5, b = 0 }) player.print({ "mod-loaded2" }) end local function on_init() - global.playerSettings = {} + storage.playerSettings = {} for index, player in pairs(game.players) do -- initialize player(s) when mod is loaded into existing game @@ -37,7 +37,7 @@ local function on_init() if baseBBox ~= nil then -- Update base trackers of each player for index, _ in pairs(game.players) do - local baseTracker = global.playerSettings[index].trackers[3] + local baseTracker = storage.playerSettings[index].trackers[3] baseTracker.minPos = baseBBox.minPos baseTracker.maxPos = baseBBox.maxPos TLBE.Tracker.updateCenterAndSize(baseTracker) @@ -57,7 +57,7 @@ local function on_configuration_changed(event) -- Sometimes playerSettings does not seem to be present when upgrading -- from older versions. We can just fix this issue here. for index, player in pairs(game.players) do - if global.playerSettings[index] == nil then + if storage.playerSettings[index] == nil then player.print({ "migration-fix-missing-player-data" }) init_new_player(index, player) end @@ -73,7 +73,7 @@ local function on_player_created(event) local player = game.players[event.player_index] player.print({ "mod-loaded2" }, { r = 1, g = 0.5, b = 0 }) - TLBE.GUI.initialize(player, global.playerSettings[event.player_index]) + TLBE.GUI.initialize(player, storage.playerSettings[event.player_index]) end diff --git a/graphics/logo-24.png b/graphics/logo-24.png new file mode 100644 index 0000000000000000000000000000000000000000..55e15b0c5d8305045e36d24087081fda10bd2322 GIT binary patch literal 482 zcmV<80UiE{P)oh^zgjAA7{3}EuU@ta-G~&OYLTv4{ z2*E}XEMAC`h}a0RF;7^F%!4z$>|S`efq}XC_WNdUcbL1BbJnGeb*hdNZ5E}JW^m&` zdL!rDtCDlhMaMXL$On826IFgg=tG0tLyG+J5b=R8*9s)e;R$Z~|4ueT1mW*Zw3pKFq9uepZPap5z# z6!9e9wBQ%PPxjmNdc=eLM_j`MK95r1UhMSi5Ns>3rBMo8z+wSkz;sEYHj94ad;y=r zZb_h4;0oRw-pU#8aJ8aQJffB8m}f(Tv!cS2|ZFT&>|cNc$0DUk684>8#o zjA!r&do})1M#Ub!M0^>i+K^HlL)(#YRO^r7RY&6RGTGn#EY2RY_%FO2e6>2W&i^X@ Y0chAjf>DMt4gdfE07*qoM6N<$g7US{82|tP literal 0 HcmV?d00001 diff --git a/graphics/logo-32.png b/graphics/logo-32.png new file mode 100644 index 0000000000000000000000000000000000000000..f3d534ae091f91435f73e09e6b9fd145eceb03b6 GIT binary patch literal 634 zcmV-=0)_pFP)}_jxoM3MHpi&>QvMEy;Z+5b zXZ|v1q&aj+>vHWaey8>ZtV`{fJyy~$w|q%!@ipr&T?f+O8@P+t>D{QtCO(hh7W{Y! z;YBV3J28|8lv<wsxo!BY0YpvoP=(hSEfbFojRar!bcKhVi`D0v53^O>jn|F0^9m zIGr$iQ_6cLU^)@+z(NPyH*8PXP9?kPMNh*=DW1}(i0y0*PPUBcXhj8NC){WO?Cuoj zdnurn;^zX`470wM0uH2jzX0}Liu((47utkhurY0}TODu{3A0JA+I8{5-|NjpK7gzE zp6gq{74#>}WC`9%~mSA&uliItm zZ7C$n5zrIs(>P43vX85hi1CU9T+D98V;Y-i;2%v~$CDW2Z1caMDy#h8uyO%^0N#%R UfSzBQWB>pF07*qoM6N<$g2Go7DF6Tf literal 0 HcmV?d00001 diff --git a/graphics/logo.png b/graphics/logo.png deleted file mode 100644 index 3630d67b1a0c85c29ba895fe353ac1a0d10bc9e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1665 zcmV-{27dX8P)+>Cjiq9cwzMk(E&|eGA_yuFs9aQxT17-(3>xEuAwV<{iLq%k z1b8umqCCJGa*Kv~foKTjQf?w7rc31_5`nf9ER>cly?^6FXQw;u?9R+O(@Biqc{n?B z{`<{2|8x7!e+Hae35}>GDavOA@Z2OI>m(|wNotf5`oZRzHb0gY_X7oQm^MF_=6n78 zft*cB!8L|>OhA^@CZ*sH8RX1kn&E0PGYxm@*~x7K;yuPD^_NX4%l}0KXE2pu+>NX3 zP}&TTj~SlSMVNP4o$B+a(bcC{j~EakqDjYqib@9sDHBj^(yQMZ5CzhabPTAXN>oCr z)}Yk1Nm+4-?Un?nsFbHn!B-{?YBnIsEeTLXmF=lagfWbz&=j$NsP-$5MYenvQNkGu zOe=r#yPgE{fRjhfaE&Ah?S`o0F4JjGD`O7Xq|T}-Fa zaAzo|`*rL^nWS7YY``O^B2(wU`?=PO0Jy>NejVynMgl;&OeE16!M>fRjJ;G-Ll+_P zc#`4-p;d^!kFV$W3o)$zkm@ID7k z?mx;})9CFE<+Q|+K7)IE3Re}bj5w~rK0Z)RngrOhSj!X>d=vX=k2~!a8Nz;t5nU^9 zCY42ArpcMdRRsfFc!giB+%4xm7=gVfPk_M@lO4%SY^~LTePt)wgt=;|- zdQNQPDDP8#oJaKX*>rd?3OYnzX=JjT=u^H=bU8;Bc`*^b(Hl6ITc(IRaU^Z@fPxKr z17DFAQ$&Nz(J{N+rl6DYn(v2`C`ax3j*xA4S+q?-RB~hDnzSWE-4<=Tld(4RB}Z$) z51I&)#&+&Xh#J5at@JwETwVvZD0Kjm$xa3)L}ju~(g2im?6&9FE(N=^d@rf>;ffTLjk+@w(F**qaEkV5Y(nd0s;f;*N_Gp*bdv%QDb0XZ-wz<$X z8rY+tNz1crp|g7Z%MEi@gS)l7(LD-swEVg)^tE39a>Ja}piawk-J@W*e)hNS*-m{y zbW@WYt{>97EU}H<6F>qMuihL{kf8-e9sFd8t)M{*jzTU{FhX(wlpDQX@tN5kr2~Ko zq`Mgx6l?jXmiodvEq~rsMM~k>Uj7r?7h3*;yP;7m`u~NU7GlPCx^m#IE!0D#gGq5) zm804;uw4VY$D|iE{9qypF@G^kLp_GLeoWHjHp!7o2{DzT$)d8r{gdJu2IvZKxhdi| zeb-hv;=xJruxOfuJ1tcY8DKJiF3D%Fp|8M0Cu z3}tolj_6{rY_#vynS8pG&*NyA$#g;lxx#Vw(eo|Ht8BIZ*_9*tROK~ghu+L|W;2!h z=%Shm4l12`$x<7OW{UEuu*Px$ecQfbl!A8HDJv|L!+?~EcqgB#sQkzS37?nFPBx#$`lk>(|D2aF&&^Z_OlKK9qBIUx2xk+9V=NB?$ijMAfUB@@NWq00000 LNkvXXu0mjfhtU&a diff --git a/graphics/pause-camera-24.png b/graphics/pause-camera-24.png new file mode 100644 index 0000000000000000000000000000000000000000..cd44db7668dabbe8dbd9b1668af249ea52100dda GIT binary patch literal 505 zcmV{#Pbj2fhouT z0@ax9vnZu>9T&#vXF2EF)!g{wQc7oWF!&ES=cmCR#u8@6ayONZS&nu4uoEA1&g&_q z{TL)=n~vf+c13c7GjY9z<1H`vGW1FD9k1cB(!bNdqlBN>*76oxiHy~_->q!v`cUYD z2A=}W1pVsBRG%KkPVtyB8ygd}4IIFUE|1z#@eT|A95TTz;%%2ft-y9=VA|pvc2qn%x9A-9 zVr7E1f;~82@#qv^DO+(0Uq<-P!Obei!Cx21xF1GyI2o7=?m>_IUQ_%AmvJa?#qYz^ viZrY;tr%c!ivFuJ_^R}CwcWNDYq<6cz>-NPy52uK00000NkvXXu0mjf4k+RO literal 0 HcmV?d00001 diff --git a/graphics/pause-camera-32.png b/graphics/pause-camera-32.png new file mode 100644 index 0000000000000000000000000000000000000000..3a70e458cda352e53b98cf61f341de3628888b70 GIT binary patch literal 651 zcmV;60(AX}P){wVRRxC7; zXv|_lO_Co)n$c*a`E@Ox^VZ|-o!9e@cf6Z9b)MTj=X=ln-sj$X&htnqSxUtnBuo@+ zH^Y`H+APZimI*hOH0lpqMarisVqxZ>SV759?rR^+7XR>OWl+IQ=S(dHEXLMC<&Ft9>&Y`nT+3mvlz!b;K;T^_8$7}qh zC!fZVm@LBqoCzH$5E-mPqLG#co{9;2@wkrv5qbl2y43_ep+la!pEke^1!h(3bIS-^ zkCh!Sfjt)38)agbEk>i!9xQ>aVn!RHLdp`Dj<%x&c6GGBT1jAYv?C?3!_jUj8N1XO zcp3ZJgRc#6U(g-c;gYdSUzchQ*e}n7wf+h0E98QfUc-cs*bozJ#1%XVy^Ox_^~tYo z%LycTO5M}oFK92`HxqL)#b_S)?!)v8@GSHX)m5_k^% lc!pWc9ms#tS$R?G{|#)WJd{m!SY-eJ002ovPDHLkV1jD!CvpG) literal 0 HcmV?d00001 diff --git a/graphics/pause-camera.png b/graphics/pause-camera.png deleted file mode 100644 index 1c594fceca9b477d578e8bbd595590486df528b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3091 zcmZ{mcUTgN*T-?=Krtujb(U!ZQ#03fpykM&RF2#^$`TaZ;y}f2bxmKpX(<9}=xsT! zp zfP{nu=*{RTRA?|V42p=2C|UXaC;%Xt?{onMPaI#yWAd+rs#3YZ4dA2q-oMP|&AwI& z){?4?y2(-W)Ye~@@p>S2>DT2O%cDA%y%kc`t2F>{VEtW+De-c%O8eH2gYhbRW91+(P<}FLQ>MSn>=PrCG3p1lk z5n*Je4XMyYr?7W^wARV*l}{))nMFWwlY8d{$blIez(rX*4Ioxo5C-l91F`ww!^qZF zDpLa}ZXk@+IQIW19gp2}Iq^|l+DbW@4x0){U|O*U@nnKW59sk{WX#n9>Q?HIT7TW? z{_&Ox9xC}FO$v5J0o|TGJh#P5?Ju(H?XI=O)J7-K z??bU_iNt@H2YV*yHbFL`waJ-U;Y43zeA}BkHI*!xJYXEon6d5&+MO!5hYgu_eEah5 zcIMaN#$}YYW&h)us#i45#FO74L#vx}hm96R0TORjw(Ki^e1)CK6Jw^T$B8^ZR_8p!kig@d+6tNV<7)7@Y!Q(;W z4ScRju?PgS6^oFh<3NKe%nz3Jq&D;?gv#O&o2U#AWjw6qxLGQg2W43IHg1KpHAoP8IUB{3l1Sj%=}X48a(y)m|}) zE^S#G%U#@&R_Vx{OHxY(Q`2{Y&s(~>(zlZ%{eNpdOH=nLjZ=J-1tmv$dm`5POi~B# zxV(l?QITE49V7n+iL{!-fzgb%zIkER-uROO(?OQMda}Wx`#Umy27fA?$~Q1w-q@I+ z3xycAoUR8&{IR|648d-#kwUwR-JXJvS?>atzp3DYmVH(EoSWuhw)wP@qPoph^<~BJ zXViQ2=DMg7wsQ=}EMBP}cBI(m1pr5PMi5+}c*X>W9!zAh=i$K}2#7wvD z9!VZFBNH5v?P*yFkHdT(qlyp@)?G?)F)lnG)giG~Tr1s@o_Nx6a_p5k&KSMW9ap#1^#v2K zUaNElI~Aui91W14I^g_6%K0v4>)wo6tG;jF1U$Twg9qk$Pc zK61wTJOWn-5EfgpNIr+=M>7!ZXJnU;-u@=>{CK$Qcf|%{^Bo>7|iKC?8C-2qe{txo1+{7rmS1 z`?@@&GM-^u=c*32*U3!y`>{q@U*CJ!DrllEdwCp2eUJ(Dmsm)My4Aiq)k6PMg|x=9 zTbF(K86^7~kK?wJBf91aPf7k3w^3G^fM8b=l2L(*w<(%6rlTEz(`2UK^=46vc$;;# zeADWB`R3p(6MpsUobN)l)9+=qU0Mw&7b-5++z@{R)4Nh*zt1sZizp?c(sB8-A*B@V zAjS%_Nk}yu<;y3K-5mz{GtQ4`_!-3?*H()Au{f}&{~qjnEqCX7TGMxziozIiwz7OO zZN%lyDOOw@LyuP>c``)Sp(xHk!0b#{B7n?{fcpviy|XcUQ3l!{f>DU0O>!^F$Q=hM z8`T&jUvC+JUN>oAtq^o2I}~ud(-xlbXj<#nd0vI`l5wz8Vw_)Z+QM424VNXaP4y>&1;v zYKOnY9xcBAI=Zn9eJK-a9s58pHG3FbBVP4X@fr2eH8uY&TlWuXd$9!SCLe2w=Dti% zXUjSiyXh$#3X7ghX@-dYIWy7GV06_HlsTxGg^B$N4941}YY{m*fAFK4c2FS`jnh9D zO)NKF{qNsKwX$)(a8V- zvBD0eqfoT?CDwQp>LC5=Y27(q$?Q@k>VQD`^zjLAwt1b$_DK&+p}0`telBwm@tV*VwLwXGu3hz7Q#PQ zo|wl?^B5$a2E6UARdiOGc@74a=KV!2_WE-joQAc1-i6G*6<-pd&VKRxFtIzYu{mzG zbCMNfmXg@fojVE6cTmr%tHz7ZNz{n16rDPe1q+B3e^l@X9DW6MKSc2eG}61=YBl@& z177}(>v7*lg0w6HATpU-)e6c`H-y!0O~J@w#$9DW^St-JB;aplgjjeVBl?k-qN`|R zLin5Gru^$wQ1jDKz%f{#UtgccM;#Xre1X;7Vn`~QDxJU&(~y7X(%*+9aDHfFXar+p zj}@)o0<^Ar#n3YDyQrnST3#E4SIz{fmuYr+mq*weky+|H`|4@Hfp?pCynH3_1|7VT zdnQ+|=pxtGb@Q)3AD7r41j3}uw}-t<7pJw?gev2<@K0o{wt?GUu06feX;f^kaP+Y; z_?I`=s)6Dyy)spYt6LgX3{Oc5H zcOU+ay}4)RI53)hqBLl`cULPMXCq>*0m||yuF-Q>aCB)F#cIrF{rfaV0!JMVZ)neQ zk9OiEFRwoE@JNZXo5{(jE$oDZ#9{omR&NySvvES}*l&L(*@Z2)ul z_{XVboJq3!w|h2E_!n{nD^+#1s&-5x0LPrs!{sqHufetxe($2qltVsa)fonLI>t^eY3;ygEMZ@g^tc0^k--CwV@ONpBE<2UtjQf1IOgKL9^_j#s)nesdCL?S4{d3GcgwAH(iRDZW*! dR;^mK`USNDZRDdo00aO4002ovPDHLkV1kSr$7=up diff --git a/graphics/take-screenshot-24.png b/graphics/take-screenshot-24.png new file mode 100644 index 0000000000000000000000000000000000000000..6f2cbc655d5378dc9f4f62a81131670494d4dab6 GIT binary patch literal 528 zcmV+r0`L8aP)$(HE=?h*()!1pNXEn)nA2Z!K=cEB4;x0_OwM%*{N{?#}G&1>R#7HLjGpZO1Ba;2^GHArqa&??PS3G^M;FL4fsTfV)R$J0_m zg{wUT{;sU#FQJ~+rlli#jRW}9@_pCbmpg^{tx-hmODV1Ia0e%G8MC;gIi5$FLeF<4 z-S62&3D0p6=kY*O$5LE9(%tXVihm~Cc1RUwBVs8c?&V(&`IXz!^!9F%@bwQ-X>$xL So+*?70000JP)sA#mb5EKhZujsE)uvElH5lLkq zR74CG7Cs6S1TBPsnwdEk_YO{Ua?damy@d;QbM|Y^>~+s0U3EeG!JP8H@c}kt8_wXoLjAar$ZZWu;61kBnEYbfUjK$GJ!oiP0@tw#Z@c(@;2@5c z5y%X-6VBr>#=7`6;3S^PujgHn;luz0g7mFAl=zxi`_a%RrtlIUy7(IMPyC2KA1uGn z!%kSHfp>Bd9>=29BAhAm@08@PkT{GI1S0Oqg*Yrf5iek@$i0@xU4a(^5{Ov9Mfqm4 z3#a6F%~W2iW_@QPw%>V!Z literal 0 HcmV?d00001 diff --git a/graphics/take-screenshot.png b/graphics/take-screenshot.png deleted file mode 100644 index c6a7e57ca28837eb4accbcfb64ec112008dff2dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2403 zcmV-p37qzcP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H12=GZn zK~#90?VW#+Rb?5+KhL)O6juW|E_ zu}pK!8EY!i8T&zunptB?kweCmHI_4JhWrqTAOtprUD#c|{qda39w$BLrV}_{(i2e^&Fnnj7r^kC^5t{^@00YqnEDn1 zkJMP-Qb~`+)OQZ>C@> zTm^%J!UzfqBM5jkZw2zC2_FG;=B-E$lW-OB0$L@F z0QLcY%2}m)b1rZ`@CB2Uw=xAeQ}hW63L_{ejG%zR2nr~Spa5txv&ClCmbW7H#?0Ex zY!NUGn3T6ZInV;k0x*2SWR0Yc=BiSiF|&Jtivxdxt@xOEF!2>&B`~fDUuPbcuRggj z48QkLK^km~!u={n7JY((qGMQ47y)>bI2dUu9TZ03MldvQC32wT%sRd>0%tH9L5VjN zMo>^Z4hjk*D4;Nc0(@snSCDeY%)xbwWyJe| z2dQiTC0+z(1OG`OZ$TjQ^T)-<(9EU~y)w5$(z6lyM*+_QZ>~Yi3Q4ymRPlJz2F&5L zE!rkvV?_R;z#oCLYLIa^aBU*(%8`_5!j~s|@I8*@sTY_ZQRbGI{FPD%Fd=LGGe|Qf z?Nc<}lCFvtR}f>k`Nr4%|fL{!>+C@;C^Z^P7OB_%`qI{q%lM817Q-Fyn>X=Sr8UXkxW=b<2Bj{(q8zZO@ctX<0qb``)4&eT>(6Sv-}z=gnjsJ!OUYG$J)MU5I}Mw}aH^ZH*9-nwyl~Vo~$hRfv0;YxP8VmfYLjL{0rDgJ0r;sm6yCprH^!}B;CAcnBSBs?8 zk`Bk@-4nN&)C|FfAvy*_|Q+cR%5^$fHT^%}iBfiGoh-{!QWbOz& zr0wPSa4w3mc%R{G!Dj)V!^7<)CQlB8qV0LQNjXm_~JrTIFhO*5ZyYd(r z;JaG#G=lIjsGZt(0xdPO(sXSjMjm^bzOj5e{-~>kdB9tP<3~vmhOmkJd<=Jnj{BPc ziDC@?j6_lg$pcdMl8=w!uF!Fk`HNxr=n4GZ|C>;c?q=Wv_-fK%q#O7a-Za;na8U82 zL-p{`HmSemQ_YedPgpoD6GF#HjBr0etp8wSktD{z5#SpM%4NYRq2qriD1U^$cSj5X z#wXO{NS=LycZQB1q4p;EVdgFB~|xG+n_>O>p9+6VrFK2T%%?}v_;q){YKBWU7S2h&gCYY5eFeQ1(t z9MGuomX?Q(Zv>vNvfRVC%Q?7H>m_NF$a}`{lYzG}lJ?=QT9uqXUjdd&3a=O3LMY%u zgRzXh8PaX|3Sp(4Rl-}$OX+)juEdv_lcVHw=2@*GJ_n30tMdZjNBA@EdEB>P6)?Um z-xVokccs05rC&SPCTU8jzG0F+BWb;SUE`3X?UL3?T2?0eB1v5-<n@wb(wk$YIuVoC2#djHC1Dft;mXUEikV$As~B<;;W_H6Lw$kj1|>SYAN zCp)eMhV&zE8t!?Ng-l7>BI(Jb_pfY>K$3PzS|w>@Kk`nK^ga1*rYu<0jIUk|1ZT-p zaNmHHX7&*9TYUW7fzPc^!#B4qAlqP5Cs28_OuZNnd=>93{s#C1zTtF#aIF=;_r=8T za7w~}^f8ams9vu`60J1QG!x_}k$Ta$kMY~Hzkmj-QOct8tOqv}; zmEP6d2s~H%@s|Ye4vuQCwQ^ zb&Hp%Ex^V=q6d64Y1|O%ATTd(xPs4pcUCAr(9=5k@URk>RT!?#lJD+qRCY-k@qgAQ VLbuLU&!YeU002ovPDHLkV1jTljHv(s diff --git a/info.json b/info.json index a452415..0bb7aa7 100644 --- a/info.json +++ b/info.json @@ -1,14 +1,14 @@ { "name": "TLBE", - "version": "1.5.2", + "version": "2.0.0", "title": "Time Lapse Base Edition", "author": "veger", "contact": "", "homepage": "", "license": "MIT https://opensource.org/licenses/MIT", - "factorio_version": "1.1", + "factorio_version": "2.0", "dependencies": [ - "base >= 1.0.0", + "base >= 2.0.0", "? StatsGui >= 1.1.0" ], "description": "Takes screenshots of your base at specified intervals." diff --git a/migrations/tlbe-0.2.1.lua b/migrations/tlbe-0.2.1.lua index c3c7b1b..a9e243a 100644 --- a/migrations/tlbe-0.2.1.lua +++ b/migrations/tlbe-0.2.1.lua @@ -4,12 +4,12 @@ local Tracker = require("scripts.tracker") local ticks_per_second = 60 -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end for player_index, player in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil or playerSettings.cameras == nil then goto NextPlayer end @@ -68,7 +68,7 @@ for player_index, player in pairs(game.players) do playerSettings.trackers = { table.unpack(mainCamera.trackers) } -- Remove obsolete entries - global.rocketLaunching = nil + storage.rocketLaunching = nil playerSettings.enabled = nil playerSettings.noticesEnabled = nil playerSettings.followPlayer = nil diff --git a/migrations/tlbe-1.0.0.lua b/migrations/tlbe-1.0.0.lua index 2cc8d48..00f0e44 100644 --- a/migrations/tlbe-1.0.0.lua +++ b/migrations/tlbe-1.0.0.lua @@ -1,16 +1,16 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end for player_index, _ in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end for _, tracker in pairs(playerSettings.trackers) do if tracker.type == "player" then - tracker.size = {x = 1, y = 1} + tracker.size = { x = 1, y = 1 } tracker.smooth = false else tracker.smooth = true diff --git a/migrations/tlbe.1.1.1.lua b/migrations/tlbe.1.1.1.lua index 5f3aad3..2502d5a 100644 --- a/migrations/tlbe.1.1.1.lua +++ b/migrations/tlbe.1.1.1.lua @@ -1,12 +1,12 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end -- Set to old default value for smooth experience for player_index, player in pairs(game.players) do local guiSettings = settings.get_player_settings(player) - local playerSettings = global.playerSettings[player_index] - guiSettings["tlbe-sequential-names"] = {value = false} + local playerSettings = storage.playerSettings[player_index] + guiSettings["tlbe-sequential-names"] = { value = false } if playerSettings ~= nil then playerSettings.screenshotNumber = game.tick + 1 diff --git a/migrations/tlbe.1.2.0.lua b/migrations/tlbe.1.2.0.lua index fc2b60c..aac11bb 100644 --- a/migrations/tlbe.1.2.0.lua +++ b/migrations/tlbe.1.2.0.lua @@ -1,10 +1,10 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end -- Set new camera setting to its previous (default) value for player_index, _ in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end diff --git a/migrations/tlbe.1.3.1.lua b/migrations/tlbe.1.3.1.lua index 548c5ff..c3ecdd1 100644 --- a/migrations/tlbe.1.3.1.lua +++ b/migrations/tlbe.1.3.1.lua @@ -1,10 +1,10 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end -- Set camera and tracker surfaces to the default surface for player_index, _ in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end diff --git a/migrations/tlbe.1.4.2.lua b/migrations/tlbe.1.4.2.lua index 3e8c2f2..12ca7d0 100644 --- a/migrations/tlbe.1.4.2.lua +++ b/migrations/tlbe.1.4.2.lua @@ -1,4 +1,4 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end @@ -7,13 +7,13 @@ local Tracker = require("scripts.tracker") -- Update camera with current active tracker to prevent possible (zooming) issues for player_index, _ in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end for _, camera in pairs(playerSettings.cameras) do - local _, activeTracker = Tracker.findActiveTracker(camera.trackers, camera.surfaceName) + local _, activeTracker = Tracker.findActiveTracker(camera.trackers, camera.surfaceName) Camera.SetActiveTracker(camera, activeTracker) end diff --git a/migrations/tlbe.1.4.3.lua b/migrations/tlbe.1.4.3.lua index a2bac5c..edc8726 100644 --- a/migrations/tlbe.1.4.3.lua +++ b/migrations/tlbe.1.4.3.lua @@ -1,4 +1,4 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end @@ -7,14 +7,14 @@ local Camera = require("scripts.camera") -- Update camera save folder and name -- Move sequential screenshot number to camera(s) for player_index, _ in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end for _, camera in pairs(playerSettings.cameras) do - Camera.setName(camera, camera.name) - camera.screenshotNumber = playerSettings.screenshotNumber + Camera.setName(camera, camera.name) + camera.screenshotNumber = playerSettings.screenshotNumber end playerSettings.screenshotNumber = nil diff --git a/migrations/tlbe.1.4.4.lua b/migrations/tlbe.1.4.4.lua index 89415ae..baa51e7 100644 --- a/migrations/tlbe.1.4.4.lua +++ b/migrations/tlbe.1.4.4.lua @@ -1,11 +1,11 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end -- Set camera alwaysDay to true for backwards compatibility -- Make tracker untilBuild available for all trackers for player_index, _ in pairs(game.players) do - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end diff --git a/migrations/tlbe.1.4.5.lua b/migrations/tlbe.1.4.5.lua index 57b1e03..0e41c7f 100644 --- a/migrations/tlbe.1.4.5.lua +++ b/migrations/tlbe.1.4.5.lua @@ -1,4 +1,4 @@ -if global.playerSettings == nil then +if storage.playerSettings == nil then goto SkipMigration end @@ -8,7 +8,7 @@ local GUI = require("scripts.gui") -- Convert to new Camera transitionData for player_index, player in pairs(game.players) do ---@type playerSettings - local playerSettings = global.playerSettings[player_index] + local playerSettings = storage.playerSettings[player_index] if playerSettings == nil then goto NextPlayer end diff --git a/prototypes/shortcuts.lua b/prototypes/shortcuts.lua index 24255a4..7534ce1 100644 --- a/prototypes/shortcuts.lua +++ b/prototypes/shortcuts.lua @@ -26,36 +26,10 @@ data:extend( action = "lua", localised_name = { "shortcut.tlbe" }, associated_control_input = "tlbe-main-window-toggle", - icon = { - -- tlbe-logo - filename = "__TLBE__/graphics/logo.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 0, 0 }, - scale = 1, - flags = { "icon" } - }, - small_icon = { - -- tlbe-logo - filename = "__TLBE__/graphics/logo.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 0, 0 }, - scale = 1, - flags = { "icon" } - }, - disabled_small_icon = { - -- tlbe-logo-white - filename = "__TLBE__/graphics/logo.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 65, 0 }, - scale = 1, - flags = { "icon" } - } + icon = "__TLBE__/graphics/logo-32.png", + icon_size = 32, + small_icon = "__TLBE__/graphics/logo-24.png", + small_icon_size = 24 }, { type = "shortcut", @@ -65,36 +39,10 @@ data:extend( action = "lua", localised_name = { "shortcut.tlbe-pause" }, associated_control_input = "tlbe-pause-cameras", - icon = { - -- tlbe-pause-camera - filename = "__TLBE__/graphics/pause-camera.png", - priority = "extra-high-no-scale", - width = 64, - height = 64, - position = { 0, 0 }, - scale = 1, - flags = { "icon" } - }, - small_icon = { - -- tlbe-pause-camera - filename = "__TLBE__/graphics/pause-camera.png", - priority = "extra-high-no-scale", - width = 64, - height = 64, - position = { 0, 0 }, - scale = 1, - flags = { "icon" } - }, - disabled_small_icon = { - -- tlbe-pause-camera-white - filename = "__TLBE__/graphics/pause-camera.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 65, 0 }, - scale = 1, - flags = { "icon" } - } + icon = "__TLBE__/graphics/pause-camera-32.png", + icon_size = 32, + small_icon = "__TLBE__/graphics/pause-camera-24.png", + small_icon_size = 24 }, { type = "shortcut", @@ -104,36 +52,10 @@ data:extend( action = "lua", localised_name = { "shortcut.tlbe-screenshot" }, associated_control_input = "tlbe-take-screenshot", - icon = { - -- tlbe-take-screenshot - filename = "__TLBE__/graphics/take-screenshot.png", - priority = "extra-high-no-scale", - width = 64, - height = 64, - position = { 0, 0 }, - scale = 1, - flags = { "icon" } - }, - small_icon = { - -- tlbe-take-screenshot - filename = "__TLBE__/graphics/take-screenshot.png", - priority = "extra-high-no-scale", - width = 64, - height = 64, - position = { 0, 0 }, - scale = 1, - flags = { "icon" } - }, - disabled_small_icon = { - -- tlbe-take-screenshot-white - filename = "__TLBE__/graphics/take-screenshot.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 65, 0 }, - scale = 1, - flags = { "icon" } - } + icon = "__TLBE__/graphics/take-screenshot-32.png", + icon_size = 32, + small_icon = "__TLBE__/graphics/take-screenshot-24.png", + small_icon_size = 24, } } ) diff --git a/prototypes/signal.lua b/prototypes/signal.lua index 3a7170b..6fc6503 100644 --- a/prototypes/signal.lua +++ b/prototypes/signal.lua @@ -14,13 +14,14 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-north-west.png", + icon_size = 32, tint = capture_tint } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "a" + order = "a", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -28,13 +29,14 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-south-west.png", + icon_size = 32, tint = capture_tint, } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "b" + order = "b", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -42,14 +44,15 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-south-east.png", + icon_size = 32, tint = capture_tint } }, - icon_size = 32, + scale = 0.5, tint = { 0, 1, 0 }, - icon_mipmaps = 1, subgroup = "tlbe-virtual-signal", - order = "c" + order = "c", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -57,13 +60,14 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-north-east.png", + icon_size = 32, tint = capture_tint, } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "d" + order = "d", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -71,13 +75,14 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-north-west.png", + icon_size = 32, tint = target_tint } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "e" + order = "e", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -85,13 +90,14 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-south-west.png", - tint = target_tint, + icon_size = 32, + tint = target_tint } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "f" + order = "f", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -99,13 +105,14 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-south-east.png", + icon_size = 32, tint = target_tint } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "g" + order = "g", + hidden_in_factoriopedia = true }, { type = "virtual-signal", @@ -113,12 +120,13 @@ data:extend({ icons = { { icon = "__TLBE__/graphics/box-north-east.png", + icon_size = 32, tint = target_tint, } }, - icon_size = 32, - icon_mipmaps = 1, + scale = 0.5, subgroup = "tlbe-virtual-signal", - order = "h" + order = "h", + hidden_in_factoriopedia = true } }) diff --git a/prototypes/sprites.lua b/prototypes/sprites.lua index bac7b24..fa8a296 100644 --- a/prototypes/sprites.lua +++ b/prototypes/sprites.lua @@ -1,60 +1,5 @@ data:extend( { - { - type = "sprite", - name = "tlbe-logo", - filename = "__TLBE__/graphics/logo.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 0, 0 }, - scale = 0.5, - flags = { "gui-icon" } - }, - { - type = "sprite", - name = "tlbe-logo-white", - filename = "__TLBE__/graphics/logo.png", - priority = "extra-high-no-scale", - width = 64, - height = 50, - position = { 65, 0 }, - scale = 0.5, - flags = { "gui-icon" } - }, - { - type = "sprite", - name = "tlbe-pause-camera", - filename = "__TLBE__/graphics/pause-camera.png", - priority = "extra-high-no-scale", - width = 64, - height = 64, - position = { 0, 0 }, - scale = 0.5, - flags = { "gui-icon" } - }, - { - type = "sprite", - name = "tlbe-take-screenshot", - filename = "__TLBE__/graphics/take-screenshot.png", - priority = "extra-high-no-scale", - width = 64, - height = 64, - position = { 0, 0 }, - scale = 0.5, - flags = { "gui-icon" } - }, - { - type = "sprite", - name = "play-white", - filename = "__TLBE__/graphics/play-white.png", - priority = "medium", - width = 32, - height = 32, - mipmap_count = 2, - scale = 0.5, - flags = { "gui-icon" } - }, { type = "sprite", name = "pause-white", diff --git a/prototypes/styles.lua b/prototypes/styles.lua index 3dbbd5d..954f1b1 100644 --- a/prototypes/styles.lua +++ b/prototypes/styles.lua @@ -48,7 +48,7 @@ default_gui["tlbe_fancy_list_box"] = { default_gui["tlbe_fancy_list_box_item"] = { type = "frame_style", - parent = "dark_frame", + parent = "shallow_frame", padding = 0, width = fancy_list_box_width } @@ -153,7 +153,7 @@ default_gui["tlbe_tracker_list"] = { right_margin = camera_flow_left_side_margin } -default_gui["tble_tracker_add_dropdown"] = { +default_gui["tlbe_tracker_add_dropdown"] = { type = "dropdown_style", width = fancy_list_box_width, right_margin = camera_flow_left_side_margin diff --git a/scripts/camera.lua b/scripts/camera.lua index f759acb..a941e6b 100644 --- a/scripts/camera.lua +++ b/scripts/camera.lua @@ -475,7 +475,7 @@ end --- @param player LuaPlayer function Camera.recordingSensor(player) - local playerSettings = global.playerSettings[player.index] + local playerSettings = storage.playerSettings[player.index] if not playerSettings.showCameraStatus then return nil diff --git a/scripts/config.lua b/scripts/config.lua index 21b84b1..4b1053a 100644 --- a/scripts/config.lua +++ b/scripts/config.lua @@ -31,10 +31,10 @@ function Config.reload(event) local player = game.players[event.player_index] local guiSettings = settings.get_player_settings(player) - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] if playerSettings == nil then playerSettings = Config.newPlayerSettings(player) - global.playerSettings[event.player_index] = playerSettings + storage.playerSettings[event.player_index] = playerSettings end ---@diagnostic disable: assign-type-mismatch diff --git a/scripts/gui.lua b/scripts/gui.lua index c9d224b..c99ef28 100644 --- a/scripts/gui.lua +++ b/scripts/gui.lua @@ -47,7 +47,7 @@ function GUI.tick() -- TODO performance: Use some kind of event system to update the GUI for for _, player in pairs(game.players) do - local playerSettings = global.playerSettings[player.index] + local playerSettings = storage.playerSettings[player.index] if playerSettings.gui ~= nil then if playerSettings.gui.cameraInfo.valid then local camera = playerSettings.cameras[playerSettings.guiPersist.selectedCamera] @@ -97,7 +97,7 @@ end function GUI.onClick(event) local player = game.players[event.player_index] ---@type playerSettings - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] if event.element.name == "tlbe-main-window-close" then GUI.closeMainWindow(event) @@ -416,7 +416,7 @@ end --- @param event EventData.on_gui_selection_state_changed function GUI.onSelected(event) local player = game.players[event.player_index] - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] if event.element.name == "tlbe-cameras-list" then GUI.setSelectedCamera(player, playerSettings, event.element.selected_index) @@ -514,7 +514,7 @@ end function GUI.onTextChanged(event) ---@type playerSettings - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] local selectedTracker = playerSettings.trackers[playerSettings.guiPersist.selectedTracker] if event.element.name == "camera-name" then @@ -666,7 +666,7 @@ function GUI.onTextChanged(event) end function GUI.onGuiConfirmed(event) - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] if event.element.name == "tlbe-tracker-cityblock-blockScale-value" and event.element.text ~= nil then local selectedTracker = playerSettings.trackers[playerSettings.guiPersist.selectedTracker] local value = tonumber(event.element.text) @@ -682,7 +682,7 @@ end function GUI.onStateChanged(event) ---@type playerSettings - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] if event.element.name == "camera-entity-info" then playerSettings.cameras[playerSettings.guiPersist.selectedCamera].entityInfo = event.element.state elseif event.element.name == "camera-show-gui" then @@ -713,7 +713,7 @@ function GUI.takeScreenshot(event) local active = player.is_shortcut_available("tlbe-screenshot-shortcut") if active then ---@type playerSettings - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] local camera = playerSettings.cameras[playerSettings.guiPersist.selectedCamera] local _, activeTracker = Tracker.findActiveTracker(camera.trackers, camera.surfaceName) @@ -724,7 +724,7 @@ end function GUI.onSurfacesUpdated() -- Surface list got updated so refresh GUI for _, player in pairs(game.players) do - local playerSettings = global.playerSettings[player.index] + local playerSettings = storage.playerSettings[player.index] if playerSettings.gui ~= nil then GUI.updateCameraConfig( playerSettings.useInterval, @@ -747,7 +747,7 @@ function GUI.onSurfaceChanged(event) end for _, player in pairs(game.players) do - local playerSettings = global.playerSettings[player.index] + local playerSettings = storage.playerSettings[player.index] for _, camera in pairs(playerSettings.cameras) do if camera.surfaceName == surfaceName then @@ -777,7 +777,7 @@ end function GUI.togglePauseCameras(event) local player = game.players[event.player_index] - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] playerSettings.pauseCameras = playerSettings.pauseCameras ~= true player.set_shortcut_toggled("tlbe-pause-shortcut", playerSettings.pauseCameras) @@ -793,7 +793,7 @@ end function GUI.toggleMainWindow(event) local player = game.players[event.player_index] ---@type playerSettings - local playerSettings = global.playerSettings[event.player_index] + local playerSettings = storage.playerSettings[event.player_index] local mainWindowOpen = player.gui.screen["tlbe-main-window"] ~= nil player.set_shortcut_toggled("tlbe-shortcut", not mainWindowOpen) @@ -835,7 +835,7 @@ function GUI.toggleMainWindow(event) title_bar.add { type = "sprite-button", style = "frame_action_button", - sprite = "utility/close_white", + sprite = "utility/close", name = "tlbe-main-window-close" } @@ -889,13 +889,13 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca -- Camera info playerGUI.cameraInfo = cameraBox.add { type = "table", column_count = 2 } - playerGUI.cameraInfo.add { type = "label", caption = { "gui.label-name" }, style = "description_property_name_label" } + playerGUI.cameraInfo.add { type = "label", caption = { "gui.label-name" }, style = "bold_label" } playerGUI.cameraInfo.add { type = "textfield", name = "camera-name", style = "tlbe_config_textfield" } playerGUI.cameraInfo.add { type = "label", name = "camera-surface-label", caption = { "gui.label-surface" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { type = "drop-down", @@ -906,7 +906,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca playerGUI.cameraInfo.add { type = "label", caption = { "gui.label-resolution" }, - style = "description_property_name_label" + style = "bold_label" } local resolutionFlow = playerGUI.cameraInfo.add { type = "flow", name = "camera-resolution" } resolutionFlow.add { @@ -926,7 +926,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca type = "label", caption = { "gui.label-framerate" }, tooltip = { "tooltip.camera-framerate" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { type = "textfield", @@ -940,7 +940,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca type = "label", caption = { "gui.label-interval" }, tooltip = { "tooltip.camera-interval" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { @@ -956,7 +956,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca type = "label", caption = { "gui.label-speedgain" }, tooltip = { "tooltip.camera-speedgain" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { @@ -972,7 +972,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca type = "label", caption = { "gui.label-transitionperiod" }, tooltip = { "tooltip.camera-transitionperiod" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { type = "textfield", @@ -987,7 +987,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca type = "label", caption = { "gui.label-transition-interval" }, tooltip = { "tooltip.camera-transition-interval" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { type = "textfield", @@ -1002,7 +1002,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca type = "label", caption = { "gui.label-transition-speedgain" }, tooltip = { "tooltip.camera-transition-speedgain" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { type = "textfield", @@ -1040,10 +1040,10 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca playerGUI.cameraInfo.add { type = "label", caption = { "gui.label-position" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraInfo.add { type = "label", name = "camera-position" } - playerGUI.cameraInfo.add { type = "label", caption = { "gui.label-zoom" }, style = "description_property_name_label" } + playerGUI.cameraInfo.add { type = "label", caption = { "gui.label-zoom" }, style = "bold_label" } playerGUI.cameraInfo.add { type = "label", name = "camera-zoom" } GUI.updateCameraConfig(useInterval, playerGUI.cameraInfo, cameras[guiPersist.selectedCamera]) @@ -1051,7 +1051,7 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca -- Trackers flow.add { type = "line" } - flow.add { type = "label", caption = { "gui.label-camera-trackers" }, style = "description_property_name_label" } + flow.add { type = "label", caption = { "gui.label-camera-trackers" }, style = "bold_label" } local trackerBox = flow.add { type = "flow" } playerGUI.cameraTrackerListFlow = trackerBox.add { type = "flow", direction = "vertical", style = "tlbe_fancy_list_parent" } @@ -1078,19 +1078,19 @@ function GUI.createCameraSettings(parent, playerGUI, guiPersist, useInterval, ca playerGUI.cameraTrackerInfo.add { type = "label", caption = { "gui.label-type" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraTrackerInfo.add { type = "label", name = "tracker-type" } playerGUI.cameraTrackerInfo.add { type = "label", caption = { "gui.label-center" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraTrackerInfo.add { type = "label", name = "tracker-position" } playerGUI.cameraTrackerInfo.add { type = "label", caption = { "gui.label-size" }, - style = "description_property_name_label" + style = "bold_label" } playerGUI.cameraTrackerInfo.add { type = "label", name = "tracker-size" } GUI.updateTrackerInfo( @@ -1111,7 +1111,7 @@ function GUI.createTrackerSettings(parent, playerGUI, guiPersist, cameras, track selected_index = 1, name = "tlbe-tracker-add", items = { { "gui.item-new-tracker" }, table.unpack(GUI.allTrackersLabels) }, - style = "tble_tracker_add_dropdown" + style = "tlbe_tracker_add_dropdown" } -- Trackers @@ -1326,7 +1326,7 @@ function GUI.createCameraAddTracker(parent, allTrackers, camera) selected_index = 1, name = "tlbe-camera-add-tracker", items = { { "gui.item-add-tracker" }, table.unpack(availableTrackerNames) }, - style = "tble_tracker_add_dropdown" + style = "tlbe_tracker_add_dropdown" } end end @@ -1453,13 +1453,13 @@ end function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) trackerInfo.clear() - trackerInfo.add { type = "label", caption = { "gui.label-name" }, style = "description_property_name_label" } + trackerInfo.add { type = "label", caption = { "gui.label-name" }, style = "bold_label" } trackerInfo.add { type = "textfield", name = "tracker-name", style = "tlbe_config_textfield" } trackerInfo.add { type = "label", name = "tracker-surface-label", caption = { "gui.label-surface" }, - style = "description_property_name_label" + style = "bold_label" } trackerInfo.add { type = "drop-down", @@ -1481,7 +1481,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) trackerInfo.add { type = "label", caption = { "gui.label-top-right" }, - style = "description_property_name_label" + style = "bold_label" } local trFlow = trackerInfo.add { type = "flow", name = "tracker-tr" } trFlow.add { @@ -1515,7 +1515,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) } trackerInfo.add { type = "label", caption = { "gui.label-bottom-left" }, - style = "description_property_name_label" } + style = "bold_label" } local blFlow = trackerInfo.add { type = "flow", name = "tracker-bl" } blFlow.add { type = "textfield", @@ -1560,7 +1560,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) type = "label", caption = { "gui.label-cityblock-size" }, tooltip = { "tooltip.tracker-cityblock-size" }, - style = "description_property_name_label" + style = "bold_label" } local sizeFlow = trackerInfo.add { type = "flow", name = "cityblock-size" } sizeFlow.add { @@ -1585,7 +1585,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) type = "label", caption = { "gui.label-cityblock-offset" }, tooltip = { "tooltip.tracker-cityblock-offset" }, - style = "description_property_name_label" + style = "bold_label" } local offsetFlow = trackerInfo.add { type = "flow", name = "cityblock-offset" } offsetFlow.add { @@ -1610,7 +1610,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) type = "label", caption = { "gui.label-cityblock-currentblock" }, tooltip = { "tooltip.tracker-cityblock-currentblock" }, - style = "description_property_name_label" + style = "bold_label" } local blockFlow = trackerInfo.add { type = "flow", name = "cityblock-block" } blockFlow.add { @@ -1635,7 +1635,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) type = "label", caption = { "gui.label-cityblock-blockScale" }, tooltip = { "tooltip.tracker-cityblock-blockScale" }, - style = "description_property_name_label" + style = "bold_label" } trackerInfo.add { type = "textfield", @@ -1650,7 +1650,7 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) trackerInfo.add { type = "label", caption = { "gui.label-cityblock-centerOnPlayer" }, - style = "description_property_name_label" + style = "bold_label" } trackerInfo.add { type = "sprite-button", @@ -1665,16 +1665,16 @@ function GUI.createTrackerConfigAndInfo(trackerInfo, tracker) trackerInfo.add { type = "label", caption = { "gui.label-type" }, - style = "description_property_name_label" + style = "bold_label" } trackerInfo.add { type = "label", name = "tracker-type" } trackerInfo.add { type = "label", caption = { "gui.label-center" }, - style = "description_property_name_label" + style = "bold_label" } trackerInfo.add { type = "label", name = "tracker-position" } - trackerInfo.add { type = "label", caption = { "gui.label-size" }, style = "description_property_name_label" } + trackerInfo.add { type = "label", caption = { "gui.label-size" }, style = "bold_label" } trackerInfo.add { type = "label", name = "tracker-size" } GUI.updateTrackerConfig(trackerInfo, tracker) GUI.updateTrackerInfo(trackerInfo, tracker) diff --git a/scripts/main.lua b/scripts/main.lua index edb4a11..b67d09c 100644 --- a/scripts/main.lua +++ b/scripts/main.lua @@ -6,7 +6,7 @@ local Utils = require("scripts.utils") function Main.tick() for _, player in pairs(game.players) do - local playerSettings = global.playerSettings[player.index] + local playerSettings = storage.playerSettings[player.index] if playerSettings.pauseCameras == true then -- Skip this player as the pause-cameras toggle is enabled @@ -56,9 +56,9 @@ function Main.tick() end function Main.entity_built(event) - local newEntityBBox = Utils.entityBBox(event.created_entity) + local newEntityBBox = Utils.entityBBox(event.entity) - for _, playerSettings in pairs(global.playerSettings) do + for _, playerSettings in pairs(storage.playerSettings) do for _, tracker in pairs(playerSettings.trackers) do if not tracker.enabled then goto nextTracker @@ -67,7 +67,7 @@ function Main.entity_built(event) if tracker.untilBuild then Tracker.moveToNextTracker(tracker) elseif tracker.type == "base" then - if tracker.surfaceName ~= event.created_entity.surface.name then + if tracker.surfaceName ~= event.entity.surface.name then goto nextTracker end @@ -100,7 +100,7 @@ function Main.entity_built(event) end function Main.rocket_launch(event) - for _, playerSettings in pairs(global.playerSettings) do + for _, playerSettings in pairs(storage.playerSettings) do for _, tracker in pairs(playerSettings.trackers) do if tracker.type ~= "rocket" or tracker.surfaceName ~= event.rocket_silo.surface.name then goto nextTracker @@ -120,9 +120,9 @@ function Main.rocket_launch(event) end function Main.rocket_launched(event) - for _, playerSettings in pairs(global.playerSettings) do + for _, playerSettings in pairs(storage.playerSettings) do for _, tracker in pairs(playerSettings.trackers) do - if tracker.type ~= "rocket" or tracker.surfaceName ~= event.rocket_silo.surface.name then + if tracker.type ~= "rocket" or event.rocket_silo == nil or tracker.surfaceName ~= event.rocket_silo.surface.name then goto nextTracker end diff --git a/tests/camera.lua b/tests/camera.lua index 8c8c5b8..2f80ec5 100644 --- a/tests/camera.lua +++ b/tests/camera.lua @@ -56,8 +56,8 @@ local function nextTick() end function TestCamera:SetUp() - -- mock Factorio provided globals - global = {} + -- mock Factorio provided storage + storage = {} game = { tick = 0, surfaces = { { name = "nauvis" } }, @@ -66,7 +66,7 @@ function TestCamera:SetUp() } -- mock TLBE tables - global.playerSettings = { + storage.playerSettings = { TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }), TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }) } @@ -77,12 +77,12 @@ function TestCamera:SetUp() } -- Enable player1 camera - global.playerSettings[1].cameras[1].enabled = true + storage.playerSettings[1].cameras[1].enabled = true -- Make cameras easier to test - self.testCameraPlayer1 = global.playerSettings[1].cameras[1] - self.testCameraPlayer2 = global.playerSettings[2].cameras[1] - for _, playerSettings in pairs(global.playerSettings) do + self.testCameraPlayer1 = storage.playerSettings[1].cameras[1] + self.testCameraPlayer2 = storage.playerSettings[2].cameras[1] + for _, playerSettings in pairs(storage.playerSettings) do for _, camera in pairs(playerSettings.cameras) do for k, v in pairs( { @@ -113,7 +113,7 @@ function TestCamera:TestTransitionFromPlayerToBaseTracker() game.players[1].position = { x = 2, y = 2 } TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = 1, y = 3 }, @@ -141,7 +141,7 @@ function TestCamera:TestRocketLaunch1() -- Initialize base tracker TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = -1, y = -1 }, @@ -179,7 +179,7 @@ function TestCamera:TestResolutionChange() TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = -20, y = -20 }, diff --git a/tests/main.lua b/tests/main.lua index 31ce91f..371a774 100644 --- a/tests/main.lua +++ b/tests/main.lua @@ -127,20 +127,20 @@ function TestTick:Setup() self.screenshotTaken = true end } - global = { + storage = { playerSettings = { Config.newPlayerSettings(game.players[1]) } } self.areaTracker = Tracker.newTracker "area" - self.camera = global.playerSettings[1].cameras[1] + self.camera = storage.playerSettings[1].cameras[1] self.camera.enabled = true self.camera.screenshotInterval = 1 -- take screenshot every tick self.camera.screenshotIntervalTransition = 1 -- take screenshot every tick - global.playerSettings[1].trackers = { self.areaTracker } + storage.playerSettings[1].trackers = { self.areaTracker } self.camera.trackers = { self.areaTracker } - global.playerSettings[1].sequentialNames = true + storage.playerSettings[1].sequentialNames = true Camera.SetActiveTracker(self.camera, self.areaTracker) end diff --git a/tests/surface.lua b/tests/surface.lua index 59977b1..fb77a15 100644 --- a/tests/surface.lua +++ b/tests/surface.lua @@ -10,7 +10,7 @@ TestSurfaceEvents = {} function TestSurfaceEvents:SetUp() -- mock Factorio provided globals - global = {} + storage = {} -- luacheck: globals game game = { tick = 0, @@ -18,7 +18,7 @@ function TestSurfaceEvents:SetUp() } -- mock TLBE tables - global.playerSettings = { + storage.playerSettings = { TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }), } @@ -27,7 +27,7 @@ function TestSurfaceEvents:SetUp() } -- Make camera easier to test - self.testCamera = global.playerSettings[1].cameras[1] + self.testCamera = storage.playerSettings[1].cameras[1] self.testCamera.surfaceName = "active-surface" end diff --git a/tests/tracker-base.lua b/tests/tracker-base.lua index 735b1b9..7924b18 100644 --- a/tests/tracker-base.lua +++ b/tests/tracker-base.lua @@ -12,18 +12,18 @@ TestTrackerBase = {} function TestTrackerBase:SetUp() -- mock Factorio provided globals - global = {} + storage = {} game = { surfaces = { { name = "nauvis" }, { name = "other-surface" } } } -- mock TLBE tables - global.playerSettings = { + storage.playerSettings = { TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }) } -- Update base tracker with our test settings - self.baseTracker = global.playerSettings[1].trackers[3] + self.baseTracker = storage.playerSettings[1].trackers[3] for k, v in pairs( { changeId = 1 @@ -38,7 +38,7 @@ function TestTrackerBase:TestDisabledTracker() self.baseTracker.enabled = false TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = 1, y = 3 }, @@ -56,7 +56,7 @@ end function TestTrackerBase:TestBuildOnOtherSurface() TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[2], bounding_box = { left_top = { x = 1, y = 3 }, @@ -74,7 +74,7 @@ end function TestTrackerBase:TestSingleEntityBuilt() TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = 1, y = 3 }, @@ -102,7 +102,7 @@ end function TestTrackerBase:TestMultipleEntitiesBuilt() TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = 1, y = 3 }, @@ -116,7 +116,7 @@ function TestTrackerBase:TestMultipleEntitiesBuilt() TLBE.Main.entity_built( { - created_entity = { + entity = { surface = game.surfaces[1], bounding_box = { left_top = { x = -2, y = 5 }, diff --git a/tests/tracker-cityblock.lua b/tests/tracker-cityblock.lua index 2a724b9..419892b 100644 --- a/tests/tracker-cityblock.lua +++ b/tests/tracker-cityblock.lua @@ -10,18 +10,18 @@ TestTrackerCityBlock = {} function TestTrackerCityBlock:Setup() -- mock Factorio provided globals - global = {} + storage = {} game = { surfaces = { { name = "nauvis" }, { name = "other-surface" } } } -- mock TLBE tables - global.playerSettings = { + storage.playerSettings = { TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }) } -- Create city block tracker - self.cityblockTracker = TLBE.Tracker.newTracker("cityblock", global.playerSettings[1].trackers) + self.cityblockTracker = TLBE.Tracker.newTracker("cityblock", storage.playerSettings[1].trackers) for k, v in pairs( { changeId = 1 @@ -37,17 +37,23 @@ function TestTrackerCityBlock:Focus() self.cityblockTracker.cityBlock.blockSize.y = 32 - TLBE.Tracker.focusCityBlock(self.cityblockTracker, {x=0,y=0} ) - lu.assertEquals(self.cityblockTracker.cityBlock.currentBlock, {x=0,y=0}, "focus on tile zero should be in the block zero") - lu.assertEquals(self.cityblockTracker.centerPos, {x=16,y=16}, "focus on tile zero should center on the zero chunk") + TLBE.Tracker.focusCityBlock(self.cityblockTracker, { x = 0, y = 0 }) + lu.assertEquals(self.cityblockTracker.cityBlock.currentBlock, { x = 0, y = 0 }, + "focus on tile zero should be in the block zero") + lu.assertEquals(self.cityblockTracker.centerPos, { x = 16, y = 16 }, + "focus on tile zero should center on the zero chunk") - TLBE.Tracker.focusCityBlock(self.cityblockTracker, {x=14,y=19} ) - lu.assertEquals(self.cityblockTracker.cityBlock.currentBlock, {x=0,y=0}, "focus on a tile within zero chunk should be in the block zero") - lu.assertEquals(self.cityblockTracker.centerPos, {x=16,y=16}, "focus on a tile within zero chunk should center on the zero chunk") + TLBE.Tracker.focusCityBlock(self.cityblockTracker, { x = 14, y = 19 }) + lu.assertEquals(self.cityblockTracker.cityBlock.currentBlock, { x = 0, y = 0 }, + "focus on a tile within zero chunk should be in the block zero") + lu.assertEquals(self.cityblockTracker.centerPos, { x = 16, y = 16 }, + "focus on a tile within zero chunk should center on the zero chunk") - TLBE.Tracker.focusCityBlock(self.cityblockTracker, {x=32,y=32} ) - lu.assertEquals(self.cityblockTracker.cityBlock.currentBlock, {x=0,y=0}, "focus on tile {32,32} should be in the block {1,1}") - lu.assertEquals(self.cityblockTracker.centerPos, {x=32+16,y=32+16}, "focus on tile {32,32} should center on the {1,1} chunk") + TLBE.Tracker.focusCityBlock(self.cityblockTracker, { x = 32, y = 32 }) + lu.assertEquals(self.cityblockTracker.cityBlock.currentBlock, { x = 0, y = 0 }, + "focus on tile {32,32} should be in the block {1,1}") + lu.assertEquals(self.cityblockTracker.centerPos, { x = 32 + 16, y = 32 + 16 }, + "focus on tile {32,32} should center on the {1,1} chunk") end function TestTrackerCityBlock:scale() @@ -58,18 +64,20 @@ function TestTrackerCityBlock:scale() self.cityblockTracker.cityBlock.currentBlock.y = 0 TLBE.Tracker.recalculateCityBlock(self.cityblockTracker) local oldCenterPos = { - x=self.cityblockTracker.centerPos.x, - y=self.cityblockTracker.centerPos.y + x = self.cityblockTracker.centerPos.x, + y = self.cityblockTracker.centerPos.y } - + self.cityblockTracker.cityBlock.blockScale = 1 TLBE.Tracker.recalculateCityBlock(self.cityblockTracker) - lu.assertEquals(self.cityblockTracker.size, {x=32,y=32}, "A blockScale of 1 should give a size matching the block size") + lu.assertEquals(self.cityblockTracker.size, { x = 32, y = 32 }, + "A blockScale of 1 should give a size matching the block size") lu.assertEquals(self.cityblockTracker.centerPos, oldCenterPos, "Rescaling doesn't recenter") self.cityblockTracker.cityBlock.blockScale = 2 TLBE.Tracker.recalculateCityBlock(self.cityblockTracker) - lu.assertEquals(self.cityblockTracker.size, {x=64,y=64}, "A blockScale of 2 should give a size twice the block size") + lu.assertEquals(self.cityblockTracker.size, { x = 64, y = 64 }, + "A blockScale of 2 should give a size twice the block size") lu.assertEquals(self.cityblockTracker.centerPos, oldCenterPos, "Rescaling doesn't recenter") -end \ No newline at end of file +end diff --git a/tests/tracker-player.lua b/tests/tracker-player.lua index 677d8d1..206f8a9 100644 --- a/tests/tracker-player.lua +++ b/tests/tracker-player.lua @@ -11,17 +11,17 @@ TestTrackerPlayer = {} function TestTrackerPlayer:SetUp() -- mock Factorio provided globals - global = {} + storage = {} game = { surfaces = { { name = "nauvis" }, { name = "other-surface" } } } -- mock TLBE tables - global.playerSettings = { + storage.playerSettings = { TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }) } - self.playerTracker = global.playerSettings[1].trackers[1] + self.playerTracker = storage.playerSettings[1].trackers[1] end -- luacheck: globals game diff --git a/tests/tracker-rocket.lua b/tests/tracker-rocket.lua index 35c2f35..198a2b7 100644 --- a/tests/tracker-rocket.lua +++ b/tests/tracker-rocket.lua @@ -11,18 +11,18 @@ TestTrackerRocket = {} function TestTrackerRocket:SetUp() -- mock Factorio provided globals - global = {} + storage = {} game = { surfaces = { { name = "nauvis" }, { name = "other-surface" } } } -- mock TLBE tables - global.playerSettings = { + storage.playerSettings = { TLBE.Config.newPlayerSettings({ position = { x = 0, y = 0 } }) } -- Update rocket tracker with our test settings - self.rocketTracker = global.playerSettings[1].trackers[2] + self.rocketTracker = storage.playerSettings[1].trackers[2] for k, v in pairs( { centerPos = { x = 0, y = 0 }, @@ -62,7 +62,7 @@ end function TestTrackerRocket:TestRocketLaunched() self.rocketTracker.enabled = true TLBE.Main.rocket_launched({ rocket_silo = { surface = game.surfaces[1] } }) - TLBE.Tracker.MoveToNextTrackerFinished(global.playerSettings[1].trackers) + TLBE.Tracker.MoveToNextTrackerFinished(storage.playerSettings[1].trackers) lu.assertIsFalse(self.rocketTracker.enabled, "expected be disabled after rocket launched") end @@ -70,7 +70,7 @@ end function TestTrackerRocket:TestRocketLaunchedAlreadyInactive() self.rocketTracker.enabled = false TLBE.Main.rocket_launched({ rocket_silo = { surface = game.surfaces[1] } }) - TLBE.Tracker.MoveToNextTrackerFinished(global.playerSettings[1].trackers) + TLBE.Tracker.MoveToNextTrackerFinished(storage.playerSettings[1].trackers) lu.assertIsFalse(self.rocketTracker.enabled, "expected be still disabled after rocket launched") end