Electus LogoElectus Documentation

Electus Drugs Available Files

Browse the Electus Drugs source files and configuration by folder.

config/config.lua
---@type ElectusDrugsConfig
Config = Config or {}

Config.Debug = false
Config.Locale = "en"

-- "easy", "default" or "hardcore". The admin panel's choice wins over this.
Config.Difficulty = "default"

-- "quick" (minutes, for testing), "normal" (hours) or "slow" (about a day per weed grow). The admin panel's choice wins over this.
Config.Pace = "normal"

-- Start your framework and integrations before this resource for auto-detection.
Config.Framework = "auto"
Config.Inventory = "auto"
Config.NotificationSystem = "auto"
Config.MenuSystem = "auto"
Config.HelpTextStyle = "auto"
-- true uses the target resource; "auto" falls back to [E] prompts when no qtarget/qb-target runs.
Config.Target = true
Config.DispatchSystem = "auto"
Config.BlackMoneyItem = "auto"
Config.Logs = {
	Enabled = false,
	Service = "auto",
}

-- /drugstest and its admin test tools. Keep it off on a live server.
Config.Test = {
	Enabled = false,
	Command = "drugstest",
}

Config.ShellGrid = {
	Origin = vector3(-6.0, -4.0, 0.0),
	Columns = 24,
	Rows = 16,
	CellSize = 0.5,
	Height = 3.0,
}

-- Names are locale keys under "palette.".
Config.GridPalette = {
	{ Name = "water", Sections = {
		{ Name = "pipes", Pieces = { "straight", "straight_short", "elbow", "tee", "cross", "cap", "wall_pipe" } },
		{ Name = "flow", Pieces = { "valve", "irrigation_timer", "pump", "riser" } },
		{ Name = "tanks", Pieces = { "tank_small", "tank", "tank_large" } },
	} },
	{ Name = "growing", Sections = {
		{ Name = "beds", Pieces = { "planter_block", "sprinkler", "bed_monitor", "monitor" } },
		{ Name = "lights", Pieces = { "led", "uv", "uv_stand", "bed_led", "bed_uv" } },
		{ Name = "mushrooms", Pieces = { "mushroom_empty", "mushroom_substrate", "mushroom_1", "mushroom_2", "mushroom_3" } },
	} },
	{ Name = "air", Sections = {
		{ Name = "fans", Pieces = { "mushroom_fan", "drum_fan", "huge_fan" } },
		{ Name = "climate", Pieces = { "space_heater", "humidifier", "dehumidifier", "thermostat" } },
	} },
	{ Name = "stations", Sections = {
		{ Name = "processing", Pieces = { "drying_rack", "drying_cabinet", "mushroom_dry_rack", "processing_table", "grinder" } },
		{ Name = "prep", Pieces = { "coca_vat", "meth_prep", "ecstasy_mixer" } },
		{ Name = "cooking", Pieces = { "coca_heater", "meth_reactor" } },
		{ Name = "finishing", Pieces = { "meth_freezer", "meth_cooler", "ecstasy_press" } },
		{ Name = "power", Pieces = { "generator" } },
	} },
	{ Name = "structure", Sections = {
		{ Name = "walls", Pieces = { "wall", "wall_doorway", "wall_vent" } },
		{ Name = "insulated", Pieces = { "insulated_wall", "insulated_doorway", "insulated_vent", "insulated_door", "insulated_ceiling" } },
		{ Name = "deck", Pieces = { "deck_tile", "deck_pillar", "deck_stairs" } },
		{ Name = "storage", Pieces = { "storage_cabinet" } },
	} },
}
Config.GridHistory = 25 -- Editor actions Z can undo.
Config.PipeRunLimit = 32
Config.WallRunLimit = 64
Config.DeckAreaLimit = 48
Config.CeilingAreaLimit = 200

Config.BuildCamera = {
	Enabled = true,
	Fov = 65.0,
	MoveSpeed = 3.0, -- Metres per second.
	FastMultiplier = 2.5,
	LookSpeed = 5.0,
	ZoomStep = 0.4,
	Smoothing = 12.0,
	Margin = 0.1,
	MinHeight = 0.5,
	CeilingGap = 0.25,
}

