xbony2 / Nuclear-Control

An updated version of nuclear control.
BSD 3-Clause "New" or "Revised" License
24 stars 36 forks source link

Better Port to IC2 and IC2 Classic #134

Closed Speiger closed 8 years ago

Speiger commented 8 years ago

I am saying now sorry for what i have to say and it does not mean anything with Ingame....

But the more i read the Code of this mod the more i have to kill myself... This code handling is Horrible. There is so much code inside where i just think: WTF are you doing in there? Are you actually talking to each other or are you coding? I mean the mod itself is not bad. Maybe even a really good one but the code inside is one of the biggest messes i have ever seen... having a function tell the mod: Hey i am the serverside now, and use it never again and after that check you are using the same function to detect the client.... I mean WTF? Or did someone of you hear something about OptionalInterface? or good reflection use? I think not... Oh well i am not able to change your minds but my suggestion is: Rewirte the whole mod use Reflection to load submoduls/crossmod things and all that stuff and never use it again unless a crossmod can not solve it... Well i take that back... Because i do not think that this would end better... but start to originze/fix the codemess you did...

Again i am really sorry to say what i think, but helping a great mod with a mess code is really painfull...

Ok after yelling at you and beeing now sorry (and before sorry) about that is done. What did i do? I simply changed how the IC2 Plugin/Cross works. Instead of having 2 Crosses in your ModArea we have now 1. The cross itself is just a empty baseclass with a couple helper functions in it. They get called simply by your mod and if IC2 is not installed then i have a fallback class that simply catches everything and calls default functions... If Ic2 Exp is installed then it will call IC2 Exp functions and classes. No worry no crashes (all loaded by reflection) if IC2 Classic is loaded then it will call IC2 Classic functions. Well i had to implement a Class to your mod area simply because it is required... Only for compiling after that you can delete it if you want... So and now a thing what i also did i made everything to that new modul compatible and that should solve every problem...

Now i would lie when i said that i have tested that thing. Simple reason why not: AE2 Crashes during the loading... But i can tell you the thing i made is stable that it will not crash... At least if you do not mess something up with it...

Speiger

xbony2 commented 8 years ago

This pull request is a mess in itself. I'm not accepting it.

Speiger commented 8 years ago

@xbony2 make a better one... That does not require Reflection at all after the game was loaded, and supports both IC2s

xbony2 commented 8 years ago

Well... stuff like shedar.mods.ic2.nuclearcontrol.crossmod.ic2.IC2Type is just silly, since there's already shedar.mods.ic2.nuclearcontrol.crossmod.ic2classic.IC2ClassicType. Why not use or improve or delete or at least do something about the later?

And yes, all of the NC code is awfully messy. I just ported it, I didn't need to improve it :P

Speiger commented 8 years ago

ok thats a thing i accept. My thing did not delete the classes i deleted. Because the Original Classes should be deleted... Thats not a thing i wanted to do... Oh well... Anyway the changes i made should completly replace your old plugin... @xbony2

Speiger commented 8 years ago

@xbony2 fixed it. Now the old plugins get deleted... Thats how it should look like.

xbony2 commented 8 years ago

Will merge when I have a chance to mess around with it, which may be a while cause vacation.