z_mirror/Tapeline
git clone https://git.raiguard.me/z_mirror/Tapeline
58e4899
revert-47-freeze-fix
1local data_util =require ( "__flib__.data-util" ) 2 3data : extend ( { 4{ 5type ="custom-input" , 6name ="tl-get-tool" , 7key_sequence ="ALT + M" , 8action ="spawn-item" , 9item_to_spawn ="tl-tool" , 10order ="a" , 11} , 12{ 13type ="custom-input" , 14name ="tl-edit-tape" , 15key_sequence ="mouse-button-2" , 16order ="b" , 17} , 18{ 19type ="custom-input" , 20name ="tl-delete-tape" , 21key_sequence ="SHIFT + mouse-button-2" , 22order ="c" , 23} , 24{ 25type ="custom-input" , 26name ="tl-increase-divisor" , 27key_sequence ="ALT + mouse-wheel-up" , 28order ="d" , 29} , 30{ 31type ="custom-input" , 32name ="tl-decrease-divisor" , 33key_sequence ="ALT + mouse-wheel-down" , 34order ="e" , 35} , 36{ 37type ="custom-input" , 38name ="tl-next-mode" , 39key_sequence ="CONTROL + mouse-wheel-up" , 40order ="f" , 41} , 42{ 43type ="custom-input" , 44name ="tl-previous-mode" , 45key_sequence ="CONTROL + mouse-wheel-down" , 46order ="g" , 47} , 48{ 49type ="custom-input" , 50name ="tl-linked-clear-cursor" , 51key_sequence ="" , 52linked_game_control ="clear-cursor" , 53} , 54{ 55type ="collision-layer" , 56name ="tapeline" , 57} , 58{ 59type ="simple-entity-with-force" , 60name ="tl-dummy-entity" , 61flags ={ "not-on-map" , "player-creation" } , 62hidden =true , 63collision_box ={ { - 0.4 , - 0.4 } , { 0.4 , 0.4 } } , 64collision_mask ={ layers ={ tapeline =true } } , 65selectable_in_game =false , 66build_sound ={ filename ="__core__/sound/silence-1sec.ogg" } , 67created_smoke ={ smoke_name ="tl-empty-smoke" } , --- @diagnostic disable-line 68alert_when_damaged =false , 69} , 70{ 71type ="highlight-box" , 72name ="tl-highlight-box" , 73} , 74{ 75type ="selection-tool" , 76name ="tl-tool" , 77localised_name ={ "item-name.tl-tool" } , 78icons ={ 79{ icon =data_util . black_image , icon_size =1 , scale =64 } , 80{ icon ="__Tapeline__/graphics/item/tapeline-tool.png" , icon_size =32 , icon_mipmaps =2 } , 81} , 82subgroup ="tool" , 83order ="c[automated-construction]-x" , 84select ={ 85mode ="nothing" , 86border_color ={ a =0 } , 87cursor_box_type ="not-allowed" , 88} , 89alt_select ={ 90mode ="nothing" , 91border_color ={ a =0 } , 92cursor_box_type ="not-allowed" , 93} , 94place_result ="tl-dummy-entity" , 95stack_size =10 , 96flags ={ "only-in-cursor" , "spawnable" } , 97hidden =true , 98draw_label_for_cursor_render =true , 99mouse_cursor ="tl-tool-cursor" , 100} , 101{ 102type ="mouse-cursor" , 103name ="tl-tool-cursor" , 104filename ="__Tapeline__/graphics/cursor/draw-cursor.png" , 105hot_pixel_x =1 , 106hot_pixel_y =1 , 107} , 108{ 109type ="shortcut" , 110name ="tl-get-tool" , 111order ="a[alt-mode]-b[copy]" , 112associated_control_input ="tl-get-tool" , 113action ="spawn-item" , 114item_to_spawn ="tl-tool" , 115icon ="__Tapeline__/graphics/shortcut/shortcut-x56.png" , 116icon_size =56 , 117small_icon ="__Tapeline__/graphics/shortcut/shortcut-x24.png" , 118small_icon_size =24 , 119} , 120{ 121type ="tips-and-tricks-item-category" , 122name ="tapeline" , 123order ="l-[tapeline]" , 124} , 125{ 126type ="tips-and-tricks-item" , 127name ="tl-introduction" , 128category ="tapeline" , 129order ="a" , 130is_title =true , 131image ="__Tapeline__/graphics/tips-and-tricks/introduction.png" , 132} , 133{ 134type ="tips-and-tricks-item" , 135name ="tl-persistent" , 136category ="tapeline" , 137order ="b" , 138indent =1 , 139dependencies ={ "tl-introduction" } , 140trigger ={ type ="dependencies-met" } , 141image ="__Tapeline__/graphics/tips-and-tricks/persistent.png" , 142} , 143{ 144type ="tips-and-tricks-item" , 145name ="tl-modes" , 146category ="tapeline" , 147order ="c" , 148indent =1 , 149dependencies ={ "tl-introduction" } , 150trigger ={ type ="dependencies-met" } , 151image ="__Tapeline__/graphics/tips-and-tricks/modes.png" , 152} , 153{ 154type ="tips-and-tricks-item" , 155name ="tl-divisors" , 156category ="tapeline" , 157order ="d" , 158indent =1 , 159dependencies ={ "tl-introduction" } , 160trigger ={ type ="dependencies-met" } , 161image ="__Tapeline__/graphics/tips-and-tricks/divisors.png" , 162} , 163{ 164type ="tips-and-tricks-item" , 165name ="tl-edit" , 166category ="tapeline" , 167order ="e" , 168indent =1 , 169dependencies ={ "tl-introduction" } , 170trigger ={ type ="dependencies-met" } , 171image ="__Tapeline__/graphics/tips-and-tricks/edit.png" , 172} , 173{ 174type ="trivial-smoke" , 175name ="tl-empty-smoke" , 176animation ={ 177filename =data_util . empty_image , 178size ={ 1 , 1 } , 179frame_count =8 , 180} , 181duration =1 , 182} , 183} )