zrmine = zrmine || {}
zrmine.config = zrmine.config || {}

// Version 1.2.4
////////////////////////////////////////////////////////////////////////////////
// Developed by ZeroChain:
// http://steamcommunity.com/id/zerochain/

// If you wish to contact me:
// clemensproduction@gmail.com

////////////////////////////////////////////////////////////////////////////////
//////////////BEFORE YOU START BE SURE TO READ THE README.TXT///////////////////
////////////////////////////////////////////////////////////////////////////////



// Misc
///////////////////////
// This enables fast download
zrmine.config.EnableResourceAddfile = false

// These Ranks are allowed do use the Chat Commands:
// !savezrms | !zrms_lvlsys_reset PlayerName | !zrms_givexp Amount | !zrms_givelvl Amount
// !zrms_giveselfxp Amount | !zrms_giveselflvl Amount
zrmine.config.allowedRanks = {
	"superadmin",
	"owner",
}

// What language do we want? en,de,fr,pl
zrmine.config.selectedLanguage = "en"

// What Gamemode are we running this script on?
zrmine.config.selectedGameMode = "DarkRP"
// DarkRP
// NutScript
// BaseWars

// Currency Display
zrmine.config.BuyerNPC_Currency = "$"

// Mass Display
zrmine.config.BuyerNPC_Mass = "kg"

// Disables the Owner Checks so everyone can use and place everyones mining entitys
// Note* This should be on true if you dont have a prop protection on your server
zrmine.config.SharedOwnership = false

// The Damage the entitys have do take before they get destroyed.
// Setting it to -1 disables it
zrmine.config.Damageable = {}
zrmine.config.Damageable["MineEntrance"] = {EntityHealth = 1000}
zrmine.config.Damageable["Melter"] = {EntityHealth = 500}
zrmine.config.Damageable["Crusher"] = {EntityHealth = 300}
zrmine.config.Damageable["Refinery"] = {EntityHealth = 300}
zrmine.config.Damageable["Conveyorbelt"] = {EntityHealth = 200}
zrmine.config.Damageable["Splitter"] = {EntityHealth = 200}

// Some debug information
zrmine.config.debug = false
///////////////////////


// The Pickaxe
///////////////////////

// The Level System
/*
Examble: zrmine.config.Pickaxe_Lvl[Level] =
	{
	NextXP = Amount of XP Needed for the next Level up,
	HarvestAmount = Amount of Resource Harvested per Hit in Kg,
	HarvestInterval = Hit interval ,
	OreInv = Your Pickaxe Ore Inventory Capacity,
	FillCap = The Amount of or you can fill in a Crusher or crate per Right Click
	}
*/
zrmine.config.Pickaxe_Lvl = {}
zrmine.config.Pickaxe_Lvl[0] = {NextXP = 100, HarvestAmount = 0.1, HarvestInterval = 1.3 , OreInv = 10, FillCap = 3}
zrmine.config.Pickaxe_Lvl[1] = {NextXP = 200, HarvestAmount = 0.5, HarvestInterval = 1 , OreInv = 15, FillCap = 5}
zrmine.config.Pickaxe_Lvl[2] = {NextXP = 400, HarvestAmount = 1, HarvestInterval = 0.9 , OreInv = 20, FillCap = 10}
zrmine.config.Pickaxe_Lvl[3] = {NextXP = 500, HarvestAmount = 2, HarvestInterval = 0.75 , OreInv = 25, FillCap = 15}
zrmine.config.Pickaxe_Lvl[4] = {NextXP = 1000, HarvestAmount = 4, HarvestInterval = 0.6 , OreInv = 35, FillCap = 20}
zrmine.config.Pickaxe_Lvl[5] = {NextXP = 1500, HarvestAmount = 5, HarvestInterval = 0.5 , OreInv = 50, FillCap = 25}

// How many pickaxe hits before we get another XP
zrmine.config.Pickaxe_MaxNextXP = 10
zrmine.config.Pickaxe_MinNextXP = 5

// This is the Time in seconds that the Level system gets saved each player it changed
zrmine.config.Pickaxe_LvlSys_SaveTime = 500

// What Color Theme should the Pickaxe UI have
zrmine.config.PickaxeThemeLight = false

// This Defines a offset for the main UI of the Pickaxe
zrmine.config.PickaxeUI_Offset = Vector(0,0,0)

// Defines the harvest chance in % per Hit
zrmine.config.Pickaxe_HarvestChance = 75 //1-100% 75% means we have a 25% chance of getting no resource

