Skip to content

Commit

Permalink
Merge pull request #1 from GhustOne/dev
Browse files Browse the repository at this point in the history
v1.9
  • Loading branch information
GhustOne authored Jan 5, 2023
2 parents 8903c06 + 6a9c1f1 commit 1d86218
Show file tree
Hide file tree
Showing 11 changed files with 6,250 additions and 561 deletions.
16 changes: 7 additions & 9 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Moved controls, hotkey notifications, menu pos, player info to one settings file
Improved highlight function activation
Sorted Color submenu
Added Online Player Sort
Added Custom Trusted Mode for scripts loaded with Proddy's Manager
Added Proddy's Script Manager (REQUIRED TO LOAD OTHER SCRIPTS)
in Script Features > Cheese Menu > Proddy's Script Manager
v1.8.2:
Included Proddy's Script Manager in Auto updater
- Added feature hints
- Added support for gif, 2t1 and dds headers (old gif folders still work, all saved UIs will have no header)
- Added gradient support for features (UIs will have to be edited and resaved)
- Added customizable sizes for footer text and hint text

- Improved hotkey activation (shouldn't activate when input box is open, will add console later)
- Improved update download (thanks to Proton#5503's idea)
53 changes: 20 additions & 33 deletions CMAutoUpdater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,44 @@ local status = true
local appdata_path = utils.get_appdata_path("PopstarDevs", "2Take1Menu")

local filePaths = {
cheesemenu = appdata_path.."\\scripts\\cheesemenu.lua",
gltw = appdata_path.."\\scripts\\cheesemenu\\libs\\GLTW.lua",
getinput = appdata_path.."\\scripts\\cheesemenu\\libs\\Get Input.lua",
cheeseUtils = appdata_path.."\\scripts\\cheesemenu\\libs\\CheeseUtilities.lua",
proddysManager = appdata_path.."\\scripts\\cheesemenu\\libs\\Proddy's Script Manager.lua",
}
local files = {
cheesemenu = [[https://raw.githubusercontent.com/GhustOne/CheeseMenu/main/cheesemenu.lua]],
gltw = [[https://raw.githubusercontent.com/GhustOne/CheeseMenu/main/cheesemenu/libs/GLTW.lua]],
getinput = [[https://raw.githubusercontent.com/GhustOne/CheeseMenu/main/cheesemenu/libs/Get%20Input.lua]],
cheeseUtils = [[https://raw.githubusercontent.com/GhustOne/CheeseMenu/main/cheesemenu/libs/CheeseUtilities.lua]],
proddysManager = [[https://raw.githubusercontent.com/GhustOne/CheeseMenu/main/cheesemenu/libs/Proddy's%20Script%20Manager.lua]],
["cheesemenu.lua"] = appdata_path.."\\scripts\\cheesemenu.lua",
["GLTW.lua"] = appdata_path.."\\scripts\\cheesemenu\\libs\\GLTW.lua",
["Get Input.lua"] = appdata_path.."\\scripts\\cheesemenu\\libs\\Get Input.lua",
["CheeseUtilities.lua"] = appdata_path.."\\scripts\\cheesemenu\\libs\\CheeseUtilities.lua",
["Proddy's Script Manager.lua"] = appdata_path.."\\scripts\\cheesemenu\\libs\\Proddy's Script Manager.lua",
}

local all_files = 0
local downloaded_files = 0
for k, v in pairs(files) do
all_files = all_files + 1
menu.create_thread(function()
local responseCode, file = web.get(v)
if responseCode == 200 then
files[k] = file
downloaded_files = downloaded_files + 1
else
print("Failed to download: "..v)
status = false
end
end)
local responseCode, responseBody = web.get([[https://raw.githubusercontent.com/GhustOne/CheeseMenu/main/aioUpdate.lua]])
if responseCode ~= 200 then
print("Failed to download update.")
status = false
end
while downloaded_files < all_files and status do
system.wait(0)
local chunk = load(responseBody)
if not chunk then
status = false
return status
end
local updatedFiles = chunk()

if status then
for k, v in pairs(files) do
local currentFile = io.open(filePaths[k], "a+")
for _, v in pairs(filePaths) do
local currentFile = io.open(v, "a+")
if not currentFile then
status = "ERROR REPLACING"
break
end
currentFile:close()
end
if status ~= "ERROR REPLACING" then
for k, v in pairs(files) do
local currentFile = io.open(filePaths[k], "w+b")
for k, v in pairs(filePaths) do
local currentFile = io.open(v, "w+b")
if currentFile then
currentFile:write(v)
currentFile:write(updatedFiles[k])
currentFile:flush()
currentFile:close()
else
status = "ERROR REPLACING"
break
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ How to install
1. Download by going to [Releases](https://github.com/GhustOne/CheeseMenu/releases) and downloading cheesemenu.zip on the latest release
2. Simply put `cheesemenu.lua` and `cheesemenu` folder that are in the downloaded zip in the scripts folder for 2t1 and load it

Any scripts loaded after will be embedded in cheesemenu
Load other scripts through `Local > Script Features > Cheese Menu > Proddy's Script Manager`.
Don't forget to enable trusted mode.

Controls are in Script Features > Cheese Menu > Controls

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.2
1.9
Loading

0 comments on commit 1d86218

Please sign in to comment.