-- Grid editor overlay colours as { red, green, blue, alpha }.
Config.GridOverlay = {
	Radius = 3.0,
	Line = { 170, 215, 200, 28 },
	Minor = { 170, 225, 205, 110 },
	Major = { 205, 245, 225, 175 },
	Border = { 120, 220, 185, 200 },
	Blocked = { 200, 70, 60, 70 },
	Unsupported = { 235, 120, 60, 38 },
	EquipmentOutline = 140,
	ReferenceOutline = 90,
	Categories = {
		water = { 70, 150, 235, 50 },
		growing = { 120, 205, 95, 50 },
		processing = { 235, 170, 70, 50 },
		lights = { 245, 220, 110, 50 },
		structure = { 150, 160, 175, 55 },
	},
	Valid = { 90, 230, 130, 70 },
	Invalid = { 240, 85, 70, 85 },
	Hover = { 245, 245, 245, 220 },
	Moving = { 240, 180, 70, 220 },
	Port = { 90, 200, 240, 230 },
	PortMatch = { 90, 235, 120, 240 },
	Dry = { 120, 135, 150, 45 },
	Supplied = { 80, 170, 245, 235 },
	Lit = { 250, 220, 90, 235 },
	Missing = { 235, 75, 65, 235 },
	Airflow = {
		Threshold = 2,
		Low = { 70, 150, 235, 30 },
		High = { 110, 240, 215, 110 },
		Arrow = { 225, 250, 255, 220 },
		Ripple = 4.0,
		Preview = { 110, 240, 215, 200 },
		Stopped = { 165, 172, 180, 40 },
		StoppedArrow = { 200, 205, 210, 150 },
		Vent = { 110, 240, 215, 235 },
		VentOff = { 150, 160, 170, 200 },
	},
	Light = {
		On = { 250, 220, 90, 55 },
		Off = { 165, 172, 180, 45 },
		Preview = { 255, 235, 120, 110 },
		Plant = { 255, 248, 190, 185 },
		Outline = { 255, 240, 150, 235 },
		Beam = { 255, 235, 120, 130 },
	},
	Climate = {
		Cold = { 80, 150, 245, 60 },
		Mild = { 120, 215, 160, 30 },
		Hot = { 250, 115, 45, 75 },
		Spot = { 255, 150, 60, 110 },
	},
}

-- Enabled adds the developer commands drugslablighting and drugslabgrid; labs work without it.
Config.ShellTest = {
	Enabled = false,
	Command = "drugslab",
	GridCommand = "drugslabgrid",
	Model = "electus_basement_shell_v21",
	Lights = { { Kind = "cage", Offset = vector3(0.0, 0.0, 2.55) } },
	Coords = vector3(0.0, 0.0, -80.0),
	Spawn = vector4(0.0, -2.4, 1.0, 0.0),
	Exit = vector3(4.0, -3.5, 0.1),
	-- Where a player who loads inside a shell goes when the server has no entrance for them.
	Rescue = vector4(195.17, -933.77, 30.69, 144.5),
}

Config.ShellSizes = {
	medium = {
		Model = "electus_basement_shell_medium",
		Grid = {
			Origin = vector3(-6.0, -4.0, 0.0), Columns = 36, Rows = 20, CellSize = 0.5, Height = 3.0, Ceiling = false, RoofHeight = 5.5,
			VentSize = "medium", -- Config.Ventilation.Sizes
			RoofBlocked = {
				{ Column = 5, Row = 4, Columns = 2, Rows = 2 }, { Column = 5, Row = 14, Columns = 2, Rows = 2 },
				{ Column = 18, Row = 4, Columns = 1, Rows = 2 }, { Column = 18, Row = 14, Columns = 1, Rows = 2 },
				{ Column = 29, Row = 4, Columns = 2, Rows = 2 }, { Column = 29, Row = 14, Columns = 2, Rows = 2 },
			},
			-- A deck tile needs a wall or a pillar within DeckSupport cells.
			DeckHeight = 2.6, DeckSupport = 4,
			CameraHeight = 5.0,
		},
		Lights = {
			{ Kind = "batten", Offset = vector3(4.0, -3.84, 2.64) },
			{ Kind = "highbay", Offset = vector3(-2.875, -1.5, 4.5) },
			{ Kind = "highbay", Offset = vector3(-2.875, 3.5, 4.5) },
			{ Kind = "highbay", Offset = vector3(3.25, -1.5, 4.5) },
			{ Kind = "highbay", Offset = vector3(3.25, 3.5, 4.5) },
			{ Kind = "highbay", Offset = vector3(9.125, -1.5, 4.5) },
			{ Kind = "highbay", Offset = vector3(9.125, 3.5, 4.5) },
		},
	},
	large = {
		Model = "electus_basement_shell_large",
		Grid = {
			Origin = vector3(-10.0, -4.0, 0.0), Columns = 52, Rows = 32, CellSize = 0.5, Height = 3.0, Ceiling = false, RoofHeight = 6.0,
			VentSize = "large", -- Config.Ventilation.Sizes
			RoofBlocked = {
				{ Column = 4, Row = 6, Columns = 4, Rows = 4 }, { Column = 4, Row = 22, Columns = 4, Rows = 4 },
				{ Column = 16, Row = 6, Columns = 4, Rows = 4 }, { Column = 16, Row = 22, Columns = 4, Rows = 4 },
				{ Column = 28, Row = 6, Columns = 4, Rows = 4 }, { Column = 28, Row = 22, Columns = 4, Rows = 4 },
				{ Column = 40, Row = 6, Columns = 4, Rows = 4 }, { Column = 40, Row = 22, Columns = 4, Rows = 4 },
				{ Column = 0, Row = 4, Columns = 52, Rows = 2 }, { Column = 0, Row = 26, Columns = 52, Rows = 2 },
				{ Column = 0, Row = 11, Columns = 52, Rows = 2 }, { Column = 0, Row = 19, Columns = 52, Rows = 2 },
				{ Column = 0, Row = 15, Columns = 52, Rows = 2 },
			},
			DeckHeight = 2.6, DeckSupport = 4,
			CameraHeight = 5.0,
		},
		Lights = {
			{ Kind = "batten", Offset = vector3(4.0, -3.84, 2.64) },
			{ Kind = "panel", Offset = vector3(-7.0, 0.0, 5.7) },
			{ Kind = "panel", Offset = vector3(-7.0, 8.0, 5.7) },
			{ Kind = "panel", Offset = vector3(-1.0, 0.0, 5.7) },
			{ Kind = "panel", Offset = vector3(-1.0, 8.0, 5.7) },
			{ Kind = "panel", Offset = vector3(5.0, 0.0, 5.7) },
			{ Kind = "panel", Offset = vector3(5.0, 8.0, 5.7) },
			{ Kind = "panel", Offset = vector3(11.0, 0.0, 5.7) },
			{ Kind = "panel", Offset = vector3(11.0, 8.0, 5.7) },
		},
	},
}

