mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Added ExpGamingCommands.tags
This commit is contained in:
31
modules/ExpGamingCommands/tags/control.lua
Normal file
31
modules/ExpGamingCommands/tags/control.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
--- A full ranking system for factorio.
|
||||||
|
-- @module ExpGamingCommands.kill
|
||||||
|
-- @author Cooldude2606
|
||||||
|
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||||
|
|
||||||
|
local Game = require('FactorioStdLib.Game')
|
||||||
|
local Ranking = require('ExpGamingCore.Ranking')
|
||||||
|
|
||||||
|
--- Gives you a tag
|
||||||
|
-- @command tag
|
||||||
|
-- @param tag the tag you want to have
|
||||||
|
commands.add_command('tag', 'Give yourself a custom tag. Use "" to have more than one word.', {
|
||||||
|
['tag'] = {true,'string-len',20}
|
||||||
|
}, function(event,args)
|
||||||
|
local player = Game.get_player(event)
|
||||||
|
local rank = Ranking.get_rank(player)
|
||||||
|
player.tag = rank.tag..' - '..args.tag
|
||||||
|
player.print('Your tag has been set. Use /tag-clear to remove your tag')
|
||||||
|
end)
|
||||||
|
|
||||||
|
--- Gives you a tag
|
||||||
|
-- @command tag
|
||||||
|
-- @param tag the tag you want to have
|
||||||
|
commands.add_command('tag-clear', 'Removes a custom tag. Player can be self (/tag-clear self)', {
|
||||||
|
['player'] = {true,'player-rank'}
|
||||||
|
}, function(event,args)
|
||||||
|
local player = args.player
|
||||||
|
local rank = Ranking.get_rank(player)
|
||||||
|
player.tag = rank.tag
|
||||||
|
player.print('Your tag has been removed.')
|
||||||
|
end)
|
||||||
21
modules/ExpGamingCommands/tags/softmod.json
Normal file
21
modules/ExpGamingCommands/tags/softmod.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "tags",
|
||||||
|
"version": "4.0.0",
|
||||||
|
"type": "Module",
|
||||||
|
"description": "Allows tags to be used by users.",
|
||||||
|
"location": "<blank>",
|
||||||
|
"keywords": [
|
||||||
|
"Tags",
|
||||||
|
"Custom Tags",
|
||||||
|
"Commands",
|
||||||
|
"ExpGaming"
|
||||||
|
],
|
||||||
|
"author": "<blank>",
|
||||||
|
"contact": "<blank>",
|
||||||
|
"license": "<blank>",
|
||||||
|
"dependencies": {
|
||||||
|
"ExpGamingCore.Ranking": "^4.0.0",
|
||||||
|
"ExpGamingCore.Commands": "^4.0.0",
|
||||||
|
"FactorioStdLib.Game": "^0.8.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user