forked from StrafesNET/map-tool
Compare commits
85 Commits
test-files
...
master
Author | SHA1 | Date | |
---|---|---|---|
a17901d473 | |||
b88c6b899a | |||
835d4bbecd | |||
b756dc979c | |||
1e888ebb01 | |||
b9dccb1af5 | |||
c6d293cc6b | |||
a386f90f51 | |||
43115cbac6 | |||
35b5aff9a7 | |||
36419af870 | |||
a7518bef46 | |||
6df1f41599 | |||
422d0a160d | |||
1727f9213c | |||
afa9e7447d | |||
ff85efa54f | |||
fa69c53cfc | |||
a57c228580 | |||
5dc69db885 | |||
e54400a436 | |||
e2a5edf8df | |||
d6dd1b8abd | |||
a2b793fcd3 | |||
9cb34f14c8 | |||
bd2e3aa2d3 | |||
07f6053839 | |||
0d5b918ea1 | |||
20a568220a | |||
d670d4129e | |||
de7b0bd5cc | |||
01524146c7 | |||
45e8e415d0 | |||
4417bafc5c | |||
8553625738 | |||
3a3749eaeb | |||
53539f290b | |||
479dd37f53 | |||
34b6a869f0 | |||
19a455ee5e | |||
9904b7a044 | |||
6efa811eb6 | |||
81e4a201bd | |||
8fd5618af2 | |||
54c26d6e1e | |||
110ec94a08 | |||
980da5a6a7 | |||
1cd77984d4 | |||
b0fe231388 | |||
5a4a39ab75 | |||
|
1b2324deeb | ||
4c485e76e4 | |||
7bbb9ca24f | |||
eff55af1b4 | |||
0d05cc9996 | |||
2a55ef90df | |||
1a6202ae66 | |||
|
742f7b4ec0 | ||
2cb346f49a | |||
e5cca9ed04 | |||
52d911a25a | |||
7ab20f36a7 | |||
a7554da1c5 | |||
37f0dad7a1 | |||
e309f15cb8 | |||
29374e4ff5 | |||
b7d04d1f40 | |||
432ec11ea6 | |||
01449b1850 | |||
327d0a4992 | |||
420dbaa022 | |||
cad29af4bb | |||
e0e8744bfd | |||
b434dce0f6 | |||
6ef8fd2f69 | |||
7234065bd8 | |||
41d8e700c5 | |||
4ca3d56f0f | |||
593b6902fd | |||
7523c4313a | |||
694440bd29 | |||
755e1d4d5b | |||
4334a6f330 | |||
553ad2cca5 | |||
3f15d2f5a8 |
1573
Cargo.lock
generated
1573
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
19
Cargo.toml
19
Cargo.toml
@ -1,11 +1,28 @@
|
||||
[package]
|
||||
name = "map-tool"
|
||||
version = "0.1.0"
|
||||
version = "1.4.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[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_dom_weak = "2.5.0"
|
||||
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
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright (c) 2023 StrafesNET Map Tool Developers
|
||||
|
||||
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:
|
||||
|
||||
|
Binary file not shown.
126
allowed/0.lua
126
allowed/0.lua
@ -1,126 +0,0 @@
|
||||
--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
|
Binary file not shown.
13180
bhop_easyhop.rbxmx
13180
bhop_easyhop.rbxmx
File diff suppressed because it is too large
Load Diff
126
blocked/0.lua
126
blocked/0.lua
@ -1,126 +0,0 @@
|
||||
--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