diff --git a/control.lua b/control.lua index 9aba66bc..ba0f4c33 100644 --- a/control.lua +++ b/control.lua @@ -1,3 +1,4 @@ +-- not_luadoc=true --- Root Script File -- @script control.lua function _log(...) log(...) end @@ -16,7 +17,7 @@ Manager.setVerbose{ moduleLoad=true, -- when a module is required by the manager moduleInit=true, -- when and within the initation of a module moduleEnv=true, -- during module runtime, this is a global option set within each module for fine control - eventRegistered=true, -- when a module registers its event handlers + eventRegistered=false, -- when a module registers its event handlers errorCaught=true, -- when an error is caught during runtime output=Manager._verbose -- can be: can be: print || log || other function } diff --git a/doc/index.html b/doc/index.html index d797fba0..7dbc8d4a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -31,17 +31,17 @@

Modules

-

Scripts

- @@ -64,48 +59,48 @@

Modules

- - + + - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - + + @@ -132,23 +127,12 @@
expcore.guiparts.centerAdds a new obj to the center guiFSMFactorio Softmod Manager
expcore.guiparts.inputsSets the input to trigger on an certain event
expcore.guiparts.leftUsed to add a left gui frame
expcore.guiparts.popupUsed to add a popup gui style
expcore.guiparts.toolbarAdd a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset
expcore.commandsmodules.expgamingcore.commands.control Uses a commands data to return the inputs as a string
expcore.guimodules.expgamingcore.gui.guiparts.centerAdds a new obj to the center gui
modules.expgamingcore.gui.guiparts.inputsSets the input to trigger on an certain event
modules.expgamingcore.gui.guiparts.leftUsed to add a left gui frame
modules.expgamingcore.gui.guiparts.popupUsed to add a popup gui style
modules.expgamingcore.gui.guiparts.toolbarAdd a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset
modules.expgamingcore.gui.control Add a white bar to any gui frame
expcore.rankingmodules.expgamingcore.ranking.control Returns a rank object given a player or rank name
expcore.servermodules.expgamingcore.server.control Returns a un-used uuid (better system needed)
expcore.syncUsed as a faster way to get to the ranking function, overrides previous
FSMFactorio Softmod ManagerExpGamingCore.SyncDescription - A small description that will be displayed on the doc
ExpGamingLibA defines module for retrieving the number of ticks in 1 unit of time.
-

Scripts

- - - - - - - - - -
control.luaRoot Script File
index.luaUsed to index the files to be loaded
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/ExpGamingCore.Sync.html b/doc/modules/ExpGamingCore.Sync.html new file mode 100644 index 00000000..7f2b0843 --- /dev/null +++ b/doc/modules/ExpGamingCore.Sync.html @@ -0,0 +1,705 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module ExpGamingCore.Sync

+

Description - A small description that will be displayed on the doc

+

+

Info:

+
    +
  • License: https://github.com/explosivegaming/scenario/blob/master/LICENSE
  • +
  • Author: Cooldude2606
  • +
+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
tick_format (tick)Used to standidise the tick format for any sync info
print (player_message, player_name[, player_tag[, player_colour[, prefix]]])Prints to chat as if it were a player
emit_embeded (args)Logs an embed to the json.data we use a js script to add things we cant here
count_admins ()Used to get the number of admins currently online
count_afk ([time=7200])Used to get the number of afk players defined by 2 min by default
count_ranks ()Used to get the number of players in each rank and currently online; if ExpGamingCore/Ranking is present then it will give more than admin and user
count_players (online)Used to get a list of every player name with the option to limit to only online players
count_player_times ()Used to get a list of every player name with the amount of time they have played for
update ()Called to update values inside of the info
add_update (key, callback)Adds a callback to be called when the info is updated
emit_data ()Outputs the curent server info into a file
+

Tables

+ + + + + +
EmitEmbededParamatersOutline of the paramaters accepted by Sync.emit_embeded
+

Fields

+ + + + + + + + + +
infoused to get the global list that has been defined, also used to set that list
timeUsed to return and set the current IRL time; not very good need a better way to do this
+

modules.expgamingcore.sync.lib.gui Functions

+ + + + + + + + + +
_comment ()This file will be loaded when ExpGamingCore/Gui is present
add_to_gui (element)Adds a emeltent to the sever info gui
+

modules.expgamingcore.sync.lib.ranking Functions

+ + + + + + + + + + + + + +
_comment ()This file will be loaded when ExpGamingCore/Ranking is present
set_ranks (...)Used as a redirect to Ranking._base_preset that will set the rank given to a player apon joining
count_ranks ()Used to get the number of players in each rank and currently online
+ +
+
+ + +

Functions

+ +
+
+ + tick_format (tick) +
+
+ Used to standidise the tick format for any sync info + + +

Parameters:

+
    +
  • tick + +
  • +
+ +

Returns:

+
    + + {number,string} + table containg both the raw number and clean version of a time +
+ + + +

Usage:

+
    +
    Sync.tick_format(60) -- return {60,'1.00M'}
    +
+ +
+
+ + print (player_message, player_name[, player_tag[, player_colour[, prefix]]]) +
+
+ Prints to chat as if it were a player + + +

