z_mirror/Tapeline
git clone https://git.raiguard.me/z_mirror/Tapeline
971a28c
revert-47-freeze-fix
1local flib_migration =require ( "__flib__.migration" ) 2 3local settings =require ( "scripts.settings" ) 4local tape =require ( "scripts.tape" ) 5local tool =require ( "scripts.tool" ) 6 7local versions ={ 8[ "3.0.0" ] =function () 9rendering . clear ( script . mod_name ) 10for _ , surface in pairs ( game . surfaces ) do 11for _ , box in pairs ( surface . find_entities_filtered ( { name ="tl-highlight-box" } )) do 12box . destroy () 13end 14end 15storage ={} 16settings . on_init () 17tape . on_init () 18tool . on_init () 19end , 20[ "3.0.3" ] =function () 21--- @param tbl table<uint, Tape> 22local function migrate_tapes ( tbl ) 23for key , tape_data in pairs ( tbl ) do 24if tape_data . player . valid then 25tape_data . player_index =tape_data . player . index 26else 27tbl [ key ] =nil 28end 29end 30end 31migrate_tapes ( storage . drawing ) 32migrate_tapes ( storage . editing ) 33migrate_tapes ( storage . tapes ) 34end , 35} 36 37local migrations ={} 38 39--- @param e ConfigurationChangedData 40function migrations . on_configuration_changed ( e ) 41flib_migration . on_config_changed ( e , versions ) 42end 43 44return migrations