mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
two getthumbnail funs merget into one
This commit is contained in:
@@ -447,12 +447,20 @@ removefile:
|
||||
fa.close()
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Save type (0b 0000 00ab)
|
||||
* b: unset - full save; set - quicksave (only applicable to worlds -- quicksave just means the disk is in dirty state)
|
||||
* a: set - generated by autosave
|
||||
*/
|
||||
fun getSaveMode(): Int {
|
||||
val fa = RandomAccessFile(diskFile, "rwd")
|
||||
fa.seek(49L)
|
||||
return fa.read().also { fa.close() }
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 1 if the savegame is player data, 2 if the savegame is world data, 0 otherwise
|
||||
*/
|
||||
fun getSaveKind(): Int {
|
||||
val fa = RandomAccessFile(diskFile, "rwd")
|
||||
fa.seek(50L)
|
||||
|
||||
Reference in New Issue
Block a user