mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Dependenices
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
]]
|
||||
|
||||
-- dependencies
|
||||
local Global = require 'utils.global'
|
||||
local Debug = require 'utils.debug'
|
||||
local table = require 'utils.table'
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Debug = require 'utils.debug' --- @dep utils.debug
|
||||
local table = require 'utils.table' --- @dep utils.table
|
||||
|
||||
-- localized functions
|
||||
local get_random_weighted = table.get_random_weighted
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
local Event = require 'utils.event'
|
||||
local Game = require 'utils.game'
|
||||
local Utils = require 'utils.core'
|
||||
local Timestamp = require 'utils.timestamp'
|
||||
local Rank = require 'features.rank_system'
|
||||
local Donator = require 'features.donator'
|
||||
local Server = require 'features.server'
|
||||
local Ranks = require 'resources.ranks'
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Game = require 'utils.game' --- @dep utils.game
|
||||
local Utils = require 'utils.core' --- @dep utils.core
|
||||
local Timestamp = require 'utils.timestamp' --- @dep utils.timestamp
|
||||
local Rank = require 'features.rank_system' --- @dep features.rank_system
|
||||
local Donator = require 'features.donator' --- @dep features.donator
|
||||
local Server = require 'features.server' --- @dep features.server
|
||||
local Ranks = require 'resources.ranks' --- @dep resources.ranks
|
||||
|
||||
local insert = table.insert
|
||||
local format = string.format
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- This file contains core utilities used by the redmew scenario.
|
||||
--- This file contains core utilities used by the redmew scenario.
|
||||
|
||||
-- Dependencies
|
||||
local Game = require 'utils.game'
|
||||
local Color = require 'resources.color_presets'
|
||||
local Game = require 'utils.game' --- @dep utils.game
|
||||
local Color = require 'resources.color_presets' --- @dep resources.color_presets
|
||||
|
||||
-- localized functions
|
||||
local random = math.random
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- A small debugging tool that writes the contents of _ENV to a file when the game loads.
|
||||
--- A small debugging tool that writes the contents of _ENV to a file when the game loads.
|
||||
-- Useful for ensuring you get the same information when loading
|
||||
-- the reference and desync levels in desync reports.
|
||||
-- dependencies
|
||||
local table = require 'utils.table'
|
||||
local Event = require 'utils.event'
|
||||
local table = require 'utils.table' --- @dep utils.table
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
|
||||
-- localized functions
|
||||
local inspect = table.inspect
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
-- Handlers added with Event.add cannot be removed.
|
||||
-- For handlers that need to be removed or added at runtime use Event.add_removable.
|
||||
-- @usage
|
||||
-- local Event = require 'utils.event'
|
||||
-- local Event = require 'utils.event' --- @dep utils.event
|
||||
-- Event.add(
|
||||
-- defines.events.on_built_entity,
|
||||
-- function(event)
|
||||
@@ -27,8 +27,8 @@
|
||||
-- Token is used because it's a desync risk to store closures inside the global table.
|
||||
--
|
||||
-- @usage
|
||||
-- local Token = require 'utils.token'
|
||||
-- local Event = require 'utils.event'
|
||||
-- local Token = require 'utils.token' --- @dep utils.token
|
||||
-- local Event = require 'utils.event' --- @dep utils.event
|
||||
--
|
||||
-- Token.register must not be called inside an event handler.
|
||||
-- local handler =
|
||||
@@ -55,7 +55,7 @@
|
||||
-- A closure is a function that uses a local variable not defined in the function.
|
||||
--
|
||||
-- @usage
|
||||
-- local Event = require 'utils.event'
|
||||
-- local Event = require 'utils.event' --- @dep utils.event
|
||||
--
|
||||
-- If you want to remove the handler you will need to keep a reference to it.
|
||||
-- global.handler = function(event)
|
||||
@@ -80,7 +80,7 @@
|
||||
--
|
||||
-- ** Custom Scenario Events **
|
||||
--
|
||||
-- local Event = require 'utils.event'
|
||||
-- local Event = require 'utils.event' --- @dep utils.event
|
||||
--
|
||||
-- local event_id = script.generate_event_name()
|
||||
--
|
||||
@@ -94,10 +94,10 @@
|
||||
-- The table contains extra information that you want to pass to the handler.
|
||||
-- script.raise_event(event_id, {extra = 'data'})
|
||||
|
||||
local EventCore = require 'utils.event_core'
|
||||
local Global = require 'utils.global'
|
||||
local Token = require 'utils.token'
|
||||
local Debug = require 'utils.debug'
|
||||
local EventCore = require 'utils.event_core' --- @dep utils.event_core
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Token = require 'utils.token' --- @dep utils.token
|
||||
local Debug = require 'utils.debug' --- @dep utils.debug
|
||||
|
||||
local table_remove = table.remove
|
||||
local core_add = EventCore.add
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local Global = require 'utils.global'
|
||||
local Color = require 'resources.color_presets'
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Color = require 'resources.color_presets' --- @dep resources.color_presets
|
||||
local pairs = pairs
|
||||
|
||||
local Game = {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local Event = require 'utils.event_core'
|
||||
local Token = require 'utils.token'
|
||||
local Event = require 'utils.event_core' --- @dep utils.event_core
|
||||
local Token = require 'utils.token' --- @dep utils.token
|
||||
|
||||
local Global = {}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
local Token = require 'utils.token'
|
||||
local Event = require 'utils.event'
|
||||
local Game = require 'utils.game'
|
||||
local Global = require 'utils.global'
|
||||
local mod_gui = require 'mod-gui'
|
||||
local Token = require 'utils.token' --- @dep utils.token
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Game = require 'utils.game' --- @dep utils.game
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local mod_gui = require 'mod-gui' --- @dep mod-gui
|
||||
|
||||
local Gui = {}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
local Global = require 'utils.global'
|
||||
local Game = require 'utils.game'
|
||||
local PlayerStats = require 'features.player_stats'
|
||||
local Command = require 'utils.command'
|
||||
local Ranks = require 'resources.ranks'
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Game = require 'utils.game' --- @dep utils.game
|
||||
local PlayerStats = require 'features.player_stats' --- @dep features.player_stats
|
||||
local Command = require 'utils.command' --- @dep utils.command
|
||||
local Ranks = require 'resources.ranks' --- @dep resources.ranks
|
||||
|
||||
local format = string.format
|
||||
local abs = math.abs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- A module to prevent recipes from being unlocked by research. Accessed via the public functions.
|
||||
local Event = require 'utils.event'
|
||||
local Global = require 'utils.global'
|
||||
--- A module to prevent recipes from being unlocked by research. Accessed via the public functions.
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
|
||||
local Public = {}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Global = require 'utils.global'
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local type = type
|
||||
local error = error
|
||||
local tonumber = tonumber
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
local Module = {}
|
||||
|
||||
local Debug = require 'utils.debug'
|
||||
local Debug = require 'utils.debug' --- @dep utils.debug
|
||||
|
||||
local in_state_callbacks = {}
|
||||
local transaction_callbacks = {}
|
||||
|
||||
@@ -238,7 +238,7 @@ require 'util'
|
||||
-- process is a function which allow altering the passed object before transforming it into a string.
|
||||
-- A typical way to use it would be to remove certain values so that they don't appear at all.
|
||||
-- return <string> the prettied table
|
||||
table.inspect = require 'utils.inspect'
|
||||
table.inspect = require 'utils.inspect' --- @dep utils.inspect
|
||||
|
||||
--- Takes a table and returns the number of entries in the table. (Slower than #table, faster than iterating via pairs)
|
||||
table.size = table_size
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
-- Threading simulation module
|
||||
--- Threading simulation module
|
||||
-- Task.sleep()
|
||||
-- @author Valansch and Grilledham
|
||||
-- github: https://github.com/Refactorio/RedMew
|
||||
-- ======================================================= --
|
||||
|
||||
local Queue = require 'utils.queue'
|
||||
local PriorityQueue = require 'utils.priority_queue'
|
||||
local Event = require 'utils.event'
|
||||
local Token = require 'utils.token'
|
||||
local Queue = require 'utils.queue' --- @dep utils.queue
|
||||
local PriorityQueue = require 'utils.priority_queue' --- @dep utils.priority_queue
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Token = require 'utils.token' --- @dep utils.token
|
||||
|
||||
local Task = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user