|
03-02-2016
|
11
|
|
Banned
Join Date: Sep 2015
Location: I live in a place on a place
Posts: 1,464
|
Like twilit said(I restored his post because it's more informative than mine, imo) there are two images made for each item. A green version and a blue version. Scripts render the button like so:
PHP Code:
button = "buttonfile"; // The button basename, so for the shovel it would be 'classiciphone_virtualkey_shovel'
suffix = season == "winter" ? "_blue" : ""; // This is the suffix, if it's winter it will be '_blue' otherwise it's '', or nothing.
image = button @ suffix @ ".png"; // This is where all the information is combined to form a filename. @ means concat or pretty much merging. It will merge the file basename, the suffix, and then append .png to the end of it. Boom, filename.
That's the gist of the old system, if that makes sense. The system has since been modified to allow a button base image, and then rendering an image over it but that doesn't fix all the old images. I have considered writing something in Java that takes all the old virtualkeys and removes the alpha values from the image so I could do a batch process on the entire lot in one go but I'm not sure how effective that would be. And all the scripts would still need their filename updated with the new versions. I would love to do this honestly. I think there's a lot that can be done with the interface if we could change the buttons but it's just something we got screwed over with.
This is a similar problem all across the server scripts. I've recently had to go through 100+ scripts for all the pets and replace them to use a base class script instead of their own copy/pasted version of the same script. If there was a bug with the pets, I couldn't fix it because I would have to make the change to every single pet script. However I had to finally break down and do it because of necessities of needing to make some fundamental changes to pets and there was no other way to do it. There are lots of instances like this that come up when you're working on the server and it makes development a massive pain in the ass.
|
Your problems are just because of poor planing
|
|
|
|