LuaSetting::hidden

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 373
Joined: Tue Jul 08, 2014 10:06 am
Contact:

LuaSetting::hidden

Post by LuziferSenpai »

Hey,

it would be nice to have a Option to hide a Setting from a Player, so we can have Settings that are only meant to be changed by other mods or used in other mods to register Entities.

Like Klonan does in his Transport Drones mod.

Code: Select all

if mods["Transport_Drones"] then
	data:extend
	{
		{
			type = "string-setting",
			name = "transport_drones_add_deep-storage-unit-fluid-big",
			setting_type = "startup",
			order = "01",
			default_value = "__Deep_Storage_Unit__/scripts/units/DSUFB",
			localised_name = { "", "DO NOT TOUCH!" }
		},
		{
			type = "string-setting",
			name = "transport_drones_add_deep-storage-unit-item-big",
			setting_type = "startup",
			order = "02",
			default_value = "__Deep_Storage_Unit__/scripts/units/DSUIB",
			localised_name = { "", "DO NOT TOUCH!" }
		}
	}
end
So, this adds these 2 entities with these 2 Files to his mod.

But a Player could change that currently and thats why I would love to get this Option.

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
User avatar
Linver
Fast Inserter
Fast Inserter
Posts: 158
Joined: Wed Jan 09, 2019 2:28 pm
Contact:

Re: LuaSetting::hidden

Post by Linver »

+1

In some compatibility situation I have remove some options and this cost to me some code walk-around. This can be useful in different situations
Rseding91
Factorio Staff
Factorio Staff
Posts: 14280
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaSetting::hidden

Post by Rseding91 »

Ok, added for the next release.
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: LuaSetting::hidden

Post by eradicator »

This is also going to be useful to conditionally hide advanced options. (edit: limited to player/map though)

Thanks!
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Implemented mod requests”