Parameters:

+
    +
  • player_message + string + the message to be printed in chat +
  • +
  • player_name + string + the name of the player sending the message +
  • +
  • player_tag + string + the tag apllied to the player's name + (optional) +
  • +
  • player_colour + string + the colour of the message, either hex or named colour + (optional) +
  • +
  • prefix + string + add a prefix before the chat eg [IRC] + (optional) +
  • +
+ + + + +

Usage:

+
    +
    Sync.print('Test','Cooldude2606')
    +
+ +
+
+ + emit_embeded (args) +
+
+ Logs an embed to the json.data we use a js script to add things we cant here + + +

Parameters:

+
    +
  • args + table + a table which contains everything that the embeded will use +
  • +
+ + + +

See also:

+ + +

Usage:

+
    +
    Sync.emit_embeded{title='BAN',color='0x0',description='A player was banned' ... }
    +
+ +
+
+ + count_admins () +
+
+ Used to get the number of admins currently online + + + +

Returns:

+
    + + number + the number of admins online +
+ + + +

Usage:

+
    +
    Sync.count_admins() -- returns number
    +
+ +
+
+ + count_afk ([time=7200]) +
+
+ Used to get the number of afk players defined by 2 min by default + + +

Parameters:

+
    +
  • time + int + in ticks that a player is called afk + (default 7200) +
  • +
+ +

Returns:

+
    + + number + the number of afk players +
+ + + +

Usage:

+
    +
    Sync.count_afk()
    +
+ +
+
+ + count_ranks () +
+
+ Used to get the number of players in each rank and currently online; if ExpGamingCore/Ranking is present then it will give more than admin and user + + + +

Returns:

+
    + + table + contains the ranks and the players in that rank +
+ + + +

Usage:

+
    +
    Sync.count_ranks()
    +
+ +
+
+ + count_players (online) +
+
+ Used to get a list of every player name with the option to limit to only online players + + +

Parameters:

+
    +
  • online + boolean + true will get only the online players +
  • +
+ +

Returns:

+
    + + table + table of player names +
+ + + +

Usage:

+
    +
    Sync.count_players()
    +
+ +
+
+ + count_player_times () +
+
+ Used to get a list of every player name with the amount of time they have played for + + + +

Returns:

+
    + + table + table indexed by player name, each value contains the raw tick and then the clean string +
+ + + +

Usage:

+
    +
    Sync.count_player_times()
    +
+ +
+
+ + update () +
+
+ Called to update values inside of the info + + + +

Returns:

+
    + + all of the new info +
+ + + +

Usage:

+
    +
    Sync.update()
    +
+ +
+
+ + add_update (key, callback) +
+
+ Adds a callback to be called when the info is updated + + +

Parameters:

+
    +
  • key + string + the key that the value will be stored in +
  • +
  • callback + function + the function which will return this value +
  • +
+ + + + +

Usage:

