To make things a little easier, I use global variables within objects. I have an item, let's say /obj/item/apple, and this has a global variable of fruit which is set to 1.
Pretty lame, but it suffices as an example. Performing the following action:
obj/item/apple
var
global
fruit = 1
obj/item/transmutator
//turns apples into oranges!
New()
. = ..()
spawn
var
obj/item/apple/I = new
if(I.fruit) //despite usage, still a warning
...
else
...
I = null
Now I'm using this method to obtain the value of the fruit variable. I now postulate the question if this is a glitch, or if I'm doing it wrong and I need to access this global variable some other way. Does anyone know?
Where that warning is a bug is something of a matter for debating semantics and whether you should need an isntance variable to access something inherently static.