Merge pull request #200 from oof2win2/dev
Clear join message & fixing saving quickbar
This commit is contained in:
@@ -154,7 +154,8 @@ Roles.new_role('Supporter','Sup')
|
|||||||
'command/tag-color',
|
'command/tag-color',
|
||||||
'command/jail',
|
'command/jail',
|
||||||
'command/unjail',
|
'command/unjail',
|
||||||
'command/join-message'
|
'command/join-message',
|
||||||
|
'command/join-message-clear'
|
||||||
}
|
}
|
||||||
|
|
||||||
Roles.new_role('Partner','Part')
|
Roles.new_role('Partner','Part')
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[join-message]
|
[join-message]
|
||||||
greet=[color=0,1,0] Welcome to explosive gaming community server! If you like the server join our discord: __1__ [/color]
|
greet=[color=0,1,0] Welcome to explosive gaming community server! If you like the server join our discord: __1__ [/color]
|
||||||
message-set=Your join message has been updated.
|
message-set=Your join message has been updated.
|
||||||
|
message-cleared=Your join message has been cleared.
|
||||||
|
|
||||||
[quickbar]
|
[quickbar]
|
||||||
saved=Your quickbar filters have been saved.
|
saved=Your quickbar filters have been saved.
|
||||||
|
|||||||
@@ -34,3 +34,10 @@ Commands.new_command('join-message', 'Sets your custom join message')
|
|||||||
CustomMessages:set(player, message)
|
CustomMessages:set(player, message)
|
||||||
return {'join-message.message-set'}
|
return {'join-message.message-set'}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Commands.new_command('join-message-clear', 'Clear your join message')
|
||||||
|
:register(function(player)
|
||||||
|
if not player then return end
|
||||||
|
CustomMessages:remove(player)
|
||||||
|
return {'join-message.message-cleared'}
|
||||||
|
end)
|
||||||
@@ -31,17 +31,29 @@ PlayerFilters:on_load(function(player_name, filters)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
local ignoredItems = {
|
||||||
|
["blueprint"] = true,
|
||||||
|
["blueprint-book"] = true,
|
||||||
|
["deconstruction-planner"] = true,
|
||||||
|
["spidertron-remote"] = true,
|
||||||
|
["upgrade-planner"] = true
|
||||||
|
}
|
||||||
|
|
||||||
--- Saves your quickbar preset to the script-output folder
|
--- Saves your quickbar preset to the script-output folder
|
||||||
-- @command save-quickbar
|
-- @command save-quickbar
|
||||||
Commands.new_command('save-quickbar', 'Saves your Quickbar preset items to file')
|
Commands.new_command('save-quickbar', 'Saves your Quickbar preset items to file')
|
||||||
:add_alias('save-toolbar')
|
:add_alias('save-toolbar')
|
||||||
:register(function(player)
|
:register(function(player)
|
||||||
local filters = {}
|
local filters = {}
|
||||||
|
|
||||||
for i = 1, 100 do
|
for i = 1, 100 do
|
||||||
local slot = player.get_quick_bar_slot(i)
|
local slot = player.get_quick_bar_slot(i)
|
||||||
-- Need to filter out blueprint and blueprint books because the slot is a LuaItemPrototype and does not contain a way to export blueprint data
|
-- Need to filter out blueprint and blueprint books because the slot is a LuaItemPrototype and does not contain a way to export blueprint data
|
||||||
if slot ~= nil and slot.name ~= "blueprint" and slot.name ~= "blueprint-book" then
|
if slot ~= nil then
|
||||||
filters[i] = slot.name
|
local ignored = ignoredItems[slot.name]
|
||||||
|
if ignored ~= true then
|
||||||
|
filters[i] = slot.name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user