-- Zoom: 1 frames the whole bed, lower is closer. TurnSpeed: 1 is default.
Config.BedView = { Enabled = true, Fov = 50.0, Zoom = .7, TurnSpeed = 1.0, Ease = 450, Radius = .035, Reach = 4.0, PanSpeed = 1.5, FocusHeight = .55, CeilingGap = .3 }
-- Pitch: degrees the camera looks down at the start. GhostAlpha: 0-255.
Config.RackView = {
	Enabled = true, Fov = 45.0, Margin = 1.45, Ease = 400, TurnSpeed = 1.0, GhostAlpha = 110,
	Pitch = { DryingRack = 40.0, Cabinet = 20.0, TrayRack = 18.0 },
	HangRoom = .35, PickRadius = .06,
}
-- A bag holds BagLitres, a block takes BlockLitres. Required = false places blocks already full and level.
Config.Soil = { Required = true, BagLitres = 50, BlockLitres = 25, PourRate = 10, LevelDistance = 1.0, RoughPenalty = 10, BagSag = .55 }
Config.BedMonitor = {
	Inset = .03, Lift = .002, DrawDistance = 8.0,
	ScreenDistance = 6.0, Width = 1280, Height = 800, UpdateInterval = 1000, IdleTimeout = 15000, UseDistance = 2.2, CameraDistance = .42, Fov = 45.0,
	Screen = { vector3(-0.2, 0.03523, 0.74587), vector3(-0.2, -0.02948, 0.50438), vector3(0.2, -0.02948, 0.50438), vector3(0.2, 0.03523, 0.74587) },
}

