Support for neon signsSolved
spewki
At this point, I'm guessing I could just make a mod that gives the ability to use the admin command to players.

Yzarul, Do you happen to know what the layers are called for the animated sign... I imagine it would be something like [ sign.neon.xl.animated.1 ] or Layer.1 .. would it be that easy to add the layers? i had tried what you mentioned to add the other layers.. but everytime I do /sil and the url it wipes the other layers. not sure why.

Hello. If you want more than one image in animated neons you can change lines:

            public void SetImage(uint id)
            {
                Sign.textureIDs = new uint[] { id };
            }

To:

            public void SetImage(uint id)
            {
                Sign.textureIDs[0] = id;
            }

And then copy image to next frames. :)
Sometimes it can remove stretch from images, and double them, but works better than nothing :P

Heres how to add a command for it.

So if you wanted to set frames it would be.

/sil frame:0url
/sil frame:1url

and so on up to frame 4.

Any way in the code go to
"private IEnumerator DownloadImage(DownloadRequest request)"

and add this into the start of the function.

                int fselected = 0;
		if (request.Url.StartsWith("frame:0"))
		{
		fselected = 0;
		request.Url = request.Url.Replace("frame:0","");
		}
		else if (request.Url.StartsWith("frame:1"))
		{
		fselected = 1;
		request.Url = request.Url.Replace("frame:1","");
		}
		else if (request.Url.StartsWith("frame:2"))
		{
		fselected = 2;
		request.Url = request.Url.Replace("frame:2","");
		}
		else if (request.Url.StartsWith("frame:3"))
		{
		fselected = 3;
		request.Url = request.Url.Replace("frame:3","");
		}
		else if (request.Url.StartsWith("frame:4"))
		{
		fselected = 4;
		request.Url = request.Url.Replace("frame:4","");
		}

Then further down in the function find.
"request.Sign.SetImage(FileStorage.server.Store(resizedImageBytes, FileStorage.Type.png, request.Sign.NetId));"

and change it to

request.Sign.SetImage(FileStorage.server.Store(resizedImageBytes, FileStorage.Type.png, request.Sign.NetId),fselected);

Then in.
"private IEnumerator RestoreImage(RestoreRequest request)"

find
"request.Sign.SetImage(FileStorage.server.Store(resizedImageBytes, FileStorage.Type.png, request.Sign.NetId));"

change it to

request.Sign.SetImage(FileStorage.server.Store(resizedImageBytes, FileStorage.Type.png, request.Sign.NetId),0);

Then in
"private interface IPaintableEntity : IBasePaintableEntity"

change
"void SetImage(uint id);"

to

void SetImage(uint id,int frameid);

then find
"public void SetImage(uint id)"

change it to.

            public void SetImage(uint id,int frameid)
            {
                //Sign.textureIDs = new uint[] { id };
		Sign.textureIDs[frameid] = id;
            }

does not work in my case 

(00:27:25) | Added '// Reference: System.Drawing' in plugin 'SignArtist'

(00:27:28) | Error while compiling: SignArtist.cs(719,23): error CS0535: `Oxide.Plugins.SignArtist.PaintableFrame' does not implement interface member `Oxide.Plugins.SignArtist.IPaintableEntity.SetImage(uint, int)'

Is there any desire to find a way to allow NEON signs to translate simple JPGs into a neon sign??

thanks

[Sign Artist] Couldn't find the required image size for assets/prefabs/misc/xmas/neon_sign/sign.neon.xl.animated.prefab, please report this in the plugin's thread.

Yes, same for

[Sign Artist] Couldn't find the required image size for assets/prefabs/misc/xmas/neon_sign/sign.neon.xl.prefab, please report this in the plugin's thread.

Deleted User

does not work in my case 

(00:27:25) | Added '// Reference: System.Drawing' in plugin 'SignArtist'

(00:27:28) | Error while compiling: SignArtist.cs(719,23): error CS0535: `Oxide.Plugins.SignArtist.PaintableFrame' does not implement interface member `Oxide.Plugins.SignArtist.IPaintableEntity.SetImage(uint, int)'

did everything according to the instructions, the same mistake

 Error while compiling: SignArtist.cs(725,23): error CS0535: 
`Oxide.Plugins.SignArtist.PaintableFrame' does not implement interface member 
`Oxide.Plugins.SignArtist.IPaintableEntity.SetImage(uint, int)'

hello - can you share the final cs file? this looks like great work! 

shturval

did everything according to the instructions, the same mistake

 Error while compiling: SignArtist.cs(725,23): error CS0535: 
`Oxide.Plugins.SignArtist.PaintableFrame' does not implement interface member 
`Oxide.Plugins.SignArtist.IPaintableEntity.SetImage(uint, int)'

The function is no longer under

public void SetImage (uint id)
{
    Sign._overlayTextureCrc = id;
}

but under

public void SetImage (uint id, int frameid)
{
    Sign._overlayTextureCrc = id;
}

therefore SetImage must also be changed for PaintableFrame, even if the content of the Functions ignored this.

Then it should work again for those who had errors. He just didn't know frameid.

In the programming language it was said that SetImage gets an id AND a frameid, because PaintableFrame was not changed for you, but it only expected the id, but got both, so there was an error.

i hope this gets updated with the neon signs! 

[Sign Artist] Couldn't find the required image size for assets/prefabs/misc/xmas/neon_sign/sign.neon.xl.prefab, please report this in the plugin's thread.

Same here

Hi there, works perfectly for me a long time, but now the image got doubled if i copy to another frame,
Only happends to "medium animated Signs" the big one works fine.
anyone got a fix for that ?

Locked automatically