@@ -499,8 +499,7 @@ function tabbuilder.handle_multiplayer_buttons(fields)
499
499
end
500
500
501
501
if fields [" cb_public_serverlist" ] ~= nil then
502
- engine .setting_setbool (" public_serverlist" ,
503
- tabbuilder .tobool (fields [" cb_public_serverlist" ]))
502
+ engine .setting_set (" public_serverlist" , fields [" cb_public_serverlist" ])
504
503
505
504
if engine .setting_getbool (" public_serverlist" ) then
506
505
menu .favorites = engine .get_favorites (" online" )
@@ -571,15 +570,15 @@ function tabbuilder.handle_server_buttons(fields)
571
570
menu .handle_key_up_down (fields ," srv_worlds" ," mainmenu_last_selected_world" )
572
571
573
572
if fields [" cb_creative_mode" ] then
574
- engine .setting_setbool (" creative_mode" ,tabbuilder . tobool ( fields [" cb_creative_mode" ]) )
573
+ engine .setting_set (" creative_mode" , fields [" cb_creative_mode" ])
575
574
end
576
575
577
576
if fields [" cb_enable_damage" ] then
578
- engine .setting_setbool (" enable_damage" ,tabbuilder . tobool ( fields [" cb_enable_damage" ]) )
577
+ engine .setting_set (" enable_damage" , fields [" cb_enable_damage" ])
579
578
end
580
579
581
580
if fields [" cb_server_announce" ] then
582
- engine .setting_setbool (" server_announce" ,tabbuilder . tobool ( fields [" cb_server_announce" ]) )
581
+ engine .setting_set (" server_announce" , fields [" cb_server_announce" ])
583
582
end
584
583
585
584
if fields [" start_server" ] ~= nil or
@@ -635,54 +634,45 @@ function tabbuilder.handle_server_buttons(fields)
635
634
end
636
635
end
637
636
638
- ---- ----------------------------------------------------------------------------
639
- function tabbuilder .tobool (text )
640
- if text == " true" then
641
- return true
642
- else
643
- return false
644
- end
645
- end
646
-
647
637
---- ----------------------------------------------------------------------------
648
638
function tabbuilder .handle_settings_buttons (fields )
649
639
if fields [" cb_fancy_trees" ] then
650
- engine .setting_setbool (" new_style_leaves" ,tabbuilder . tobool ( fields [" cb_fancy_trees" ]) )
640
+ engine .setting_set (" new_style_leaves" , fields [" cb_fancy_trees" ])
651
641
end
652
642
if fields [" cb_smooth_lighting" ] then
653
- engine .setting_setbool (" smooth_lighting" ,tabbuilder . tobool ( fields [" cb_smooth_lighting" ]) )
643
+ engine .setting_set (" smooth_lighting" , fields [" cb_smooth_lighting" ])
654
644
end
655
645
if fields [" cb_3d_clouds" ] then
656
- engine .setting_setbool (" enable_3d_clouds" ,tabbuilder . tobool ( fields [" cb_3d_clouds" ]) )
646
+ engine .setting_set (" enable_3d_clouds" , fields [" cb_3d_clouds" ])
657
647
end
658
648
if fields [" cb_opaque_water" ] then
659
- engine .setting_setbool (" opaque_water" ,tabbuilder . tobool ( fields [" cb_opaque_water" ]) )
649
+ engine .setting_set (" opaque_water" , fields [" cb_opaque_water" ])
660
650
end
661
651
662
652
if fields [" cb_mipmapping" ] then
663
- engine .setting_setbool (" mip_map" ,tabbuilder . tobool ( fields [" cb_mipmapping" ]) )
653
+ engine .setting_set (" mip_map" , fields [" cb_mipmapping" ])
664
654
end
665
655
if fields [" cb_anisotrophic" ] then
666
- engine .setting_setbool (" anisotropic_filter" ,tabbuilder . tobool ( fields [" cb_anisotrophic" ]) )
656
+ engine .setting_set (" anisotropic_filter" , fields [" cb_anisotrophic" ])
667
657
end
668
658
if fields [" cb_bilinear" ] then
669
- engine .setting_setbool (" bilinear_filter" ,tabbuilder . tobool ( fields [" cb_bilinear" ]) )
659
+ engine .setting_set (" bilinear_filter" , fields [" cb_bilinear" ])
670
660
end
671
661
if fields [" cb_trilinear" ] then
672
- engine .setting_setbool (" trilinear_filter" ,tabbuilder . tobool ( fields [" cb_trilinear" ]) )
662
+ engine .setting_set (" trilinear_filter" , fields [" cb_trilinear" ])
673
663
end
674
664
675
665
if fields [" cb_shaders" ] then
676
- engine .setting_setbool (" enable_shaders" ,tabbuilder . tobool ( fields [" cb_shaders" ]) )
666
+ engine .setting_set (" enable_shaders" , fields [" cb_shaders" ])
677
667
end
678
668
if fields [" cb_pre_ivis" ] then
679
- engine .setting_setbool (" preload_item_visuals" ,tabbuilder . tobool ( fields [" cb_pre_ivis" ]) )
669
+ engine .setting_set (" preload_item_visuals" , fields [" cb_pre_ivis" ])
680
670
end
681
671
if fields [" cb_particles" ] then
682
- engine .setting_setbool (" enable_particles" ,tabbuilder . tobool ( fields [" cb_particles" ]) )
672
+ engine .setting_set (" enable_particles" , fields [" cb_particles" ])
683
673
end
684
674
if fields [" cb_finite_liquid" ] then
685
- engine .setting_setbool (" liquid_finite" ,tabbuilder . tobool ( fields [" cb_finite_liquid" ]) )
675
+ engine .setting_set (" liquid_finite" , fields [" cb_finite_liquid" ])
686
676
end
687
677
688
678
if fields [" btn_change_keys" ] ~= nil then
@@ -711,11 +701,11 @@ function tabbuilder.handle_singleplayer_buttons(fields)
711
701
menu .handle_key_up_down (fields ," sp_worlds" ," mainmenu_last_selected_world" )
712
702
713
703
if fields [" cb_creative_mode" ] then
714
- engine .setting_setbool (" creative_mode" ,tabbuilder . tobool ( fields [" cb_creative_mode" ]) )
704
+ engine .setting_set (" creative_mode" , fields [" cb_creative_mode" ])
715
705
end
716
706
717
707
if fields [" cb_enable_damage" ] then
718
- engine .setting_setbool (" enable_damage" ,tabbuilder . tobool ( fields [" cb_enable_damage" ]) )
708
+ engine .setting_set (" enable_damage" , fields [" cb_enable_damage" ])
719
709
end
720
710
721
711
if fields [" play" ] ~= nil or
0 commit comments