Page 1 of 1

LuaSetting::hidden

Posted: Mon Apr 06, 2020 4:51 am
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

Re: LuaSetting::hidden

Posted: Wed Apr 15, 2020 1:37 am
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

Re: LuaSetting::hidden

Posted: Tue Apr 21, 2020 11:00 pm
by Rseding91
Ok, added for the next release.

Re: LuaSetting::hidden

Posted: Tue Apr 21, 2020 11:03 pm
by eradicator
This is also going to be useful to conditionally hide advanced options. (edit: limited to player/map though)

Thanks!