Config.Pot = {
	DefaultStyle = "round",
	Styles = {
		round = {
			EmptyModel = "electus_pot_empty",
			FilledModel = "electus_pot_soil",
			SoilModel = "electus_pot_soil_insert",
			PlantOffset = vector3(0.0, 0.0, 0.365),
			SoilBase = 0.025,
			SoilStartScale = 0.7077626,
		},
		square = {
			MonitorOffset = vector3(0.0, -0.233, 0.446),
			EmptyModel = "electus_square_pot_empty",
			FilledModel = "electus_square_pot_soil",
			SoilModel = "electus_square_soil_insert",
			PlantOffset = vector3(0.0, 0.0, 0.39),
			SoilBase = 0.035,
			SoilStartScale = 0.79908676,
			PipeModel = "electus_square_water_pipe",
			WaterPort = vector3(0.14, -0.272, 0.14),
			HoseEnd = vector3(0.09, -0.65, -0.122),
			Drippers = { vector3(-0.12, -0.1755, 0.4), vector3(0.12, -0.1755, 0.4), vector3(-0.12, 0.1755, 0.4), vector3(0.12, 0.1755, 0.4) },
		},
		block = {
			MonitorOffset = vector3(0.0, -0.238, 0.40),
			EmptyModel = "ed_planter_block_grate",
			FilledModel = "ed_planter_block_soil",
			SoilModel = "ed_planter_block_soil_insert",
			HeapModel = "ed_planter_block_soil_heap",
			PlantOffset = vector3(0.0, 0.0, 0.37),
			SoilBase = 0.07,
			SoilStartScale = 0.9389468,
			Deck = 0.40,
			SprinklerHead = vector3(0.0, 0.0, 0.153),
		},
	},
	DefaultStage = 3,
	DefaultStrain = "og_kush",
	CutDistance = 2.0,
	CutAimRadius = 0.04,
	CutDuration = 550,
	FillDuration = 4000,
	-- Moisture is a percentage, rates are per second.
	Watering = { InitialMoisture = 20, StartBelow = 45, Target = 70, FillRate = 6, DryRate = .25 / 60,
		SprinklerSeconds = 15 },
	FillParticles = {
		Asset = "core",
		Name = "ent_amb_stoner_rubble_drop",
		Scale = 0.12,
		Offset = vector3(0.0, 0.0, 0.60),
		Colour = vector3(0.36, 0.25, 0.14),
	},
}
Config.Water = {
	InitialFill = 0.0,
	Tanks = {
		small = { Model = "ed_water_tank_50", Capacity = 50, Outlet = vector3(0, -0.2316, 0.096), FillPort = vector3(0, -.1752, .54) },
		medium = { Model = "electus_water_tank", Capacity = 200, Outlet = vector3(0, -0.386, 0.16), FillPort = vector3(0, -.292, .90) },
		large = { Model = "ed_water_tank_500", Capacity = 500, Outlet = vector3(0, -0.5404, 0.20), FillPort = vector3(0, -.4088, 1.125) },
	},
	PipeModel = "electus_water_pipe",
	CouplerModel = "electus_water_coupler",
	LitresPerMoisture = 0.02,
	Leak = { LitresPerSecond = .25, Reach = .45, Height = .03, Scale = .18 },
	Sprinkler = { Asset = "core", Name = "ent_amb_sprinkler_golf", Range = 4.0, Rotation = vector3(0, 29.248826, 90) },
	MaxDistance = 6.0,
	-- Colour tints the droplets (r, g, b 0-1). Try values with /drugstest spray <r> <g> <b> [alpha].
	SprinklerSpray = {
		Asset = "ed_sprinkler_spray", Name = "ed_sprinkler_fan", Scale = 1.0, Sweep = 30, SweepSeconds = 2.6, DrawDistance = 15.0, MaxSprays = 12,
		Colour = vector3(.62, .74, .86), Alpha = 1.0,
	},
	-- Every and Run are game minutes (one is two real seconds).
	Timer = {
		Every = { 30, 60, 120, 180, 240, 360, 720, 1440 },
		Run = { 1, 2, 5, 10, 15, 30 },
		Default = { every = 60, run = 10, mode = "auto" },
		Distance = 1.8,
	},
}
-- Moisture is a percentage, rates are per second.
Config.Mushrooms = {
	InitialMoisture = 25, StartBelow = 40, Target = 75, FillRate = 4, DryRate = .05 / 60, LitresPerMoisture = .04, PickDistance = 2, AimRadius = .025, PickDuration = 550,
	View = { Distance = .6, Height = 1.25, Fov = 55.0, Ease = 450, Radius = .035 },
	-- Seconds per stage while moisture and airflow stay at or above these.
	StageDuration = 7200, GrowMoisture = 45, GrowAirflow = 30,
	Flushes = 2, -- Harvests per substrate.
	PickYield = 1,
	MonitorOffset = vector3(.05, -.221, .14),
}
Config.Humidifier = {
	Mist = { Asset = "core", Name = "ent_amb_steam_vent_round", Scale = .32, Alpha = .6, Colour = vector3(.92, .96, 1.0), Offsets = { vector3(0, -.02, 1.005) } },
}
Config.RoomMist = {
	Enabled = true,
	Asset = "core",
	Name = "ent_amb_fbi_smoke_linger_lt",
	Scale = 1.0,
	Alpha = 0.12,
	Colour = vector3(0.35, 0.35, 0.35),
	Offsets = {
		vector3(-4.0, -2.0, 0.8), vector3(0.0, -2.0, 1.2), vector3(4.0, -2.0, 0.8),
		vector3(-4.0, 2.0, 1.2), vector3(0.0, 2.0, 0.8), vector3(4.0, 2.0, 1.2),
	},
}
-- 0 turns a boost off.
Config.LightBoost = {
	LedGrowth = 25, -- Percent faster growth under a switched-on LED.
	UvQuality = 10, -- Quality points one growth stage under UV wins back, up to 100.
}
Config.GrowLights = {
	led = { GlowModel = "ed_grow_glow_led_v13" },
	uv = { GlowModel = "ed_grow_glow_uv_v13" },
	uv_stand = { GlowModel = "ed_grow_stand_glow" },
	bed_led = { GlowModel = "ed_bed_light_led_glow" },
	bed_uv = { GlowModel = "ed_bed_light_uv_glow" },
}