22
33local M = {}
44
5- local CEI_VERSION = " 0.8.6 "
5+ local CEI_VERSION = " 0.8.7 "
66local logTag = " CEI"
77local gui_module = require (" ge/extensions/editor/api/gui" )
88local gui = {setupEditorGuiTheme = nop }
@@ -23,6 +23,7 @@ local isFrozen = {}
2323local resetsBlockedInputActions = {}
2424local allResetsBlockedInputActions = {}
2525local editorBlocked = {}
26+ local boostBlocked = { " funBoost" , " funBoostBackwards" , " funFling" , " funFlingDownward" }
2627local descriptions = {}
2728local environmentValsSet = false
2829local environmentVals = {}
@@ -65,6 +66,11 @@ local syncRequested = false
6566local environmentDefaults = {}
6667local environmentPause = false
6768
69+ local b
70+ local bb
71+ local fu
72+ local fd
73+
6874local function getObject (className , preferredObjName )
6975 if envObjectIdCache [className ] then
7076 return scenetree .findObjectById (envObjectIdCache [className ])
@@ -199,6 +205,21 @@ local function rxConfigData(data)
199205 extensions .core_input_actionFilter .setGroup (' cei2' , editorBlocked )
200206 extensions .core_input_actionFilter .addAction (0 , ' cei2' , true )
201207
208+ if config .restrictions .boost == true then
209+ core_funstuff .boost = function () end
210+ core_funstuff .boostBackwards = function () end
211+ core_funstuff .flingUpward = function () end
212+ core_funstuff .flingDownward = function () end
213+ else
214+ core_funstuff .boost = b
215+ core_funstuff .boostBackwards = bb
216+ core_funstuff .flingUpward = fu
217+ core_funstuff .flingDownward = fd
218+ end
219+
220+ extensions .core_input_actionFilter .setGroup (' boost' , boostBlocked )
221+ extensions .core_input_actionFilter .addAction (0 , ' boost' , config .restrictions .boost )
222+
202223 if configValsSet == false then
203224 configVals .server = {}
204225 configVals .cobalt = {}
@@ -2998,6 +3019,42 @@ local function drawCEI()
29983019 log (' W' , logTag , " CEISetRestrictions Called: " .. data )
29993020 end
30003021 end
3022+
3023+ if im .TreeNode1 (" Boost" ) then
3024+ im .SameLine ()
3025+ if im .SmallButton (" Reset##boost" ) then
3026+ local data = jsonEncode ( { " boost" , " default" , " boost" } )
3027+ TriggerServerEvent (" CEISetRestrictions" , data )
3028+ log (' W' , logTag , " CEISetRestrictions Called: " .. data )
3029+ end
3030+ im .Indent ()
3031+ im .Text (" Boost: " )
3032+ if config .restrictions .boost then
3033+ im .SameLine ()
3034+ if im .SmallButton (" Blocked##boost" ) then
3035+ local data = jsonEncode ( { " boost" , false , " boost" } )
3036+ TriggerServerEvent (" CEISetRestrictions" , data )
3037+ log (' W' , logTag , " CEISetRestrictions Called: " .. data )
3038+ end
3039+ else
3040+ im .SameLine ()
3041+ if im .SmallButton (" Allowed##boost" ) then
3042+ local data = jsonEncode ( { " boost" , true , " boost" } )
3043+ TriggerServerEvent (" CEISetRestrictions" , data )
3044+ log (' W' , logTag , " CEISetRestrictions Called: " .. data )
3045+ end
3046+ end
3047+ im .TreePop ()
3048+ im .Unindent ()
3049+ else
3050+ im .SameLine ()
3051+ if im .SmallButton (" Reset##boost" ) then
3052+ local data = jsonEncode ( { " boost" , " default" , " boost" } )
3053+ TriggerServerEvent (" CEISetRestrictions" , data )
3054+ log (' W' , logTag , " CEISetRestrictions Called: " .. data )
3055+ end
3056+ end
3057+
30013058 im .Unindent ()
30023059 end
30033060 end
@@ -5795,6 +5852,12 @@ local function onWorldReadyState(state)
57955852 syncRequested = true
57965853 end
57975854 end
5855+ if core_funstuff then
5856+ b = core_funstuff .boost
5857+ bb = core_funstuff .boostBackwards
5858+ fu = core_funstuff .flingUpward
5859+ fd = core_funstuff .flingDownward
5860+ end
57985861 end
57995862end
58005863
0 commit comments