This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 8064ba84d8
commit 73479cff9e
7338 changed files with 1718883 additions and 14 deletions

View File

@@ -0,0 +1,15 @@
--[[
| 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/
--]]
CHAT_RECOGNIZED = CHAT_RECOGNIZED or {}
CHAT_RECOGNIZED["mev"] = true
CHAT_RECOGNIZED["sv"] = true

View File

@@ -0,0 +1,15 @@
--[[
| 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/
--]]
LANGUAGE = {
cmdMev = "Réaliser une action visuelle.",
cmdSV = "Communiquer visuellement."
}

View File

@@ -0,0 +1,15 @@
--[[
| 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/
--]]
LANGUAGE = {
cmdMev = "Réaliser une action visuelle.",
cmdSV = "Communiquer visuellement."
}

View File

@@ -0,0 +1,43 @@
--[[
| 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 entityMeta = FindMetaTable("Entity")
function entityMeta:StealthOpenDoor()
if (!self.stealthOpen) then
self.stealthOpen = true
self.oldSpeed = self:GetInternalVariable("Speed")
self:SetSaveValue("Speed", self.oldSpeed / 2)
local uniqueID = self:EntIndex() and self:EntIndex() or tostring(self:GetPos())
timer.Create("resetDoorStealthValue" .. uniqueID, 5 * (self:GetInternalVariable("speed") / (self:GetClass() == "prop_door_rotating" and self:GetInternalVariable("distance") or self:GetInternalVariable("m_flMoveDistance"))), 1, function()
if (self:GetSaveTable().m_eDoorState != 1 and self:GetSaveTable().m_eDoorState != 3) then
timer.Simple(5, function()
self:SetSaveValue("Speed", self.oldSpeed)
self.stealthOpen = false
end)
else
timer.Create("checkForDoorReset" .. self:EntIndex(), 0.1, 0, function()
if (self:GetSaveTable().m_eDoorState != 1 and self:GetSaveTable().m_eDoorState != 3) then
timer.Simple(5, function()
self:SetSaveValue("Speed", self.oldSpeed)
self.stealthOpen = false
end)
timer.Remove("checkForDoorReset" .. self:EntIndex())
end
end)
end
end)
end
end

View File

@@ -0,0 +1,74 @@
--[[
| 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/
--]]
PLUGIN.name = "Stealth"
PLUGIN.author = "Aspect™"
PLUGIN.description = "Adds several stealth-related features."
ix.util.Include("meta/sv_entity.lua")
ix.util.Include("cl_plugin.lua")
ix.util.Include("sv_hooks.lua")
ix.chat.Register("mev", {
format = "*** %s %s",
color = Color(128, 128, 128, 255),
CanHear = function(self, speaker, listener)
if (speaker:GetEyeTraceNoCursor().Entity == listener or speaker == listener) then
return true
else
local trace = {}
trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER
trace.start = listener:LocalToWorld(listener:OBBCenter())
trace.endpos = speaker:GetShootPos()
trace.filter = {listener, speaker}
trace = util.TraceLine(trace)
if (trace.Fraction >= (0.75)) then
return true
end
end
return false
end,
prefix = {"/MeV"},
description = "@cmdMev",
indicator = "chatPerforming"
})
ix.chat.Register("sv", {
format = "*** %s mouvemente \"%s\"",
color = Color(128, 128, 128, 255),
CanHear = function(self, speaker, listener)
if (speaker:GetEyeTraceNoCursor().Entity == listener or speaker == listener) then
return true
else
local trace = {}
trace.mask = CONTENTS_SOLID + CONTENTS_MOVEABLE + CONTENTS_OPAQUE + CONTENTS_DEBRIS + CONTENTS_HITBOX + CONTENTS_MONSTER
trace.start = listener:LocalToWorld(listener:OBBCenter())
trace.endpos = speaker:GetShootPos()
trace.filter = {listener, speaker}
trace = util.TraceLine(trace)
if (trace.Fraction >= (0.75)) then
return true
end
end
return false
end,
prefix = {"/SV"},
description = "@cmdSV",
indicator = "chatPerforming"
})

View File

@@ -0,0 +1,42 @@
--[[
| 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/
--]]
function PLUGIN:PlayerFootstep(client, position, foot, soundName, volume)
if (client:KeyDown(IN_WALK) or client:KeyDown(IN_DUCK)) then
return true
end
end
function PLUGIN:AcceptInput(entity, input, activator, caller, value)
if (input == "Use" and entity:IsDoor() and (activator:KeyDown(IN_WALK) or activator:KeyDown(IN_DUCK))) then
entity:StealthOpenDoor()
if (entity:GetInternalVariable("slavename")) then
for _, slave in pairs(ents.FindByName(entity:GetInternalVariable("slavename"))) do
slave:StealthOpenDoor()
end
end
for _, slave in pairs(ents.FindByName(entity:GetName())) do
slave:StealthOpenDoor()
end
end
end
function PLUGIN:EntityEmitSound(data)
if !data.Entity or data.Entity and !IsValid(data.Entity) then return end
if (data.Entity:IsDoor() and data.Entity.stealthOpen) then
data.Volume = data.Volume * 0.05
return true
end
end