+
    +
    Sync.add_update('players',function() return #game.players end)
    +
+ +
+
+ + emit_data () +
+
+ Outputs the curent server info into a file + + + + + + +

Usage:

+
    +
    Sync.emit_data()
    +
+ +
+
+

Tables

+ +
+
+ + EmitEmbededParamaters +
+
+ Outline of the paramaters accepted by Sync.emit_embeded + + +

Fields:

+
    +
  • title + the tile of the embed +
  • +
  • color + the color given in hex you can use Color.to_hex{r=0,g=0,b=0} +
  • +
  • description + the description of the embed +
  • +
  • server_detail + sting to add onto the pre-set server detail +
  • +
  • fieldone + the filed to add to the embed (key is name) (value is text) (start value with <<inline>> to make inline) +
  • +
  • fieldtwo + the filed to add to the embed (key is name) (value is text) (start value with <<inline>> to make inline) +
  • +
+ + + + + +
+
+

Fields

+ +
+
+ + info +
+
+ used to get the global list that has been defined, also used to set that list + + +
    +
  • set + table + keys to be replaced in the server info + (default nil) +
  • +
+ + + + +

Usage:

+
    +
  • Sync.info{server_name='Factorio Server 2'} -- returns true
  • +
  • Sync.info -- table of info
  • +
+ +
+
+ + time +
+
+ Used to return and set the current IRL time; not very good need a better way to do this + + +
    +
  • set + string + the date time to be set + (default nil) +
  • +
+ + + + +

Usage:

+
    +
  • Sync.time('Sun Apr  1 18:44:30 UTC 2018')
  • +
  • Sync.time -- string
  • +
+ +
+
+

modules.expgamingcore.sync.lib.gui Functions

+ +
+
+ + _comment () +
+
+ This file will be loaded when ExpGamingCore/Gui is present + + + + + + + +
+
+ + add_to_gui (element) +
+
+ Adds a emeltent to the sever info gui + + +

Parameters:

+
    +
  • element + see examples before for what can be used, it can also be a return from Gui.inputs.add +
  • +
+ +

Returns:

+
    + + bolean + based on weather it was successful or not +
+ + + +

Usage:

+
    +
    Sync.add_to_gui('string') -- return true
    +
+ +
+
+

modules.expgamingcore.sync.lib.ranking Functions

+ +
+
+ + _comment () +
+
+ This file will be loaded when ExpGamingCore/Ranking is present + + + + + + + +
+
+ + set_ranks (...) +
+
+ Used as a redirect to Ranking._base_preset that will set the rank given to a player apon joining + + +

Parameters:

+
    +
  • ... + +
  • +
+ + + + +

Usage:

+
    +
    Sync.set_ranks{player_name=rank_name,...}
    +
+ +
+
+ + count_ranks () +
+
+ Used to get the number of players in each rank and currently online + + + +

Returns:

+
    + + table + contains the ranks and the players in that rank +
+ + + +

Usage:

+
    +
    Sync.count_ranks()
    +
+ +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2018-05-31 00:41:31 +
+
+ + diff --git a/doc/modules/ExpGamingLib.html b/doc/modules/ExpGamingLib.html index dc02f790..7a44bc2e 100644 --- a/doc/modules/ExpGamingLib.html +++ b/doc/modules/ExpGamingLib.html @@ -38,17 +38,17 @@

Modules

-

Scripts

- @@ -86,6 +81,10 @@ Used to get the current ENV with all _G keys removed; useful when saving function to global + add_metatable (tbl[, callback=tostring[, string=table.tostring]]) + Creats a table that will act like a string and a function + + is_type (v[, test_type=nil]) Compear types faster for faster valadation of prams @@ -166,6 +165,47 @@
get_env() returns current ENV with _G keys removed
+ +
+ + add_metatable (tbl[, callback=tostring[, string=table.tostring]]) +
+
+ Creats a table that will act like a string and a function + + +

Parameters:

+ + +

Returns:

+
    + + table + the new table with its metatable set +
+ + + +

Usage:

+ +
@@ -371,7 +411,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/FSM.html b/doc/modules/FSM.html index 99d6ba47..6db19fc5 100644 --- a/doc/modules/FSM.html +++ b/doc/modules/FSM.html @@ -39,17 +39,17 @@

Modules

-

Scripts

- @@ -412,7 +407,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/StdLib.Color.html b/doc/modules/StdLib.Color.html index 8c8b4bf1..7cc11d31 100644 --- a/doc/modules/StdLib.Color.html +++ b/doc/modules/StdLib.Color.html @@ -39,17 +39,17 @@

Modules

-

Scripts

- @@ -558,7 +553,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/StdLib.Game.html b/doc/modules/StdLib.Game.html index 9e35cbfb..5b4f4488 100644 --- a/doc/modules/StdLib.Game.html +++ b/doc/modules/StdLib.Game.html @@ -38,17 +38,17 @@

Modules

-

Scripts

- @@ -219,7 +214,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/StdLib.String.html b/doc/modules/StdLib.String.html index d0253f49..4d2128bc 100644 --- a/doc/modules/StdLib.String.html +++ b/doc/modules/StdLib.String.html @@ -38,17 +38,17 @@

Modules

-

Scripts

- @@ -299,7 +294,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/StdLib.Table.html b/doc/modules/StdLib.Table.html index 84b9f1db..d2a41200 100644 --- a/doc/modules/StdLib.Table.html +++ b/doc/modules/StdLib.Table.html @@ -38,17 +38,17 @@

Modules

-

Scripts

- @@ -1128,7 +1123,7 @@ some_func(1,2)
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/StdLib.Time.html b/doc/modules/StdLib.Time.html index f0352349..b42b0935 100644 --- a/doc/modules/StdLib.Time.html +++ b/doc/modules/StdLib.Time.html @@ -38,17 +38,17 @@

Modules

-

Scripts

- @@ -136,7 +131,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/StdLib.html b/doc/modules/StdLib.html deleted file mode 100644 index 014bd5c6..00000000 --- a/doc/modules/StdLib.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - Reference - - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module StdLib

-

A defines module for retrieving the number of ticks in 1 unit of time.

-

- Extends the Factorio defines table.

- - -

Tables

- - - - - -
defines.timeReturns the number of ticks in a second, minute, hour, day, week, month, or year.
- -
-
- - -

Tables

- -
-
- - defines.time -
-
- Returns the number of ticks in a second, minute, hour, day, week, month, or year. - - -

Fields:

-
    -
  • second - the number of Factorio ticks in a second -
  • -
  • minute - the number of Factorio ticks in a second -
  • -
  • hour - the number of Factorio ticks in an hour -
  • -
  • day - the number of Factorio ticks in an day -
  • -
  • week - the number of Factorio ticks in a week -
  • -
  • month - the number of Factorio ticks in a month (30 days) -
  • -
  • year - the number of Factorio ticks in a year (365 days) -
  • -
- - - - -

Usage:

-
    -
    local ten_seconds = defines.time.second * 10
    -
- -
-
- - -
-
-
-generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:33 -
-
- - diff --git a/doc/modules/expcore.sync.html b/doc/modules/expcore.sync.html deleted file mode 100644 index f931601a..00000000 --- a/doc/modules/expcore.sync.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - - Reference - - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module expcore.sync

-

Used as a faster way to get to the ranking function, overrides previous

-

-

Usage:

-
    -
    Sync.set_ranks{name=rank_name}
    -
    -
- - -

Functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sync.tick_format (tick)Used to standidise the tick format for any sync info
Sync.print (player_message, player_name[, player_tag[, player_colour[, prefix]]])Prints to chat as if it were a player
Sync.emit_embeded (args)Logs an embed to the json.data we use a js script to add things we cant here
Sync.count_admins ()used to get the number of admins currently online
Sync.count_afk ([time=7200])used to get the number of afk players defined by 2 min by default
Sync.count_ranks ()used to get the number of players in each rank and currently online
Sync.count_players (online)used to get the number of players either online or all
Sync.count_player_times ()used to get the number of players resulting in there play times
Sync.info ([set=nil])used to return the global list and set values in it
Sync.time ([set=nil])used to return the global time and set its value
Sync.update ()called to update values inside of the info
Sync.add_update (key, callback)Adds a callback to be called when the info is updated
Sync.emit_data ()outputs the curent server info into a file
Sync.add_to_gui (element)Adds a emeltent to the sever info gui
- -
-
- - -

Functions

- -
-
- - Sync.tick_format (tick) -
-
- Used to standidise the tick format for any sync info - - -

Parameters:

-
    -
  • tick - -
  • -
- - - - -

Usage:

-
    -
    Sync.tick_format(60) -- return {60,'1.00M'}
    -
- -
-
- - Sync.print (player_message, player_name[, player_tag[, player_colour[, prefix]]]) -
-
- Prints to chat as if it were a player - - -

Parameters:

-
    -
  • player_message - the message to be printed in chat -
  • -
  • player_name - the name of the player sending the message -
  • -
  • player_tag - the tag apllied to the player's name - (optional) -
  • -
  • player_colour - the colour of the message - (optional) -
  • -
  • prefix - add a prefix before the chat eg [IRC] - (optional) -
  • -
- - - - -

Usage:

-
    -
    Sync.print('Test','Cooldude2606')
    -
- -
-
- - Sync.emit_embeded (args) -
-
- Logs an embed to the json.data we use a js script to add things we cant here - - -

Parameters:

-
    -
  • args - table - a table which contains everything that the embeded will use -
  • -
- - - - -

Usage:

-
    -
    Sync.emit_embeded{title='BAN',color='0x0',description='A player was banned' ... }
    -
- -
-
- - Sync.count_admins () -
-
- used to get the number of admins currently online - - - -

Returns:

-
    - - int - the number of admins online -
- - - -

Usage:

-
    -
    Sync.count_admins()
    -
- -
-
- - Sync.count_afk ([time=7200]) -
-
- used to get the number of afk players defined by 2 min by default - - -

Parameters:

-
    -
  • time - int - in ticks that a player is called afk - (default 7200) -
  • -
- -

Returns:

-
    - - int - the number of afk players -
- - - -

Usage:

-
    -
    Sync.count_afk()
    -
- -
-
- - Sync.count_ranks () -
-
- used to get the number of players in each rank and currently online - - - -

Returns:

-
    - - table - contains the ranks and the players in that rank -
- - - -

Usage:

-
    -
    Sync.count_ranks()
    -
- -
-
- - Sync.count_players (online) -
-
- used to get the number of players either online or all - - -

Parameters:

-
    -
  • online - bolean - if true only get online players -
  • -
- -

Returns:

-
    - - table - contains player names -
- - - -

Usage:

-
    -
    Sync.count_players()
    -
- -
-
- - Sync.count_player_times () -
-
- used to get the number of players resulting in there play times - - - -

Returns:

-
    - - table - contains players and each player is given a tick amount and a formated string -
- - - -

Usage:

-
    -
    Sync.count_player_times()
    -
- -
-
- - Sync.info ([set=nil]) -
-
- used to return the global list and set values in it - - -

Parameters:

-
    -
  • set - table - keys to be replaced in the server info - (default nil) -
  • -
- -

Returns:

-
    - - either returns success when setting or the info when not setting -
- - - -

Usage:

-
    -
    Sync.info{server_name='Factorio Server 2'}
    -
- -
-
- - Sync.time ([set=nil]) -
-
- used to return the global time and set its value - - -

Parameters:

-
    -
  • set - string - the date time to be set - (default nil) -
  • -
- -

Returns:

-
    - - either true false if setting or the date time and tick off set -
- - - -

Usage:

-
    -
    Sync.time('Sun Apr  1 18:44:30 UTC 2018')
    -
- -
-
- - Sync.update () -
-
- called to update values inside of the info - - - -

Returns:

-
    - - all of the new info -
- - - -

Usage:

-
    -
    Sync.update()
    -
- -
-
- - Sync.add_update (key, callback) -
-
- Adds a callback to be called when the info is updated - - -

Parameters:

-
    -
  • key - string - the key that the value will be stored in -
  • -
  • callback - function - the function which will return this value -
  • -
- - - - -

Usage:

-
    -
    Sync.add_update('players',function() return #game.players end)
    -
- -
-
- - Sync.emit_data () -
-
- outputs the curent server info into a file - - - - - - -

Usage:

-
    -
    Sync.emit_data()
    -
- -
-
- - Sync.add_to_gui (element) -
-
- Adds a emeltent to the sever info gui - - -

Parameters:

-
    -
  • element - see examples before for what can be used, it can also be a return from Gui.inputs.add -
  • -
- -

Returns:

-
    - - bolean - based on weather it was successful or not -
- - - -

Usage:

-
    -
    Sync.add_to_gui('string') -- return trues
    -
- -
-
- - -
-
-
-generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 -
-
- - diff --git a/doc/modules/expcore.commands.html b/doc/modules/modules.expgamingcore.commands.control.html similarity index 65% rename from doc/modules/expcore.commands.html rename to doc/modules/modules.expgamingcore.commands.control.html index 1d31df15..f3323613 100644 --- a/doc/modules/expcore.commands.html +++ b/doc/modules/modules.expgamingcore.commands.control.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.commands

+

Module modules.expgamingcore.commands.control

Uses a commands data to return the inputs as a string

Usage:

@@ -80,7 +75,7 @@

Functions

- +
get_commands (player)commands.get_commands (player) Used to return all the commands a player can use
@@ -93,8 +88,8 @@
- - get_commands (player) + + commands.get_commands (player)
Used to return all the commands a player can use @@ -129,7 +124,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.gui.html b/doc/modules/modules.expgamingcore.gui.control.html similarity index 76% rename from doc/modules/expcore.gui.html rename to doc/modules/modules.expgamingcore.gui.control.html index 79e8f946..4f951cc4 100644 --- a/doc/modules/expcore.gui.html +++ b/doc/modules/modules.expgamingcore.gui.control.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.gui

+

Module modules.expgamingcore.gui.control

Add a white bar to any gui frame

Usage:

@@ -165,7 +160,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.guiparts.center.html b/doc/modules/modules.expgamingcore.gui.guiparts.center.html similarity index 85% rename from doc/modules/expcore.guiparts.center.html rename to doc/modules/modules.expgamingcore.gui.guiparts.center.html index d9f8dd00..7dd28f1a 100644 --- a/doc/modules/expcore.guiparts.center.html +++ b/doc/modules/modules.expgamingcore.gui.guiparts.center.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.guiparts.center

+

Module modules.expgamingcore.gui.guiparts.center

Adds a new obj to the center gui

Usage:

@@ -283,7 +278,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.guiparts.inputs.html b/doc/modules/modules.expgamingcore.gui.guiparts.inputs.html similarity index 91% rename from doc/modules/expcore.guiparts.inputs.html rename to doc/modules/modules.expgamingcore.gui.guiparts.inputs.html index 40cfab8b..82977f9e 100644 --- a/doc/modules/expcore.guiparts.inputs.html +++ b/doc/modules/modules.expgamingcore.gui.guiparts.inputs.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.guiparts.inputs

+

Module modules.expgamingcore.gui.guiparts.inputs

Sets the input to trigger on an certain event

Usage:

@@ -439,7 +434,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.guiparts.left.html b/doc/modules/modules.expgamingcore.gui.guiparts.left.html similarity index 78% rename from doc/modules/expcore.guiparts.left.html rename to doc/modules/modules.expgamingcore.gui.guiparts.left.html index f631247f..2d78fe94 100644 --- a/doc/modules/expcore.guiparts.left.html +++ b/doc/modules/modules.expgamingcore.gui.guiparts.left.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.guiparts.left

+

Module modules.expgamingcore.gui.guiparts.left

Used to add a left gui frame

Usage:

@@ -186,7 +181,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.guiparts.popup.html b/doc/modules/modules.expgamingcore.gui.guiparts.popup.html similarity index 71% rename from doc/modules/expcore.guiparts.popup.html rename to doc/modules/modules.expgamingcore.gui.guiparts.popup.html index 5cd26f05..6309f7b2 100644 --- a/doc/modules/expcore.guiparts.popup.html +++ b/doc/modules/modules.expgamingcore.gui.guiparts.popup.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.guiparts.popup

+

Module modules.expgamingcore.gui.guiparts.popup

Used to add a popup gui style

Usage:

@@ -131,7 +126,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.guiparts.toolbar.html b/doc/modules/modules.expgamingcore.gui.guiparts.toolbar.html similarity index 67% rename from doc/modules/expcore.guiparts.toolbar.html rename to doc/modules/modules.expgamingcore.gui.guiparts.toolbar.html index 58bb65e6..483c4c9f 100644 --- a/doc/modules/expcore.guiparts.toolbar.html +++ b/doc/modules/modules.expgamingcore.gui.guiparts.toolbar.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.guiparts.toolbar

+

Module modules.expgamingcore.gui.guiparts.toolbar

Add a button to the toolbar, ranks need to be allowed to use these buttons if ranks is preset

Usage:

@@ -122,7 +117,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.ranking.html b/doc/modules/modules.expgamingcore.ranking.control.html similarity index 88% rename from doc/modules/expcore.ranking.html rename to doc/modules/modules.expgamingcore.ranking.control.html index b5a57000..690fa714 100644 --- a/doc/modules/expcore.ranking.html +++ b/doc/modules/modules.expgamingcore.ranking.control.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.ranking

+

Module modules.expgamingcore.ranking.control

Returns a rank object given a player or rank name

Usage:

@@ -379,7 +374,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/expcore.server.html b/doc/modules/modules.expgamingcore.server.control.html similarity index 92% rename from doc/modules/expcore.server.html rename to doc/modules/modules.expgamingcore.server.control.html index 688c54bd..603165ee 100644 --- a/doc/modules/expcore.server.html +++ b/doc/modules/modules.expgamingcore.server.control.html @@ -38,17 +38,17 @@

Modules

-

Scripts

-
-

Module expcore.server

+

Module modules.expgamingcore.server.control

Returns a un-used uuid (better system needed)

Usage:

@@ -564,7 +559,7 @@
generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 +Last updated 2018-05-31 00:41:31
diff --git a/doc/modules/modules.factoriostdlib.color.html b/doc/modules/modules.factoriostdlib.color.html deleted file mode 100644 index 43b661cf..00000000 --- a/doc/modules/modules.factoriostdlib.color.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - Reference - - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Module modules.factoriostdlib.color

-

A defines module for retrieving colors by name.

-

- Extends the Factorio defines table.

-

Usage:

-
    -
    require('stdlib/defines/color')
    -
    -
- - -

Functions

- - - - - - - - - - - - - - - - - - - - - - - - - -
Color.set ([color=white[, alpha=1]])Set a value for the alpha channel in the given color table.
Color.to_table (c_arr)Converts a color in the array format to a color in the table format.
Color.from_rgb ([r=0[, g=0[, b=0[, a=255]]]])Converts a color in the rgb format to a color table
Color.from_hex (hex[, alpha=1])Get a color table with a hexadecimal string.
Color.to_rgb (color)Converts a color in the color table format to rgb
Color.to_hex (color)Converts a color in the color table format to hex
-

Tables

- - - - - - - - - - - - - - - - - -
defines.colorA table of colors allowing retrieval by color name.
defines.anticolorReturns white for dark colors or black for lighter colors.
defines.lightcolorReturns a lighter color of a named color
defines.textcolorReturns a lighter color of a named color.
- -
-
- - -

Functions

- -
-
- - Color.set ([color=white[, alpha=1]]) -
-
- Set a value for the alpha channel in the given color table. - `color.a` represents the alpha channel in the given color table. -
    -
  • If ***alpha*** is given, set `color.a` to it. -
  • If ***alpha*** is not given, and if the given color table does not have a value for `color.a`, set `color.a` to 1. -
  • If ***alpha*** is not given, and if the given color table already has a value for `color.a`, then leave `color.a` alone. -
- - -

Parameters:

-
    -
  • color - defines.color or Concepts.Color - the color to configure - (default white) -
  • -
  • alpha - float - the alpha value (*[0 - 1]*) to set for the given color - (default 1) -
  • -
- -

Returns:

-
    - - a - color table that has the specified value for the alpha channel -
- - - - -
-
- - Color.to_table (c_arr) -
-
- Converts a color in the array format to a color in the table format. - - -

Parameters:

-
    -
  • c_arr - table - the color to convert -
  • -
- -

Returns:

-
    - - a - converted color — { r = c\_arr[1], g = c\_arr[2], b = c\_arr[3], a = c\_arr[4] } -
- - - - -
-
- - Color.from_rgb ([r=0[, g=0[, b=0[, a=255]]]]) -
-
- Converts a color in the rgb format to a color table - - -

Parameters:

-
    -
  • r - int - 0-255 red - (default 0) -
  • -
  • g - int - 0-255 green - (default 0) -
  • -
  • b - int - 0-255 blue - (default 0) -
  • -
  • a - int - 0-255 alpha - (default 255) -
  • -
- -

Returns:

-
    - - Concepts.Color - -
- - - - -
-
- - Color.from_hex (hex[, alpha=1]) -
-
- Get a color table with a hexadecimal string. - Optionally provide the value for the alpha channel. - - -

Parameters:

-
    -
  • hex - string - hexadecimal color string (#ffffff, not #fff) -
  • -
  • alpha - float - the alpha value to set; such that ***[ 0 ⋜ value ⋜ 1 ]*** - (default 1) -
  • -
- -

Returns:

-
    - - a - color table with RGB converted from Hex and with alpha -
- - - - -
-
- - Color.to_rgb (color) -
-
- Converts a color in the color table format to rgb - - -

Parameters:

-
    -
  • color - table - the color to convert -
  • -
- -

Returns:

-
    - - table - the color as rgb -
- - - - -
-
- - Color.to_hex (color) -
-
- Converts a color in the color table format to hex - - -

Parameters:

-
    -
  • color - table - the color to convert -
  • -
- -

Returns:

-
    - - string - the color as hex -
- - - - -
-
-

Tables

- -
-
- - defines.color -
-
- A table of colors allowing retrieval by color name. - - -

Fields:

-
    -
  • white - {r=1.00,g=1.00,b=1.00} -
  • -
  • black - {r=0.00,g=0.00,b=0.00} -
  • -
  • darkgrey - {r=0.25,g=0.25,b=0.25} -
  • -
  • grey - {r=0.50,g=0.50,b=0.50} -
  • -
  • lightgrey - {r=0.75,g=0.75,b=0.75} -
  • -
  • red - {r=1.00,g=0.00,b=0.00} -
  • -
  • darkred - {r=0.50,g=0.00,b=0.00} -
  • -
  • lightred - {r=1.00,g=0.50,b=0.50} -
  • -
  • green - {r=0.00,g=1.00,b=0.00} -
  • -
  • darkgreen - {r=0.00,g=0.50,b=0.00} -
  • -
  • lightgreen - {r=0.50,g=1.00,b=0.50} -
  • -
  • blue - {r=0.00,g=0.00,b=1.00} -
  • -
  • darkblue - {r=0.00,g=0.00,b=0.50} -
  • -
  • lightblue - {r=0.50,g=0.50,b=1.00} -
  • -
  • orange - {r=1.00,g=0.55,b=0.10} -
  • -
  • yellow - {r=1.00,g=1.00,b=0.00} -
  • -
  • pink - {r=1.00,g=0.00,b=1.00} -
  • -
  • purple - {r=0.60,g=0.10,b=0.60} -
  • -
  • brown - {r=0.60,g=0.40,b=0.10} -
  • -
- - - - - -
-
- - defines.anticolor -
-
- Returns white for dark colors or black for lighter colors. - - -

Fields:

-
    -
  • green - defines.color.black -
  • -
  • grey - defines.color.black -
  • -
  • lightblue - defines.color.black -
  • -
  • lightgreen - defines.color.black -
  • -
  • lightgrey - defines.color.black -
  • -
  • lightred - defines.color.black -
  • -
  • orange - defines.color.black -
  • -
  • white - defines.color.black -
  • -
  • yellow - defines.color.black -
  • -
  • black - defines.color.white -
  • -
  • blue - defines.color.white -
  • -
  • brown - defines.color.white -
  • -
  • darkblue - defines.color.white -
  • -
  • darkgreen - defines.color.white -
  • -
  • darkgrey - defines.color.white -
  • -
  • darkred - defines.color.white -
  • -
  • pink - defines.color.white -
  • -
  • purple - defines.color.white -
  • -
  • red - defines.color.white -
  • -
- - - - - -
-
- - defines.lightcolor -
-
- Returns a lighter color of a named color - - -

Fields:

-
    -
  • white - defines.color.lightgrey -
  • -
  • grey - defines.color.darkgrey -
  • -
  • lightgrey - defines.color.grey -
  • -
  • red - defines.color.lightred -
  • -
  • green - defines.color.lightgreen -
  • -
  • blue - defines.color.lightblue -
  • -
  • yellow - defines.color.orange -
  • -
  • pink - defines.color.purple -
  • -
- - - - - -
-
- - defines.textcolor -
-
- Returns a lighter color of a named color. - - -

Fields:

-
    -
  • info - {r=0.21,g=0.95,b=1.00} -
  • -
  • bg - {r=0.00,g=0.00,b=0.00} -
  • -
  • low - {r=0.18,g=0.77,b=0.18} -
  • -
  • med - {r=1.00,g=0.89,b=0.26} -
  • -
  • high - {r=1.00,g=0.33,b=0.00} -
  • -
  • crit - {r=1.00,g=0.00,b=0.00} -
  • -
- - - - - -
-
- - -
-
-
-generated by LDoc 1.4.6 -Last updated 2018-05-29 23:30:03 -
-
- - diff --git a/doc/scripts/control.lua.html b/doc/scripts/control.lua.html deleted file mode 100644 index 6e5604ce..00000000 --- a/doc/scripts/control.lua.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Reference - - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Script control.lua

-

Root Script File

-

- - - -
-
- - - - -
-
-
-generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 -
-
- - diff --git a/doc/scripts/index.lua.html b/doc/scripts/index.lua.html deleted file mode 100644 index f912ae6d..00000000 --- a/doc/scripts/index.lua.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Reference - - - - -
- -
- -
-
-
- - -
- - - - - - -
- -

Script index.lua

-

Used to index the files to be loaded

-

- - - -
-
- - - - -
-
-
-generated by LDoc 1.4.6 -Last updated 2018-05-30 00:08:40 -
-
- - diff --git a/modules/ExpGamingCore/Sync/control.lua b/modules/ExpGamingCore/Sync/control.lua index 17a312ed..0d97f529 100644 --- a/modules/ExpGamingCore/Sync/control.lua +++ b/modules/ExpGamingCore/Sync/control.lua @@ -1,13 +1,9 @@ ---[[ -Explosive Gaming +--- Description - A small description that will be displayed on the doc +-- @module ExpGamingCore.Sync +-- @alias Sync +-- @author Cooldude2606 +-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE -This file can be used with permission but this and the credit below must remain in the file. -Contact a member of management on our discord to seek permission to use our code. -Any changes that you may make to the code are yours but that does not make the script yours. -Discord: https://discord.gg/r6dC2uK -]] ---Please Only Edit Below This Line----------------------------------------------------------- --- this file is used to allow easy syncing with out side programes local Sync = {} local Sync_updates = {} @@ -45,16 +41,19 @@ function Sync.print(player_message,player_name,player_tag,player_colour,prefix) game.print(prefix..player_name..tag..': '..player_message,colour) end ---- Logs an embed to the json.data we use a js script to add things we cant here --- @usage Sync.emit_embeded{title='BAN',color='0x0',description='A player was banned' ... } --- @tparam table args a table which contains everything that the embeded will use --- @table args +--- Outline of the paramaters accepted by Sync.emit_embeded +-- @table EmitEmbededParamaters -- @field title the tile of the embed -- @field color the color given in hex you can use Color.to_hex{r=0,g=0,b=0} -- @field description the description of the embed -- @field server_detail sting to add onto the pre-set server detail --- @field fieldone the filed to add to the embed (key is name) (value is text) (start value with <> to make inline) --- @field fieldtwo the filed to add to the embed (key is name) (value is text) (start value with <> to make inline) +-- @field fieldone the filed to add to the embed (key is name) (value is text) (start value with <<inline>> to make inline) +-- @field fieldtwo the filed to add to the embed (key is name) (value is text) (start value with <<inline>> to make inline) + +--- Logs an embed to the json.data we use a js script to add things we cant here +-- @usage Sync.emit_embeded{title='BAN',color='0x0',description='A player was banned' ... } +-- @tparam table args a table which contains everything that the embeded will use +-- @see EmitEmbededParamaters function Sync.emit_embeded(args) if not is_type(args,'table') then error('Args table not given to Sync.emit_embeded',2) end local title = is_type(args.title,'string') and args.title or '' @@ -90,6 +89,7 @@ function Sync.emit_embeded(args) end --- The error handle setup by sync to emit a discord embed for any errors +-- @local here -- @function errorHandler -- @tparam string err the error passed by the err control error.addHandler('Discord Emit',function(err) @@ -241,7 +241,7 @@ function Sync.add_update(key,callback) Sync_updates[key] = callback end ---- outputs the curent server info into a file +--- Outputs the curent server info into a file -- @usage Sync.emit_data() function Sync.emit_data() local info = Sync.info diff --git a/modules/ExpGamingCore/Sync/lib/gui.lua b/modules/ExpGamingCore/Sync/lib/gui.lua index 8a1c5771..a1ddd980 100644 --- a/modules/ExpGamingCore/Sync/lib/gui.lua +++ b/modules/ExpGamingCore/Sync/lib/gui.lua @@ -4,7 +4,9 @@ -- @author Cooldude2606 -- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE --- this file will be loaded when ExpGamingCore/Gui is present +--- This file will be loaded when ExpGamingCore/Gui is present +-- @function _comment + local Sync_gui_functions = {} @@ -35,6 +37,7 @@ local function label_format(label,width) end --- Creates a center gui that will appear on join +-- @table server-info -- @local call to Gui.Center Gui.center.add{ name='server-info', diff --git a/modules/ExpGamingCore/Sync/lib/ranking.lua b/modules/ExpGamingCore/Sync/lib/ranking.lua index 81e671da..4925290b 100644 --- a/modules/ExpGamingCore/Sync/lib/ranking.lua +++ b/modules/ExpGamingCore/Sync/lib/ranking.lua @@ -4,11 +4,11 @@ -- @author Cooldude2606 -- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE --- this file will be loaded when ExpGamingCore/Ranking is present - +--- This file will be loaded when ExpGamingCore/Ranking is present +-- @function _comment + --- Used as a redirect to Ranking._base_preset that will set the rank given to a player apon joining -- @usage Sync.set_ranks{player_name=rank_name,...} --- @see Ranking._base_preset function Sync.set_ranks(...) Ranking._base_preset(...) end @@ -30,8 +30,7 @@ function Sync.count_ranks() return _ranks end ---- Adds a caption to the info gui that shows the rank given to the player --- @local callback for Sync.add_to_gui +-- Adds a caption to the info gui that shows the rank given to the player if Sync.add_to_gui then Sync.add_to_gui(function(player,frame) return 'You have been assigned the rank \''..Ranking.get_rank(player).name..'\'' diff --git a/modules/FactorioModGui/control.lua b/modules/FactorioModGui/control.lua index 40fa62b1..1f3bbf83 100644 --- a/modules/FactorioModGui/control.lua +++ b/modules/FactorioModGui/control.lua @@ -1,6 +1,8 @@ +-- not_luadoc=true --- Redirect to factorio mod-gui -- @module Factorio Mod Gui --- @alias mod-gui +-- @alias mod_gui -- @author Factorio Dev Team +-- redirect to normal require of mod gui return require("mod-gui") \ No newline at end of file diff --git a/modules/index.lua b/modules/index.lua index 643e99c5..8488de38 100644 --- a/modules/index.lua +++ b/modules/index.lua @@ -1,3 +1,4 @@ +-- not_luadoc=true --- Used to index the files to be loaded -- @script index.lua return {