diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json deleted file mode 100644 index e9c346db..00000000 --- a/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ExpandedNodes": [ - "", - "\\.github", - "\\.github\\ISSUE_TEMPLATE", - "\\utils" - ], - "SelectedNode": "\\utils\\math.lua", - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite deleted file mode 100644 index 178ee981..00000000 Binary files a/.vs/slnx.sqlite and /dev/null differ diff --git a/.vs/vs/v16/.suo b/.vs/vs/v16/.suo deleted file mode 100644 index c5280cd2..00000000 Binary files a/.vs/vs/v16/.suo and /dev/null differ diff --git a/config/_file_loader.lua b/config/_file_loader.lua index 7521e087..c4a5bba6 100644 --- a/config/_file_loader.lua +++ b/config/_file_loader.lua @@ -13,7 +13,6 @@ return { 'modules.commands.tag', 'modules.commands.teleport', 'modules.commands.cheat-mode', - 'modules.commands.ratio', 'modules.commands.interface', 'modules.commands.help', 'modules.commands.roles', diff --git a/config/roles.lua b/config/roles.lua index 36aced14..d46d08fe 100644 --- a/config/roles.lua +++ b/config/roles.lua @@ -210,7 +210,6 @@ local default = Roles.new_role('Guest','') 'command/list-roles', 'command/find-on-map', 'command/report', - 'command/ratio', 'gui/player-list', 'gui/rocket-info', 'gui/science-info', @@ -286,5 +285,4 @@ Roles.override_player_roles{ Tcheko={'Moderator','Member'}, WhomstThouAmMe={'Moderator','Member'}, Windbomb={'Moderator','Member'}, - tovernaar123={'Administrator','Moderator','Member'}, } diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg index ab475d4b..2fdbea0b 100644 --- a/locale/en/commands.cfg +++ b/locale/en/commands.cfg @@ -59,18 +59,9 @@ result=__1__ entites were revived and __2__ were healed to max health. set=Your bonus has been set to __1__. wip=This command is temporary and will be replaced at some point in the future. -[expcom-ratio] -notSelecting=Please select an entetiy with a recpie. -item-in=You need __1__ per seconds of [item=__2__]. -fluid-in=You need __1__ per seconds of [fluid=__2__]. -item-out=This will result in: __1__ [item=__2__] per second. -fluid-out=This will result in: __1__ [fluid=__2__] per second. -machines=And you will need __1__ machines (with the same speed as this one) for this. - [expcom-home] no-home=You have no home set. no-return=You can't return when home has not yet been used. home-set=Your home point has been set to x: __1__ y: __2__ return-set=Your return point has been set to x: __1__ y: __2__ home-get=Your home point is at x: __1__ y: __2__ - diff --git a/modules/commands/ratio.lua b/modules/commands/ratio.lua deleted file mode 100644 index e96fd2e3..00000000 --- a/modules/commands/ratio.lua +++ /dev/null @@ -1,85 +0,0 @@ - - -local Commands = require 'expcore.commands' - - -Commands.new_command('ratio','Will give the ratio on what you have selected') - :add_param('itemsPerSecond',true,'number') - :register(function(player,itemsPerSecond,raw) - - local machine = player.selected -- selected machine - if not machine then --nil check - return Commands.error{'expcom-ratio.notSelecting'} - end - - if machine.type ~= "assembling-machine" and machine.type ~= "furnace" then - return Commands.error{'expcom-ratio.notSelecting'} - end - local recpie = machine.get_recipe() -- recpie - - if not recpie then --nil check - return Commands.error{'expcom-ratio.notSelecting'} - end - - local items = recpie.ingredients -- items in that recpie - local product = recpie.products -- output items - local amountOfMachines - local moduleInvetory = machine.get_module_inventory()--the module Invetory of the machine - local mult = Modules(moduleInvetory) --function for the productivety moduals - - if itemsPerSecond then - amountOfMachines = math.ceil( AmountOfMachines(itemsPerSecond,1/recpie.energy*machine.crafting_speed*product[1].amount*mult)) -- amount of machines - end - if not amountOfMachines then - amountOfMachines = 1 --set to 1 to make it not nil - end - ----------------------------items---------------------------- - for i, item in ipairs(items) do - local sprite -- string to make the icon work either fluid ore item - - if item.type == "item" then - sprite = 'expcom-ratio.item-in' - else - sprite = 'expcom-ratio.fluid-in' - end - - - local ips = item.amount/recpie.energy*machine.crafting_speed*amountOfMachines --math on the items/fluids per second - Commands.print {sprite,math.round(ips,3),item.name}-- full string - end - ----------------------------products---------------------------- - - for i, product in ipairs(product) do - local sprite -- string to make the icon work either fluid ore item - - if product.type == "item" then - sprite = 'expcom-ratio.item-out' - else - sprite = 'expcom-ratio.fluid-out' - end - - local output = 1/recpie.energy*machine.crafting_speed*product.amount*mult --math on the outputs per second - Commands.print {sprite,math.round(output*amountOfMachines,3),product.name} -- full string - - end - - if amountOfMachines ~= 1 then - Commands.print{'expcom-ratio.machines',amountOfMachines} - end - - end) -function Modules(moduleInvetory) -- returns the multeplier of the modules - local effect1 = moduleInvetory.get_item_count("productivity-module") -- type 1 - local effect2 = moduleInvetory.get_item_count("productivity-module-2")-- type 2 - local effect3 = moduleInvetory.get_item_count("productivity-module-3") -- type 3 - - local mult = effect1*4+effect2*6+effect3*10 - return mult/100+1 -end - -function AmountOfMachines(itemsPerSecond,output) - if(itemsPerSecond) then - return itemsPerSecond/output - - end -end