// This Values are % Multiplicators for the diffrend resource types
// *Note* Examble : Amount: 0.5% = -50% You get only half the amount per hit   Speed: 1.3% = +30% more time needed do harvest
zrmine.config.Pickaxe_HarvestMul = {}
zrmine.config.Pickaxe_HarvestMul["Random"] = {Amount = 0.5, Speed = 1.3,XP = 2}
zrmine.config.Pickaxe_HarvestMul["Coal"] =  {Amount = 1.3, Speed = 0.5,XP = 1}
zrmine.config.Pickaxe_HarvestMul["Iron"] = {Amount = 1.2, Speed = 0.7,XP = 1}
zrmine.config.Pickaxe_HarvestMul["Bronze"] = {Amount = 0.6, Speed = 1,XP = 1}
zrmine.config.Pickaxe_HarvestMul["Silver"] = {Amount = 0.5, Speed = 1.1,XP = 2}
zrmine.config.Pickaxe_HarvestMul["Gold"] = {Amount = 0.25, Speed = 1.5,XP = 3}
///////////////////////



// The Bar
///////////////////////

/*
// Real Metal Price
local Gold_1kg = 48000	//$
local Silver_1kg = 630	//$
local Bronze_1kg = 18	//$
local Iron_1kg = 0.80	//$
*/

local Gold_1kg = 150	//$
local Silver_1kg = 75	//$
local Bronze_1kg = 25	//$
local Iron_1kg = 10	//$

local Mass_per_Bar = 10

// The Cash Value of 1 bar
zrmine.config.BarValue = {}
zrmine.config.BarValue["Iron"] = Iron_1kg * Mass_per_Bar
zrmine.config.BarValue["Bronze"] = Bronze_1kg * Mass_per_Bar
zrmine.config.BarValue["Silver"] = Silver_1kg * Mass_per_Bar
zrmine.config.BarValue["Gold"] = Gold_1kg * Mass_per_Bar

// Does the storage crate need do be full before it can be collected
zrmine.config.StorageCrateFull = false
///////////////////////



// The Buyer NPC
///////////////////////

zrmine.config.BuyerNPC_Model = "models/Humans/Group03/male_07.mdl"
// Note* You need do make sure the Model got compiled with the animations you want to use

// The Idle Animations of the Buyer NPC
zrmine.config.BuyerNPC_anim_idle = {"idle_angry","idle_subtle"}

// The Sell Animations of the Buyer NPC
zrmine.config.BuyerNPC_anim_sell = {"takepackage","cheer1","cheer2"}

// Here you can add all the Jobs that can sell Metal Bars
//*Note* This has do be the exact name of the Job, leaves this table empty do allow everyone do sell metal bars
zrmine.config.BuyerNPC_customers = {
	"Retro Miner",
}

// This is the time in seconds the buyer npcs refresh their buy rate
zrmine.config.BuyerNPC_RateRefresh = 600 //seconds

// This defines the range at which some Buyers gonna buy your metals
zrmine.config.BuyerNPC_MaxRate = 150 //%
zrmine.config.BuyerNPC_MinRate = 75 //%
///////////////////////



// The Resource Junk
///////////////////////
// This Values Defines the Despawn Time in seconds, set to -1 do Disable it
zrmine.config.Resource_DespawnTime = 200
///////////////////////



// The Ore Spawns
///////////////////////

// Do we want the Ore Spawns do refresh?
zrmine.config.Ore_Refresh = true

// How often do we want do refresh the ore spawns?
zrmine.config.Ore_Refreshrate = 400 //seconds

// How much gets refreshed?
zrmine.config.Ore_RefreshAmount = 200 //kg
///////////////////////



// The Mine
///////////////////////

// If you want do set the name of the Mine Entrance yourself rather then using the player name
// This can be usefull if the MineEntrace is public
zrmine.config.Mine_CustomName = nil

// Defines the chance in % what the MineEntrance Enity gives you
zrmine.config.Mine_ResourceChance = {}
zrmine.config.Mine_ResourceChance["Coal"] = 35
zrmine.config.Mine_ResourceChance["Iron"] = 30
zrmine.config.Mine_ResourceChance["Bronze"] = 15
zrmine.config.Mine_ResourceChance["Silver"] = 10
zrmine.config.Mine_ResourceChance["Gold"] = 5

