OpenKeeper
OpenKeeper copied to clipboard
Remove deprecated code
It is very difficult to match the new code with the old one. It is very difficult to understand which code has already been ported, and which is not yet.
I suggest in deprecated classes to add "see" documentation help to find a new classes. I propose to clear methods whose functionality has been transferred to new classes, while maintaining the health of the code.
So we will know which code we still need, and which we have 100% transferred to the new classes.
Basically
- toniarts.openkeeper.ai.creature.*
- toniarts.openkeeper.world.*
are deprecated.
Most of the functionality have been ported. It is not exactly 1:1, but pretty close. It was certainly easier to port that way than to come up with totally new structure on top of a totally new architecture. Notable exceptions are:
- Effects
Some minor things are still left but I would still say that we have more than we used to.
We must remove methods that are no longer used and do not contain valuable code. For instance,
public void someMethod() {
// deprecated
}
Remember the @Deprecated
annotation :)
But annotation on method. Not only on class. So we will know that the method is completely transferred to a new class.
I would even say that you need to chage deprecated classes into dummy classes. There will be methods in the classess, but without logic
The old code being still around is indeed confusing.
I think I can remove them soon. There is only the effects I wish to salvage, but other than that I don't think there are any references anymore. Moving MainMenu and the ModelViewer was the last big work
Yeah this should be done before development comes to a halt since it requires deep knowledge about all the code.