mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
59 lines
1.6 KiB
Lua
59 lines
1.6 KiB
Lua
|
|
--[[
|
||
|
|
| 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 PLUGIN = PLUGIN
|
||
|
|
|
||
|
|
-- Glasses stuff
|
||
|
|
ix.option.Add("useImmersiveGlasses", ix.type.bool, true, {
|
||
|
|
category = "appearance",
|
||
|
|
hidden = function()
|
||
|
|
return ix.config.Get("forceImmersiveGlasses")
|
||
|
|
end
|
||
|
|
})
|
||
|
|
|
||
|
|
netstream.Hook("OpenBeardStyling", function(target)
|
||
|
|
if (IsValid(ix.gui.menu)) then
|
||
|
|
ix.gui.menu:Remove()
|
||
|
|
end
|
||
|
|
|
||
|
|
if IsValid(beardStyling) then
|
||
|
|
beardStyling:Remove()
|
||
|
|
end
|
||
|
|
|
||
|
|
local beardStyling = vgui.Create("BeardStyling")
|
||
|
|
beardStyling:CustomInit(target)
|
||
|
|
end)
|
||
|
|
|
||
|
|
netstream.Hook("GetStylingConfirmation", function(attempter)
|
||
|
|
Derma_Query("Ktoś chce stylizować twoje włosy/brodę! Czy chcesz na to pozwolić?", "Stylizacja włosów/brody", "Pozwól", function()
|
||
|
|
netstream.Start("AcceptStyling", attempter)
|
||
|
|
end, "Disallow")
|
||
|
|
end)
|
||
|
|
|
||
|
|
-- Called when blurry screen space effects should be rendered.
|
||
|
|
function PLUGIN:RenderScreenspaceEffects()
|
||
|
|
if (!ix.config.Get("forceImmersiveGlasses")) then
|
||
|
|
if (!ix.option.Get("useImmersiveGlasses", true)) then return end
|
||
|
|
end
|
||
|
|
|
||
|
|
local client = LocalPlayer()
|
||
|
|
if (client:GetMoveType() == MOVETYPE_NOCLIP and !client:InVehicle()) then return end
|
||
|
|
|
||
|
|
local character = client:GetCharacter()
|
||
|
|
if (!character) then return end
|
||
|
|
|
||
|
|
local needsGlasses = character:GetGlasses()
|
||
|
|
local hasGlasses = character:HasGlasses()
|
||
|
|
if ((needsGlasses and !hasGlasses) or (!needsGlasses and hasGlasses)) then
|
||
|
|
DrawToyTown(28,ScrH())
|
||
|
|
end
|
||
|
|
end
|