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