// This Value Defines the Mining Time in seconds for the MineEntrace Entity
zrmine.config.MiningTime = {}
zrmine.config.MiningTime["Random"] = 30
zrmine.config.MiningTime["Coal"] = 15
zrmine.config.MiningTime["Iron"] = 30

zrmine.config.MiningTime["Bronze"] = 40
zrmine.config.MiningTime["Silver"] = 50
zrmine.config.MiningTime["Gold"] = 60

// The Ore Search distance of the Mine
zrmine.config.Mine_SearchDistance = 400

// This Value Defines the Amount one Minning Load gives the player in kg
zrmine.config.Max_MiningAmount = 45
zrmine.config.Min_MiningAmount = 15

// This defines how many ore entites 1 mine is allowed to spawn until it tells the user to refine some of the allready spawned ore
zrmine.config.Mine_MaxEntCount = 6
///////////////////////



// The Conveyorbelt
///////////////////////
zrmine.config.Belt_Capacity = 15
zrmine.config.SplitterBelt_Capacity = 25
///////////////////////



// The Inserter
///////////////////////
// Should Resources be deleted when no module is connected
zrmine.config.Inserter_DeleteOnEndPoint = true
///////////////////////



// The Crusher
///////////////////////

// Whats the crush process duration
zrmine.config.Crusher_Time = 1

// Whats the work amount
zrmine.config.Crusher_WorkAmount = 2

// Whats the crusher inventory capacity?
zrmine.config.Crusher_Capacity = 100
///////////////////////



// The Gravel Crate
///////////////////////

// The Capacity of the Crates
zrmine.config.GravelCrates_Capacity = 100

// Do we want do reuse the gravel crates or should they get deleted when emtpy
zrmine.config.GravelCrates_ReUse = true
///////////////////////



// The Refiner Crate
///////////////////////
// Do we want that everyone can attach or detach the refiner basket
zrmine.config.ResourceCrates_Sharing = true
// The Capacity of the Crates
zrmine.config.ResourceCrates_Capacity = 50
// Do we want do reuse the crate or destroy it when emtpy
zrmine.config.ResourceCrates_ReUse = true
///////////////////////



// The Refiner
///////////////////////
// This Values Defines the Refining Time in seconds
zrmine.config.Gold_RefiningTime = 30
zrmine.config.Silver_RefiningTime = 15
zrmine.config.Bronze_RefiningTime = 10
zrmine.config.Iron_RefiningTime = 5
zrmine.config.Coal_RefiningTime = 5

// How much of the Refined ore is metal
zrmine.config.RefiningAmount = 0.75 // 75%

zrmine.config.Refiner_Capacity = 25
///////////////////////



// The Melter
///////////////////////
// The Coal Capacity of the Melter
zrmine.config.Melter_Coal_Capacity = 100

// The Unload Time
zrmine.config.Melter_UnloadTime = 10

zrmine.config.Melter_Vars = {}
zrmine.config.Melter_Vars["Iron"] = {OreAmount = 25, MeltDuration = 5,CoalAmount = 10,CoolingTime = 3}
zrmine.config.Melter_Vars["Bronze"] = {OreAmount = 15, MeltDuration = 10,CoalAmount = 15,CoolingTime = 5}
zrmine.config.Melter_Vars["Silver"] = {OreAmount = 10, MeltDuration = 15,CoalAmount = 20,CoolingTime = 7}
zrmine.config.Melter_Vars["Gold"] = {OreAmount = 1, MeltDuration = 20,CoalAmount = 25,CoolingTime = 10}
///////////////////////



// Vrondakis Leveling System
///////////////////////

// How much XP do we get for completing these Tasks
// *Note01 Only works if Vrondakis Leveling System is installed
// *Note02 Also needs Faclos or NaMad PropProtection script installed do determine the owner
zrmine.config.Vrondakis = {}
zrmine.config.Vrondakis["Mining_mine"] = {XP = 5} // Per Mine Load
zrmine.config.Vrondakis["Mining_pickaxe"] = {XP = 1} // Per Hit
zrmine.config.Vrondakis["Crushing"] = {XP = 1} // Per WorkLoad
zrmine.config.Vrondakis["Refining"] = {XP = 2} // Per WorkLoad
zrmine.config.Vrondakis["Melting"] = {XP = 10} // Per WorkLoad
zrmine.config.Vrondakis["Selling"] = {XP = 5} // Per Sell
///////////////////////



zrmine.config.UI = {}
zrmine.config.UI["RefinerCrate"] = {TextColor = Color(255,255,255)}
