forked from Sokomine/travelnet
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* persistence in mod-storage wip * remove `travelnet.restore_data` * refactor saving/loading with mod_storage * migration test * fix typo / handle some edge cases --------- Co-authored-by: BuckarooBanzay <[email protected]>
- Loading branch information
1 parent
cc7e335
commit 8d1c55d
Showing
12 changed files
with
120 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
mtt.register("migration", function(callback) | ||
local travelnets = travelnet.get_travelnets("singleplayer") | ||
assert(type(travelnets) == "table") | ||
assert(type(travelnets["net1"]) == "table") | ||
assert(type(travelnets["net1"]["station1"]) == "table") | ||
assert(type(travelnets["net1"]["station1"].pos) == "table") | ||
assert(travelnets["net1"]["station1"].timestamp == 1663767532) | ||
assert(travelnets["net1"]["station1"].pos.x == 1022) | ||
assert(travelnets["net1"]["station1"].pos.y == 100) | ||
assert(travelnets["net1"]["station1"].pos.z == -856) | ||
|
||
travelnet.set_travelnets("singleplayer", travelnets) | ||
|
||
callback() | ||
end) |
Oops, something went wrong.