mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
39
lua/autorun/client/advdupe2_cl_init.lua
Normal file
39
lua/autorun/client/advdupe2_cl_init.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
AdvDupe2 = {
|
||||
Version = "1.1.0",
|
||||
Revision = 51,
|
||||
InfoText = {},
|
||||
DataFolder = "advdupe2",
|
||||
FileRenameTryLimit = 256,
|
||||
ProgressBar = {}
|
||||
}
|
||||
|
||||
if(!file.Exists(AdvDupe2.DataFolder, "DATA"))then
|
||||
file.CreateDir(AdvDupe2.DataFolder)
|
||||
end
|
||||
|
||||
include( "advdupe2/file_browser.lua" )
|
||||
include( "advdupe2/sh_codec.lua" )
|
||||
include( "advdupe2/cl_file.lua" )
|
||||
include( "advdupe2/cl_ghost.lua" )
|
||||
|
||||
function AdvDupe2.Notify(msg,typ,dur)
|
||||
surface.PlaySound(typ == 1 and "buttons/button10.wav" or "ambient/water/drip1.wav")
|
||||
GAMEMODE:AddNotify(msg, typ or NOTIFY_GENERIC, dur or 5)
|
||||
//if not game.SinglePlayer() then
|
||||
print("[AdvDupe2Notify]\t"..msg)
|
||||
//end
|
||||
end
|
||||
|
||||
net.Receive("AdvDupe2Notify", function()
|
||||
AdvDupe2.Notify(net.ReadString(), net.ReadUInt(8), net.ReadFloat())
|
||||
end)
|
||||
52
lua/autorun/client/campaignents_clientfuncs_2.lua
Normal file
52
lua/autorun/client/campaignents_clientfuncs_2.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local _LocalPlayer = LocalPlayer
|
||||
|
||||
function saveents_CanBeUgly()
|
||||
local ply = _LocalPlayer()
|
||||
if IsValid( ply:GetActiveWeapon() ) and string.find( _LocalPlayer():GetActiveWeapon():GetClass(), "camera" ) then return false end
|
||||
return true
|
||||
|
||||
end
|
||||
|
||||
local cachedIsEditing = nil
|
||||
local nextCache = 0
|
||||
local _CurTime = CurTime
|
||||
|
||||
function saveents_IsEditing()
|
||||
if nextCache > _CurTime() then return cachedIsEditing end
|
||||
nextCache = _CurTime() + 0.01
|
||||
|
||||
local ply = _LocalPlayer()
|
||||
local moveType = ply:GetMoveType()
|
||||
if moveType ~= MOVETYPE_NOCLIP then cachedIsEditing = nil return end
|
||||
if ply:InVehicle() then cachedIsEditing = nil return end
|
||||
if not saveents_CanBeUgly() then cachedIsEditing = nil return end
|
||||
|
||||
cachedIsEditing = true
|
||||
return true
|
||||
|
||||
end
|
||||
|
||||
function saveents_DoBeamColor( self )
|
||||
if not self.GetGoalID then return end
|
||||
timer.Simple( 0, function()
|
||||
if not IsValid( self ) then return end
|
||||
local val = self:GetGoalID() * 4
|
||||
local r = ( val % 255 )
|
||||
local g = ( ( val + 85 ) % 255 )
|
||||
local b = ( ( val + 170 ) % 255 )
|
||||
|
||||
self.nextNPCGoalCheck = 0
|
||||
self.GoalLinkColor = Color( r, g, b )
|
||||
|
||||
end )
|
||||
end
|
||||
143
lua/autorun/client/cl_weapon_holsters.lua
Normal file
143
lua/autorun/client/cl_weapon_holsters.lua
Normal file
@@ -0,0 +1,143 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
--[[
|
||||
__ ___ __ __
|
||||
/ |/ /__ ____/ /__ / / __ __
|
||||
/ /|_/ / _ `/ _ / -_) / _ \/ // /
|
||||
/_/ /_/\_,_/\_,_/\__/ /_.__/\_, /
|
||||
___ __ /___/ ___ __
|
||||
/ _ \___ / /_ _____ ___ / /____ ____ / _ \__ ______/ /__
|
||||
/ ___/ _ \/ / // / -_|_-</ __/ -_) __/ / // / // / __/ '_/
|
||||
/_/ \___/_/\_, /\__/___/\__/\__/_/ /____/\_,_/\__/_/\_\
|
||||
/___/
|
||||
https://steamcommunity.com/profiles/76561198057599363
|
||||
]]
|
||||
CreateClientConVar("cl_weapon_holsters", "1", true, false, "Enable Weapon Holsters (client side)")
|
||||
WepHolster = WepHolster or {}
|
||||
WepHolster.wepInfo = WepHolster.wepInfo or {}
|
||||
|
||||
net.Receive("sendWholeWHData", function(len)
|
||||
WepHolster.wepInfo = net.ReadTable()
|
||||
end)
|
||||
|
||||
net.Receive("sendWHData", function(len)
|
||||
local class = net.ReadString()
|
||||
local tbl = net.ReadTable()
|
||||
WepHolster.wepInfo[class] = tbl.Model and tbl or nil
|
||||
|
||||
if not tbl.Model then
|
||||
for pl, weps in pairs(WepHolster.HolsteredWeps) do
|
||||
local ply = Entity(pl)
|
||||
|
||||
for cls, wep in pairs(weps) do
|
||||
if cls == class then
|
||||
wep:Remove()
|
||||
WepHolster.HolsteredWeps[pl][cls] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
WepHolster.HolsteredWeps = WepHolster.HolsteredWeps or {}
|
||||
|
||||
local function CalcOffset(pos, ang, off)
|
||||
return pos + ang:Right() * off.x + ang:Forward() * off.y + ang:Up() * off.z
|
||||
end
|
||||
|
||||
local function cdwh()
|
||||
return WepHolster.wepInfo and WepHolster.HolsteredWeps and GetConVar("cl_weapon_holsters"):GetBool() and GetConVar("sv_weapon_holsters"):GetBool()
|
||||
end
|
||||
|
||||
hook.Add("PostPlayerDraw", "WeaponHolster", function(ply)
|
||||
if not cdwh() then
|
||||
return
|
||||
end
|
||||
|
||||
if IsValid(ply) and ply:Alive() then
|
||||
for wepclass, model in pairs(WepHolster.HolsteredWeps[ply:EntIndex()] or {}) do
|
||||
if not WepHolster.wepInfo[wepclass] then
|
||||
return
|
||||
end
|
||||
|
||||
local bone = ply:LookupBone(WepHolster.wepInfo[wepclass].Bone)
|
||||
|
||||
if not bone then
|
||||
return
|
||||
end
|
||||
|
||||
local matrix = ply:GetBoneMatrix(bone)
|
||||
|
||||
if not matrix then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = matrix:GetTranslation()
|
||||
local ang = matrix:GetAngles()
|
||||
pos = CalcOffset(pos, ang, WepHolster.wepInfo[wepclass].BoneOffset[1])
|
||||
model:SetRenderOrigin(pos)
|
||||
ang:RotateAroundAxis(ang:Forward(), WepHolster.wepInfo[wepclass].BoneOffset[2].p)
|
||||
ang:RotateAroundAxis(ang:Up(), WepHolster.wepInfo[wepclass].BoneOffset[2].y)
|
||||
ang:RotateAroundAxis(ang:Right(), WepHolster.wepInfo[wepclass].BoneOffset[2].r)
|
||||
model:SetRenderAngles(ang)
|
||||
model:DrawModel()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("Think", "WeaponHolster", function()
|
||||
if not cdwh() then
|
||||
return
|
||||
end
|
||||
|
||||
for _, ply in pairs(player.GetAll()) do
|
||||
if IsValid(ply) and ply:Alive() then
|
||||
for k, v in pairs(ply:GetWeapons()) do
|
||||
local class = v:GetClass()
|
||||
local plyid = ply:EntIndex()
|
||||
WepHolster.HolsteredWeps[plyid] = WepHolster.HolsteredWeps[plyid] or {}
|
||||
|
||||
if WepHolster.wepInfo[class] and ply:GetActiveWeapon() ~= v and not WepHolster.HolsteredWeps[plyid][class] then
|
||||
WepHolster.HolsteredWeps[plyid][class] = ClientsideModel(WepHolster.wepInfo[class].Model, RENDERGROUP_OPAQUE)
|
||||
|
||||
if not IsValid(WepHolster.HolsteredWeps[plyid][class]) then
|
||||
SafeRemoveEntity(WepHolster.HolsteredWeps[plyid][class]) -- just in case.
|
||||
WepHolster.HolsteredWeps[plyid][class] = nil
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
WepHolster.HolsteredWeps[plyid][class]:SetNoDraw(true)
|
||||
|
||||
if WepHolster.wepInfo[class].isEditing then
|
||||
WepHolster.HolsteredWeps[plyid][class]:SetMaterial("models/wireframe")
|
||||
--print("wireframe화 think")
|
||||
--print(WepHolster.wepInfo[class].isEditing)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 필요없는 CSEnt 찾아서 삭제
|
||||
for pl, weps in pairs(WepHolster.HolsteredWeps) do
|
||||
local ply = Entity(pl)
|
||||
|
||||
for class, wep in pairs(weps) do
|
||||
if not IsValid(ply) or not ply:IsPlayer() or not ply:Alive() or (IsValid(ply:GetActiveWeapon()) and ply:GetActiveWeapon():GetClass() == class) or not IsValid(ply:GetWeapon(class)) then
|
||||
wep:Remove() -- 삭제
|
||||
WepHolster.HolsteredWeps[pl][class] = nil
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
131
lua/autorun/client/demo_recording.lua
Normal file
131
lua/autorun/client/demo_recording.lua
Normal file
@@ -0,0 +1,131 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
if ( !engine.IsPlayingDemo() ) then return end
|
||||
|
||||
local VideoSettings = engine.VideoSettings()
|
||||
if ( !VideoSettings ) then return end
|
||||
|
||||
PrintTable( VideoSettings )
|
||||
|
||||
local SmoothedAng = nil
|
||||
local SmoothedFOV = nil
|
||||
local SmoothedPos = nil
|
||||
local AutoFocusPoint = nil
|
||||
|
||||
hook.Add( "Initialize", "DemoRenderInit", function()
|
||||
|
||||
if ( VideoSettings.frameblend < 2 ) then
|
||||
RunConsoleCommand( "pp_fb", "0" )
|
||||
else
|
||||
RunConsoleCommand( "pp_fb", "1" )
|
||||
RunConsoleCommand( "pp_fb_frames", VideoSettings.frameblend )
|
||||
RunConsoleCommand( "pp_fb_shutter", VideoSettings.fbshutter )
|
||||
end
|
||||
|
||||
end )
|
||||
|
||||
hook.Add( "RenderScene", "RenderForDemo", function( ViewOrigin, ViewAngles, ViewFOV )
|
||||
|
||||
if ( !engine.IsPlayingDemo() ) then return false end
|
||||
|
||||
render.Clear( 0, 0, 0, 255, true, true )
|
||||
|
||||
local FramesPerFrame = 1
|
||||
|
||||
if ( frame_blend.IsActive() ) then
|
||||
|
||||
FramesPerFrame = frame_blend.RenderableFrames()
|
||||
frame_blend.AddFrame()
|
||||
|
||||
if ( frame_blend.ShouldSkipFrame() ) then
|
||||
|
||||
frame_blend.DrawPreview()
|
||||
return true
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if ( !SmoothedAng ) then SmoothedAng = ViewAngles * 1 end
|
||||
if ( !SmoothedFOV ) then SmoothedFOV = ViewFOV end
|
||||
if ( !SmoothedPos ) then SmoothedPos = ViewOrigin * 1 end
|
||||
if ( !AutoFocusPoint ) then AutoFocusPoint = SmoothedPos * 1 end
|
||||
|
||||
if ( VideoSettings.viewsmooth > 0 ) then
|
||||
SmoothedAng = LerpAngle( ( 1 - VideoSettings.viewsmooth ) / FramesPerFrame, SmoothedAng, ViewAngles )
|
||||
SmoothedFOV = Lerp( ( 1 - VideoSettings.viewsmooth ) / FramesPerFrame, SmoothedFOV, ViewFOV )
|
||||
else
|
||||
SmoothedAng = ViewAngles * 1
|
||||
SmoothedFOV = ViewFOV
|
||||
end
|
||||
|
||||
if ( VideoSettings.possmooth > 0 ) then
|
||||
SmoothedPos = LerpVector( ( 1 - VideoSettings.possmooth ) / FramesPerFrame, SmoothedPos, ViewOrigin )
|
||||
else
|
||||
SmoothedPos = ViewOrigin * 1
|
||||
end
|
||||
|
||||
local view = {
|
||||
x = 0,
|
||||
y = 0,
|
||||
w = math.Round( VideoSettings.width ),
|
||||
h = math.Round( VideoSettings.height ),
|
||||
angles = SmoothedAng,
|
||||
origin = SmoothedPos,
|
||||
fov = SmoothedFOV,
|
||||
drawhud = false,
|
||||
drawviewmodel = true,
|
||||
dopostprocess = true,
|
||||
drawmonitors = true
|
||||
}
|
||||
|
||||
if ( VideoSettings.dofsteps && VideoSettings.dofpasses ) then
|
||||
|
||||
local trace = util.TraceHull( {
|
||||
start = view.origin,
|
||||
endpos = view.origin + ( view.angles:Forward() * 8000 ),
|
||||
mins = Vector( -2, -2, -2 ),
|
||||
maxs = Vector( 2, 2, 2 ),
|
||||
filter = { GetViewEntity() }
|
||||
} )
|
||||
|
||||
local focuspeed = math.Clamp( ( VideoSettings.doffocusspeed / FramesPerFrame ) * 0.2, 0, 1 )
|
||||
AutoFocusPoint = LerpVector( focuspeed, AutoFocusPoint, trace.HitPos )
|
||||
local UsableFocusPoint = view.origin + view.angles:Forward() * AutoFocusPoint:Distance( view.origin )
|
||||
|
||||
RenderDoF( view.origin, view.angles, UsableFocusPoint, VideoSettings.dofsize * 0.3, VideoSettings.dofsteps, VideoSettings.dofpasses, false, table.Copy( view ) )
|
||||
|
||||
else
|
||||
|
||||
render.RenderView( view )
|
||||
|
||||
end
|
||||
|
||||
-- TODO: IF RENDER HUD
|
||||
render.RenderHUD( 0, 0, view.w, view.h )
|
||||
|
||||
local ShouldRecordThisFrme = frame_blend.IsLastFrame()
|
||||
|
||||
if ( frame_blend.IsActive() ) then
|
||||
|
||||
frame_blend.BlendFrame()
|
||||
frame_blend.DrawPreview()
|
||||
|
||||
end
|
||||
|
||||
if ( ShouldRecordThisFrme ) then
|
||||
menu.RecordFrame()
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
end )
|
||||
40
lua/autorun/client/gm_demo.lua
Normal file
40
lua/autorun/client/gm_demo.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
concommand.Add( "gm_demo", function( ply, cmd, arg )
|
||||
|
||||
if ( engine.IsRecordingDemo() ) then
|
||||
RunConsoleCommand( "stop" )
|
||||
return
|
||||
end
|
||||
|
||||
local dynamic_name = game.GetMap() .. " " .. util.DateStamp()
|
||||
|
||||
RunConsoleCommand( "record", "demos/" .. dynamic_name .. ".dem" )
|
||||
RunConsoleCommand( "record_screenshot", dynamic_name )
|
||||
|
||||
end, nil, "Start or stop recording a demo.", FCVAR_DONTRECORD )
|
||||
|
||||
local matRecording = nil
|
||||
local drawicon = CreateConVar( "gm_demo_icon", 1, FCVAR_ARCHIVE + FCVAR_DONTRECORD, "If set to 1, display a 'RECORDING' icon during gm_demo." )
|
||||
hook.Add( "HUDPaint", "DrawRecordingIcon", function()
|
||||
|
||||
if ( !engine.IsRecordingDemo() || !drawicon:GetBool() ) then return end
|
||||
|
||||
if ( !matRecording ) then
|
||||
matRecording = Material( "gmod/recording.png" )
|
||||
end
|
||||
|
||||
surface.SetDrawColor( 255, 255, 255, 255 )
|
||||
surface.SetMaterial( matRecording )
|
||||
surface.DrawTexturedRect( ScrW() - 512, 0, 512, 256 )
|
||||
|
||||
end )
|
||||
239
lua/autorun/client/lvs_vehicle_tab.lua
Normal file
239
lua/autorun/client/lvs_vehicle_tab.lua
Normal file
@@ -0,0 +1,239 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
|
||||
hook.Add( "PopulateVehicles", "!!!add_lvs_to_vehicles", function( pnlContent, tree, node )
|
||||
local CategoryNameTranslate = {}
|
||||
local Categorised = {}
|
||||
local SubCategorised = {}
|
||||
|
||||
local SpawnableEntities = table.Copy( list.Get( "SpawnableEntities" ) )
|
||||
local Variants = {
|
||||
[1] = "[LVS] - ",
|
||||
[2] = "[LVS] -",
|
||||
[3] = "[LVS]- ",
|
||||
[4] = "[LVS]-",
|
||||
[5] = "[LVS] ",
|
||||
}
|
||||
|
||||
for _, v in pairs( scripted_ents.GetList() ) do
|
||||
if not v.t or not v.t.ClassName or not v.t.VehicleCategory then continue end
|
||||
|
||||
if not isstring( v.t.ClassName ) or v.t.ClassName == "" or not SpawnableEntities[ v.t.ClassName ] then continue end
|
||||
|
||||
SpawnableEntities[ v.t.ClassName ].Category = "[LVS] - "..v.t.VehicleCategory
|
||||
|
||||
if not v.t.VehicleSubCategory then continue end
|
||||
|
||||
SpawnableEntities[ v.t.ClassName ].SubCategory = v.t.VehicleSubCategory
|
||||
end
|
||||
|
||||
if SpawnableEntities then
|
||||
for k, v in pairs( SpawnableEntities ) do
|
||||
|
||||
local Category = v.Category
|
||||
|
||||
if not isstring( Category ) then continue end
|
||||
|
||||
if not Category:StartWith( "[LVS]" ) and not v.LVS then continue end
|
||||
|
||||
v.SpawnName = k
|
||||
|
||||
for _, start in pairs( Variants ) do
|
||||
if Category:StartWith( start ) then
|
||||
local NewName = string.Replace(Category, start, "")
|
||||
CategoryNameTranslate[ NewName ] = Category
|
||||
Category = NewName
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if v.SubCategory then
|
||||
SubCategorised[ Category ] = SubCategorised[ Category ] or {}
|
||||
SubCategorised[ Category ][ v.SubCategory ] = SubCategorised[ Category ][ v.SubCategory ] or {}
|
||||
|
||||
table.insert( SubCategorised[ Category ][ v.SubCategory ], v )
|
||||
end
|
||||
|
||||
Categorised[ Category ] = Categorised[ Category ] or {}
|
||||
|
||||
table.insert( Categorised[ Category ], v )
|
||||
end
|
||||
end
|
||||
|
||||
local lvsNode = tree:AddNode( "[LVS]", "icon16/lvs.png" )
|
||||
|
||||
if Categorised["[LVS]"] then
|
||||
local v = Categorised["[LVS]"]
|
||||
|
||||
lvsNode.DoPopulate = function( self )
|
||||
if self.PropPanel then return end
|
||||
|
||||
self.PropPanel = vgui.Create( "ContentContainer", pnlContent )
|
||||
self.PropPanel:SetVisible( false )
|
||||
self.PropPanel:SetTriggerSpawnlistChange( false )
|
||||
|
||||
for k, ent in SortedPairsByMemberValue( v, "PrintName" ) do
|
||||
spawnmenu.CreateContentIcon( ent.ScriptedEntityType or "entity", self.PropPanel, {
|
||||
nicename = ent.PrintName or ent.ClassName,
|
||||
spawnname = ent.SpawnName,
|
||||
material = ent.IconOverride or "entities/" .. ent.SpawnName .. ".png",
|
||||
admin = ent.AdminOnly
|
||||
} )
|
||||
end
|
||||
end
|
||||
|
||||
lvsNode.DoClick = function( self )
|
||||
self:DoPopulate()
|
||||
pnlContent:SwitchPanel( self.PropPanel )
|
||||
end
|
||||
end
|
||||
|
||||
local IconList = list.Get( "ContentCategoryIcons" )
|
||||
|
||||
for CategoryName, v in SortedPairs( Categorised ) do
|
||||
if CategoryName:StartWith( "[LVS]" ) then continue end
|
||||
|
||||
local Icon = "icon16/lvs_noicon.png"
|
||||
|
||||
if IconList and IconList[ CategoryNameTranslate[ CategoryName ] ] then
|
||||
Icon = IconList[ CategoryNameTranslate[ CategoryName ] ]
|
||||
end
|
||||
|
||||
local node = lvsNode:AddNode( CategoryName, Icon )
|
||||
|
||||
node.DoPopulate = function( self )
|
||||
if self.PropPanel then return end
|
||||
|
||||
self.PropPanel = vgui.Create( "ContentContainer", pnlContent )
|
||||
self.PropPanel:SetVisible( false )
|
||||
self.PropPanel:SetTriggerSpawnlistChange( false )
|
||||
|
||||
for k, ent in SortedPairsByMemberValue( v, "PrintName" ) do
|
||||
if ent.SubCategory then
|
||||
continue
|
||||
end
|
||||
|
||||
spawnmenu.CreateContentIcon( ent.ScriptedEntityType or "entity", self.PropPanel, {
|
||||
nicename = ent.PrintName or ent.ClassName,
|
||||
spawnname = ent.SpawnName,
|
||||
material = ent.IconOverride or "entities/" .. ent.SpawnName .. ".png",
|
||||
admin = ent.AdminOnly
|
||||
} )
|
||||
end
|
||||
end
|
||||
node.DoClick = function( self )
|
||||
self:DoPopulate()
|
||||
pnlContent:SwitchPanel( self.PropPanel )
|
||||
end
|
||||
|
||||
local SubCat = SubCategorised[ CategoryName ]
|
||||
|
||||
if not SubCat then continue end
|
||||
|
||||
for SubName, data in SortedPairs( SubCat ) do
|
||||
|
||||
local SubIcon = "icon16/lvs_noicon.png"
|
||||
|
||||
if IconList then
|
||||
if IconList[ "[LVS] - "..CategoryName.." - "..SubName ] then
|
||||
SubIcon = IconList[ "[LVS] - "..CategoryName.." - "..SubName ]
|
||||
else
|
||||
if IconList[ "[LVS] - "..SubName ] then
|
||||
SubIcon = IconList[ "[LVS] - "..SubName ]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local subnode = node:AddNode( SubName, SubIcon )
|
||||
|
||||
subnode.DoPopulate = function( self )
|
||||
if self.PropPanel then return end
|
||||
|
||||
self.PropPanel = vgui.Create( "ContentContainer", pnlContent )
|
||||
self.PropPanel:SetVisible( false )
|
||||
self.PropPanel:SetTriggerSpawnlistChange( false )
|
||||
|
||||
for k, ent in SortedPairsByMemberValue( data, "PrintName" ) do
|
||||
spawnmenu.CreateContentIcon( ent.ScriptedEntityType or "entity", self.PropPanel, {
|
||||
nicename = ent.PrintName or ent.ClassName,
|
||||
spawnname = ent.SpawnName,
|
||||
material = ent.IconOverride or "entities/" .. ent.SpawnName .. ".png",
|
||||
admin = ent.AdminOnly
|
||||
} )
|
||||
end
|
||||
end
|
||||
subnode.DoClick = function( self )
|
||||
self:DoPopulate()
|
||||
pnlContent:SwitchPanel( self.PropPanel )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- User Stuff
|
||||
hook.Run( "LVS.PopulateVehicles", lvsNode, pnlContent, tree )
|
||||
|
||||
-- CONTROLS
|
||||
local node = lvsNode:AddNode( "Controls", "icon16/keyboard.png" )
|
||||
node.DoClick = function( self )
|
||||
LVS:OpenMenu()
|
||||
LVS:OpenClientControls()
|
||||
end
|
||||
|
||||
-- CLIENT SETTINGS
|
||||
local node = lvsNode:AddNode( "Client Settings", "icon16/wrench.png" )
|
||||
node.DoClick = function( self )
|
||||
LVS:OpenMenu()
|
||||
LVS:OpenClientSettings()
|
||||
end
|
||||
|
||||
-- SERVER SETTINGS
|
||||
local node = lvsNode:AddNode( "Server Settings", "icon16/wrench_orange.png" )
|
||||
node.DoClick = function( self )
|
||||
if LocalPlayer():IsSuperAdmin() then
|
||||
LVS:OpenMenu()
|
||||
LVS:OpenServerMenu()
|
||||
else
|
||||
surface.PlaySound( "buttons/button11.wav" )
|
||||
end
|
||||
end
|
||||
end )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS]", "icon16/lvs.png" )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Artillery", "icon16/lvs_artillery.png" )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Cars", "icon16/lvs_cars.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Cars - Armored", "icon16/lvs_armor.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Cars - Civilian", "icon16/lvs_civilian.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Cars - Military", "icon16/lvs_military.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Cars - Pack", "icon16/lvs_cars_pack.png" )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Helicopters", "icon16/lvs_helicopters.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Helicopters - Combine", "icon16/lvs_combine.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Helicopters - Resistance", "icon16/lvs_resistance.png" )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Planes", "icon16/lvs_planes.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Planes - Bombers", "icon16/lvs_bomb.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Planes - Fighters", "icon16/lvs_fighter.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Planes - Civilian", "icon16/lvs_civilian.png" )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Tanks", "icon16/lvs_tanks.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Tanks - Light", "icon16/lvs_light.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Tanks - Medium", "icon16/lvs_medium.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Tanks - Heavy", "icon16/lvs_heavy.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Tanks - RP", "icon16/lvs_rp.png" )
|
||||
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Star Wars", "icon16/lvs_starwars.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Star Wars - Gunships", "icon16/lvs_sw_gunship.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Star Wars - Hover Tanks", "icon16/lvs_sw_hover.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Star Wars - Walkers", "icon16/lvs_sw_walker.png" )
|
||||
list.Set( "ContentCategoryIcons", "[LVS] - Star Wars - Starfighters", "icon16/lvs_sw_starfighter.png" )
|
||||
289
lua/autorun/client/morematerials.lua
Normal file
289
lua/autorun/client/morematerials.lua
Normal file
@@ -0,0 +1,289 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
// adding materials to the material toolguns list
|
||||
|
||||
list.Add( "OverrideMaterials", "models/XQM//Deg360" )
|
||||
list.Add( "OverrideMaterials", "models/XQM//LightLinesGB" )
|
||||
list.Add( "OverrideMaterials", "models/XQM//LightLinesRed" )
|
||||
list.Add( "OverrideMaterials", "models/XQM//SquaredMat" )
|
||||
list.Add( "OverrideMaterials", "models/XQM//WoodTexture_1" )
|
||||
list.Add( "OverrideMaterials", "models/airboat/airboat_blur02" )
|
||||
list.Add( "OverrideMaterials", "models/alyx/emptool_glow" )
|
||||
list.Add( "OverrideMaterials", "models/antlion/antlion_innards" )
|
||||
list.Add( "OverrideMaterials", "models/barnacle/roots" )
|
||||
list.Add( "OverrideMaterials", "models/combine_advisor/body9" )
|
||||
list.Add( "OverrideMaterials", "models/combine_advisor/mask" )
|
||||
list.Add( "OverrideMaterials", "models/combine_scanner/scanner_eye" )
|
||||
list.Add( "OverrideMaterials", "models/debug/debugwhite" )
|
||||
list.Add( "OverrideMaterials", "models/dog/eyeglass" )
|
||||
list.Add( "OverrideMaterials", "models/effects/portalrift_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/effects/slimebubble_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/effects/splode1_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/effects/splode_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/gibs/metalgibs/metal_gibs" )
|
||||
list.Add( "OverrideMaterials", "models/gibs/woodgibs/woodgibs01" )
|
||||
list.Add( "OverrideMaterials", "models/gibs/woodgibs/woodgibs02" )
|
||||
list.Add( "OverrideMaterials", "models/gibs/woodgibs/woodgibs03" )
|
||||
list.Add( "OverrideMaterials", "models/player/player_chrome1" )
|
||||
list.Add( "OverrideMaterials", "models/props_animated_breakable/smokestack/brickwall002a" )
|
||||
list.Add( "OverrideMaterials", "models/props_building_details/courtyard_template001c_bars" )
|
||||
list.Add( "OverrideMaterials", "models/props_building_details/courtyard_template001c_bars" )
|
||||
list.Add( "OverrideMaterials", "models/props_buildings/destroyedbuilldingwall01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_buildings/plasterwall021a" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/frostedglass_01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/furniturefabric001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/furniturefabric002a" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/furnituremetal001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/gate_door02a" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/metalladder001" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/metalladder002" )
|
||||
list.Add( "OverrideMaterials", "models/props_c17/metalladder003" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/canal_bridge_railing_01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/canal_bridge_railing_01b" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/canal_bridge_railing_01c" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/canalmap_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/coastmap_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/metalcrate001d" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/metalwall005b" )
|
||||
list.Add( "OverrideMaterials", "models/props_canal/rock_riverbed01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/citadel_cable" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/citadel_cable_b" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/com_shield001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/combine_interface_disp" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/combine_monitorbay_disp" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/metal_combinebridge001" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/pipes01" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/pipes03" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/prtl_sky_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/props_combine/stasisfield_beam" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/building_template010a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/building_template022j" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/composite_debris" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/concretefloor013a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/concretefloor020a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/concretewall019a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/metalwall001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterceiling008a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterwall009d" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterwall021a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterwall034a" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterwall034d" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterwall039c" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/plasterwall040c" )
|
||||
list.Add( "OverrideMaterials", "models/props_debris/tilefloor001c" )
|
||||
list.Add( "OverrideMaterials", "models/props_foliage/driftwood_01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_foliage/oak_tree01" )
|
||||
list.Add( "OverrideMaterials", "models/props_foliage/tree_deciduous_01a_trunk" )
|
||||
list.Add( "OverrideMaterials", "models/props_interiors/metalfence007a" )
|
||||
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01b" )
|
||||
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01c" )
|
||||
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01d" )
|
||||
list.Add( "OverrideMaterials", "models/props_junk/plasticcrate01e" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/Tank_Glass001" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/cornerunit_cloud" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/door_klab01" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/security_screens" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/security_screens2" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/warp_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/props_lab/xencrystal_sheet" )
|
||||
list.Add( "OverrideMaterials", "models/props_pipes/GutterMetal01a")
|
||||
list.Add( "OverrideMaterials", "models/props_pipes/destroyedpipes01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_pipes/pipemetal001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_pipes/pipeset_metal02" )
|
||||
list.Add( "OverrideMaterials", "models/props_pipes/pipesystem01a_skin1" )
|
||||
list.Add( "OverrideMaterials", "models/props_pipes/pipesystem01a_skin2" )
|
||||
list.Add( "OverrideMaterials", "models/props_vents/borealis_vent001" )
|
||||
list.Add( "OverrideMaterials", "models/props_vents/borealis_vent001b" )
|
||||
list.Add( "OverrideMaterials", "models/props_vents/borealis_vent001c" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/concretefloor010a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/concretewall064b" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/concretewall066a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/dirtwall001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/metal_tram001a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/quarryobjects01" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff02a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff02b" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff02c" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/rockcliff04a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/rockgranite02a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/tugboat01" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/tugboat02" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/wood_fence01a" )
|
||||
list.Add( "OverrideMaterials", "models/props_wasteland/wood_fence01a_skin2" )
|
||||
list.Add( "OverrideMaterials", "models/shadertest/predator" )
|
||||
list.Add( "OverrideMaterials", "models/weapons/v_crossbow/rebar_glow" )
|
||||
list.Add( "OverrideMaterials", "models/weapons/v_crowbar/crowbar_cyl" )
|
||||
list.Add( "OverrideMaterials", "models/weapons/v_grenade/grenade body" )
|
||||
list.Add( "OverrideMaterials", "models/weapons/v_slam/new light1" )
|
||||
list.Add( "OverrideMaterials", "models/weapons/v_slam/new light2" )
|
||||
list.Add( "OverrideMaterials", "models/weapons/v_smg1/texture5" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/BoxFull_diffuse" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/CellShadedCamo_diffuse" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/CinderBlock_Tex" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/JetBody2TailPiece_diffuse" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/PoleX1_diffuse" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/Rails/gumball_1" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/SquaredMatInverted" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/WoodPlankTexture" )
|
||||
list.Add( "OverrideMaterials", "models/XQM/boxfull_diffuse" )
|
||||
list.Add( "OverrideMaterials", "models/dav0r/hoverball" )
|
||||
list.Add( "OverrideMaterials", "models/spawn_effect" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/Fender_chrome" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/Fender_white" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/Fender_wood" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/Future_vents" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/FuturisticTrackRamp_1-2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/OfficeWindow_1-1" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/Pro_gear_side" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/black_brushes" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/black_chrome" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/blue_steel" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/camera" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/car_tire" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/checkers_map" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/cigar" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/concrete0" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/concrete1" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/concrete2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/concrete3" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/construct/concrete_barrier00" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/construct/concrete_barrier2_00" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/construct/concrete_pipe_00" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/egg" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/gear" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/gear_top" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/grey_chrome" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/grey_steel" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/heli" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/indentTiles2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/iron_rails" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_carbonfiber" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_carbonfiber2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_metallic" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_metallic2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_plastic" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mat/mat_phx_plastic2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/metal_plate" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/metal_wheel" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/metalbox" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/metalbox2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/metalfence004a" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/middle" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/mrref2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/output_jack" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/pack2/chrome" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/pack2/interior_sides" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/pack2/train_floor" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/potato" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/pro_gear_top2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/ps_grass" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/road" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/roadside" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/scrnspace" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/side" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/simplyMetallic1" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/simplyMetallic2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/smallwheel" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/spheremappy" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/t_light" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/thruster" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/tiles2" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/top" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/torpedo" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_beamside" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_beamtop" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_plate" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/trains/track_plateside" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/white_brushes" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/white_fps" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/window" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/wire/pcb_blue" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/wire/pcb_green" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/wire/pcb_red" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/wood_dome" )
|
||||
list.Add( "OverrideMaterials", "phoenix_storms/wood_side" )
|
||||
|
||||
// Checking if CSS is mounted and adding CSS textures if it is
|
||||
|
||||
function engine.IsMounted(g)
|
||||
for k,v in pairs(engine.GetGames()) do
|
||||
if (' cstrike' ) then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if IsMounted( 'cstrike' ) and (engine.IsMounted('cstrike')) then
|
||||
|
||||
list.Add( "OverrideMaterials", "models/cs_havana/wndb" )
|
||||
list.Add( "OverrideMaterials", "models/cs_havana/wndd" )
|
||||
list.Add( "OverrideMaterials", "models/cs_italy/light_orange" )
|
||||
list.Add( "OverrideMaterials", "models/cs_italy/plaster" )
|
||||
list.Add( "OverrideMaterials", "models/cs_italy/pwtrim2" )
|
||||
list.Add( "OverrideMaterials", "models/de_cbble/wndarch" )
|
||||
list.Add( "OverrideMaterials", "models/de_chateau/ch_arch_b1" )
|
||||
list.Add( "OverrideMaterials", "models/pi_window/plaster" )
|
||||
list.Add( "OverrideMaterials", "models/pi_window/trim128" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/dollar" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/fireescapefloor" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/metal_stairs1" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/moneywrap" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/moneywrap02" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/moneytop" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_assault/pylon" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/boulder01" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/milceil001" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/militiarock" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/militiarockb" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/milwall006" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/rocks01" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/roofbeams01" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/roofbeams02" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/roofbeams03" )
|
||||
list.Add( "OverrideMaterials", "models/props/CS_militia/RoofEdges" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_office/clouds" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_office/file_cabinet2" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_office/file_cabinet3" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_office/screen" )
|
||||
list.Add( "OverrideMaterials", "models/props/cs_office/snowmana" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/de_inferno_boulder_03" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/infflra" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/infflrd" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/inftowertop" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/offwndwb_break" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/roofbits" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/tileroof01" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_inferno/woodfloor008a" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_nuke/nukconcretewalla" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_nuke/nukecardboard" )
|
||||
list.Add( "OverrideMaterials", "models/props/de_nuke/pipeset_metal" )
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
// Making sure there's no double materials in the list in case of other addons, plus sorting them
|
||||
|
||||
timer.Simple(0, function()
|
||||
local mats = list.GetForEdit("OverrideMaterials");
|
||||
local cleaner = {};
|
||||
for i, mat in pairs(mats) do
|
||||
cleaner[mat] = true;
|
||||
mats[i] = nil;
|
||||
end
|
||||
local i = 1;
|
||||
for mat in pairs(cleaner) do
|
||||
mats[i] = mat;
|
||||
i = i + 1;
|
||||
end
|
||||
table.sort(mats);
|
||||
end);
|
||||
97
lua/autorun/client/vj_menu_main_client.lua
Normal file
97
lua/autorun/client/vj_menu_main_client.lua
Normal file
@@ -0,0 +1,97 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
/*--------------------------------------------------
|
||||
=============== Client Main Menu ===============
|
||||
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
|
||||
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
|
||||
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
|
||||
--------------------------------------------------*/
|
||||
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
|
||||
include('autorun/client/vj_menu_plugins.lua')
|
||||
|
||||
local function VJ_INFORMATION(Panel)
|
||||
local client = LocalPlayer() -- Local Player
|
||||
Panel:AddControl("Label", {Text = "About VJ Base:"})
|
||||
Panel:ControlHelp("VJ Base is made by DrVrej. The main purpose of this base is for the sake of simplicity. It provides many types of bases including a very advanced artificial intelligent NPC base.")
|
||||
--
|
||||
--
|
||||
Panel:AddControl("Label", {Text = "User Information:"})
|
||||
Panel:ControlHelp("Date - "..os.date("%b %d, %Y - %I:%M %p")) -- Date
|
||||
Panel:ControlHelp("Name - "..client:Nick().." ("..client:SteamID()..")") -- Name + Steam ID
|
||||
Panel:ControlHelp("Session - "..(game.SinglePlayer() and "SinglePlayer" or "Multiplayer")..", "..gmod.GetGamemode().Name.." ("..game.GetMap()..")") -- Game Session
|
||||
Panel:ControlHelp("VJ Base - "..VJBASE_VERSION..", "..#VJ.Plugins.." plugins, "..GetConVar("vj_language"):GetString()) -- VJ Base Information
|
||||
Panel:ControlHelp("System - "..(system.IsLinux() and "Linux" or (system.IsOSX() and "OSX" or "Windows")).." ("..ScrW().."x"..ScrH()..")") // system.IsWindows() -- System
|
||||
--
|
||||
--
|
||||
Panel:AddControl("Label", {Text = "Mounted Games:"})
|
||||
Panel:ControlHelp("HL1S - "..tostring(IsMounted("hl1")))
|
||||
Panel:ControlHelp("HL2 - "..tostring(IsMounted("hl2")))
|
||||
Panel:ControlHelp("HL2Ep1 - "..tostring(IsMounted("episodic")))
|
||||
Panel:ControlHelp("HL2Ep2 - "..tostring(IsMounted("ep2")))
|
||||
Panel:ControlHelp("CSS - "..tostring(IsMounted("cstrike")))
|
||||
Panel:ControlHelp("DoD - "..tostring(IsMounted("dod")))
|
||||
Panel:ControlHelp("TF2 - "..tostring(IsMounted("tf")))
|
||||
--
|
||||
--
|
||||
Panel:AddControl("Label", {Text = "Command Information:"})
|
||||
Panel:ControlHelp("SNPC Configurations - 'vj_npc_*'")
|
||||
Panel:ControlHelp("Weapons - 'vj_wep_*'")
|
||||
Panel:ControlHelp("HUD - 'vj_hud_*'")
|
||||
Panel:ControlHelp("Crosshair - 'vj_hud_ch_*'")
|
||||
--
|
||||
--
|
||||
Panel:AddControl("Label", {Text = "Credits:"})
|
||||
Panel:ControlHelp("DrVrej(Me) - Everything, from coding to fixing models and materials to sound editing")
|
||||
Panel:ControlHelp("Black Mesa Source - Original non-edited gib models, blood pool texture, and glock 17 model")
|
||||
Panel:ControlHelp("Valve - AK-47, M16A1 and MP40 models")
|
||||
Panel:ControlHelp("Orion - Helped create first version of the base (2011-2012)")
|
||||
Panel:ControlHelp("Cpt. Hazama - Suggestions + testing")
|
||||
Panel:ControlHelp("Oteek - Bloodpool textures + testing")
|
||||
Panel:ControlHelp("China-Mandem - Original K-3 Model")
|
||||
|
||||
Panel:ControlHelp("")
|
||||
Panel:ControlHelp("============================")
|
||||
|
||||
Panel:ControlHelp("Copyright (c) "..os.date("20%y").." by DrVrej, All rights reserved.")
|
||||
Panel:ControlHelp("No parts of the code may be reproduced, copied, modified or adapted, without the prior written consent of the author.")
|
||||
end
|
||||
----=================================----
|
||||
local function VJ_MAINMENU_CLIENT(Panel)
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.clsettings.label"})
|
||||
|
||||
-- Icons: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
||||
local vj_combo_box = vgui.Create("DComboBox")
|
||||
vj_combo_box:SetSize(100, 30)
|
||||
vj_combo_box:SetValue("#vjbase.menu.clsettings.labellang")
|
||||
vj_combo_box:AddChoice("English", "english", false, "flags16/us.png")
|
||||
vj_combo_box:AddChoice("简体中文", "schinese", false, "flags16/cn.png")
|
||||
vj_combo_box:AddChoice("ՀայերԷն *", "armenian", false, "flags16/am.png")
|
||||
vj_combo_box:AddChoice("Русский", "russian", false, "flags16/ru.png")
|
||||
vj_combo_box:AddChoice("Deutsche *", "german", false, "flags16/de.png")
|
||||
vj_combo_box:AddChoice("Français *", "french", false, "flags16/fr.png")
|
||||
vj_combo_box:AddChoice("Lietuvių", "lithuanian", false, "flags16/lt.png")
|
||||
vj_combo_box:AddChoice("Español (Latino Americano) *", "spanish_lt", false, "flags16/mx.png")
|
||||
vj_combo_box:AddChoice("Português (Brasileiro) *", "portuguese_br", false, "flags16/br.png")
|
||||
vj_combo_box.OnSelect = function(data, index, text)
|
||||
RunConsoleCommand("vj_language", vj_combo_box:GetOptionData(index))
|
||||
chat.AddText(Color(255, 215, 0), "#vjbase.menu.clsettings.notify.lang", " ", Color(30, 200, 255), text)
|
||||
timer.Simple(0.2, function() VJ_REFRESH_LANGUAGE(val) RunConsoleCommand("spawnmenu_reload") end) -- Bedke kichme espasenk minchevor command-e update ela
|
||||
end
|
||||
Panel:AddPanel(vj_combo_box)
|
||||
Panel:ControlHelp("* stands for unfinished translation!")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.clsettings.lang.auto", Command = "vj_language_auto"})
|
||||
Panel:ControlHelp("#vjbase.menu.clsettings.lang.auto.label")
|
||||
end
|
||||
----=================================----
|
||||
hook.Add("PopulateToolMenu", "VJ_ADDTOMENU_INFORMATION", function()
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "Main Menu", "Information", "#vjbase.menu.info", "", "", VJ_INFORMATION, {})
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "Main Menu", "Client Settings", "#vjbase.menu.clsettings", "", "", VJ_MAINMENU_CLIENT, {})
|
||||
end)
|
||||
127
lua/autorun/client/vj_menu_plugins.lua
Normal file
127
lua/autorun/client/vj_menu_plugins.lua
Normal file
@@ -0,0 +1,127 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
/*--------------------------------------------------
|
||||
=============== VJ Base Plugins ===============
|
||||
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
|
||||
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
|
||||
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
|
||||
--------------------------------------------------*/
|
||||
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_PLUGINS(Panel)
|
||||
local numPlugins = #VJ.Plugins
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.plugins.label"})
|
||||
Panel:ControlHelp(language.GetPhrase("#vjbase.menu.plugins.version").." "..VJBASE_VERSION) -- Main Number / Version / Patches
|
||||
Panel:ControlHelp(language.GetPhrase("#vjbase.menu.plugins.totalplugins").." "..numPlugins)
|
||||
|
||||
local CheckList = vgui.Create("DListView")
|
||||
CheckList:SetTooltip(false)
|
||||
//CheckList:Center() -- No need since Size does it already
|
||||
CheckList:SetSize(100, 300) -- Size
|
||||
CheckList:SetMultiSelect(false)
|
||||
CheckList:AddColumn("#vjbase.menu.plugins.header1") -- Add column
|
||||
CheckList:AddColumn("#vjbase.menu.plugins.header2"):SetFixedWidth(50) -- Add column
|
||||
//Panel:SetName("Test") -- Renames the blue label
|
||||
if VJ.Plugins != nil then
|
||||
for _,v in SortedPairsByMemberValue(VJ.Plugins, "Name") do
|
||||
CheckList:AddLine(v.Name, v.Type)
|
||||
end
|
||||
else
|
||||
CheckList:AddLine("#vjbase.menu.plugins.notfound", "")
|
||||
end
|
||||
CheckList.OnRowSelected = function()
|
||||
surface.PlaySound(Sound("vj_misc/illuminati_confirmed.mp3"))
|
||||
chat.AddText(Color(255,255,0),"-=-=-=-=-=-=-=-=- ", Color(255,100,0), "VJ Base", Color(255,255,0)," -=-=-=-=-=-=-=-=-")
|
||||
chat.AddText(Color(0,255,0), language.GetPhrase("#vjbase.menu.plugins.version").." "..VJBASE_VERSION)
|
||||
chat.AddText(Color(0,255,0), language.GetPhrase("#vjbase.menu.plugins.totalplugins").." "..numPlugins)
|
||||
end
|
||||
Panel:AddItem(CheckList)
|
||||
|
||||
-- Changelog for VJ Base
|
||||
local changelog = vgui.Create("DButton")
|
||||
changelog:SetFont("TargetID")
|
||||
changelog:SetText("#vjbase.menu.plugins.changelog")
|
||||
changelog:SetSize(150, 25)
|
||||
changelog:SetColor(Color(0, 102, 0))
|
||||
changelog:SetFont("VJFont_Trebuchet24_SmallMedium")
|
||||
changelog.DoClick = function(x)
|
||||
gui.OpenURL("https://github.com/DrVrej/VJ-Base/releases")
|
||||
end
|
||||
Panel:AddPanel(changelog)
|
||||
|
||||
-- Github Wiki
|
||||
local github = vgui.Create("DButton")
|
||||
github:SetFont("TargetID")
|
||||
github:SetText("#vjbase.menu.plugins.makeaddon")
|
||||
github:SetSize(150, 25)
|
||||
github:SetColor(Color(0, 0, 102))
|
||||
github:SetFont("VJFont_Trebuchet24_SmallMedium")
|
||||
github.DoClick = function(x)
|
||||
gui.OpenURL("https://github.com/DrVrej/VJ-Base/wiki")
|
||||
end
|
||||
Panel:AddPanel(github)
|
||||
|
||||
-- Tutorial Video
|
||||
local tutorialVid = vgui.Create("DButton")
|
||||
tutorialVid:SetFont("TargetID")
|
||||
tutorialVid:SetText("#tool.vjstool.menu.tutorialvideo")
|
||||
tutorialVid:SetSize(150, 25)
|
||||
tutorialVid:SetColor(Color(0, 0, 102))
|
||||
tutorialVid:SetFont("VJFont_Trebuchet24_SmallMedium")
|
||||
tutorialVid.DoClick = function(x)
|
||||
gui.OpenURL("https://www.youtube.com/watch?v=dGoqEpFZ5_M")
|
||||
end
|
||||
Panel:AddPanel(tutorialVid)
|
||||
|
||||
-- *insert lenny face*
|
||||
if (LocalPlayer():SteamID() == "STEAM_0:0:22688298") then
|
||||
local lennyface = vgui.Create("DButton")
|
||||
lennyface:SetFont("TargetID")
|
||||
lennyface:SetText("HELLO")
|
||||
lennyface:SetSize(150, 25)
|
||||
lennyface:SetColor(Color(0, 0, 102))
|
||||
lennyface:SetFont("VJFont_Trebuchet24_SmallMedium")
|
||||
lennyface.DoClick = function(x)
|
||||
net.Start("vj_meme")
|
||||
net.SendToServer()
|
||||
end
|
||||
Panel:AddPanel(lennyface)
|
||||
end
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
hook.Add("PopulateToolMenu", "VJ_ADDTOMENU_INSTALLATIONS", function()
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "Main Menu", "Installed Plugins", "#vjbase.menu.plugins", "", "", VJ_PLUGINS)
|
||||
end)
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function doWelcomeMsg()
|
||||
print("Notice: This server is running VJ Base.")
|
||||
|
||||
local amt = #VJ.Plugins
|
||||
if amt <= 9 then
|
||||
amt = "0"..tostring(amt)
|
||||
else
|
||||
amt = tostring(amt)
|
||||
end
|
||||
local dashes = "----------------------------"
|
||||
|
||||
chat.AddText(Color(255,215,0),"|"..dashes..">", Color(0,255,255), " VJ Base ", Color(30,200,255), VJBASE_VERSION.." ", Color(255,215,0), "<"..dashes.."|")
|
||||
chat.AddText(Color(255,215,0),"|- ", Color(255,255,0),"NOTICE! ", Color(255,255,255), "To configure ", Color(0,255,255), "VJ Base ", Color(255,255,255), "click on ", Color(0,255,255), "DrVrej", Color(255,255,255)," in the spawn menu! ", Color(255,215,0),"-|")
|
||||
//chat.AddText(Color(255,215,0),"|"..dashes..">", Color(30,200,255), " "..amt, Color(0,255,255), " VJ Plugins ", Color(255,215,0), "<"..dashes.."|")
|
||||
end
|
||||
concommand.Add("vj_welcome_msg", doWelcomeMsg)
|
||||
net.Receive("vj_welcome_msg", doWelcomeMsg)
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
concommand.Add("vj_iamhere", function(ply,cmd,args)
|
||||
net.Start("vj_meme")
|
||||
net.SendToServer()
|
||||
end)
|
||||
298
lua/autorun/client/vj_menu_snpc.lua
Normal file
298
lua/autorun/client/vj_menu_snpc.lua
Normal file
@@ -0,0 +1,298 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
/*--------------------------------------------------
|
||||
=============== SNPC Menu ===============
|
||||
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
|
||||
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
|
||||
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
|
||||
--------------------------------------------------*/
|
||||
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
|
||||
include('autorun/client/vj_menu_plugins.lua')
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_SNPC_OPTIONS(Panel) -- Options
|
||||
if !game.SinglePlayer() && !LocalPlayer():IsAdmin() then
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.admin.not"})
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
return
|
||||
end
|
||||
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.snpc.warnfuture"})
|
||||
Panel:AddControl("Button",{Text = "#vjbase.menu.general.reset.everything", Command = "vj_npc_godmodesnpc 0\nvj_npc_playerfriendly 0\nvj_npc_zombiefriendly 0\nvj_npc_antlionfriendly 0\nvj_npc_combinefriendly 0\nvj_npc_corpsefade 0\nvj_npc_corpsefadetime 10\nvj_npc_undocorpse 0\nvj_npc_allhealth 0\nvj_npc_fadegibs 1\nvj_npc_fadegibstime 90\nvj_npc_gibcollidable 0\nvj_npc_addfrags 1\nvj_npc_dropweapon 1\nvj_npc_itemdrops 1\nvj_npc_creatureopendoor 1\nvj_npc_vjfriendly 0\nvj_npc_globalcorpselimit 32\nvj_npc_seedistance 0\nvj_npc_processtime 1\nvj_npc_usegmoddecals 0\nvj_npc_knowenemylocation 0\nvj_npc_plypickupdropwep 1\nvj_npc_difficulty 0\nvj_npc_human_canjump 1\nvj_npc_corpsecollision 0"})
|
||||
local vj_difficulty = {Options = {}, CVars = {}, Label = "#vjbase.menu.snpc.options.difficulty.header", MenuButton = "0"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.neanderthal"] = {vj_npc_difficulty = "-3"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.childs_play"] = {vj_npc_difficulty = "-2"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.easy"] = {vj_npc_difficulty = "-1"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.normal"] = {vj_npc_difficulty = "0"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.hard"] = {vj_npc_difficulty = "1"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.insane"] = {vj_npc_difficulty = "2"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.impossible"] = {vj_npc_difficulty = "3"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.nightmare"] = {vj_npc_difficulty = "4"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.hell_on_earth"] = {vj_npc_difficulty = "5"}
|
||||
vj_difficulty.Options["#vjbase.menu.snpc.options.difficulty.total_annihilation"] = {vj_npc_difficulty = "6"}
|
||||
Panel:AddControl("ComboBox", vj_difficulty)
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.options.label1"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglefriendlyantlion", Command = "vj_npc_antlionfriendly"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglefriendlycombine", Command = "vj_npc_combinefriendly"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglefriendlyplayer", Command = "vj_npc_playerfriendly"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglefriendlyzombie", Command = "vj_npc_zombiefriendly"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglefriendlyvj", Command = "vj_npc_vjfriendly"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label2")
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.options.label3"})
|
||||
local vj_collision = {Options = {}, CVars = {}, Label = "#vjbase.menu.snpc.options.collision.header", MenuButton = "0"}
|
||||
vj_collision.Options["#vjbase.menu.snpc.options.collision.default"] = {vj_npc_corpsecollision = "0"}
|
||||
vj_collision.Options["#vjbase.menu.snpc.options.collision.everything"] = {vj_npc_corpsecollision = "1"}
|
||||
vj_collision.Options["#vjbase.menu.snpc.options.collision.onlyworld"] = {vj_npc_corpsecollision = "2"}
|
||||
vj_collision.Options["#vjbase.menu.snpc.options.collision.excludedebris"] = {vj_npc_corpsecollision = "3"}
|
||||
vj_collision.Options["#vjbase.menu.snpc.options.collision.excludeplynpcs"] = {vj_npc_corpsecollision = "4"}
|
||||
vj_collision.Options["#vjbase.menu.snpc.options.collision.excludeply"] = {vj_npc_corpsecollision = "5"}
|
||||
Panel:AddControl("ComboBox", vj_collision)
|
||||
Panel:AddControl("Slider",{Label = "#vjbase.menu.snpc.options.corpselimit",min = 4,max = 300,Command = "vj_npc_globalcorpselimit"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label4")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.toggleundocorpses", Command = "vj_npc_undocorpse"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglecorpsefade", Command = "vj_npc_corpsefade"})
|
||||
Panel:AddControl("Slider",{Label = "#vjbase.menu.snpc.options.corpsefadetime",min = 0,max = 600,Command = "vj_npc_corpsefadetime"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label5")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglegibcollision", Command = "vj_npc_gibcollidable"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglefadegibs", Command = "vj_npc_fadegibs"})
|
||||
Panel:AddControl("Slider",{Label = "#vjbase.menu.snpc.options.gibfadetime",min = 0,max = 600,Command = "vj_npc_fadegibstime"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label6")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglesnpcgodmode", Command = "vj_npc_godmodesnpc"})
|
||||
//Panel:AddControl("Slider", {Label = "Health Changer",min = 0,max = 10000,Command = "vj_npc_allhealth"})
|
||||
Panel:AddControl("TextBox", {Label = "#vjbase.menu.snpc.options.health", Command = "vj_npc_allhealth", WaitForEnter = "0"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.defaulthealth")
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.options.label7"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.toggleknowenemylocation", Command = "vj_npc_knowenemylocation"})
|
||||
Panel:AddControl("TextBox", {Label = "#vjbase.menu.snpc.options.sightdistance", Command = "vj_npc_seedistance", WaitForEnter = "0"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label8")
|
||||
Panel:AddControl("Slider",{Label = "#vjbase.menu.snpc.options.processtime",Type = "Float",min = 0.05,max = 3,Command = "vj_npc_processtime"})
|
||||
local vid = vgui.Create("DButton") -- Process Time Video
|
||||
vid:SetFont("TargetID")
|
||||
vid:SetText("#vjbase.menu.snpc.options.whatisprocesstime")
|
||||
vid:SetSize(150,25)
|
||||
//vid:SetColor(Color(76,153,255,255))
|
||||
vid.DoClick = function()
|
||||
gui.OpenURL("https://www.youtube.com/watch?v=7wKsCmGpieU")
|
||||
end
|
||||
Panel:AddPanel(vid)
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label9")
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.options.label10"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglegmoddecals", Command = "vj_npc_usegmoddecals"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.options.label11")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglecreatureopendoor", Command = "vj_npc_creatureopendoor"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglehumanscanjump", Command = "vj_npc_human_canjump"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.toggleitemdrops", Command = "vj_npc_itemdrops"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.togglehumansdropweapon", Command = "vj_npc_dropweapon"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.toggleplydroppedweapons", Command = "vj_npc_plypickupdropwep"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.options.toggleaddfrags", Command = "vj_npc_addfrags"})
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_SNPC_SETTINGS(Panel) -- Settings
|
||||
if !game.SinglePlayer() && !LocalPlayer():IsAdmin() then
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.admin.not"})
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
return
|
||||
end
|
||||
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.snpc.warnfuture"})
|
||||
Panel:AddControl("Button",{Text = "#vjbase.menu.general.reset.everything", Command = "vj_npc_nocorpses 0\nvj_npc_nobleed 0\nvj_npc_nomelee 0\nvj_npc_norange 0\nvj_npc_noleap 0\nvj_npc_noflinching 0\nvj_npc_noallies 0\nvj_npc_noweapon 0\nvj_npc_nowandering 0\nvj_npc_nogib 0\nvj_npc_nodeathanimation 0\nvj_npc_nodangerdetection 0\nvj_npc_animal_runontouch 0\nvj_npc_animal_runonhit 0\nvj_npc_slowplayer 0\nvj_npc_bleedenemyonmelee 0\nvj_npc_noproppush 0\nvj_npc_nopropattack 0\nvj_npc_novfx_gibdeath 0\nvj_npc_noidleparticle 0\nvj_npc_noreload 0\nvj_npc_nobecomeenemytoply 0\nvj_npc_nofollowplayer 0\nvj_npc_nothrowgrenade 0\nvj_npc_nobloodpool 0\nvj_npc_nochasingenemy 0\nvj_npc_nosnpcchat 0\nvj_npc_nomedics 0\nvj_npc_nomeleedmgdsp 0\nvj_npc_nocallhelp 0\nvj_npc_noeating 0"})
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.settings.label1"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglewandering", Command = "vj_npc_nowandering"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglechasingenemy", Command = "vj_npc_nochasingenemy"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label2")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglemedics", Command = "vj_npc_nomedics"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglefollowplayer", Command = "vj_npc_nofollowplayer"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label3")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleallies", Command = "vj_npc_noallies"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglebecomeenemytoply", Command = "vj_npc_nobecomeenemytoply"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglecallhelp", Command = "vj_npc_nocallhelp"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleproppush", Command = "vj_npc_noproppush"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglepropattack", Command = "vj_npc_nopropattack"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggledangersight", Command = "vj_npc_nodangerdetection"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglereloading", Command = "vj_npc_noreload"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleeating", Command = "vj_npc_noeating"})
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.settings.label4"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglemelee", Command = "vj_npc_nomelee"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglerange", Command = "vj_npc_norange"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleleap", Command = "vj_npc_noleap"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglethrownade", Command = "vj_npc_nothrowgrenade"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleweapons", Command = "vj_npc_noweapon"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label5")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglemeleedsp", Command = "vj_npc_nomeleedmgdsp"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleslowplayer", Command = "vj_npc_slowplayer"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglebleedonmelee", Command = "vj_npc_bleedenemyonmelee"})
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.settings.label6"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleidleparticles", Command = "vj_npc_noidleparticle"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label7")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglesnpcchat", Command = "vj_npc_nosnpcchat"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label8")
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.settings.label9"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggleflinching", Command = "vj_npc_noflinching"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglebleeding", Command = "vj_npc_nobleed"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label10")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglebloodpool", Command = "vj_npc_nobloodpool"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglegib", Command = "vj_npc_nogib"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.settings.label11")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglegibdeathvfx", Command = "vj_npc_novfx_gibdeath"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.toggledeathanim", Command = "vj_npc_nodeathanimation"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglecorpses", Command = "vj_npc_nocorpses"})
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.settings.label12"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglerunontouch", Command = "vj_npc_animal_runontouch"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.settings.togglerunonhit", Command = "vj_npc_animal_runonhit"})
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_SNPC_SOUNDSETTINGS(Panel) -- Sound Settings
|
||||
if !game.SinglePlayer() && !LocalPlayer():IsAdmin() then
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.admin.not"})
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
return
|
||||
end
|
||||
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.snpc.warnfuture"})
|
||||
Panel:AddControl("Button",{Text = "#vjbase.menu.general.reset.everything", Command = "vj_npc_sd_nosounds 0\n vj_npc_sd_idle 0\n vj_npc_sd_alert 0\n vj_npc_sd_pain 0\n vj_npc_sd_death 0\n vj_npc_sd_footstep 0\n vj_npc_sd_soundtrack 0\n vj_npc_sd_meleeattack 0\n vj_npc_sd_meleeattackmiss 0\n vj_npc_sd_rangeattack 0\n vj_npc_sd_leapattack 0\n vj_npc_sd_ondangersight 0\n vj_npc_sd_onplayersight 0\n vj_npc_sd_damagebyplayer 0\n vj_npc_sd_slowplayer 0\n vj_npc_sd_gibbing 0\n vj_npc_sd_breath 0\n vj_npc_sd_followplayer 0\n vj_npc_sd_becomenemytoply 0\n vj_npc_sd_medic 0\n vj_npc_sd_reload 0\n vj_npc_sd_grenadeattack 0\n vj_npc_sd_suppressing 0\n vj_npc_sd_callforhelp 0\n vj_npc_sd_onreceiveorder 0"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggleallsounds", Command = "vj_npc_sd_nosounds"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglesoundtrack", Command = "vj_npc_sd_soundtrack"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggleidle", Command = "vj_npc_sd_idle"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglebreathing", Command = "vj_npc_sd_breath"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglefootsteps", Command = "vj_npc_sd_footstep"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggleattacksounds", Command = "vj_npc_sd_meleeattack"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglemeleemiss", Command = "vj_npc_sd_meleeattackmiss"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglerangeattack", Command = "vj_npc_sd_rangeattack"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglealert", Command = "vj_npc_sd_alert"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglepain", Command = "vj_npc_sd_pain"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggledeath", Command = "vj_npc_sd_death"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglegibbing", Command = "vj_npc_sd_gibbing"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.sdsettings.label1")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglemedic", Command = "vj_npc_sd_medic"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglefollowing", Command = "vj_npc_sd_followplayer"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglecallhelp", Command = "vj_npc_sd_callforhelp"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglereceiveorder", Command = "vj_npc_sd_onreceiveorder"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglebecomeenemy", Command = "vj_npc_sd_becomenemytoply"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggleplayersight", Command = "vj_npc_sd_onplayersight"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.sdsettings.label2")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggledmgbyplayer", Command = "vj_npc_sd_damagebyplayer"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.sdsettings.label3")
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.snpc.creaturesettings"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggleleap", Command = "vj_npc_sd_leapattack"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggleslowedplayer", Command = "vj_npc_sd_slowplayer"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.sdsettings.label4")
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.snpc.humansettings"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglegrenade", Command = "vj_npc_sd_grenadeattack"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.toggledangersight", Command = "vj_npc_sd_ondangersight"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglesuppressing", Command = "vj_npc_sd_suppressing"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.sdsettings.togglereload", Command = "vj_npc_sd_reload"})
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_SNPC_DEVSETTINGS(Panel) -- Developer Settings
|
||||
if !game.SinglePlayer() && !LocalPlayer():IsAdmin() then
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.general.admin.not"})
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
return
|
||||
end
|
||||
|
||||
Panel:AddControl( "Label", {Text = "#vjbase.menu.general.admin.only"})
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.devsettings.label1"})
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.devsettings.label2"})
|
||||
Panel:AddControl("Button",{Text = "#vjbase.menu.general.reset.everything", Command = "vj_npc_dev_printwepinfo 0\n vj_npc_printdied 0\n vj_npc_printondamage 0\n vj_npc_printontouch 0\n vj_npc_printstoppedattacks 0\n vj_npc_printtakingcover 0\n vj_npc_printresetenemy 0\n vj_npc_printlastseenenemy 0\n vj_npc_usedevcommands 0\n vj_npc_printcurenemy 0"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.toggledev", Command = "vj_npc_usedevcommands"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.devsettings.label3")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printcurenemy", Command = "vj_npc_printcurenemy"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printlastseenenemy", Command = "vj_npc_printlastseenenemy"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printonreset", Command = "vj_npc_printresetenemy"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printonstopattack", Command = "vj_npc_printstoppedattacks"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printtakingcover", Command = "vj_npc_printtakingcover"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printondamage", Command = "vj_npc_printondamage"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printondeath", Command = "vj_npc_printdied"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printtouch", Command = "vj_npc_printontouch"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.devsettings.printweaponinfo", Command = "vj_npc_dev_printwepinfo"})
|
||||
Panel:AddControl("Button", {Label = "#vjbase.menu.snpc.devsettings.cachedmodels", Command = "listmodels"})
|
||||
local npcCount = vgui.Create("DButton")
|
||||
npcCount:SetText("#vjbase.menu.snpc.devsettings.numofnpcs")
|
||||
npcCount.DoClick = function(x)
|
||||
local i = 0
|
||||
for _, v in ipairs(ents.GetAll()) do
|
||||
if v:IsNPC() then
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
LocalPlayer():ChatPrint("Number of NPCs: "..i)
|
||||
end
|
||||
Panel:AddPanel(npcCount)
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.devsettings.label4"})
|
||||
Panel:AddControl("Button", {Label = "#vjbase.menu.snpc.devsettings.reloadsounds", Command = "snd_restart"})
|
||||
Panel:AddControl("Button", {Label = "#vjbase.menu.snpc.devsettings.reloadmaterials", Command = "mat_reloadallmaterials"})
|
||||
Panel:AddControl("Button", {Label = "#vjbase.menu.snpc.devsettings.reloadtextures", Command = "mat_reloadtextures"})
|
||||
Panel:AddControl("Button", {Label = "#vjbase.menu.snpc.devsettings.reloadmodels", Command = "r_flushlod"})
|
||||
Panel:AddControl("Button", {Label = "#vjbase.menu.snpc.devsettings.reloadspawnmenu", Command = "spawnmenu_reload"})
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_SNPC_CONTROLLERSETTINGS(Panel) -- NPC Controller Settings
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.consettings.label1"})
|
||||
Panel:AddControl("Button",{Text = "#vjbase.menu.general.reset.everything", Command = "vj_npc_cont_hud 1\n vj_npc_cont_zoomdist 5\n vj_npc_cont_devents 0\n vj_npc_cont_cam_speed 6\n vj_npc_cont_cam_zoomspeed 10\n vj_npc_cont_diewithnpc 0"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.consettings.displayhud", Command = "vj_npc_cont_hud"})
|
||||
Panel:AddControl("Slider", {Label = "#vjbase.menu.snpc.consettings.camzoomdistance", min = 5, max = 300, Command = "vj_npc_cont_zoomdist"})
|
||||
Panel:AddControl("Slider", {Label = "#vjbase.menu.snpc.consettings.camzoomspeed", min = 1, max = 200, Command = "vj_npc_cont_cam_zoomspeed"})
|
||||
Panel:AddControl("Slider", {Label = "#vjbase.menu.snpc.consettings.camspeed", min = 1, max = 180, Command = "vj_npc_cont_cam_speed"})
|
||||
Panel:ControlHelp("#vjbase.menu.snpc.consettings.label2")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.consettings.diewithnpc", Command = "vj_npc_cont_diewithnpc"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.snpc.consettings.displaydev", Command = "vj_npc_cont_devents"})
|
||||
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.snpc.consettings.label3"})
|
||||
|
||||
local ControlList = vgui.Create("DListView")
|
||||
ControlList:SetTooltip(false)
|
||||
ControlList:SetSize(100, 320)
|
||||
ControlList:SetMultiSelect(false)
|
||||
ControlList:AddColumn("#vjbase.menu.snpc.consettings.bind.header1") -- Add column
|
||||
ControlList:AddColumn("#vjbase.menu.snpc.consettings.bind.header2") -- Add column
|
||||
ControlList:AddLine("W A S D", "#vjbase.menu.snpc.consettings.bind.movement")
|
||||
ControlList:AddLine("END", "#vjbase.menu.snpc.consettings.bind.exitcontrol")
|
||||
ControlList:AddLine("FIRE1", "#vjbase.menu.snpc.consettings.bind.meleeattack")
|
||||
ControlList:AddLine("FIRE2", "#vjbase.menu.snpc.consettings.bind.rangeattack")
|
||||
ControlList:AddLine("JUMP", "#vjbase.menu.snpc.consettings.bind.leaporgrenade")
|
||||
ControlList:AddLine("RELOAD", "#vjbase.menu.snpc.consettings.bind.reloadweapon")
|
||||
ControlList:AddLine("T", "#vjbase.menu.snpc.consettings.bind.togglebullseye")
|
||||
ControlList:AddLine("H", "#vjbase.menu.snpc.consettings.bind.cameramode")
|
||||
ControlList:AddLine("J", "#vjbase.menu.snpc.consettings.bind.movementjump")
|
||||
ControlList:AddLine("MOUSE WHEEL", "#vjbase.menu.snpc.consettings.bind.camerazoom")
|
||||
ControlList:AddLine("UP ARROW", "#vjbase.menu.snpc.consettings.bind.cameraforward")
|
||||
ControlList:AddLine("UP ARROW + RUN", "#vjbase.menu.snpc.consettings.bind.cameraup")
|
||||
ControlList:AddLine("DOWN ARROW", "#vjbase.menu.snpc.consettings.bind.camerabackward")
|
||||
ControlList:AddLine("DOWN ARROW + RUN", "#vjbase.menu.snpc.consettings.bind.cameradown")
|
||||
ControlList:AddLine("LEFT ARROW", "#vjbase.menu.snpc.consettings.bind.cameraleft")
|
||||
ControlList:AddLine("RIGHT ARROW", "#vjbase.menu.snpc.consettings.bind.cameraright")
|
||||
ControlList:AddLine("BACKSPACE", "#vjbase.menu.snpc.consettings.bind.resetzoom")
|
||||
ControlList.OnRowSelected = function(panel, rowIndex, row)
|
||||
chat.AddText(Color(0,255,0), language.GetPhrase("#vjbase.menu.snpc.consettings.bind.clickmsg1").." ", Color(255,255,0), row:GetValue(1), Color(0,255,0), " | "..language.GetPhrase("#vjbase.menu.snpc.consettings.bind.clickmsg2").." ", Color(255,255,0), row:GetValue(2))
|
||||
end
|
||||
Panel:AddItem(ControlList)
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
hook.Add("PopulateToolMenu", "VJ_ADDTOMENU_SNPC", function()
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "SNPCs", "SNPC Options", "#vjbase.menu.snpc.options", "", "", VJ_SNPC_OPTIONS, {})
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "SNPCs", "SNPC Settings", "#vjbase.menu.snpc.settings", "", "", VJ_SNPC_SETTINGS, {})
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "SNPCs", "SNPC Sound Settings", "#vjbase.menu.snpc.sdsettings", "", "", VJ_SNPC_SOUNDSETTINGS, {})
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "SNPCs", "SNPC Developer Settings", "#vjbase.menu.snpc.devsettings", "", "", VJ_SNPC_DEVSETTINGS, {})
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "SNPCs", "NPC Controller Settings", "#vjbase.menu.snpc.consettings", "", "", VJ_SNPC_CONTROLLERSETTINGS, {})
|
||||
end)
|
||||
31
lua/autorun/client/vj_menu_weapon.lua
Normal file
31
lua/autorun/client/vj_menu_weapon.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
/*--------------------------------------------------
|
||||
=============== Weapon Menu ===============
|
||||
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
|
||||
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
|
||||
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
|
||||
--------------------------------------------------*/
|
||||
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
|
||||
include('autorun/client/vj_menu_plugins.lua')
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
local function VJ_WEAPON_CLIENTSETTINGS(Panel) -- Client Settings
|
||||
Panel:AddControl("Label", {Text = "#vjbase.menu.clweapon.notice"})
|
||||
Panel:AddControl("Button",{Text = "#vjbase.menu.general.reset.everything", Command = "vj_wep_nomuszzleflash 0\n vj_wep_nobulletshells 0\n vj_wep_nomuszzleflash_dynamiclight 0"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.clweapon.togglemuzzle", Command = "vj_wep_nomuszzleflash"})
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.clweapon.togglemuzzlelight", Command = "vj_wep_nomuszzleflash_dynamiclight"})
|
||||
Panel:ControlHelp("#vjbase.menu.clweapon.togglemuzzle.label")
|
||||
Panel:AddControl("Checkbox", {Label = "#vjbase.menu.clweapon.togglemuzzlebulletshells", Command = "vj_wep_nobulletshells"})
|
||||
end
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
hook.Add("PopulateToolMenu", "VJ_ADDTOMENU_WEAPON", function()
|
||||
spawnmenu.AddToolMenuOption("DrVrej", "Weapons", "Weapon Client Settings", "#vjbase.menu.clweapon", "", "", VJ_WEAPON_CLIENTSETTINGS, {})
|
||||
end)
|
||||
678
lua/autorun/client/wh_gui.lua
Normal file
678
lua/autorun/client/wh_gui.lua
Normal file
@@ -0,0 +1,678 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
--[[
|
||||
__ ___ __ __
|
||||
/ |/ /__ ____/ /__ / / __ __
|
||||
/ /|_/ / _ `/ _ / -_) / _ \/ // /
|
||||
/_/ /_/\_,_/\_,_/\__/ /_.__/\_, /
|
||||
___ __ /___/ ___ __
|
||||
/ _ \___ / /_ _____ ___ / /____ ____ / _ \__ ______/ /__
|
||||
/ ___/ _ \/ / // / -_|_-</ __/ -_) __/ / // / // / __/ '_/
|
||||
/_/ \___/_/\_, /\__/___/\__/\__/_/ /____/\_,_/\__/_/\_\
|
||||
/___/
|
||||
https://steamcommunity.com/profiles/76561198057599363
|
||||
]]
|
||||
local Menu = {
|
||||
Main = {},
|
||||
Editor = {}
|
||||
}
|
||||
|
||||
local playerBones = {"ValveBiped.Bip01_Head1", "ValveBiped.Bip01_Pelvis", "ValveBiped.Bip01_Spine", "ValveBiped.Bip01_Spine1", "ValveBiped.Bip01_Spine2", "ValveBiped.Bip01_Spine4", "ValveBiped.Anim_Attachment_RH", "ValveBiped.Bip01_R_Hand", "ValveBiped.Bip01_R_Forearm", "ValveBiped.Bip01_R_UpperArm", "ValveBiped.Bip01_R_Clavicle", "ValveBiped.Bip01_R_Foot", "ValveBiped.Bip01_R_Toe0", "ValveBiped.Bip01_R_Thigh", "ValveBiped.Bip01_R_Calf", "ValveBiped.Bip01_R_Shoulder", "ValveBiped.Bip01_R_Elbow", "ValveBiped.Bip01_Neck1", "ValveBiped.Anim_Attachment_LH", "ValveBiped.Bip01_L_Hand", "ValveBiped.Bip01_L_Forearm", "ValveBiped.Bip01_L_UpperArm", "ValveBiped.Bip01_L_Clavicle", "ValveBiped.Bip01_L_Foot", "ValveBiped.Bip01_L_Toe0", "ValveBiped.Bip01_L_Thigh", "ValveBiped.Bip01_L_Calf", "ValveBiped.Bip01_L_Shoulder", "ValveBiped.Bip01_L_Elbow"}
|
||||
|
||||
local function KeyboardOn(pnl)
|
||||
if (IsValid(Menu.Main.Frame) and IsValid(pnl) and pnl:HasParent(Menu.Main.Frame)) then
|
||||
Menu.Main.Frame:SetKeyboardInputEnabled(true)
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("OnTextEntryGetFocus", "lf_weapon_properties_editor_keyboard_on", KeyboardOn)
|
||||
|
||||
local function KeyboardOff(pnl)
|
||||
if (IsValid(Menu.Main.Frame) and IsValid(pnl) and pnl:HasParent(Menu.Main.Frame)) then
|
||||
Menu.Main.Frame:SetKeyboardInputEnabled(false)
|
||||
|
||||
if pnl.OnValueChange then
|
||||
pnl:OnValueChange()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("OnTextEntryLoseFocus", "lf_weapon_properties_editor_keyboard_off", KeyboardOff)
|
||||
-- Blur Code by: https://facepunch.com/member.php?u=237675
|
||||
local blur = Material("pp/blurscreen")
|
||||
|
||||
local function DrawBlur(panel, amount)
|
||||
local x, y = panel:LocalToScreen(0, 0)
|
||||
local scrW, scrH = ScrW(), ScrH()
|
||||
surface.SetDrawColor(255, 255, 255)
|
||||
surface.SetMaterial(blur)
|
||||
|
||||
for i = 1, 3 do
|
||||
blur:SetFloat("$blur", (i / 3) * (amount or 6))
|
||||
blur:Recompute()
|
||||
render.UpdateScreenEffectTexture()
|
||||
surface.DrawTexturedRect(x * -1, y * -1, scrW, scrH)
|
||||
end
|
||||
end
|
||||
|
||||
local function removeHolstWep(class)
|
||||
for pl, weps in pairs(WepHolster.HolsteredWeps) do
|
||||
for cls, wep in pairs(weps) do
|
||||
if class == "" or cls == class then
|
||||
wep:Remove()
|
||||
WepHolster.HolsteredWeps[pl][cls] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function setEditing(class, bool)
|
||||
if class ~= "" then
|
||||
if WepHolster.wepInfo[class] then
|
||||
WepHolster.wepInfo[class].isEditing = bool
|
||||
end
|
||||
else
|
||||
for k, v in pairs(WepHolster.wepInfo) do
|
||||
WepHolster.wepInfo[k].isEditing = bool
|
||||
end
|
||||
end
|
||||
|
||||
for pl, weps in pairs(WepHolster.HolsteredWeps) do
|
||||
for cls, wep in pairs(weps) do
|
||||
if cls == class or class == "" then
|
||||
if bool then
|
||||
wep:SetMaterial("models/wireframe")
|
||||
--print("wireframe화 gui")
|
||||
--print(WepHolster.wepInfo[cls].isEditing)
|
||||
--print("wireframe 해제 gui")
|
||||
--print(WepHolster.wepInfo[cls].isEditing)
|
||||
else
|
||||
wep:Remove()
|
||||
WepHolster.HolsteredWeps[pl][cls] = nil
|
||||
WepHolster.wepInfo[cls].isEditing = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Menu.Editor:Init(class)
|
||||
local Frame = vgui.Create("DFrame", Menu.Main.Frame)
|
||||
local fw, fh = 600, 350
|
||||
local pw, ph = fw - 10, fh - 34
|
||||
Frame:SetPos(ScrW() - fw - 10, (ScrH() / 2) - (fh / 2))
|
||||
Frame:SetSize(fw, fh)
|
||||
Frame:SetTitle(class)
|
||||
Frame:SetVisible(true)
|
||||
Frame:SetDraggable(true)
|
||||
Frame:SetScreenLock(false)
|
||||
Frame:ShowCloseButton(true)
|
||||
Frame:MakePopup()
|
||||
Frame:SetKeyboardInputEnabled(false)
|
||||
|
||||
function Frame:Paint(w, h)
|
||||
DrawBlur(self, 2)
|
||||
draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 200))
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function Frame.lblTitle:Paint(w, h)
|
||||
draw.SimpleTextOutlined(Frame.lblTitle:GetText(), "DermaDefaultBold", 1, 2, Color(255, 255, 255, 255), 0, 0, 1, Color(0, 0, 0, 255))
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local pnl = Frame:Add("DPanel")
|
||||
pnl:Dock(FILL)
|
||||
pnl:DockPadding(10, 10, 10, 10)
|
||||
local prop = pnl:Add("DCategoryList")
|
||||
prop:Dock(FILL)
|
||||
|
||||
local function AddLineText(list, text, val, class)
|
||||
local line = list:Add("DPanel")
|
||||
line:DockPadding(5, 2, 5, 2)
|
||||
line:SetDrawBackground(false)
|
||||
local id
|
||||
|
||||
if val then
|
||||
local lbl = line:Add("DLabel")
|
||||
lbl:Dock(LEFT)
|
||||
lbl:SetWide(239)
|
||||
lbl:SetDark(true)
|
||||
lbl:SetText(text)
|
||||
id = line:Add("DTextEntry")
|
||||
id:Dock(FILL)
|
||||
id:SetText(val or "")
|
||||
else
|
||||
local lbl = line:Add("DLabel")
|
||||
lbl:Dock(FILL)
|
||||
lbl:SetText(text)
|
||||
end
|
||||
|
||||
return line, id
|
||||
end
|
||||
|
||||
local function AddLineInt(list, text, val, min, max)
|
||||
local line = list:Add("DPanel")
|
||||
line:DockPadding(5, 2, 5, 2)
|
||||
line:SetPaintBackground(false)
|
||||
local id
|
||||
|
||||
if val then
|
||||
id = line:Add("DNumSlider")
|
||||
id:Dock(FILL)
|
||||
id:SetDark(true)
|
||||
id:SetDecimals(3)
|
||||
id:SetMinMax(min, max)
|
||||
id:SetText(text)
|
||||
id:SetValue(val or 0)
|
||||
else
|
||||
local lbl = line:Add("DLabel")
|
||||
lbl:Dock(FILL)
|
||||
lbl:SetText(text)
|
||||
end
|
||||
|
||||
return line, id
|
||||
end
|
||||
|
||||
local cat = prop:Add(class)
|
||||
local list = vgui.Create("DListLayout")
|
||||
cat:SetContents(list)
|
||||
local line, rModel = AddLineText(list, "Model:", WepHolster.wepInfo[class].Model, class)
|
||||
|
||||
rModel.OnValueChange = function(val)
|
||||
val = rModel:GetValue()
|
||||
WepHolster.wepInfo[class].Model = val
|
||||
setEditing(class, true)
|
||||
removeHolstWep(class)
|
||||
end
|
||||
|
||||
local line, rBone = AddLineText(list, "Bone:", WepHolster.wepInfo[class].Bone)
|
||||
WepHolster.lookingBone = WepHolster.wepInfo[class].Bone
|
||||
|
||||
if rBone then
|
||||
rBone.OnValueChange = function(val)
|
||||
val = rBone:GetValue()
|
||||
|
||||
if table.HasValue(playerBones, val) then
|
||||
WepHolster.wepInfo[class].Bone = val
|
||||
setEditing(class, true)
|
||||
WepHolster.lookingBone = val
|
||||
end
|
||||
end
|
||||
|
||||
local c = line:Add("DComboBox")
|
||||
c:Dock(RIGHT)
|
||||
c:SetWide(40)
|
||||
c:SetSortItems(false)
|
||||
c:SetValue("...")
|
||||
|
||||
for _, v in pairs(playerBones) do
|
||||
c:AddChoice(v)
|
||||
end
|
||||
|
||||
function c:OnSelect(index, value)
|
||||
rBone:SetText(value)
|
||||
rBone:OnValueChange()
|
||||
c:SetValue("...")
|
||||
end
|
||||
end
|
||||
|
||||
local line, rVectorX = AddLineInt(list, "Position x:", WepHolster.wepInfo[class].BoneOffset[1].x, -20, 20, class)
|
||||
|
||||
rVectorX.OnValueChanged = function(value)
|
||||
WepHolster.wepInfo[class].BoneOffset[1].x = rVectorX:GetValue()
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
local line, rVectorY = AddLineInt(list, "Position y:", WepHolster.wepInfo[class].BoneOffset[1].y, -20, 20, class)
|
||||
|
||||
rVectorY.OnValueChanged = function(value)
|
||||
WepHolster.wepInfo[class].BoneOffset[1].y = rVectorY:GetValue()
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
local line, rVectorZ = AddLineInt(list, "Position z:", WepHolster.wepInfo[class].BoneOffset[1].z, -20, 20, class)
|
||||
|
||||
rVectorZ.OnValueChanged = function(value)
|
||||
WepHolster.wepInfo[class].BoneOffset[1].z = rVectorZ:GetValue()
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
local line, rAngleP = AddLineInt(list, "Angle pitch:", WepHolster.wepInfo[class].BoneOffset[2].p, -180, 180, class)
|
||||
|
||||
rAngleP.OnValueChanged = function(value)
|
||||
WepHolster.wepInfo[class].BoneOffset[2].p = rAngleP:GetValue()
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
local line, rAngleY = AddLineInt(list, "Angle yaw:", WepHolster.wepInfo[class].BoneOffset[2].y, -180, 180, class)
|
||||
|
||||
rAngleY.OnValueChanged = function(value)
|
||||
WepHolster.wepInfo[class].BoneOffset[2].y = rAngleY:GetValue()
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
local line, rAngleR = AddLineInt(list, "Angle roll:", WepHolster.wepInfo[class].BoneOffset[2].r, -180, 180, class)
|
||||
|
||||
rAngleR.OnValueChanged = function(value)
|
||||
WepHolster.wepInfo[class].BoneOffset[2].r = rAngleR:GetValue()
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
local subpnl = pnl:Add("DPanel")
|
||||
subpnl:Dock(BOTTOM)
|
||||
subpnl:DockMargin(0, 20, 0, 0)
|
||||
subpnl:SetHeight(20)
|
||||
subpnl:SetDrawBackground(false)
|
||||
local lw = (pw - 10) / 2 - 10
|
||||
local b = subpnl:Add("DComboBox")
|
||||
b:Dock(LEFT)
|
||||
b:SetWide(lw)
|
||||
b:SetValue("Reset")
|
||||
b:SetSortItems(false)
|
||||
b:AddChoice("to saved data if available")
|
||||
b:AddChoice("to default if available")
|
||||
|
||||
b.OnSelect = function(index, value, data)
|
||||
Frame:Close()
|
||||
|
||||
if value == 2 then
|
||||
local oldwhdata = WepHolster.wepInfo[class]
|
||||
net.Start("resetWHDataToDefault")
|
||||
net.WriteString(class)
|
||||
net.SendToServer()
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
local different
|
||||
|
||||
for k, v in pairs(WepHolster.wepInfo[class]) do
|
||||
if (k == "Model" or k == "Bone") and string.lower(oldwhdata[k]) ~= string.lower(v) then
|
||||
different = true
|
||||
print(k .. ": " .. v)
|
||||
-- print(_..": "..vec_ang)
|
||||
elseif k == "BoneOffset" then
|
||||
for _, vec_ang in pairs(v) do
|
||||
if vec_ang ~= oldwhdata[k][_] then
|
||||
different = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- '==' operator is not working on table.. fuck.
|
||||
if different then
|
||||
setEditing(class, true)
|
||||
end
|
||||
end)
|
||||
elseif not WepHolster.wepInfo[class].notSavedYet then
|
||||
net.Start("reloadWH")
|
||||
net.WriteString(class)
|
||||
net.SendToServer()
|
||||
setEditing(class, false)
|
||||
end
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
Menu.Editor:Init(class)
|
||||
removeHolstWep(class)
|
||||
end)
|
||||
end
|
||||
|
||||
local b = subpnl:Add("DComboBox")
|
||||
b:Dock(RIGHT)
|
||||
b:SetWide(lw)
|
||||
b:SetValue("Delete")
|
||||
b:AddChoice("Are you sure?")
|
||||
|
||||
b.OnSelect = function(index, value, data)
|
||||
net.Start("deleteWHData")
|
||||
net.WriteString(class)
|
||||
net.SendToServer()
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
Menu.Main.Frame:Close()
|
||||
Menu.Main:Init()
|
||||
end)
|
||||
end
|
||||
|
||||
local b = pnl:Add("DButton")
|
||||
b:Dock(BOTTOM)
|
||||
b:DockMargin(0, 10, 0, 0)
|
||||
b:SetHeight(30)
|
||||
b:SetText("Apply Changes")
|
||||
|
||||
b.DoClick = function()
|
||||
setEditing(class, false)
|
||||
WepHolster.wepInfo[class].notSavedYet = nil
|
||||
net.Start("applyWepHolsterData")
|
||||
net.WriteString(class)
|
||||
net.WriteTable(WepHolster.wepInfo[class])
|
||||
net.SendToServer()
|
||||
Frame:Close()
|
||||
end
|
||||
|
||||
Frame.OnClose = function()
|
||||
--[[
|
||||
net.Start("reloadWH")
|
||||
net.WriteString(class)
|
||||
net.SendToServer()
|
||||
Menu.Main.Frame:Close()
|
||||
timer.Simple(0.1, function()
|
||||
removeHolstWep(class)
|
||||
Menu.Main:Init()
|
||||
end)
|
||||
]]
|
||||
WepHolster.lookingBone = nil
|
||||
end
|
||||
end
|
||||
|
||||
local function addWeapon(class, model)
|
||||
WepHolster.wepInfo[class] = WepHolster.wepInfo[class] or {
|
||||
Model = model or "models/weapons/w_rif_ak47.mdl",
|
||||
Bone = "ValveBiped.Bip01_R_Clavicle",
|
||||
BoneOffset = {Vector(13, 4, 5), Angle(90, 0, 100)},
|
||||
notSavedYet = true
|
||||
}
|
||||
|
||||
Menu.Main.Frame:Close()
|
||||
Menu.Main:Init()
|
||||
Menu.Editor:Init(class)
|
||||
setEditing(class, true)
|
||||
end
|
||||
|
||||
function Menu.Main:Init()
|
||||
Menu.Main.Frame = vgui.Create("DFrame")
|
||||
local Frame = Menu.Main.Frame
|
||||
local fw, fh = 400, ScrH() - 20
|
||||
local pw, ph = fw - 10, fh - 34
|
||||
Frame:SetPos(10, 10)
|
||||
Frame:SetSize(fw, fh)
|
||||
Frame:SetTitle("Weapon Holsters Editor")
|
||||
Frame:SetVisible(true)
|
||||
Frame:SetDraggable(true)
|
||||
Frame:SetScreenLock(false)
|
||||
Frame:ShowCloseButton(true)
|
||||
Frame:MakePopup()
|
||||
Frame:SetKeyboardInputEnabled(false)
|
||||
|
||||
function Frame:Paint(w, h)
|
||||
DrawBlur(self, 2)
|
||||
draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 200))
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function Frame.lblTitle:Paint(w, h)
|
||||
draw.SimpleTextOutlined(Frame.lblTitle:GetText(), "DermaDefaultBold", 1, 2, Color(255, 255, 255, 255), 0, 0, 1, Color(0, 0, 0, 255))
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local pnl = Frame:Add("DPanel")
|
||||
pnl:Dock(FILL)
|
||||
pnl:DockPadding(10, 10, 10, 10)
|
||||
local b = pnl:Add("DButton")
|
||||
b:Dock(TOP)
|
||||
b:DockMargin(0, 0, 0, 1)
|
||||
b:SetHeight(25)
|
||||
b:SetText("Add weapon by class:")
|
||||
|
||||
b.DoClick = function()
|
||||
local name = tostring(Menu.Main.WeaponEntry:GetValue())
|
||||
|
||||
if name == "" then
|
||||
return
|
||||
end
|
||||
|
||||
addWeapon(name)
|
||||
end
|
||||
|
||||
Menu.Main.WeaponEntry = pnl:Add("DTextEntry")
|
||||
Menu.Main.WeaponEntry:Dock(TOP)
|
||||
Menu.Main.WeaponEntry:DockMargin(0, 0, 0, 10)
|
||||
Menu.Main.WeaponEntry:SetHeight(20)
|
||||
Menu.Main.WeaponEntry:SetTooltip("Just right-click on the weapon icon in the spawn menu, click Copy to Clipboard, and paste it here.")
|
||||
--[[
|
||||
local help = pnl:Add("DLabel") -- Fuck you, I'll use SetTooltip instead.
|
||||
help:Dock(TOP)
|
||||
help:DockMargin(0, 0, 0, 10)
|
||||
help:SetHeight(26)
|
||||
help:SetText("Just right-click on the weapon icon in the spawn menu,\nclick Copy to Clipboard, and paste it here.")
|
||||
]]
|
||||
b = pnl:Add("DButton")
|
||||
b:Dock(TOP)
|
||||
b:DockMargin(0, 0, 0, 10)
|
||||
b:SetHeight(24)
|
||||
b:SetText("Add weapon you currently holding")
|
||||
|
||||
b.DoClick = function()
|
||||
local weapon = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if IsValid(weapon) then
|
||||
addWeapon(weapon:GetClass(), weapon:GetWeaponWorldModel())
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
local help = pnl:Add("DLabel")
|
||||
help:Dock(TOP)
|
||||
help:DockMargin(0, 0, 0, 5)
|
||||
help:SetHeight(13)
|
||||
help:SetText("Click the bar to sort the list, and double click the weapon to edit:")
|
||||
]]
|
||||
Menu.Main.WeaponList = pnl:Add("DListView")
|
||||
Menu.Main.WeaponList:Dock(FILL)
|
||||
Menu.Main.WeaponList:SetMultiSelect(false)
|
||||
Menu.Main.WeaponList:AddColumn("Category")
|
||||
Menu.Main.WeaponList:AddColumn("Name")
|
||||
Menu.Main.WeaponList:AddColumn("Class")
|
||||
Menu.Main.WeaponList:SetTooltip("Click the bar to sort the list, and double click the weapon to edit.")
|
||||
|
||||
function Menu.Main.WeaponList:DoDoubleClick(id, sel)
|
||||
local wepclass = tostring(sel:GetValue(3))
|
||||
|
||||
if WepHolster.wepInfo[wepclass] then
|
||||
Menu.Editor:Init(wepclass)
|
||||
end
|
||||
end
|
||||
|
||||
function Menu.Main.WeaponList:Populate()
|
||||
self:Clear()
|
||||
|
||||
for k, v in pairs(WepHolster.wepInfo) do
|
||||
local swep = weapons.Get(k)
|
||||
self:AddLine(swep and swep.Category or "Other", swep and swep.PrintName or WepHolster.HL2Weps[k] or k, k)
|
||||
end
|
||||
|
||||
self:SortByColumn(1)
|
||||
end
|
||||
|
||||
Menu.Main.WeaponList:Populate()
|
||||
local credit = pnl:Add("DLabel")
|
||||
credit:Dock(BOTTOM)
|
||||
credit:DockMargin(0, 10, 0, 0)
|
||||
credit:SetHeight(13)
|
||||
credit:SetText("Made by Polyester Duck")
|
||||
local b = pnl:Add("DComboBox")
|
||||
b:Dock(BOTTOM)
|
||||
b:DockMargin(0, 10, 0, 0)
|
||||
b:SetHeight(20)
|
||||
b:SetValue("RESET EVERYTHING TO DEFAULT")
|
||||
b:AddChoice("ARE YOU REALLY SURE?")
|
||||
|
||||
b.OnSelect = function(index, value, data)
|
||||
setEditing("", false)
|
||||
net.Start("resetWholeWHDataToDefault")
|
||||
net.SendToServer()
|
||||
Frame:Close()
|
||||
timer.Simple(0.1, Menu.Main.Init)
|
||||
end
|
||||
|
||||
Frame.OnClose = function()
|
||||
--[[
|
||||
net.Start("reloadWholeWH")
|
||||
net.SendToServer()
|
||||
for pl, weps in pairs(WepHolster.HolsteredWeps) do
|
||||
for cls, wep in pairs(weps) do
|
||||
wep:Remove()
|
||||
WepHolster.HolsteredWeps[pl][cls] = nil
|
||||
end
|
||||
end
|
||||
]]
|
||||
WepHolster.lookingBone = nil
|
||||
end
|
||||
end
|
||||
|
||||
function Menu.Toggle()
|
||||
if LocalPlayer():IsSuperAdmin() then
|
||||
if IsValid(Menu.Main.Frame) then
|
||||
Menu.Main.Frame:Close()
|
||||
else
|
||||
Menu.Main:Init()
|
||||
end
|
||||
else
|
||||
if IsValid(Menu.Main.Frame) then
|
||||
Menu.Main.Frame:Close()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
concommand.Add("weapon_holsters_editor", Menu.Toggle)
|
||||
|
||||
local function clientTrickBox(panel, con_name, func_onchange)
|
||||
local con = GetConVar(con_name)
|
||||
|
||||
if not con then
|
||||
return
|
||||
end
|
||||
|
||||
local tickbox = vgui.Create("DCheckBoxLabel", panel)
|
||||
tickbox:SetText(con:GetHelpText() or "Unknown setting.")
|
||||
tickbox:SetValue(con:GetBool())
|
||||
tickbox.con_name = con_name
|
||||
tickbox:SetDark(true)
|
||||
|
||||
function tickbox:OnChange(b)
|
||||
RunConsoleCommand(self.con_name, b and "1" or "0")
|
||||
|
||||
if func_onchange then
|
||||
func_onchange()
|
||||
end
|
||||
end
|
||||
|
||||
function tickbox:Think()
|
||||
if not self.con_name then
|
||||
return
|
||||
end
|
||||
|
||||
local ucon = GetConVar(self.con_name)
|
||||
|
||||
if (ucon:GetBool() or true) ~= self:GetValue() then
|
||||
self:SetChecked(ucon:GetBool())
|
||||
end
|
||||
end
|
||||
|
||||
panel:AddItem(tickbox)
|
||||
end
|
||||
|
||||
local function requestSetting(con, arg)
|
||||
if type(arg) == "boolean" then
|
||||
arg = arg and "1" or "0"
|
||||
end
|
||||
|
||||
net.Start("WepHolsters_Settings")
|
||||
net.WriteString(con)
|
||||
net.WriteString(arg)
|
||||
net.SendToServer()
|
||||
end
|
||||
|
||||
local function adminTrickBox(panel, con_name)
|
||||
local con = GetConVar(con_name)
|
||||
|
||||
if not con then
|
||||
return
|
||||
end
|
||||
|
||||
local tickbox = vgui.Create("DCheckBoxLabel", panel)
|
||||
tickbox:SetText(con:GetHelpText() or "Unknown setting.")
|
||||
tickbox:SetValue(con:GetBool())
|
||||
tickbox.con_name = con_name
|
||||
tickbox:SetDark(true)
|
||||
|
||||
function tickbox:OnChange(b)
|
||||
requestSetting(self.con_name, b and "1" or "0")
|
||||
end
|
||||
|
||||
function tickbox:Think()
|
||||
if not self.con_name then
|
||||
return
|
||||
end
|
||||
|
||||
local ucon = GetConVar(self.con_name)
|
||||
|
||||
if (ucon:GetBool() or true) ~= self:GetValue() then
|
||||
self:SetChecked(ucon:GetBool())
|
||||
end
|
||||
end
|
||||
|
||||
panel:AddItem(tickbox)
|
||||
end
|
||||
|
||||
-- Spawn Menu entry.
|
||||
local function SpawnMenu_Entry(panel)
|
||||
panel:AddControl("Label", {
|
||||
Text = "Client Settings:"
|
||||
})
|
||||
|
||||
clientTrickBox(panel, "cl_weapon_holsters", function()
|
||||
removeHolstWep("")
|
||||
end)
|
||||
|
||||
panel:AddControl("Label", {
|
||||
Text = "Administrator Settings:"
|
||||
})
|
||||
|
||||
adminTrickBox(panel, "sv_weapon_holsters")
|
||||
|
||||
local a = panel:AddControl("Button", {
|
||||
Label = "Open Editor",
|
||||
Command = "weapon_holsters_editor"
|
||||
})
|
||||
|
||||
a:SetSize(0, 50)
|
||||
a:SetEnabled(LocalPlayer():IsSuperAdmin())
|
||||
end
|
||||
|
||||
hook.Add("PopulateToolMenu", "weapon_holsters_editor_spawnmenu", function()
|
||||
spawnmenu.AddToolMenuOption("Options", "Player", "weapon_holsters_editor_spawnmenu_entry", "Weapon Holsters", "", "", SpawnMenu_Entry, {})
|
||||
end)
|
||||
|
||||
hook.Add("HUDPaint", "whBoneIndicator", function()
|
||||
if WepHolster.lookingBone then
|
||||
for k, ply in pairs(player.GetAll()) do
|
||||
lp = LocalPlayer()
|
||||
local bone = ply:LookupBone(WepHolster.lookingBone)
|
||||
local matrix = ply:GetBoneMatrix(bone)
|
||||
|
||||
if not matrix then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = matrix:GetTranslation()
|
||||
pos = pos:ToScreen()
|
||||
local wihe = 6
|
||||
draw.RoundedBox(2, pos.x - wihe / 2, pos.y - wihe / 2, wihe, wihe, Color(0, 0, 0, 200))
|
||||
wihe = wihe - 2
|
||||
draw.RoundedBox(2, pos.x - wihe / 2, pos.y - wihe / 2, wihe, wihe, Color(255, 255, 255, 255))
|
||||
end
|
||||
end
|
||||
end)
|
||||
113
lua/autorun/client/xeon-drm-auth.lua
Normal file
113
lua/autorun/client/xeon-drm-auth.lua
Normal file
@@ -0,0 +1,113 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
local domain = CreateConVar("xeon_dev", 0, bit.bor(FCVAR_REPLICATED, FCVAR_UNREGISTERED, FCVAR_UNLOGGED, FCVAR_DONTRECORD), nil, 0, 1):GetInt() == 1 and "http://gmod.sneed" or "https://xeon.network"
|
||||
|
||||
local XEON_AUTH
|
||||
net.Receive("XEON.Auth", function(len)
|
||||
if net.ReadBool() then
|
||||
if IsValid(XEON_AUTH) then
|
||||
XEON_AUTH:Linked()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
net.Start("XEON.Auth")
|
||||
net.SendToServer()
|
||||
|
||||
if IsValid(XEON_AUTH) then return end
|
||||
|
||||
XEON_AUTH = vgui.Create("DFrame")
|
||||
XEON_AUTH:SetSize(ScrW() * .8, ScrH() * .8)
|
||||
XEON_AUTH:SetTitle("XEON DRM by Billy - Server Linking")
|
||||
XEON_AUTH:Center()
|
||||
XEON_AUTH:MakePopup()
|
||||
XEON_AUTH:SetRenderInScreenshots(false)
|
||||
|
||||
local html = vgui.Create("DHTML", XEON_AUTH)
|
||||
html:Dock(FILL)
|
||||
html:OpenURL(domain .. "/link/" .. (LocalPlayer():IsSuperAdmin() and "1" or "0"))
|
||||
html:AddFunction("XEON", "Auth", function(token_bytes)
|
||||
local token_bytes = string.Explode(", ", token_bytes:sub(2, -2), false)
|
||||
local token = {}
|
||||
for i = 1, 32 do
|
||||
token[i] = string.char(token_bytes[i])
|
||||
end
|
||||
token = table.concat(token)
|
||||
|
||||
net.Start("XEON.Auth")
|
||||
net.WriteData(token, 32)
|
||||
net.SendToServer()
|
||||
end)
|
||||
html:AddFunction("XEON", "ReloadMap", function()
|
||||
net.Start("XEON.ReloadMap")
|
||||
net.SendToServer()
|
||||
|
||||
if IsValid(XEON_AUTH) then
|
||||
XEON_AUTH:Close()
|
||||
XEON_AUTH = nil
|
||||
end
|
||||
end)
|
||||
local RunJS = html.RunJavascript
|
||||
function XEON_AUTH:Linked()
|
||||
RunJS(html, "LINKED()")
|
||||
end
|
||||
html.QueueJavascript = nil
|
||||
html.RunJavascript = nil
|
||||
end)
|
||||
|
||||
local function openErrors(errors)
|
||||
if IsValid(XEON_ERRORS) then
|
||||
XEON_ERRORS:Update(errors)
|
||||
return
|
||||
end
|
||||
|
||||
XEON_ERRORS = vgui.Create("DFrame")
|
||||
XEON_ERRORS:SetSize(ScrW() * .8, ScrH() * .8)
|
||||
XEON_ERRORS:SetTitle("XEON DRM by Billy - Error!")
|
||||
XEON_ERRORS:Center()
|
||||
XEON_ERRORS:MakePopup()
|
||||
|
||||
local html = vgui.Create("DHTML", XEON_ERRORS)
|
||||
html:Dock(FILL)
|
||||
html:OpenURL(domain .. "/errors")
|
||||
html:AddFunction("XEON", "ScriptSupport", function()
|
||||
gui.OpenURL("https://support.billy.enterprises")
|
||||
end)
|
||||
|
||||
function XEON_ERRORS:Update(errors)
|
||||
print("XEON Errors: " .. #errors)
|
||||
PrintTable(errors)
|
||||
|
||||
html:QueueJavascript("ShowNetworkedErrors(" .. util.TableToJSON(errors) .. ")")
|
||||
end
|
||||
function html:OnDocumentReady()
|
||||
XEON_ERRORS:Update(errors)
|
||||
self.OnDocumentReady = nil
|
||||
end
|
||||
XEON_ERRORS:Update(errors)
|
||||
|
||||
sound.PlayURL("https://xeon.network/static/media/oof.mp3", "", function() end)
|
||||
end
|
||||
|
||||
net.Receive("XEON.Error", function()
|
||||
local errors = {}
|
||||
for i = 1, net.ReadUInt(16) do
|
||||
errors[i] = net.ReadString()
|
||||
end
|
||||
openErrors(errors)
|
||||
end)
|
||||
|
||||
hook.Add("InitPostEntity", "XEON.Error", function()
|
||||
timer.Simple(2, function()
|
||||
net.Start("XEON.Error")
|
||||
net.SendToServer()
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user