Drakulix / ScrollsModLoader

A Mod Loader Framework for the game "Scrolls" by Mojang
www.scrollsguide.com/summoner
GNU Lesser General Public License v2.1
15 stars 9 forks source link

Auto repatch on file change #4

Open MaPePeR opened 10 years ago

MaPePeR commented 10 years ago

Detects if a mod.dll file is newer than the Assembly-CSharp.dll and will repatch automatically.

To be on the safe side there should be a way to restrict it to not do it twice...

Drakulix commented 10 years ago

Thats a nice way to "fix" it. Although this is more a nice, new feature then a fix.

I cannot review code in holidays (laptop is at home). I will test and accept both of your pull requests, when I am back.

MaPePeR commented 10 years ago

Enjoy your holidays!

This one is a bit 'dangerous', because under weird circumstances(write times not saved in file system?) it may cause an endless repatch loop.

Drakulix commented 10 years ago

The question is if Mono/.net implements it on all required platforms/filesystems.

We would need to cover NTFS, FAT32, HFS and HFS+ at least for Mac and Windows.

Drakulix commented 10 years ago

I think I am not going to include this right now, because we have no tested this functionality on enough systems and it might be buggy in the mono runtime. Once you have a more elaborated version of this, that maybe saves the SHA1 hash of the mod file for change detection, I am happy to add this feature.

MaPePeR commented 10 years ago

Yea, i agree. It might be nice for development, but is not useful for the end user and only introduces more risks.