LuaIntro: How to disable the example addons? (95.0)

LuaIntro: How to disable the example addons? (95.0)

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

LuaIntro: How to disable the example addons? (95.0)

Post by knorke »

Bit stupid question, but how does one disable the addons\ from base\springcontent.sdz\LuaIntro\Addons\ ?
As to add your own.

My modinfo.lua only has:

Code: Select all

depend = {
                "cursors.sdz",
        }
So how comes they even show up in the first place?

Putting empty .lua with the same names works but seems a bit silly.

spring-94.1.1-956-gc7ec3d3 in case that matters.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: LuaIntro: How to disable the example addons? (95.0)

Post by jK »

Code: Select all

if addon.InGetInfo then
	return {
		name      = "DefaultAddonBlocker";
		desc      = "";
		author    = "jK";
		date      = "2013";
		license   = "GNU GPL, v2 or later";

		layer     = math.huge;
		hidden    = true; -- don't show in the widget selector
		api       = true; -- load before all others?
		before    = {"all"}; -- make it loaded before ALL other widgets (-> it must be the first widget that gets loaded!)

		enabled   = true; -- loaded by default?
	}
end

local blockedDefaultAddons = {
	LoadTexture = true,
}

function addon.BlockAddon(name, knownInfo)
	return blockedDefaultAddons[name]
end
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: LuaIntro: How to disable the example addons? (95.0)

Post by knorke »

hm if that works then ok, thanks.
But now I must think of
Image

Should the those addons really run by default like that?
The gadgets in springcontent.sdz\LuaGadgets\Gadgets\ do not.
Will it stay like this or is temporary during development/testing?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: LuaIntro: How to disable the example addons? (95.0)

Post by jK »

Then I can't include the example in springcontent. except giving the dir silly names as `LuaIntro.example`
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: LuaIntro: How to disable the example addons? (95.0)

Post by Silentwings »

I think it's best to have the addons there, to copy out of basecontent, since without them likely no one realizes what the new features are. They don't get in the way when not being used as far as I can see.

New loadscreen setup is really nice, I made one for ba with a smaller progress bar and a bit less text.
Post Reply

Return to “Lua Scripts”