mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Fix indents
Fix incorrectly indented code as detected by ESLint.
This commit is contained in:
1 parent
703fda43ad
commit
3e4f0b6b5e
2 files changed
+12
-16
No files matched your search
@@ -189,11 +189,7 @@ JavaScript template literals may also be used where appropriate.
|
|||||||
|
|
||||||
### Indenting
|
### Indenting
|
||||||
|
|
||||||
JavaScript code should be indented with tabs. There are places in the
|
JavaScript code should be indented with tabs.
|
||||||
codebase that are mixing tabs and spaces or uses only spaces for
|
|
||||||
indents. Should you be modifiying such code that is mixing spaces and
|
|
||||||
tabs as indending you should update the indenting to use tabs _on the
|
|
||||||
code you change_ while leaving the rest of the code untouched.
|
|
||||||
|
|
||||||
Lua code should be indented with 4 spaces.
|
Lua code should be indented with 4 spaces.
|
||||||
|
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ function Dose(numreq,instore,store_last_tick,dole,carry,prev_req,numreq_total_ad
|
|||||||
var outputs=[0,0,0,0];
|
var outputs=[0,0,0,0];
|
||||||
//NN: Please don't touch :), code is generated
|
//NN: Please don't touch :), code is generated
|
||||||
|
|
||||||
outputs[0]=inputs[7]*0.8058582544;
|
outputs[0]=inputs[7]*0.8058582544;
|
||||||
outputs[0]=sigmoid2(outputs[0]);
|
outputs[0]=sigmoid2(outputs[0]);
|
||||||
outputs[1]=sigmoid0(outputs[1]);
|
outputs[1]=sigmoid0(outputs[1]);
|
||||||
outputs[2]=sigmoid0(outputs[2]);
|
outputs[2]=sigmoid0(outputs[2]);
|
||||||
outputs[3]=inputs[6]*0.2294657379;
|
outputs[3]=inputs[6]*0.2294657379;
|
||||||
outputs[3]=sigmoid0(outputs[3]);
|
outputs[3]=sigmoid0(outputs[3]);
|
||||||
|
|
||||||
debt=debt || 0;
|
debt=debt || 0;
|
||||||
if (outputs[0]>0.99) outputs[0]=1.0;
|
if (outputs[0]>0.99) outputs[0]=1.0;
|
||||||
@@ -103,11 +103,11 @@ function Tick(instore,dole,store_last_tick,numreq_total_adj)
|
|||||||
var outputs=[0,0];
|
var outputs=[0,0];
|
||||||
//NN: Please don't touch :), code is generated
|
//NN: Please don't touch :), code is generated
|
||||||
|
|
||||||
outputs[0]=inputs[3]*0.9364774823;
|
outputs[0]=inputs[3]*0.9364774823;
|
||||||
outputs[0]=outputs[0]*1.0*0.4590721726;
|
outputs[0]=outputs[0]*1.0*0.4590721726;
|
||||||
outputs[0]=sigmoid2(outputs[0]);
|
outputs[0]=sigmoid2(outputs[0]);
|
||||||
outputs[1]=outputs[0]*1.828422785;
|
outputs[1]=outputs[0]*1.828422785;
|
||||||
outputs[1]=sigmoid3(outputs[1]);
|
outputs[1]=sigmoid3(outputs[1]);
|
||||||
|
|
||||||
avg=outputs[1];
|
avg=outputs[1];
|
||||||
if (numreq_total_adj<0.11) avg=1;//When no item's are requested, result is 0.1 ; In that case there is no deficit, so return 1 = 100% demand fulfilled
|
if (numreq_total_adj<0.11) avg=1;//When no item's are requested, result is 0.1 ; In that case there is no deficit, so return 1 = 100% demand fulfilled
|
||||||
|
|||||||
Reference in new issue
Block a user