forked from StrafesNET/map-tool
Compare commits
1 Commits
master
...
test-files
Author | SHA1 | Date | |
---|---|---|---|
8598147214 |
1559
Cargo.lock
generated
1559
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
19
Cargo.toml
19
Cargo.toml
@ -1,28 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "map-tool"
|
name = "map-tool"
|
||||||
version = "1.4.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
|
||||||
clap = { version = "4.4.2", features = ["derive"] }
|
|
||||||
flate2 = "1.0.27"
|
|
||||||
image = "0.24.7"
|
|
||||||
image_dds = "0.1.1"
|
|
||||||
lazy-regex = "3.1.0"
|
|
||||||
rbx_binary = "0.7.1"
|
rbx_binary = "0.7.1"
|
||||||
rbx_dom_weak = "2.5.0"
|
rbx_dom_weak = "2.5.0"
|
||||||
rbx_reflection_database = "0.2.7"
|
rbx_reflection_database = "0.2.7"
|
||||||
rbx_xml = "0.13.1"
|
|
||||||
vbsp = "0.5.0"
|
|
||||||
vmdl = "0.1.1"
|
|
||||||
vmt-parser = "0.1.1"
|
|
||||||
vpk = "0.2.0"
|
|
||||||
vtf = "0.2.1"
|
|
||||||
|
|
||||||
#[profile.release]
|
|
||||||
#lto = true
|
|
||||||
#strip = true
|
|
||||||
#codegen-units = 1
|
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 StrafesNET Map Tool Developers
|
Copyright (c) <year> <copyright holders>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
BIN
ScriptFinder.rbxl
Normal file
BIN
ScriptFinder.rbxl
Normal file
Binary file not shown.
126
allowed/0.lua
Normal file
126
allowed/0.lua
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
--local Model=game:GetService'InsertService':LoadAsset(1079831188):GetChildren()[1] Model:SetModelCFrame(CFrame.new(0,Model:GetModelSize().y/2,0))
|
||||||
|
--[[ Load ID list
|
||||||
|
local ids={5692157375}
|
||||||
|
local ServerStorage=game:GetService'ServerStorage'
|
||||||
|
local function load(id)
|
||||||
|
local Model=game:GetObjects("rbxassetid://"..id)[1]
|
||||||
|
Model.Parent=workspace
|
||||||
|
Model:MoveTo(Vector3.new(0,Model:GetExtentsSize().y/2,0))
|
||||||
|
wait()
|
||||||
|
Model.Parent=ServerStorage
|
||||||
|
end
|
||||||
|
for i=1,#ids do
|
||||||
|
local succ,err=ypcall(load,ids[i])
|
||||||
|
if not succ then
|
||||||
|
print(ids[i],"error",err)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
--[[ Format map names
|
||||||
|
local c=game:GetService'ServerStorage':GetChildren()
|
||||||
|
for i=1,#c do
|
||||||
|
local le_name=c[i].Name:gsub("%s+","_"):lower()
|
||||||
|
c[i].Name=le_name
|
||||||
|
local DisplayName=c[i]:FindFirstChild("DisplayName",true)
|
||||||
|
if DisplayName and DisplayName.ClassName=="StringValue" then
|
||||||
|
local dn=DisplayName.Value
|
||||||
|
local ndn={}
|
||||||
|
for w in dn:gmatch'%S+' do
|
||||||
|
ndn[#ndn+1]=w:sub(1,1):upper()..w:sub(2)
|
||||||
|
end
|
||||||
|
if table.concat(ndn," ")~=dn then
|
||||||
|
print("Fix name:",le_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
--[[ Duplicate script labeler
|
||||||
|
local IsA=game.IsA
|
||||||
|
|
||||||
|
local ID=0
|
||||||
|
local SourceHash={}
|
||||||
|
local SourceHashCount={}
|
||||||
|
local NameHash={}
|
||||||
|
local IDHash={}
|
||||||
|
|
||||||
|
local c=game:GetService'ServerStorage':GetDescendants()
|
||||||
|
for i=1,#c do
|
||||||
|
local s=c[i]
|
||||||
|
if IsA(s,"LuaSourceContainer") then
|
||||||
|
local src=s.Source
|
||||||
|
NameHash[s]=s.Name
|
||||||
|
local id=SourceHash[src]
|
||||||
|
if id then
|
||||||
|
s.Name="copy "..id
|
||||||
|
SourceHashCount[id]=SourceHashCount[id]+1
|
||||||
|
else
|
||||||
|
ID=ID+1
|
||||||
|
IDHash[ID]=s
|
||||||
|
SourceHash[src]=ID
|
||||||
|
SourceHashCount[ID]=1
|
||||||
|
if src:find'getfenv' or src:find'require' then
|
||||||
|
s.Name="flagged "..ID
|
||||||
|
else
|
||||||
|
s.Name="unique "..ID
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i=1,ID do
|
||||||
|
local s=IDHash[i]
|
||||||
|
local hc=SourceHashCount[i]
|
||||||
|
s.Name=s.Name..(hc==1 and " (1 copy)" or " ("..hc.." copies)")
|
||||||
|
end
|
||||||
|
_G.NameHash=NameHash
|
||||||
|
--]]
|
||||||
|
--[[ Undo labeler
|
||||||
|
local NameHash=_G.NameHash
|
||||||
|
for s,n in next,NameHash do
|
||||||
|
s.Name=n
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
local IsA=workspace.IsA
|
||||||
|
local GetChildren=workspace.GetChildren
|
||||||
|
local function rsearch(search,cond1,cond2)
|
||||||
|
local found={}
|
||||||
|
for _,thing in next,GetChildren(search) do
|
||||||
|
if not cond1 or cond1(thing) then
|
||||||
|
found[#found+1]=thing
|
||||||
|
end
|
||||||
|
if not cond2 or cond2(thing) then
|
||||||
|
local nfound=#found
|
||||||
|
local r=rsearch(thing,cond1,cond2)
|
||||||
|
for i=1,#r do
|
||||||
|
found[nfound+i]=r[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return found
|
||||||
|
end
|
||||||
|
local function cond1(thing)
|
||||||
|
return IsA(thing,"LuaSourceContainer")
|
||||||
|
end
|
||||||
|
local Maps=GetChildren(game:GetService'ServerStorage')
|
||||||
|
for i=1,#Maps do
|
||||||
|
local Map=Maps[i]
|
||||||
|
if Map.ClassName=="Model" then
|
||||||
|
local Scripts=rsearch(Map,cond1)
|
||||||
|
if #Scripts>0 then
|
||||||
|
local ScriptHolder=Instance.new("Model",workspace)
|
||||||
|
ScriptHolder.Name=Map.Name.."("..#Scripts..")"
|
||||||
|
for i=1,#Scripts do
|
||||||
|
local sc=Scripts[i]
|
||||||
|
local scd
|
||||||
|
if sc.ClassName~="ModuleScript" then
|
||||||
|
sc.Disabled=true
|
||||||
|
end
|
||||||
|
local s=sc:Clone()
|
||||||
|
s.Name=sc:GetFullName()
|
||||||
|
s.Parent=ScriptHolder
|
||||||
|
if sc.ClassName~="ModuleScript" then
|
||||||
|
sc.Disabled=scd
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
BIN
bhop_dumb_blocks_5.rbxm
Normal file
BIN
bhop_dumb_blocks_5.rbxm
Normal file
Binary file not shown.
13180
bhop_easyhop.rbxmx
Executable file
13180
bhop_easyhop.rbxmx
Executable file
File diff suppressed because it is too large
Load Diff
126
blocked/0.lua
Normal file
126
blocked/0.lua
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
--local Model=game:GetService'InsertService':LoadAsset(1079831188):GetChildren()[1] Model:SetModelCFrame(CFrame.new(0,Model:GetModelSize().y/2,0))
|
||||||
|
--[[ Load ID list
|
||||||
|
local ids={5692157375}
|
||||||
|
local ServerStorage=game:GetService'ServerStorage'
|
||||||
|
local function load(id)
|
||||||
|
local Model=game:GetObjects("rbxassetid://"..id)[1]
|
||||||
|
Model.Parent=workspace
|
||||||
|
Model:MoveTo(Vector3.new(0,Model:GetExtentsSize().y/2,0))
|
||||||
|
wait()
|
||||||
|
Model.Parent=ServerStorage
|
||||||
|
end
|
||||||
|
for i=1,#ids do
|
||||||
|
local succ,err=ypcall(load,ids[i])
|
||||||
|
if not succ then
|
||||||
|
print(ids[i],"error",err)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
--[[ Format map names
|
||||||
|
local c=game:GetService'ServerStorage':GetChildren()
|
||||||
|
for i=1,#c do
|
||||||
|
local le_name=c[i].Name:gsub("%s+","_"):lower()
|
||||||
|
c[i].Name=le_name
|
||||||
|
local DisplayName=c[i]:FindFirstChild("DisplayName",true)
|
||||||
|
if DisplayName and DisplayName.ClassName=="StringValue" then
|
||||||
|
local dn=DisplayName.Value
|
||||||
|
local ndn={}
|
||||||
|
for w in dn:gmatch'%S+' do
|
||||||
|
ndn[#ndn+1]=w:sub(1,1):upper()..w:sub(2)
|
||||||
|
end
|
||||||
|
if table.concat(ndn," ")~=dn then
|
||||||
|
print("Fix name:",le_name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
--[[ Duplicate script labeler
|
||||||
|
local IsA=game.IsA
|
||||||
|
|
||||||
|
local ID=0
|
||||||
|
local SourceHash={}
|
||||||
|
local SourceHashCount={}
|
||||||
|
local NameHash={}
|
||||||
|
local IDHash={}
|
||||||
|
|
||||||
|
local c=game:GetService'ServerStorage':GetDescendants()
|
||||||
|
for i=1,#c do
|
||||||
|
local s=c[i]
|
||||||
|
if IsA(s,"LuaSourceContainer") then
|
||||||
|
local src=s.Source
|
||||||
|
NameHash[s]=s.Name
|
||||||
|
local id=SourceHash[src]
|
||||||
|
if id then
|
||||||
|
s.Name="copy "..id
|
||||||
|
SourceHashCount[id]=SourceHashCount[id]+1
|
||||||
|
else
|
||||||
|
ID=ID+1
|
||||||
|
IDHash[ID]=s
|
||||||
|
SourceHash[src]=ID
|
||||||
|
SourceHashCount[ID]=1
|
||||||
|
if src:find'getfenv' or src:find'require' then
|
||||||
|
s.Name="flagged "..ID
|
||||||
|
else
|
||||||
|
s.Name="unique "..ID
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i=1,ID do
|
||||||
|
local s=IDHash[i]
|
||||||
|
local hc=SourceHashCount[i]
|
||||||
|
s.Name=s.Name..(hc==1 and " (1 copy)" or " ("..hc.." copies)")
|
||||||
|
end
|
||||||
|
_G.NameHash=NameHash
|
||||||
|
--]]
|
||||||
|
--[[ Undo labeler
|
||||||
|
local NameHash=_G.NameHash
|
||||||
|
for s,n in next,NameHash do
|
||||||
|
s.Name=n
|
||||||
|
end
|
||||||
|
--]]
|
||||||
|
local IsA=workspace.IsA
|
||||||
|
local GetChildren=workspace.GetChildren
|
||||||
|
local function rsearch(search,cond1,cond2)
|
||||||
|
local found={}
|
||||||
|
for _,thing in next,GetChildren(search) do
|
||||||
|
if not cond1 or cond1(thing) then
|
||||||
|
found[#found+1]=thing
|
||||||
|
end
|
||||||
|
if not cond2 or cond2(thing) then
|
||||||
|
local nfound=#found
|
||||||
|
local r=rsearch(thing,cond1,cond2)
|
||||||
|
for i=1,#r do
|
||||||
|
found[nfound+i]=r[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return found
|
||||||
|
end
|
||||||
|
local function cond1(thing)
|
||||||
|
return IsA(thing,"LuaSourceContainer")
|
||||||
|
end
|
||||||
|
local Maps=GetChildren(game:GetService'ServerStorage')
|
||||||
|
for i=1,#Maps do
|
||||||
|
local Map=Maps[i]
|
||||||
|
if Map.ClassName=="Model" then
|
||||||
|
local Scripts=rsearch(Map,cond1)
|
||||||
|
if #Scripts>0 then
|
||||||
|
local ScriptHolder=Instance.new("Model",workspace)
|
||||||
|
ScriptHolder.Name=Map.Name.."("..#Scripts..")"
|
||||||
|
for i=1,#Scripts do
|
||||||
|
local sc=Scripts[i]
|
||||||
|
local scd
|
||||||
|
if sc.ClassName~="ModuleScript" then
|
||||||
|
sc.Disabled=true
|
||||||
|
end
|
||||||
|
local s=sc:Clone()
|
||||||
|
s.Name=sc:GetFullName()
|
||||||
|
s.Parent=ScriptHolder
|
||||||
|
if sc.ClassName~="ModuleScript" then
|
||||||
|
sc.Disabled=scd
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
1269
src/main.rs
1269
src/main.rs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user