mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 13:23:46 +03:00
Upload
This commit is contained in:
246
lua/arccw/client/cl_0_uc_wepsel.lua
Normal file
246
lua/arccw/client/cl_0_uc_wepsel.lua
Normal file
@@ -0,0 +1,246 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
surface.CreateFont("UCWepSel", {
|
||||
font = "Bahnschrift",
|
||||
size = 36,
|
||||
weight = 0,
|
||||
blursize = 0,
|
||||
antialias = true,
|
||||
})
|
||||
|
||||
surface.CreateFont("UCWepSel2", {
|
||||
font = "Bahnschrift Light",
|
||||
size = 17,
|
||||
weight = 0,
|
||||
blursize = 0,
|
||||
antialias = true,
|
||||
})
|
||||
|
||||
surface.CreateFont("UCWepSel3", {
|
||||
font = "Bahnschrift Light",
|
||||
size = 13,
|
||||
weight = 0,
|
||||
blursize = 0,
|
||||
antialias = true,
|
||||
})
|
||||
|
||||
local PANEL = {}
|
||||
|
||||
local matOverlay_AdminOnly = Material("icon16/shield.png")
|
||||
local matOverlay_NPCWeapon = Material("icon16/monkey.png")
|
||||
local matOverlay_NPCWeaponSelected = Material("icon16/monkey_tick.png")
|
||||
|
||||
AccessorFunc(PANEL, "m_Color", "Color")
|
||||
AccessorFunc(PANEL, "m_Type", "ContentType")
|
||||
AccessorFunc(PANEL, "m_SpawnName", "SpawnName")
|
||||
AccessorFunc(PANEL, "m_NPCWeapon", "NPCWeapon")
|
||||
AccessorFunc(PANEL, "m_bAdminOnly", "AdminOnly")
|
||||
AccessorFunc(PANEL, "m_bIsNPCWeapon", "IsNPCWeapon")
|
||||
|
||||
function PANEL:Init()
|
||||
self:SetPaintBackground(false)
|
||||
-- local sw, sh = self:GetParent():GetParent():GetParent():GetSize()
|
||||
self:SetSize(384*0.9, 128) -- TODO: get real long n har. nvm
|
||||
self:SetText("")
|
||||
self:SetDoubleClickingEnabled(false)
|
||||
self.Image = self:Add("DImage")
|
||||
self.Image:SetPos(3, 3)
|
||||
self.Image:SetSize(128 - 6, 128 - 6)
|
||||
self.Image:SetVisible(false)
|
||||
self.Border = 0
|
||||
end
|
||||
|
||||
function PANEL:SetName(name, spname, other)
|
||||
self:SetTooltip(name .. "\n" .. spname)
|
||||
self.WEP_NAME = name
|
||||
self.WEP_MANU = other.manu
|
||||
self.WEP_YEAR = other.year
|
||||
self.WEP_CALI = other.cali
|
||||
--self.Label:SetText( name )
|
||||
--self.Label2:SetText( name )
|
||||
self.m_NiceName = name
|
||||
end
|
||||
|
||||
function PANEL:SetMaterial(name)
|
||||
self.m_MaterialName = name
|
||||
local mat = Material(name)
|
||||
|
||||
-- Look for the old style material
|
||||
if not mat or mat:IsError() then
|
||||
name = name:Replace("entities/", "VGUI/entities/")
|
||||
name = name:Replace(".png", "")
|
||||
mat = Material(name)
|
||||
end
|
||||
|
||||
-- Couldn't find any material.. just return
|
||||
if not mat or mat:IsError() then
|
||||
mat = Material("entities/ucepicfail.png")
|
||||
end
|
||||
|
||||
self.Image:SetMaterial(mat)
|
||||
end
|
||||
|
||||
function PANEL:DoRightClick()
|
||||
local pCanvas = self:GetSelectionCanvas()
|
||||
if IsValid(pCanvas) and pCanvas:NumSelectedChildren() > 0 and self:IsSelected() then return hook.Run("SpawnlistOpenGenericMenu", pCanvas) end
|
||||
self:OpenMenu()
|
||||
end
|
||||
|
||||
function PANEL:DoClick()
|
||||
end
|
||||
|
||||
function PANEL:OpenMenu()
|
||||
end
|
||||
|
||||
function PANEL:OnDepressionChanged(b)
|
||||
end
|
||||
|
||||
function PANEL:Paint(w, h)
|
||||
if self.Depressed and not self.Dragging then
|
||||
if self.Border ~= 8 then
|
||||
self.Border = 8
|
||||
self:OnDepressionChanged(true)
|
||||
end
|
||||
else
|
||||
if self.Border ~= 0 then
|
||||
self.Border = 0
|
||||
self:OnDepressionChanged(false)
|
||||
end
|
||||
end
|
||||
|
||||
surface.SetDrawColor(255, 255, 255, 255)
|
||||
|
||||
if not dragndrop.IsDragging() and (self:IsHovered() or self.Depressed or self:IsChildHovered()) then
|
||||
surface.SetMaterial(Material("entities/uchover.png"))
|
||||
surface.DrawTexturedRect(self.Border, self.Border, w, h)
|
||||
end
|
||||
|
||||
--surface.SetMaterial( matOverlay_Normal )
|
||||
--self.Label:Show()
|
||||
local c_w, c_s = Color(255, 255, 255, 200), Color(0, 0, 0, 127)
|
||||
|
||||
-- Name
|
||||
if assert(self.WEP_NAME, "Holy balls no weapon name??") then
|
||||
surface.SetFont("UCWepSel")
|
||||
surface.SetTextPos((128 + 16) + 2, (50 - 24) + 2)
|
||||
surface.SetTextColor(c_s)
|
||||
surface.DrawText(self.WEP_NAME or "idk")
|
||||
surface.SetTextPos(128 + 16, 50 - 24)
|
||||
surface.SetTextColor(color_white)
|
||||
surface.DrawText(self.WEP_NAME or "idk")
|
||||
end
|
||||
|
||||
local ya = false
|
||||
|
||||
if self.WEP_MANU then
|
||||
-- Manufacturer
|
||||
surface.SetFont("UCWepSel2")
|
||||
surface.SetTextPos((128 + 16) + 2, (50 - 24 + 32) + 2)
|
||||
surface.SetTextColor(c_s)
|
||||
surface.DrawText(self.WEP_MANU or "idk")
|
||||
surface.SetTextPos(128 + 16, 50 - 24 + 32)
|
||||
surface.SetTextColor(c_w)
|
||||
surface.DrawText(self.WEP_MANU or "idk")
|
||||
ya = true
|
||||
end
|
||||
|
||||
if self.WEP_CALI then
|
||||
-- Caliber
|
||||
surface.SetFont("UCWepSel3")
|
||||
surface.SetTextPos((128 + 16) + 2, (50 - 24 + 32 + (ya and 16 or 0)) + 2)
|
||||
surface.SetTextColor(c_s)
|
||||
surface.DrawText(self.WEP_CALI or "idk")
|
||||
surface.SetTextPos(128 + 16, 50 - 24 + 32 + (ya and 16 or 0))
|
||||
surface.SetTextColor(c_w)
|
||||
surface.DrawText(self.WEP_CALI or "idk")
|
||||
end
|
||||
|
||||
if self.WEP_YEAR then
|
||||
-- Year
|
||||
surface.SetFont("UCWepSel3")
|
||||
surface.SetTextPos((128 + 16) + 2, (50 - 31) + 2)
|
||||
surface.SetTextColor(c_s)
|
||||
surface.DrawText(self.WEP_YEAR or "9999")
|
||||
surface.SetTextPos(128 + 16, 50 - 31)
|
||||
surface.SetTextColor(c_w)
|
||||
surface.DrawText(self.WEP_YEAR or "9999")
|
||||
end
|
||||
|
||||
render.PushFilterMag(TEXFILTER.ANISOTROPIC)
|
||||
render.PushFilterMin(TEXFILTER.ANISOTROPIC)
|
||||
self.Image:PaintAt(3 + self.Border, 3 + self.Border, 128 - 8 - self.Border * 2, 128 - 8 - self.Border * 2)
|
||||
render.PopFilterMin()
|
||||
render.PopFilterMag()
|
||||
|
||||
--surface.DrawTexturedRect( self.Border, self.Border, w-self.Border*2, h-self.Border*2 )
|
||||
if self:GetAdminOnly() then
|
||||
surface.SetMaterial(matOverlay_AdminOnly)
|
||||
surface.DrawTexturedRect(self.Border + 8, self.Border + 8, 16, 16)
|
||||
end
|
||||
|
||||
-- This whole thing could be more dynamic
|
||||
if self:GetIsNPCWeapon() then
|
||||
surface.SetMaterial(matOverlay_NPCWeapon)
|
||||
|
||||
if self:GetSpawnName() == GetConVar("gmod_npcweapon"):GetString() then
|
||||
surface.SetMaterial(matOverlay_NPCWeaponSelected)
|
||||
end
|
||||
|
||||
surface.DrawTexturedRect(w - self.Border - 24, self.Border + 8, 16, 16)
|
||||
end
|
||||
|
||||
self:ScanForNPCWeapons()
|
||||
end
|
||||
|
||||
function PANEL:ScanForNPCWeapons()
|
||||
if self.HasScanned then return end
|
||||
self.HasScanned = true
|
||||
|
||||
for _, v in pairs(list.Get("NPCUsableWeapons")) do
|
||||
if v.class == self:GetSpawnName() then
|
||||
self:SetIsNPCWeapon(true)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PANEL:PaintOver(w, h)
|
||||
self:DrawSelections()
|
||||
end
|
||||
|
||||
function PANEL:ToTable(bigtable)
|
||||
local tab = {}
|
||||
tab.type = self:GetContentType()
|
||||
tab.nicename = self.m_NiceName
|
||||
tab.material = self.m_MaterialName
|
||||
tab.admin = self:GetAdminOnly()
|
||||
tab.spawnname = self:GetSpawnName()
|
||||
tab.weapon = self:GetNPCWeapon()
|
||||
table.insert(bigtable, tab)
|
||||
end
|
||||
|
||||
function PANEL:Copy()
|
||||
local copy = vgui.Create("UCWepSel", self:GetParent())
|
||||
copy:SetContentType(self:GetContentType())
|
||||
copy:SetSpawnName(self:GetSpawnName())
|
||||
copy:SetName(self.m_NiceName, self:GetSpawnName())
|
||||
copy:SetMaterial(self.m_MaterialName)
|
||||
copy:SetNPCWeapon(self:GetNPCWeapon())
|
||||
copy:SetAdminOnly(self:GetAdminOnly())
|
||||
copy:CopyBase(self)
|
||||
copy.DoClick = self.DoClick
|
||||
copy.OpenMenu = self.OpenMenu
|
||||
copy.OpenMenuExtra = self.OpenMenuExtra
|
||||
|
||||
return copy
|
||||
end
|
||||
|
||||
vgui.Register("UCWepSel", PANEL, "DButton")
|
||||
276
lua/arccw/client/cl_autostats.lua
Normal file
276
lua/arccw/client/cl_autostats.lua
Normal file
@@ -0,0 +1,276 @@
|
||||
--[[
|
||||
| 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 tbl = table
|
||||
local tbl_add = tbl.Add
|
||||
local tbl_ins = tbl.insert
|
||||
local tostr = tostring
|
||||
local translate = ArcCW.GetTranslation
|
||||
|
||||
-- ["buff"] = {"desc", string mode (mult, add, override, func), bool lowerbetter or function(val), number priority, bool flipsigns }
|
||||
|
||||
ArcCW.AutoStats = {
|
||||
-- Attachments
|
||||
["MagExtender"] = { "autostat.magextender", "override", false, pr = 317 },
|
||||
["MagReducer"] = { "autostat.magreducer", "override", true, pr = 316 },
|
||||
["Bipod"] = { "autostat.bipod", false, false, pr = 313 },
|
||||
["ScopeGlint"] = { "autostat.glint", "override", true, pr = 255 },
|
||||
["Silencer"] = { "autostat.silencer", "override", false, pr = 254 },
|
||||
["Override_NoRandSpread"] = { "autostat.norandspr", "override", false, pr = 253 },
|
||||
["Override_CanFireUnderwater"] = { "autostat.underwater", "override", false, pr = 252 },
|
||||
["Override_ShootWhileSprint"] = { "autostat.sprintshoot", "override", false, pr = 251 },
|
||||
-- Multipliers
|
||||
["Mult_BipodRecoil"] = { "autostat.bipodrecoil", false, true, pr = 312 },
|
||||
["Mult_BipodDispersion"] = { "autostat.bipoddisp", false, true, pr = 311 },
|
||||
["Mult_Damage"] = { "autostat.damage", "mult", false, pr = 215 },
|
||||
["Mult_DamageMin"] = { "autostat.damagemin", "mult", false, pr = 214 },
|
||||
["Mult_Range"] = { "autostat.range", "mult", false, pr = 185 },
|
||||
["Mult_RangeMin"] = { "autostat.rangemin", "mult", false, pr = 184 },
|
||||
["Mult_Penetration"] = { "autostat.penetration", "mult", false, pr = 213 },
|
||||
["Mult_MuzzleVelocity"] = { "autostat.muzzlevel", "mult", false, pr = 212 },
|
||||
["Mult_PhysBulletMuzzleVelocity"] = { "autostat.muzzlevel", "mult", false, pr = 211 },
|
||||
["Mult_MeleeTime"] = { "autostat.meleetime", "mult", true, pr = 145 },
|
||||
["Mult_MeleeDamage"] = { "autostat.meleedamage", "mult", false, pr = 144 },
|
||||
["Add_MeleeRange"] = { "autostat.meleerange", false, false, pr = 143 },
|
||||
["Mult_Recoil"] = { "autostat.recoil", "mult", true, pr = 195 },
|
||||
["Mult_RecoilSide"] = { "autostat.recoilside", "mult", true, pr = 194 },
|
||||
["Mult_RPM"] = { "autostat.firerate", "mult", false, pr = 216 },
|
||||
["Mult_AccuracyMOA"] = { "autostat.precision", "mult", true, pr = 186 },
|
||||
["Mult_HipDispersion"] = { "autostat.hipdisp", "mult", true, pr = 155 },
|
||||
["Mult_SightsDispersion"] = { "autostat.sightdisp", "mult", true, pr = 154 },
|
||||
["Mult_MoveDispersion"] = { "autostat.movedisp", "mult", true, pr = 153 },
|
||||
["Mult_JumpDispersion"] = { "autostat.jumpdisp", "mult", true, pr = 152 },
|
||||
["Mult_ShootVol"] = { "autostat.shootvol", "mult", true, pr = 115 },
|
||||
["Mult_SpeedMult"] = { "autostat.speedmult", "mult", false, pr = 114 },
|
||||
["Mult_MoveSpeed"] = { "autostat.speedmult", "mult", false, pr = 105 },
|
||||
["Mult_SightedSpeedMult"] = { "autostat.sightspeed", "mult", false, pr = 104 },
|
||||
["Mult_SightedMoveSpeed"] = { "autostat.sightspeed", "mult", false, pr = 103 },
|
||||
["Mult_ShootSpeedMult"] = { "autostat.shootspeed", "mult", false, pr = 102 },
|
||||
["Mult_ReloadTime"] = { "autostat.reloadtime", "mult", true, pr = 125 },
|
||||
["Add_BarrelLength"] = { "autostat.barrellength","add", true, pr = 915 },
|
||||
["Mult_DrawTime"] = { "autostat.drawtime", "mult", true, pr = 14 },
|
||||
["Mult_SightTime"] = { "autostat.sighttime", "mult", true, pr = 335, flipsigns = true },
|
||||
["Mult_CycleTime"] = { "autostat.cycletime", "mult", true, pr = 334 },
|
||||
["Mult_Sway"] = { "autostat.sway", "mult", true, pr = 353 },
|
||||
["Mult_HeatCapacity"] = { "autostat.heatcap", "mult", false, pr = 10 },
|
||||
["Mult_HeatDissipation"] = { "autostat.heatdrain", "mult", false, pr = 9 },
|
||||
["Mult_FixTime"] = { "autostat.heatfix", "mult", true, pr = 8 },
|
||||
["Mult_HeatDelayTime"] = { "autostat.heatdelay", "mult", true, pr = 7 },
|
||||
["Mult_MalfunctionMean"] = { "autostat.malfunctionmean", "mult", false, pr = 6 },
|
||||
["Add_ClipSize"] = { "autostat.clipsize.mod", "add", false, pr = 315 },
|
||||
["Mult_ClipSize"] = { "autostat.clipsize.mod", "mult", false, pr = 314 },
|
||||
|
||||
["Mult_TriggerDelayTime"] = { "autostat.triggerdelay", "mult", true, pr = 200 },
|
||||
|
||||
["Override_Ammo"] = {"autostat.ammotype", "func", function(wep, val, att)
|
||||
-- have to use the weapons table here because Primary.Ammo *is* modified when attachments are used
|
||||
if !IsValid(wep) or !weapons.Get(wep:GetClass()) or weapons.Get(wep:GetClass()).Primary.Ammo == val then return end
|
||||
return string.format(translate("autostat.ammotype"), string.lower(ArcCW.TranslateAmmo(val))), "infos"
|
||||
end, pr = 316},
|
||||
["Override_ClipSize"] = {"autostat.clipsize", "func", function(wep, val, att)
|
||||
if !IsValid(wep) then return end
|
||||
local ogclip = wep:GetBuff_Override("BaseClipSize") or (wep.RegularClipSize or (wep.Primary and wep.Primary.ClipSize) or 0)
|
||||
if ogclip < val then
|
||||
return string.format(translate("autostat.clipsize"), val), "pros"
|
||||
else
|
||||
return string.format(translate("autostat.clipsize"), val), "cons"
|
||||
end
|
||||
end, pr = 317},
|
||||
["Bipod"] = {"autostat.bipod2", "func", function(wep, val, att)
|
||||
if val then
|
||||
local recoil = 100 - math.Round((att.Mult_BipodRecoil or (IsValid(wep) and wep.BipodRecoil) or 1) * 100)
|
||||
local disp = 100 - math.Round((att.Mult_BipodDispersion or (IsValid(wep) and wep.BipodDispersion) or 1) * 100)
|
||||
return string.format(translate("autostat.bipod2"), disp, recoil), "pros"
|
||||
else
|
||||
return translate("autostat.nobipod"), "cons"
|
||||
end
|
||||
end, pr = 314},
|
||||
["UBGL"] = { "autostat.ubgl", "override", false, pr = 950 },
|
||||
["UBGL_Ammo"] = {"autostat.ammotypeubgl", "func", function(wep, val, att)
|
||||
-- have to use the weapons table here because Primary.Ammo *is* modified when attachments are used
|
||||
if !IsValid(wep) then return end
|
||||
return string.format(translate("autostat.ammotypeubgl"), string.lower(ArcCW.TranslateAmmo(val))), "infos"
|
||||
end, pr = 949},
|
||||
|
||||
["Add_AccuracyMOA"] = { "autostat.precision", "func", function(wep, val, att)
|
||||
if val > 0 then
|
||||
return "+" .. math.Round(val, 2) .. " " .. translate("unit.moa") .. " " .. translate("autostat.precision"), "cons"
|
||||
else
|
||||
return "-" .. math.Round(val, 2) .. " " .. translate("unit.moa") .. " " .. translate("autostat.precision"), "pros"
|
||||
end
|
||||
end, pr = 187 },
|
||||
}
|
||||
|
||||
local function getsimpleamt(stat)
|
||||
if stat > 1 then
|
||||
return stat >= 2 and "++++ " or stat >= 1.5 and "+++ " or stat >= 1.25 and "++ " or "+ "
|
||||
elseif stat < 1 then
|
||||
return stat <= 0.75 and "---- " or stat <= 0.5 and "--- " or stat <= 0.25 and "-- " or "- "
|
||||
end
|
||||
end
|
||||
|
||||
local function stattext(wep, att, i, k, dmgboth, flipsigns)
|
||||
if !ArcCW.AutoStats[i] then return end
|
||||
if i == "Mult_DamageMin" and dmgboth then return end
|
||||
|
||||
local stat = ArcCW.AutoStats[i]
|
||||
local simple = ArcCW.ConVars["attinv_simpleproscons"]:GetBool()
|
||||
|
||||
local txt = ""
|
||||
local str, eval = ArcCW.GetTranslation(stat[1]) or stat[1], stat[3]
|
||||
|
||||
if i == "Mult_Damage" and dmgboth then
|
||||
str = ArcCW.GetTranslation("autostat.damageboth") or stat[1]
|
||||
end
|
||||
|
||||
local tcon, tpro = eval and "cons" or "pros", eval and "pros" or "cons"
|
||||
|
||||
if stat[3] == "infos" then
|
||||
tcon = "infos"
|
||||
end
|
||||
|
||||
if stat[2] == "mult" and k != 1 then
|
||||
local sign, percent = k > 1 and (flipsigns and "-" or "+") or (flipsigns and "+" or "-"), k > 1 and (k - 1) or (1 - k)
|
||||
txt = simple and getsimpleamt(k) or sign .. tostr(math.Round(percent * 100, 2)) .. "% "
|
||||
return txt .. str, k > 1 and tcon or tpro
|
||||
elseif stat[2] == "add" and k != 0 then
|
||||
local sign, state = k > 0 and (flipsigns and "-" or "+") or (flipsigns and "+" or "-"), k > 0 and k or -k
|
||||
txt = simple and "+ " or sign .. tostr(state) .. " "
|
||||
return txt .. str, k > 0 and tcon or tpro
|
||||
elseif stat[2] == "override" and k == true then
|
||||
return str, tcon
|
||||
elseif stat[2] == "func" then
|
||||
local a, b = stat[3](wep, k, att)
|
||||
if a and b then return a, b end
|
||||
end
|
||||
end
|
||||
|
||||
function ArcCW:GetProsCons(wep, att, toggle)
|
||||
local pros = {}
|
||||
local cons = {}
|
||||
local infos = {}
|
||||
|
||||
tbl_add(pros, att.Desc_Pros or {})
|
||||
tbl_add(cons, att.Desc_Cons or {})
|
||||
tbl_add(infos, att.Desc_Neutrals or {})
|
||||
|
||||
local override = hook.Run("ArcCW_PreAutoStats", wep, att, pros, cons, infos, toggle)
|
||||
if override then return pros, cons, infos end
|
||||
|
||||
-- Localize attachment-specific text
|
||||
local hasmaginfo = false
|
||||
for i, v in pairs(pros) do
|
||||
if v == "pro.magcap" then hasmaginfo = true end
|
||||
pros[i] = ArcCW.TryTranslation(v)
|
||||
end
|
||||
for i, v in pairs(cons) do
|
||||
if v == "con.magcap" then hasmaginfo = true end
|
||||
cons[i] = ArcCW.TryTranslation(v)
|
||||
end
|
||||
for i, v in pairs(infos) do infos[i] = ArcCW.TryTranslation(v) end
|
||||
|
||||
if !att.AutoStats then return pros, cons, infos end
|
||||
|
||||
-- Process togglable stats
|
||||
if att.ToggleStats then
|
||||
--local toggletbl = att.ToggleStats[toggle or 1]
|
||||
for ti, toggletbl in pairs(att.ToggleStats) do
|
||||
-- show the first stat block (unless NoAutoStats), and all blocks with AutoStats
|
||||
if toggletbl.AutoStats or (ti == (toggle or 1) and !toggletbl.NoAutoStats) then
|
||||
local dmgboth = toggletbl.Mult_DamageMin and toggletbl.Mult_Damage and toggletbl.Mult_DamageMin == toggletbl.Mult_Damage
|
||||
for i, stat in SortedPairsByMemberValue(ArcCW.AutoStats, "pr", true) do
|
||||
if !toggletbl[i] or toggletbl[i .. "_SkipAS"] then continue end
|
||||
local val = toggletbl[i]
|
||||
--[[]
|
||||
-- makes the stat show as a sum and not an additional modifier
|
||||
-- feels more confusing though
|
||||
if att[i] then
|
||||
if stat[2] == "add" then
|
||||
val = val + att[i]
|
||||
elseif stat[2] == "mult" then
|
||||
val = val * att[i]
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
local txt, typ = stattext(wep, toggletbl, i, val, dmgboth, ArcCW.AutoStats[i].flipsigns )
|
||||
if !txt then continue end
|
||||
|
||||
local prefix = (stat[2] == "override" and k == true) and "" or ("[" .. (toggletbl.AutoStatName or toggletbl.PrintName or ti) .. "] ")
|
||||
|
||||
if typ == "pros" then
|
||||
tbl_ins(pros, prefix .. txt)
|
||||
elseif typ == "cons" then
|
||||
tbl_ins(cons, prefix .. txt)
|
||||
elseif typ == "infos" then
|
||||
tbl_ins(infos, prefix .. txt)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local dmgboth = att.Mult_DamageMin and att.Mult_Damage and att.Mult_DamageMin == att.Mult_Damage
|
||||
|
||||
for i, stat in SortedPairsByMemberValue(ArcCW.AutoStats, "pr", true) do
|
||||
if !att[i] or att[i .. "_SkipAS"] then continue end
|
||||
|
||||
-- Legacy support: If "Increased/Decreased magazine capacity" line exists, don't do our autostats version
|
||||
if hasmaginfo and i == "Override_ClipSize" then continue end
|
||||
|
||||
if i == "UBGL" then
|
||||
tbl_ins(infos, translate("autostat.ubgl2"))
|
||||
end
|
||||
|
||||
local txt, typ = stattext(wep, att, i, att[i], dmgboth, ArcCW.AutoStats[i].flipsigns )
|
||||
if !txt then continue end
|
||||
|
||||
if typ == "pros" then
|
||||
tbl_ins(pros, txt)
|
||||
elseif typ == "cons" then
|
||||
tbl_ins(cons, txt)
|
||||
elseif typ == "infos" then
|
||||
tbl_ins(infos, txt)
|
||||
end
|
||||
|
||||
--[[]
|
||||
if i == "Mult_DamageMin" and dmgboth then continue end
|
||||
|
||||
local k, txt = att[i], ""
|
||||
local str, st = ArcCW.GetTranslation(stat[1]) or stat[1], stat[3]
|
||||
|
||||
if i == "Mult_Damage" and dmgboth then
|
||||
str = ArcCW.GetTranslation("autostat.damageboth") or stat[1]
|
||||
end
|
||||
|
||||
local tcon, tpro = st and cons or pros, st and pros or cons
|
||||
|
||||
if stat[2] == "mult" and k != 1 then
|
||||
local sign, percent = k > 1 and "+" or "-", k > 1 and (k - 1) or (1 - k)
|
||||
|
||||
txt = simple and getsimpleamt(k) or sign .. tostr(math.Round(percent * 100, 2)) .. "% "
|
||||
|
||||
tbl_ins(k > 1 and tcon or tpro, txt .. str)
|
||||
elseif stat[2] == "add" and k != 0 then
|
||||
local sign, state = k > 0 and "+" or "-", k > 0 and k or -k
|
||||
|
||||
txt = simple and "+ " or sign .. tostr(state) .. " "
|
||||
|
||||
tbl_ins(k > 1 and tpro or tcon, txt .. str)
|
||||
elseif stat[2] == "override" and k == true then
|
||||
tbl_ins(st and cons or pros, 1, str)
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
hook.Run("ArcCW_PostAutoStats", wep, att, pros, cons, infos, toggle)
|
||||
|
||||
return pros, cons, infos
|
||||
end
|
||||
208
lua/arccw/client/cl_binds.lua
Normal file
208
lua/arccw/client/cl_binds.lua
Normal file
@@ -0,0 +1,208 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ArcCW.KEY_FIREMODE = "+zoom"
|
||||
ArcCW.KEY_FIREMODE_ALT = "arccw_firemode"
|
||||
ArcCW.KEY_ZOOMIN = "invnext"
|
||||
ArcCW.KEY_ZOOMIN_ALT = "arccw_zoom_in"
|
||||
ArcCW.KEY_ZOOMOUT = "invprev"
|
||||
ArcCW.KEY_ZOOMOUT_ALT = "arccw_zoom_out"
|
||||
ArcCW.KEY_TOGGLEINV = "+menu_context"
|
||||
ArcCW.KEY_TOGGLEINV_ALT = "arccw_toggle_inv"
|
||||
ArcCW.KEY_SWITCHSCOPE = "+use"
|
||||
ArcCW.KEY_SWITCHSCOPE_ALT = "arccw_switch_scope"
|
||||
ArcCW.KEY_TOGGLEUBGL = "arccw_toggle_ubgl"
|
||||
ArcCW.KEY_TOGGLEATT = "arccw_toggle_att"
|
||||
ArcCW.KEY_MELEE = "arccw_melee"
|
||||
|
||||
ArcCW.BindToEffect = {
|
||||
[ArcCW.KEY_FIREMODE] = "firemode",
|
||||
[ArcCW.KEY_ZOOMIN] = "zoomin",
|
||||
[ArcCW.KEY_ZOOMOUT] = "zoomout",
|
||||
[ArcCW.KEY_TOGGLEINV] = "inv",
|
||||
[ArcCW.KEY_SWITCHSCOPE] = "switchscope_dtap",
|
||||
}
|
||||
|
||||
ArcCW.BindToEffect_Unique = {
|
||||
[ArcCW.KEY_TOGGLEUBGL] = "ubgl",
|
||||
[ArcCW.KEY_SWITCHSCOPE_ALT] = "switchscope",
|
||||
[ArcCW.KEY_FIREMODE_ALT] = "firemode",
|
||||
[ArcCW.KEY_ZOOMIN_ALT] = "zoomin",
|
||||
[ArcCW.KEY_ZOOMOUT_ALT] = "zoomout",
|
||||
[ArcCW.KEY_TOGGLEINV_ALT] = "inv",
|
||||
[ArcCW.KEY_TOGGLEATT] = "toggleatt",
|
||||
[ArcCW.KEY_MELEE] = "melee",
|
||||
}
|
||||
|
||||
local lastpressZ = 0
|
||||
local lastpressE = 0
|
||||
|
||||
function ArcCW:GetBind(bind)
|
||||
local button = input.LookupBinding(bind)
|
||||
|
||||
return button == "no value" and bind .. " unbound" or button
|
||||
end
|
||||
|
||||
local function ArcCW_TranslateBindToEffect(bind)
|
||||
local alt = ArcCW.ConVars["altbindsonly"]:GetBool()
|
||||
if alt then
|
||||
return ArcCW.BindToEffect_Unique[bind], true
|
||||
else
|
||||
return ArcCW.BindToEffect_Unique[bind] or ArcCW.BindToEffect[bind] or bind, ArcCW.BindToEffect_Unique[bind] != nil
|
||||
end
|
||||
end
|
||||
|
||||
local function SendNet(string, bool)
|
||||
net.Start(string)
|
||||
if bool != nil then net.WriteBool(bool) end
|
||||
net.SendToServer()
|
||||
end
|
||||
|
||||
local function DoUbgl(wep)
|
||||
if wep:GetInUBGL() then
|
||||
SendNet("arccw_ubgl", false)
|
||||
|
||||
wep:DeselectUBGL()
|
||||
else
|
||||
SendNet("arccw_ubgl", true)
|
||||
|
||||
wep:SelectUBGL()
|
||||
end
|
||||
end
|
||||
|
||||
local debounce = 0
|
||||
local function ToggleAtts(wep)
|
||||
if debounce > CurTime() then return end -- ugly hack for double trigger
|
||||
debounce = CurTime() + 0.15
|
||||
local sounds = {}
|
||||
for k, v in pairs(wep.Attachments) do
|
||||
local atttbl = v.Installed and ArcCW.AttachmentTable[v.Installed]
|
||||
if atttbl and atttbl.ToggleStats and !v.ToggleLock then
|
||||
if atttbl.ToggleSound then sounds[atttbl.ToggleSound] = true
|
||||
else sounds["weapons/arccw/firemode.wav"] = true end
|
||||
wep:ToggleSlot(k, nil, true)
|
||||
end
|
||||
end
|
||||
for snd, _ in pairs(sounds) do
|
||||
surface.PlaySound(snd)
|
||||
end
|
||||
end
|
||||
|
||||
local function ArcCW_PlayerBindPress(ply, bind, pressed)
|
||||
if !(ply:IsValid() and pressed) then return end
|
||||
|
||||
local wep = ply:GetActiveWeapon()
|
||||
|
||||
if !wep.ArcCW then return end
|
||||
|
||||
local block = false
|
||||
|
||||
if GetConVar("arccw_nohl2flash"):GetBool() and bind == "impulse 100" then
|
||||
ToggleAtts(wep)
|
||||
|
||||
if ply:FlashlightIsOn() then return false end -- if hl2 flahslight is on we will turn it off as expected
|
||||
|
||||
return true -- we dont want hl2 flashlight
|
||||
end
|
||||
|
||||
local alt
|
||||
bind, alt = ArcCW_TranslateBindToEffect(bind)
|
||||
|
||||
if bind == "firemode" and (alt or true) and !ply:KeyDown(IN_USE) then
|
||||
SendNet("arccw_firemode")
|
||||
wep:ChangeFiremode()
|
||||
|
||||
block = true
|
||||
elseif bind == "inv" and !ply:KeyDown(IN_USE) and ArcCW.ConVars["enable_customization"]:GetInt() > -1 then
|
||||
|
||||
local state = wep:GetState() != ArcCW.STATE_CUSTOMIZE
|
||||
|
||||
SendNet("arccw_togglecustomize", state)
|
||||
|
||||
wep:ToggleCustomizeHUD(state)
|
||||
|
||||
block = true
|
||||
elseif bind == "ubgl" then
|
||||
DoUbgl(wep)
|
||||
elseif bind == "toggleatt" then
|
||||
ToggleAtts(wep)
|
||||
end
|
||||
|
||||
if wep:GetState() == ArcCW.STATE_SIGHTS then
|
||||
if bind == "zoomin" then
|
||||
wep:Scroll(1)
|
||||
block = true
|
||||
elseif bind == "zoomout" then
|
||||
wep:Scroll(-1)
|
||||
block = true
|
||||
elseif bind == "switchscope_dtap" then
|
||||
if lastpressE >= CurTime() - 0.25 then
|
||||
wep:SwitchActiveSights()
|
||||
lastpressE = 0
|
||||
else
|
||||
lastpressE = CurTime()
|
||||
end
|
||||
elseif bind == "switchscope" then
|
||||
wep:SwitchActiveSights()
|
||||
block = true
|
||||
end
|
||||
end
|
||||
|
||||
if bind == "melee" and wep:GetState() != ArcCW.STATE_SIGHTS then
|
||||
wep:Bash()
|
||||
end
|
||||
|
||||
if block then return true end
|
||||
end
|
||||
|
||||
hook.Add("PlayerBindPress", "ArcCW_PlayerBindPress", ArcCW_PlayerBindPress)
|
||||
|
||||
-- Actually register the damned things so they can be bound
|
||||
for k, v in pairs(ArcCW.BindToEffect_Unique) do
|
||||
concommand.Add(k, function(ply) ArcCW_PlayerBindPress(ply, k, true) end, nil, v, 0)
|
||||
end
|
||||
|
||||
-- ArcCW.CaptureKeys = {
|
||||
-- KEY_G
|
||||
-- }
|
||||
-- ArcCW.LastInputs = {}
|
||||
-- ArcCW.Inputs = {}
|
||||
|
||||
-- local function ArcCW_CustomInputs()
|
||||
-- local inputs = {}
|
||||
|
||||
-- for _, i in pairs(ArcCW.CaptureKeys) do
|
||||
-- -- local conv = GetConVar(i)
|
||||
|
||||
-- -- if !conv then continue end
|
||||
-- -- if !IsValid(conv) then continue end
|
||||
|
||||
-- local kc = i
|
||||
|
||||
-- inputs[kc] = input.IsKeyDown(kc)
|
||||
-- end
|
||||
|
||||
-- ArcCW.LastInputs = ArcCW.Inputs
|
||||
-- ArcCW.Inputs = inputs
|
||||
|
||||
-- if ArcCW:KeyPressed(KEY_G) then
|
||||
-- ArcCW:QuickNade("frag")
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- hook.Add("Think", "ArcCW_CustomInputs", ArcCW_CustomInputs)
|
||||
|
||||
-- function ArcCW:KeyPressed(key)
|
||||
-- if !ArcCW.LastInputs[key] and ArcCW.Inputs[key] then
|
||||
-- return true
|
||||
-- end
|
||||
|
||||
-- return false
|
||||
-- end
|
||||
297
lua/arccw/client/cl_blacklist.lua
Normal file
297
lua/arccw/client/cl_blacklist.lua
Normal file
@@ -0,0 +1,297 @@
|
||||
--[[
|
||||
| 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 srf = surface
|
||||
|
||||
|
||||
|
||||
local function ScreenScaleMulti(input)
|
||||
return ScreenScale(input) * ArcCW.ConVars["hud_size"]:GetFloat()
|
||||
end
|
||||
|
||||
local blacklistWindow = nil
|
||||
local blacklistTbl = {}
|
||||
local filter = ""
|
||||
local onlyblacklisted = false
|
||||
local internalName = false
|
||||
local dragMode = nil
|
||||
|
||||
local color_arccwbred = Color(150, 50, 50, 255)
|
||||
local color_arccwlred = Color(125, 25, 25, 150)
|
||||
local color_arccwdred = Color(75, 0, 0, 150)
|
||||
local color_arccwdtbl = Color(0, 0, 0, 200)
|
||||
|
||||
local function SaveBlacklist()
|
||||
-- We send ID over instead of strings to save on network costs
|
||||
-- optimization_is_optimization.png
|
||||
|
||||
local blacklistAmt = 0
|
||||
|
||||
for attName, bStatus in pairs(blacklistTbl) do
|
||||
if bStatus then blacklistAmt = blacklistAmt + 1 end
|
||||
end
|
||||
|
||||
net.Start("arccw_blacklist")
|
||||
net.WriteBool(false)
|
||||
net.WriteUInt(blacklistAmt, ArcCW.GetBitNecessity())
|
||||
for attName, bStatus in pairs(blacklistTbl) do
|
||||
if bStatus then
|
||||
net.WriteUInt(ArcCW.AttachmentTable[attName].ID, ArcCW.GetBitNecessity())
|
||||
end
|
||||
end
|
||||
net.SendToServer()
|
||||
|
||||
blacklistTbl = {}
|
||||
end
|
||||
|
||||
local function CreateAttButton(parent, attName, attTbl)
|
||||
local attBtn = vgui.Create("DButton", parent)
|
||||
attBtn:SetFont("ArcCW_8")
|
||||
attBtn:SetText("")
|
||||
attBtn:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(16))
|
||||
attBtn:Dock(TOP)
|
||||
attBtn:DockMargin(ScreenScaleMulti(36), ScreenScaleMulti(1), ScreenScaleMulti(36), ScreenScaleMulti(1))
|
||||
attBtn:SetContentAlignment(5)
|
||||
|
||||
attBtn.Paint = function(spaa, w, h)
|
||||
local blisted = blacklistTbl[attName]
|
||||
if blisted == nil then blisted = attTbl.Blacklisted end
|
||||
|
||||
local hovered = spaa:IsHovered()
|
||||
local blackhov = blisted and hovered
|
||||
|
||||
local Bfg_col = blackhov and color_arccwbred or blisted and color_arccwbred or hovered and color_black or color_white
|
||||
local Bbg_col = blackhov and color_arccwlred or blisted and color_arccwdred or hovered and color_white or color_arccwdtbl
|
||||
|
||||
srf.SetDrawColor(Bbg_col)
|
||||
srf.DrawRect(0, 0, w, h)
|
||||
|
||||
local img = attTbl.Icon
|
||||
if img then
|
||||
srf.SetDrawColor(Bfg_col)
|
||||
srf.SetMaterial(img)
|
||||
srf.DrawTexturedRect(ScreenScaleMulti(2), 0, h, h)
|
||||
end
|
||||
|
||||
local txt = attTbl.PrintName
|
||||
if internalName then txt = attName end
|
||||
srf.SetTextColor(Bfg_col)
|
||||
srf.SetTextPos(ScreenScaleMulti(20), ScreenScaleMulti(2))
|
||||
srf.SetFont("ArcCW_12")
|
||||
srf.DrawText(txt)
|
||||
|
||||
local listed = (blacklistTbl[attName] and !attTbl.Blacklisted)
|
||||
local unlisted = (attTbl.Blacklisted and !blacklistTbl[attName])
|
||||
local saved = (listed or unlisted) and " [not saved]" or ""
|
||||
srf.SetTextColor(Bfg_col)
|
||||
srf.SetTextPos(spaa:GetWide() - ScreenScaleMulti(36), ScreenScaleMulti(4))
|
||||
srf.SetFont("ArcCW_8")
|
||||
srf.DrawText(saved)
|
||||
end
|
||||
|
||||
-- In addition to clicking on a button, you can drag over all of them!
|
||||
attBtn.OnMousePressed = function(spaa, kc)
|
||||
blacklistTbl[attName] = !blacklistTbl[attName] and !attTbl.Blacklisted or !blacklistTbl[attName]
|
||||
dragMode = blacklistTbl[attName]
|
||||
hook.Add("Think", "ArcCW_Blacklist", function()
|
||||
if !input.IsMouseDown(MOUSE_LEFT) then
|
||||
dragMode = nil
|
||||
hook.Remove("Think", "ArcCW_Blacklist")
|
||||
end
|
||||
end)
|
||||
end
|
||||
attBtn.OnCursorEntered = function(spaa, kc)
|
||||
if dragMode != nil and input.IsMouseDown(MOUSE_LEFT) then
|
||||
blacklistTbl[attName] = dragMode
|
||||
end
|
||||
end
|
||||
|
||||
return attBtn
|
||||
end
|
||||
|
||||
function ArcCW.MakeBlacklistWindow()
|
||||
if blacklistWindow then blacklistWindow:Remove() end
|
||||
|
||||
blacklistTbl = {}
|
||||
|
||||
blacklistWindow = vgui.Create("DFrame")
|
||||
blacklistWindow:SetSize(ScrW() * 0.5, ScrH() * 0.75)
|
||||
blacklistWindow:Center()
|
||||
blacklistWindow:SetTitle("")
|
||||
blacklistWindow:SetDraggable(false)
|
||||
blacklistWindow:SetVisible(true)
|
||||
blacklistWindow:ShowCloseButton(true)
|
||||
blacklistWindow:MakePopup()
|
||||
blacklistWindow.Paint = function(self, w, h)
|
||||
srf.SetDrawColor(color_arccwdtbl)
|
||||
srf.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
local title = vgui.Create("DLabel", blacklistWindow)
|
||||
title:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(26))
|
||||
title:Dock(TOP)
|
||||
title:SetFont("ArcCW_24")
|
||||
title:SetText("ArcCW Blacklist")
|
||||
title:DockMargin(ScreenScaleMulti(16), 0, ScreenScaleMulti(16), ScreenScaleMulti(8))
|
||||
|
||||
local desc = vgui.Create("DLabel", blacklistWindow)
|
||||
desc:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(12))
|
||||
desc:Dock(TOP)
|
||||
desc:DockMargin(ScreenScaleMulti(4), 0, ScreenScaleMulti(4), ScreenScaleMulti(4))
|
||||
desc:SetFont("ArcCW_12")
|
||||
desc:SetText("Attachments checked here will stop showing up at all.")
|
||||
desc:SetContentAlignment(5)
|
||||
|
||||
local attList = vgui.Create("DScrollPanel", blacklistWindow)
|
||||
attList:SetText("")
|
||||
attList:Dock(FILL)
|
||||
attList:SetContentAlignment(5)
|
||||
attList.Paint = function(span, w, h) end
|
||||
|
||||
local sbar = attList:GetVBar()
|
||||
sbar.Paint = function() end
|
||||
sbar.btnUp.Paint = function(span, w, h) end
|
||||
sbar.btnDown.Paint = function(span, w, h) end
|
||||
sbar.btnGrip.Paint = function(span, w, h)
|
||||
srf.SetDrawColor(color_white)
|
||||
srf.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
local FilterPanel = vgui.Create("DPanel", blacklistWindow)
|
||||
FilterPanel:Dock(TOP)
|
||||
FilterPanel:DockMargin(ScreenScaleMulti(16), ScreenScaleMulti(2), ScreenScaleMulti(16), ScreenScaleMulti(2))
|
||||
FilterPanel:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(12))
|
||||
FilterPanel:SetPaintBackground(false)
|
||||
|
||||
local FilterLabel = vgui.Create("DLabel", FilterPanel)
|
||||
FilterLabel:Dock(LEFT)
|
||||
FilterLabel:SetWidth(ScreenScaleMulti(36))
|
||||
FilterLabel:DockMargin(ScreenScaleMulti(2), ScreenScaleMulti(2), ScreenScaleMulti(2), ScreenScaleMulti(2))
|
||||
FilterLabel:SetFont("ArcCW_12")
|
||||
FilterLabel:SetText("FILTER")
|
||||
|
||||
local FilterButton = vgui.Create("DButton", FilterPanel)
|
||||
FilterButton:SetFont("ArcCW_8")
|
||||
FilterButton:SetText("")
|
||||
FilterButton:SetSize(ScreenScaleMulti(48), ScreenScaleMulti(12))
|
||||
FilterButton:Dock(RIGHT)
|
||||
FilterButton:DockMargin(ScreenScaleMulti(1), 0, 0, 0)
|
||||
FilterButton:SetContentAlignment(5)
|
||||
|
||||
FilterButton.OnMousePressed = function(spaa, kc)
|
||||
onlyblacklisted = !onlyblacklisted
|
||||
|
||||
attList:GenerateButtonsToList()
|
||||
end
|
||||
|
||||
FilterButton.Paint = function(spaa, w, h)
|
||||
local hovered = spaa:IsHovered()
|
||||
|
||||
local Bfg_col = hovered and color_black or color_white
|
||||
local Bbg_col = hovered and color_white or color_arccwdtbl
|
||||
|
||||
srf.SetDrawColor(Bbg_col)
|
||||
srf.DrawRect(0, 0, w, h)
|
||||
|
||||
spaa:SetTextColor(Bfg_col)
|
||||
spaa:SetText(onlyblacklisted and "BLACKLISTED" or "ALL")
|
||||
end
|
||||
|
||||
local NameButton = vgui.Create("DButton", FilterPanel)
|
||||
NameButton:SetFont("ArcCW_8")
|
||||
NameButton:SetText("")
|
||||
NameButton:SetSize(ScreenScaleMulti(24), ScreenScaleMulti(12))
|
||||
NameButton:Dock(RIGHT)
|
||||
NameButton:DockMargin(ScreenScaleMulti(1), 0, 0, 0)
|
||||
NameButton:SetContentAlignment(5)
|
||||
|
||||
NameButton.OnMousePressed = function(spaa, kc)
|
||||
internalName = !internalName
|
||||
attList:GenerateButtonsToList()
|
||||
end
|
||||
|
||||
NameButton.Paint = function(spaa, w, h)
|
||||
local hovered = spaa:IsHovered()
|
||||
|
||||
local Bfg_col = hovered and color_black or color_white
|
||||
local Bbg_col = hovered and color_white or color_arccwdtbl
|
||||
|
||||
srf.SetDrawColor(Bbg_col)
|
||||
srf.DrawRect(0, 0, w, h)
|
||||
|
||||
spaa:SetTextColor(Bfg_col)
|
||||
spaa:SetText(internalName and "ID" or "NAME")
|
||||
end
|
||||
|
||||
local FilterEntry = vgui.Create("DTextEntry", FilterPanel)
|
||||
FilterEntry:Dock(FILL)
|
||||
FilterEntry:SetValue(filter)
|
||||
FilterEntry:SetFont("ArcCW_12")
|
||||
FilterEntry.OnChange = function( self )
|
||||
filter = self:GetValue():lower()
|
||||
|
||||
attList:GenerateButtonsToList()
|
||||
end
|
||||
|
||||
local accept = vgui.Create("DButton", blacklistWindow)
|
||||
accept:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(20))
|
||||
accept:SetText("")
|
||||
accept:Dock(BOTTOM)
|
||||
accept:DockMargin(ScreenScaleMulti(48), ScreenScaleMulti(2), ScreenScaleMulti(48), ScreenScaleMulti(2))
|
||||
accept:SetContentAlignment(5)
|
||||
|
||||
accept.OnMousePressed = function(spaa, kc)
|
||||
SaveBlacklist()
|
||||
|
||||
blacklistWindow:Close()
|
||||
blacklistWindow:Remove()
|
||||
end
|
||||
|
||||
accept.Paint = function(spaa, w, h)
|
||||
local hovered = spaa:IsHovered()
|
||||
|
||||
local Bfg_col = hovered and color_black or color_white
|
||||
local Bbg_col = hovered and color_white or color_arccwdtbl
|
||||
|
||||
srf.SetDrawColor(Bbg_col)
|
||||
srf.DrawRect(0, 0, w, h)
|
||||
|
||||
srf.SetTextColor(Bfg_col)
|
||||
srf.SetTextPos(ScreenScaleMulti(4), ScreenScaleMulti(4))
|
||||
srf.SetFont("ArcCW_12")
|
||||
srf.DrawText("Save")
|
||||
end
|
||||
|
||||
-- Perhaps unoptimized, but it's client
|
||||
-- client_side_calculations_is_not_expensive.png
|
||||
function attList:GenerateButtonsToList()
|
||||
self:GetCanvas():Clear()
|
||||
|
||||
for attName, attTbl in SortedPairsByMemberValue(ArcCW.AttachmentTable, "PrintName") do
|
||||
if attTbl.Hidden then continue end
|
||||
|
||||
if attTbl.Blacklisted then blacklistTbl[attName] = true end
|
||||
|
||||
if onlyblacklisted and !(attTbl.Blacklisted or blacklistTbl[attName]) then continue end
|
||||
|
||||
if filter != "" and !(string.find((attTbl.PrintName):lower(), filter) or string.find((attName):lower(), filter)) then continue end
|
||||
|
||||
--if attTbl.Slot == "charm" then continue end why the fuck would you do this
|
||||
|
||||
CreateAttButton(self, attName, attTbl)
|
||||
end
|
||||
end
|
||||
|
||||
attList:GenerateButtonsToList()
|
||||
end
|
||||
|
||||
concommand.Add("arccw_blacklist", function()
|
||||
if LocalPlayer():IsAdmin() then ArcCW.MakeBlacklistWindow() end
|
||||
end)
|
||||
162
lua/arccw/client/cl_convars.lua
Normal file
162
lua/arccw/client/cl_convars.lua
Normal file
@@ -0,0 +1,162 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
--[[
|
||||
ClientConVars table doc:
|
||||
name = data:
|
||||
def - default value
|
||||
desc - description of var
|
||||
min - minimum value
|
||||
max - maximum value
|
||||
usri - userinfo
|
||||
save - whether to save (default true)
|
||||
]]
|
||||
|
||||
ArcCW.ClientConVars = {
|
||||
["arccw_bullet_imaginary"] = { def = 1 },
|
||||
|
||||
["arccw_crosshair"] = { def = 1 },
|
||||
["arccw_crosshair_clr_r"] = { def = 255 },
|
||||
["arccw_crosshair_clr_g"] = { def = 255 },
|
||||
["arccw_crosshair_clr_b"] = { def = 255 },
|
||||
["arccw_crosshair_clr_a"] = { def = 255 },
|
||||
["arccw_crosshair_length"] = { def = 4 },
|
||||
["arccw_crosshair_thickness"] = { def = 1 },
|
||||
["arccw_crosshair_gap"] = { def = 1 },
|
||||
["arccw_crosshair_static"] = { def = 0 },
|
||||
["arccw_crosshair_clump"] = { def = 0 },
|
||||
["arccw_crosshair_clump_outline"] = { def = 0 },
|
||||
["arccw_crosshair_clump_always"] = { def = 0 },
|
||||
["arccw_crosshair_outline"] = { def = 2 },
|
||||
["arccw_crosshair_outline_r"] = { def = 0 },
|
||||
["arccw_crosshair_outline_g"] = { def = 0 },
|
||||
["arccw_crosshair_outline_b"] = { def = 0 },
|
||||
["arccw_crosshair_outline_a"] = { def = 255 },
|
||||
["arccw_crosshair_dot"] = { def = 1 },
|
||||
["arccw_crosshair_shotgun"] = { def = 1 },
|
||||
["arccw_crosshair_equip"] = { def = 1 },
|
||||
["arccw_crosshair_aa"] = { def = 1 },
|
||||
["arccw_crosshair_trueaim"] = { def = 0 },
|
||||
["arccw_crosshair_prong_top"] = { def = 1 },
|
||||
["arccw_crosshair_prong_left"] = { def = 1 },
|
||||
["arccw_crosshair_prong_right"] = { def = 1 },
|
||||
["arccw_crosshair_prong_bottom"] = { def = 1 },
|
||||
["arccw_crosshair_tilt"] = { def = 0 },
|
||||
|
||||
["arccw_attinv_simpleproscons"] = { def = 0 },
|
||||
["arccw_attinv_onlyinspect"] = { def = 0 },
|
||||
["arccw_attinv_hideunowned"] = { def = 0 },
|
||||
["arccw_attinv_darkunowned"] = { def = 0 },
|
||||
["arccw_attinv_closeonhurt"] = { def = 0, usri = true },
|
||||
["arccw_attinv_gamemodebuttons"] = { def = 1 },
|
||||
|
||||
["arccw_language"] = { def = "", usri = true },
|
||||
["arccw_font"] = { def = "", usri = true },
|
||||
["arccw_ammonames"] = { def = 0 },
|
||||
|
||||
["arccw_cheapscopes"] = { def = 1 },
|
||||
["arccw_cheapscopesv2_ratio"] = { def = 0.05 },
|
||||
["arccw_scopepp"] = { def = 1 },
|
||||
["arccw_thermalpp"] = { def = 1 },
|
||||
["arccw_scopepp_refract"] = { def = 0 },
|
||||
["arccw_scopepp_refract_ratio"] = { def = 0.75 },
|
||||
|
||||
["arccw_cheapscopesautoconfig"] = { def = 0 }, -- what this for
|
||||
|
||||
--["arccw_flatscopes"] = { def = 0 },
|
||||
|
||||
["arccw_shake"] = { def = 1 },
|
||||
["arccw_shakevm"] = { def = 1 },
|
||||
["arccw_muzzleeffects"] = { def = 1 },
|
||||
["arccw_shelleffects"] = { def = 1 },
|
||||
["arccw_shelltime"] = { def = 0 },
|
||||
["arccw_att_showothers"] = { def = 1 },
|
||||
["arccw_att_showground"] = { def = 1 },
|
||||
["arccw_visibility"] = { def = 8000 },
|
||||
["arccw_fastmuzzles"] = { def = 0 },
|
||||
["arccw_fasttracers"] = { def = 0 },
|
||||
|
||||
["arccw_2d3d"] = { def = 1, min = 0, max = 2},
|
||||
|
||||
["arccw_hud_3dfun"] = { def = 0, usri = true },
|
||||
["arccw_hud_3dfun_lite"] = { def = 0 },
|
||||
["arccw_hud_3dfun_ammotype"] = { def = 0 },
|
||||
["arccw_hud_forceshow"] = { def = 0 },
|
||||
["arccw_hud_fcgbars"] = { def = 1, desc = "Draw firemode bars on ammo HUD." },
|
||||
["arccw_hud_fcgabbrev"] = { def = 0, desc = "Use shortened firemode names."},
|
||||
["arccw_hud_minimal"] = { def = 1, desc = "Backup HUD if we cannot draw the ammo HUD." },
|
||||
["arccw_hud_embracetradition"] = { def = 0, desc = "Use the classic customization HUD." },
|
||||
["arccw_hud_deadzone_x"] = { def = 0 },
|
||||
["arccw_hud_deadzone_y"] = { def = 0 },
|
||||
["arccw_hud_3dfun_decaytime"] = { def = 3 },
|
||||
["arccw_hud_3dfun_right"] = { def = 2 },
|
||||
["arccw_hud_3dfun_up"] = { def = 1 },
|
||||
["arccw_hud_3dfun_forward"] = { def = 0 },
|
||||
["arccw_hud_size"] = { def = 1 },
|
||||
|
||||
["arccw_cust_sounds"] = { def = 1, desc = "Play sounds when opening and closing the customization menu." },
|
||||
|
||||
["arccw_scope_r"] = { def = 255 },
|
||||
["arccw_scope_g"] = { def = 0 },
|
||||
["arccw_scope_b"] = { def = 0 },
|
||||
|
||||
["arccw_blur"] = { def = 0 },
|
||||
["arccw_blur_toytown"] = { def = 1 },
|
||||
|
||||
["arccw_adjustsensthreshold"] = { def = 0 },
|
||||
|
||||
["arccw_drawbarrel"] = { def = 0 },
|
||||
|
||||
["arccw_glare"] = { def = 1 },
|
||||
["arccw_autosave"] = { def = 1 },
|
||||
|
||||
["arccw_vm_right"] = { def = 0 },
|
||||
["arccw_vm_up"] = { def = 0 },
|
||||
["arccw_vm_forward"] = { def = 0 },
|
||||
["arccw_vm_pitch"] = { def = 0 },
|
||||
["arccw_vm_yaw"] = { def = 0 },
|
||||
["arccw_vm_roll"] = { def = 0 },
|
||||
["arccw_vm_fov"] = { def = 0, usri = true },
|
||||
["arccw_vm_add_ads"] = { def = 0},
|
||||
["arccw_vm_coolsway"] = { def = 1 },
|
||||
["arccw_vm_coolview"] = { def = 1 },
|
||||
["arccw_vm_coolview_mult"] = { def = 1 },
|
||||
["arccw_vm_look_xmult"] = { def = 1 },
|
||||
["arccw_vm_look_ymult"] = { def = 1 },
|
||||
["arccw_vm_sway_xmult"] = { def = 1 },
|
||||
["arccw_vm_sway_ymult"] = { def = 1 },
|
||||
["arccw_vm_sway_zmult"] = { def = 1 },
|
||||
|
||||
["arccw_vm_sway_speedmult"] = { def = 1 },
|
||||
["arccw_vm_nearwall"] = { def = 1 },
|
||||
|
||||
["arccw_toggleads"] = { def = 0, usri = true },
|
||||
["arccw_altbindsonly"] = { def = 0, usri = true },
|
||||
["arccw_altsafety"] = { def = 0, usri = true },
|
||||
["arccw_automaticreload"] = { def = 0, usri = true },
|
||||
|
||||
["arccw_nohl2flash"] = { def = 0, usri = true },
|
||||
|
||||
["arccw_aimassist_cl"] = { def = 0, usri = true },
|
||||
|
||||
["arccw_dev_benchgun"] = { def = 0, save = false },
|
||||
["arccw_dev_benchgun_custom"] = { def = "", save = false },
|
||||
|
||||
["arccw_dev_removeonclose"] = { def = 0, desc = "Remove the hud when closing instead of fading out, allowing easy reloading of the hud.", save = false },
|
||||
["arccw_noinspect"] = { def = 0, usri = true },
|
||||
|
||||
["arccw_dev_crosshair"] = { def = 0, save = false },
|
||||
}
|
||||
|
||||
for name, data in pairs(ArcCW.ClientConVars) do
|
||||
ArcCW.ConVars[string.sub(name, 7)] = CreateClientConVar(name, data.def, data.save == nil and true or data.save, data.usri or false, data.desc, data.min, data.max)
|
||||
end
|
||||
|
||||
-- CreateClientConVar("arccw_quicknade", KEY_G)
|
||||
100
lua/arccw/client/cl_garbage.lua
Normal file
100
lua/arccw/client/cl_garbage.lua
Normal file
@@ -0,0 +1,100 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ArcCW.CSModels = {} -- [entid] = { Weapon = NULL, WModels = {}, VModels = {} }
|
||||
ArcCW.CSModelPile = {} -- { {Model = NULL, Weapon = NULL} }
|
||||
ArcCW.FlashlightPile = {} -- { {Weapon = NULL, ProjectedTexture = NULL}}
|
||||
ArcCW.ReferenceModel = NULL
|
||||
|
||||
local function ArcCW_CollectGarbage()
|
||||
local removed, removedents = 0, {}
|
||||
|
||||
for i, k in pairs(ArcCW.CSModels) do
|
||||
if !IsValid(k.Weapon) then
|
||||
removed = removed + 1
|
||||
|
||||
table.insert(removedents, i)
|
||||
|
||||
if k.WModels then for _, m in pairs(k.WModels) do SafeRemoveEntity(m.Model) end end
|
||||
if k.VModels then for _, m in pairs(k.VModels) do SafeRemoveEntity(m.Model) end end
|
||||
end
|
||||
end
|
||||
|
||||
for _, i in pairs(removedents) do ArcCW.CSModels[i] = nil end
|
||||
|
||||
local newpile = {}
|
||||
|
||||
for _, k in pairs(ArcCW.CSModelPile) do
|
||||
if IsValid(k.Weapon) then
|
||||
table.insert(newpile, k)
|
||||
|
||||
continue
|
||||
end
|
||||
|
||||
SafeRemoveEntity(k.Model)
|
||||
|
||||
removed = removed + 1
|
||||
end
|
||||
|
||||
ArcCW.CSModelPile = newpile
|
||||
|
||||
if GetConVar("developer"):GetBool() and removed > 0 then
|
||||
print("Removed " .. tostring(removed) .. " CSModels")
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("PostCleanupMap", "ArcCW_CleanGarbage", function()
|
||||
ArcCW_CollectGarbage()
|
||||
end)
|
||||
|
||||
timer.Create("ArcCW CSModel Garbage Collector", 5, 0, ArcCW_CollectGarbage)
|
||||
|
||||
hook.Add("PostDrawEffects", "ArcCW_CleanFlashlights", function()
|
||||
local newflashlightpile = {}
|
||||
|
||||
for _, k in pairs(ArcCW.FlashlightPile) do
|
||||
if IsValid(k.Weapon) and k.Weapon == LocalPlayer():GetActiveWeapon() then
|
||||
table.insert(newflashlightpile, k)
|
||||
|
||||
continue
|
||||
end
|
||||
|
||||
if k.ProjectedTexture and k.ProjectedTexture:IsValid() then
|
||||
k.ProjectedTexture:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
ArcCW.FlashlightPile = newflashlightpile
|
||||
|
||||
local wpn = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !wpn then return end
|
||||
if !IsValid(wpn) then return end
|
||||
if !wpn.ArcCW then return end
|
||||
|
||||
if GetViewEntity() == LocalPlayer() then return end
|
||||
|
||||
wpn:KillFlashlightsVM()
|
||||
end)
|
||||
|
||||
concommand.Add("arccw_dev_loadallattmodels", function()
|
||||
local e = ClientsideModel("models/weapons/v_pistol.mdl")
|
||||
print("created subject", e)
|
||||
|
||||
for i, v in pairs(ArcCW.AttachmentTable) do
|
||||
if v.Model then
|
||||
print("\t- " .. v.Model)
|
||||
e:SetModel(v.Model)
|
||||
end
|
||||
end
|
||||
|
||||
print("removed subject", e)
|
||||
e:Remove()
|
||||
end)
|
||||
72
lua/arccw/client/cl_glint.lua
Normal file
72
lua/arccw/client/cl_glint.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
--[[
|
||||
| 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 rnd = render
|
||||
local r_lightcol = rnd.GetLightColor
|
||||
|
||||
local glintmat = Material("effects/blueflare1")
|
||||
|
||||
local players
|
||||
local playerssaver = {}
|
||||
|
||||
hook.Add("PostDrawEffects", "ArcCW_ScopeGlint", function()
|
||||
if playerssaver != players then -- less calls on GetAll
|
||||
players = player.GetAll()
|
||||
playerssaver = players
|
||||
end
|
||||
|
||||
cam.Start3D()
|
||||
for _, ply in ipairs(players) do
|
||||
if !IsValid(ply) then continue end
|
||||
|
||||
if ply == LocalPlayer() and !ply:ShouldDrawLocalPlayer() then continue end
|
||||
|
||||
local wep = ply:GetActiveWeapon()
|
||||
|
||||
if !(IsValid(wep) and wep.ArcCW) then continue end
|
||||
|
||||
if !wep:GetBuff_Override("ScopeGlint") then continue end
|
||||
|
||||
if wep:GetState() != ArcCW.STATE_SIGHTS then continue end
|
||||
|
||||
local vec = (ply:EyePos() - EyePos()):GetNormalized()
|
||||
local dot = vec:Dot(-ply:EyeAngles():Forward())
|
||||
|
||||
dot = (dot * dot * 1.75) - 0.75
|
||||
dot = dot * (0.5 + (1 - wep:GetSightDelta()) * 0.5)
|
||||
|
||||
if dot < 0 then continue end
|
||||
|
||||
local pos = ply:EyePos() + (ply:EyeAngles():Forward() * 16) + (ply:EyeAngles():Right() * 8)
|
||||
|
||||
local _, scope_i = wep:GetBuff_Override("ScopeGlint")
|
||||
|
||||
if scope_i then
|
||||
local world = (wep.Attachments[scope_i].WElement or {}).Model
|
||||
|
||||
if world and IsValid(world) then
|
||||
local att = world:LookupAttachment("holosight") or world:LookupAttachment("scope")
|
||||
|
||||
if att then pos = world:GetAttachment(att).Pos end
|
||||
end
|
||||
end
|
||||
|
||||
local lcolpos = r_lightcol(pos):Length()
|
||||
local lcoleye = r_lightcol(EyePos()):Length()
|
||||
|
||||
local mag = wep:GetBuff_Mult("Mult_GlintMagnitude") or 1
|
||||
local intensity = math.min(0.2 + (lcolpos + lcoleye) / 2 * 1, 1) * mag
|
||||
local col = 255 * intensity
|
||||
|
||||
rnd.SetMaterial(glintmat)
|
||||
rnd.DrawSprite(pos, 96 * dot, 96 * dot, Color(col, col, col))
|
||||
end
|
||||
cam.End3D()
|
||||
end)
|
||||
290
lua/arccw/client/cl_hud.lua
Normal file
290
lua/arccw/client/cl_hud.lua
Normal file
@@ -0,0 +1,290 @@
|
||||
--[[
|
||||
| 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 hide = {
|
||||
["CHudHealth"] = true,
|
||||
["CHudBattery"] = true,
|
||||
["CHudAmmo"] = true,
|
||||
["CHudSecondaryAmmo"] = true,
|
||||
}
|
||||
|
||||
CreateClientConVar("arccw_hud_togglestats", "0")
|
||||
|
||||
ArcCW.HUDElementConVars = {
|
||||
["CHudHealth"] = CreateClientConVar("arccw_hud_showhealth", "1"),
|
||||
["CHudBattery"] = ArcCW.ConVars["hud_showhealth"],
|
||||
["CHudAmmo"] = CreateClientConVar("arccw_hud_showammo", "1"),
|
||||
["CHudSecondaryAmmo"] = ArcCW.ConVars["hud_showammo"],
|
||||
}
|
||||
|
||||
local grad = Material("arccw/hud/grad.png", "mips smooth")
|
||||
hook.Add("PreDrawViewModels", "ArcCW_PreDrawViewmodels_Grad", function()
|
||||
if ArcCW.InvHUD and !grad:IsError() then
|
||||
render.SetViewPort( 0, 0, ScrW(), ScrH() )
|
||||
cam.Start2D()
|
||||
surface.SetDrawColor(Color(255, 255, 255, Lerp(ArcCW.Inv_Fade-0.01, 0, 255)))
|
||||
surface.SetMaterial(grad)
|
||||
surface.DrawTexturedRect(0, 0, ScrW(), ScrH())
|
||||
cam.End2D()
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("HUDShouldDraw", "ArcCW_HideHUD", function(name)
|
||||
if !hide[name] then return end
|
||||
if !LocalPlayer():IsValid() then return end
|
||||
if !LocalPlayer():GetActiveWeapon().ArcCW then return end
|
||||
if ArcCW.ConVars["override_hud_off"]:GetBool() then return end
|
||||
if ArcCW.PollingDefaultHUDElements then return end
|
||||
if ArcCW.HUDElementConVars[name] and ArcCW.HUDElementConVars[name]:GetBool() == false then return end
|
||||
if engine.ActiveGamemode() == "terrortown" then return end
|
||||
|
||||
return false
|
||||
end)
|
||||
|
||||
hook.Add("RenderScreenspaceEffects", "ArcCW_ToyTown", function()
|
||||
if !LocalPlayer():IsValid() then return end
|
||||
local wpn = LocalPlayer():GetActiveWeapon()
|
||||
if !IsValid(wpn) then return end
|
||||
|
||||
if !wpn.ArcCW then return end
|
||||
|
||||
local delta = wpn:GetSightDelta()
|
||||
|
||||
if delta < 1 then
|
||||
wpn:DoToyTown()
|
||||
end
|
||||
end)
|
||||
|
||||
ArcCW.PollingDefaultHUDElements = false
|
||||
|
||||
function ArcCW:ShouldDrawHUDElement(ele)
|
||||
if !GetConVar("cl_drawhud"):GetBool() then return false end
|
||||
if ArcCW.ConVars["override_hud_off"]:GetBool() then return false end
|
||||
|
||||
if engine.ActiveGamemode() == "terrortown" and (ele != "CHudAmmo") then return false end
|
||||
|
||||
if ArcCW.HUDElementConVars[ele] and !ArcCW.HUDElementConVars[ele]:GetBool() then
|
||||
return false
|
||||
end
|
||||
|
||||
ArcCW.PollingDefaultHUDElements = true
|
||||
|
||||
if !ArcCW.ConVars["hud_forceshow"]:GetBool() and hook.Call("HUDShouldDraw", nil, ele) == false then
|
||||
ArcCW.PollingDefaultHUDElements = false
|
||||
return false
|
||||
end
|
||||
|
||||
ArcCW.PollingDefaultHUDElements = false
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local function GetFont()
|
||||
local font = "Bahnschrift"
|
||||
|
||||
if ArcCW.GetTranslation("default_font") then
|
||||
font = ArcCW.GetTranslation("default_font")
|
||||
end
|
||||
|
||||
if ArcCW.ConVars["font"]:GetString() != "" then
|
||||
font = ArcCW.ConVars["font"]:GetString()
|
||||
end
|
||||
|
||||
return font
|
||||
end
|
||||
|
||||
-- Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes. Yes.
|
||||
-- What is the size of your ass. What is it. Tell me.
|
||||
local ScreenScale_CacheC2 = {}
|
||||
ArcCW.AugmentedScreenScale = function(size)
|
||||
if ScreenScale_CacheC2[size] then return ScreenScale_CacheC2[size] end
|
||||
|
||||
local scrw, scrh = ScrW(), ScrH()
|
||||
if vrmod and vrmod.IsPlayerInVR(LocalPlayer()) then
|
||||
-- Other resolutions seem to cause stretching issues
|
||||
scrw = 1366
|
||||
scrh = 768
|
||||
end
|
||||
|
||||
local scrwmult = ArcCW.ConVars["hud_deadzone_x"]:GetFloat() * scrw
|
||||
local scrhmult = ArcCW.ConVars["hud_deadzone_y"]:GetFloat() * scrh
|
||||
|
||||
scrw, scrh = scrw - scrwmult, scrh - scrhmult
|
||||
|
||||
local r = size
|
||||
r = r * (math.max(scrw, scrh) / 800)
|
||||
r = r * ArcCW.ConVars["hud_size"]:GetFloat()
|
||||
ScreenScale_CacheC2[size] = r
|
||||
return r
|
||||
end
|
||||
|
||||
local sizes_to_make = {
|
||||
6,
|
||||
8,
|
||||
10,
|
||||
12,
|
||||
14,
|
||||
16,
|
||||
20,
|
||||
24,
|
||||
26,
|
||||
32
|
||||
}
|
||||
|
||||
local sizes_to_make_cust2 = {
|
||||
8,
|
||||
10,
|
||||
12,
|
||||
14,
|
||||
16,
|
||||
24,
|
||||
32
|
||||
}
|
||||
|
||||
local unscaled_sizes_to_make = {
|
||||
32,
|
||||
24
|
||||
}
|
||||
|
||||
local function generatefonts()
|
||||
|
||||
for _, i in pairs(sizes_to_make) do
|
||||
|
||||
surface.CreateFont( "ArcCW_" .. tostring(i), {
|
||||
font = GetFont(),
|
||||
size = ScreenScale(i) * ArcCW.ConVars["hud_size"]:GetFloat(),
|
||||
weight = 0,
|
||||
antialias = true,
|
||||
extended = true, -- Required for non-latin fonts
|
||||
} )
|
||||
|
||||
surface.CreateFont( "ArcCW_" .. tostring(i) .. "_Glow", {
|
||||
font = GetFont(),
|
||||
size = ScreenScale(i) * ArcCW.ConVars["hud_size"]:GetFloat(),
|
||||
weight = 0,
|
||||
antialias = true,
|
||||
blursize = 6,
|
||||
extended = true,
|
||||
} )
|
||||
|
||||
end
|
||||
|
||||
for _, i in pairs(sizes_to_make_cust2) do
|
||||
|
||||
surface.CreateFont( "ArcCWC2_" .. tostring(i), {
|
||||
font = GetFont(),
|
||||
size = ArcCW.AugmentedScreenScale(i) * ArcCW.ConVars["hud_size"]:GetFloat(),
|
||||
weight = 0,
|
||||
antialias = true,
|
||||
extended = true, -- Required for non-latin fonts
|
||||
} )
|
||||
|
||||
surface.CreateFont( "ArcCWC2_" .. tostring(i) .. "_Glow", {
|
||||
font = GetFont(),
|
||||
size = ArcCW.AugmentedScreenScale(i) * ArcCW.ConVars["hud_size"]:GetFloat(),
|
||||
weight = 0,
|
||||
antialias = true,
|
||||
blursize = 6,
|
||||
extended = true,
|
||||
} )
|
||||
|
||||
end
|
||||
|
||||
for _, i in pairs(unscaled_sizes_to_make) do
|
||||
|
||||
surface.CreateFont( "ArcCW_" .. tostring(i) .. "_Unscaled", {
|
||||
font = GetFont(),
|
||||
size = i,
|
||||
weight = 0,
|
||||
antialias = true,
|
||||
extended = true,
|
||||
} )
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local og_ScreenScale = ScreenScale
|
||||
|
||||
local ScreenScale_Cache = {}
|
||||
|
||||
function ScreenScale(a)
|
||||
if ScreenScale_Cache[a] then return ScreenScale_Cache[a] end
|
||||
|
||||
ScreenScale_Cache[a] = og_ScreenScale(a)
|
||||
return ScreenScale_Cache[a]
|
||||
end
|
||||
|
||||
language.Add("SniperPenetratedRound_ammo", "Sniper Ammo")
|
||||
|
||||
generatefonts()
|
||||
function ArcCW_Regen(full)
|
||||
if full then
|
||||
generatefonts()
|
||||
ScreenScale_Cache = {}
|
||||
ScreenScale_CacheC2 = {}
|
||||
end
|
||||
if IsValid(ArcCW.InvHUD) then
|
||||
ArcCW.InvHUD:Clear()
|
||||
ArcCW.InvHUD:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
--cvars.AddChangeCallback("arccw_dev_cust2beta", function() ArcCW_Regen(true) end)
|
||||
cvars.AddChangeCallback("arccw_hud_deadzone_x", function() ArcCW_Regen(true) end)
|
||||
cvars.AddChangeCallback("arccw_hud_deadzone_y", function() ArcCW_Regen(true) end)
|
||||
cvars.AddChangeCallback("arccw_hud_size", function() ArcCW_Regen(true) end)
|
||||
cvars.AddChangeCallback("arccw_font", function() ArcCW_Regen(true) end)
|
||||
hook.Add( "OnScreenSizeChanged", "ArcCW_Regen", function() ArcCW_Regen(true) end)
|
||||
|
||||
-- surface.CreateFont( "ArcCW_12", {
|
||||
-- font = font,
|
||||
-- size = ScreenScale(12),
|
||||
-- weight = 0,
|
||||
-- antialias = true,
|
||||
-- } )
|
||||
|
||||
-- surface.CreateFont( "ArcCW_12_Glow", {
|
||||
-- font = font,
|
||||
-- size = ScreenScale(12),
|
||||
-- weight = 0,
|
||||
-- antialias = true,
|
||||
-- blursize = 8,
|
||||
-- } )
|
||||
|
||||
-- surface.CreateFont( "ArcCW_16", {
|
||||
-- font = font,
|
||||
-- size = ScreenScale(16),
|
||||
-- weight = 0,
|
||||
-- antialias = true,
|
||||
-- } )
|
||||
|
||||
-- surface.CreateFont( "ArcCW_16_Glow", {
|
||||
-- font = font,
|
||||
-- size = ScreenScale(16),
|
||||
-- weight = 0,
|
||||
-- antialias = true,
|
||||
-- blursize = 8,
|
||||
-- } )
|
||||
|
||||
-- surface.CreateFont( "ArcCW_26", {
|
||||
-- font = font,
|
||||
-- size = ScreenScale(26),
|
||||
-- weight = 0,
|
||||
-- antialias = true,
|
||||
-- } )
|
||||
|
||||
-- surface.CreateFont( "ArcCW_26_Glow", {
|
||||
-- font = font,
|
||||
-- size = ScreenScale(26),
|
||||
-- weight = 0,
|
||||
-- antialias = true,
|
||||
-- blursize = 8,
|
||||
-- } )
|
||||
424
lua/arccw/client/cl_languages/en.lua
Normal file
424
lua/arccw/client/cl_languages/en.lua
Normal file
@@ -0,0 +1,424 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
-- These strings are loaded into GMod's language library instead of our custom one.
|
||||
-- They are only to be used in the options menu.
|
||||
L = {}
|
||||
|
||||
-- Generic
|
||||
L["arccw.adminonly"] = "These options require admin privileges to change. They are automatically networked in multiplayer games."
|
||||
L["arccw.clientcfg"] = "All options in this menu can be customized by players, and do not need admin privileges."
|
||||
-- Menus
|
||||
L["arccw.menus.hud"] = "HUD"
|
||||
L["arccw.menus.client"] = "Client"
|
||||
L["arccw.menus.vmodel"] = "Viewmodel"
|
||||
L["arccw.menus.perf"] = "Performance"
|
||||
L["arccw.menus.server"] = "Server"
|
||||
L["arccw.menus.mults"] = "Modifiers"
|
||||
L["arccw.menus.npcs"] = "NPCs"
|
||||
L["arccw.menus.atts"] = "Attachments"
|
||||
L["arccw.menus.ammo"] = "Ammo"
|
||||
L["arccw.menus.dev"] = "Developer"
|
||||
L["arccw.menus.xhair"] = "Crosshair"
|
||||
L["arccw.menus.bullet"] = "Bullet Physics"
|
||||
L["arccw.menus.scopes"] = "Scopes"
|
||||
L["arccw.bullet_help"] = "\nEnabling physical bullets in multiplayer may reduce the reliability of hit detection."
|
||||
-- ArcCW_Options_Ammo
|
||||
L["arccw.cvar.ammo_detonationmode"] = "Ammo Detonation"
|
||||
L["arccw.cvar.ammo_detonationmode.desc"] = "-1 - don't explode\n 0 - simple explosion\n 1 - fragmentation\n 2 - frag + burning"
|
||||
L["arccw.cvar.ammo_autopickup"] = "Auto Pickup"
|
||||
L["arccw.cvar.ammo_largetrigger"] = "Large Pickup Trigger"
|
||||
L["arccw.cvar.ammo_rareskin"] = "Rare Skin Chance"
|
||||
L["arccw.cvar.ammo_chaindet"] = "Chain Detonation"
|
||||
L["arccw.cvar.mult_ammohealth"] = "Ammo Health (-1 for indestructible)"
|
||||
L["arccw.cvar.mult_ammoamount"] = "Ammo Amount"
|
||||
-- ArcCW_Options_HUD
|
||||
L["arccw.cvar.hud_showhealth"] = "Show Health"
|
||||
L["arccw.cvar.hud_showhealth.desc"] = "Draw a custom health & armor counter."
|
||||
L["arccw.cvar.hud_showammo"] = "Show Ammo"
|
||||
L["arccw.cvar.hud_showammo.desc"] = "Custom ammo counter with firemode info and weapon name."
|
||||
L["arccw.3d2d"] = "\n3D2D HUD" -- Obsolete
|
||||
L["arccw.cvar.hud_3dfun"] = "Use 3D2D Ammo HUD"
|
||||
L["arccw.cvar.hud_3dfun.desc"] = "Use a 3D2D ammo counter."
|
||||
L["arccw.cvar.hud_3dfun_decay"] = "HUD Decay Time"
|
||||
L["arccw.cvar.hud_3dfun_decay.desc"] = "Time until the HUD starts fading away.\nSet to 0 to always stay visible."
|
||||
L["arccw.cvar.hud_minimal"] = "Allow Backup Ammo HUD"
|
||||
L["arccw.cvar.hud_minimal.desc"] = "If we can't draw our own HUD, use a minimal one."
|
||||
L["arccw.cvar.hud_forceshow"] = "Force HUD On"
|
||||
L["arccw.cvar.hud_forceshow.desc"] = "Don't play by the rules and draw our HUD anyways."
|
||||
L["arccw.cvar.hudpos_deadzone_x"] = "Deadzone X"
|
||||
L["arccw.cvar.hudpos_deadzone_y"] = "Deadzone Y"
|
||||
L["arccw.cvar.hudpos_deadzone.desc"] = "Use ArcCW on your HDTV!"
|
||||
L["arccw.cvar.hudpos_size"] = "HUD and Font Size"
|
||||
L["arccw.cvar.hudpos_size.desc"] = "Custom HUD scaling."
|
||||
-- ArcCW_Options_Bullet
|
||||
L["arccw.cvar.bullet_enable"] = "Physical Bullets"
|
||||
L["arccw.cvar.enable_penetration"] = "Enable Penetration"
|
||||
L["arccw.cvar.enable_ricochet"] = "Enable Ricochet"
|
||||
L["arccw.cvar.bullet_gravity"] = "Gravity"
|
||||
L["arccw.cvar.bullet_drag"] = "Drag"
|
||||
L["arccw.cvar.bullet_lifetime"] = "Despawn Time"
|
||||
L["arccw.cvar.bullet_velocity"] = "Multiply Velocity"
|
||||
L["arccw.cvar.bullet_imaginary"] = "Imaginary Bullets"
|
||||
L["arccw.cvar.bullet_imaginary.desc"] = "Bullets will appear to continue to travel through the 3D skybox."
|
||||
-- ArcCW_Options_Client
|
||||
L["arccw.cvar.automaticreload"] = "Automatic Reload"
|
||||
L["arccw.cvar.automaticreload.desc"] = "Automatically reload when your clip is empty."
|
||||
L["arccw.cvar.toggleads"] = "Toggle Aim"
|
||||
L["arccw.cvar.altfcgkey"] = "USE + RELOAD Toggles Firemode"
|
||||
L["arccw.cvar.altubglkey"] = "USE + RMB Toggles Underbarrel"
|
||||
L["arccw.cvar.altsafety"] = "Hold Walk to Toggle Safety"
|
||||
L["arccw.cvar.altlaserkey"] = "E+WALK To Toggle Laser (Default WALK+E)"
|
||||
L["arccw.cvar.autosave"] = "Autosave Attachments"
|
||||
L["arccw.cvar.autosave.desc"] = "Attempt to re-equip the last equipped set of attachments on weapon pickup."
|
||||
L["arccw.cvar.embracetradition"] = "Classic Customization HUD"
|
||||
L["arccw.cvar.embracetradition.desc"] = "Use the classic bulky customization HUD. Embrace tradition. Good on 4:3."
|
||||
L["arccw.cvar.glare"] = "Scope Glare"
|
||||
L["arccw.cvar.glare.desc"] = "Glare visible on your scope lens when aiming."
|
||||
L["arccw.cvar.shake"] = "Screen Shake"
|
||||
L["arccw.cvar.shakevm"] = "Viewmodel Shake"
|
||||
L["arccw.cvar.shake_info"] = "Aggressive snap when you shoot a weapon."
|
||||
L["arccw.cvar.2d3d"] = "Draw Help Text"
|
||||
L["arccw.cvar.2d3d_info"] = "Draw name of weapons, ammo and attachments on the ground."
|
||||
L["arccw.cvar.attinv_hideunowned"] = "Hide Unowned Attachments"
|
||||
L["arccw.cvar.attinv_darkunowned"] = "Grey Out Unowned Attachments"
|
||||
L["arccw.cvar.attinv_onlyinspect"] = "Hide Customization UI"
|
||||
L["arccw.cvar.attinv_simpleproscons"] = "Simple Pros And Cons"
|
||||
L["arccw.cvar.attinv_closeonhurt"] = "Close menu on damage taken"
|
||||
L["arccw.cvar.language"] = "Language"
|
||||
L["arccw.cvar.language_info"] = "Override the language. Leave blank for gmod_language."
|
||||
L["arccw.cvar.font"] = "Font"
|
||||
L["arccw.cvar.font_info"] = "Override the font. Leave blank for default."
|
||||
-- ArcCW_Options_Perf
|
||||
L["arccw.performance"] = "The options below may change performance."
|
||||
L["arccw.cvar.cheapscopes"] = "Cheap Scopes"
|
||||
L["arccw.cvar.cheapscopes.desc"] = "A cheaper PIP scope implementation like in modern games. Saves a significant amount of performance on big maps. \nYou can configure it in 'Scopes' tab."
|
||||
L["arccw.cvar.cheapscopesv2_ratio"] = "FOV Boost"
|
||||
L["arccw.cvar.cheapscopesv2_ratio.desc"] = "Cheap Scope field of view boost ratio. 0 is full FOV and full quality scope, 1 is default FOV with low quality scope."
|
||||
L["arccw.cvar.cheapscopesv2.desc"] = "A cheaper PIP scope implementation like in modern games."
|
||||
L["arccw.cvar.scopepp"] = "Scope chromatic aberration"
|
||||
L["arccw.cvar.thermalpp"] = "Thermal scope post-processing effects"
|
||||
L["arccw.cvar.scopepp_refract"] = "Scope lense refract effect (experimental)"
|
||||
L["arccw.cvar.scopepp_refract_ratio"] = "Refract ratio"
|
||||
--["arccw.cvar.flatscopes"] = "Flat Scopes"
|
||||
--L["arccw.cvar.flatscopes.desc"] = "For the ultimate performance gain.\nUse a traditional-style scope implementation that's not very impressive, but actually saves performance relative to even being unscoped."
|
||||
L["arccw.cvar.muzzleeffects"] = "Enable World Muzzle Effects"
|
||||
L["arccw.cvar.fastmuzzles"] = "Low Performance Muzzle Effects"
|
||||
L["arccw.cvar.fasttracers"] = "Low Performance Tracer Effects"
|
||||
L["arccw.cvar.shelleffects"] = "Enable World Case Effects"
|
||||
L["arccw.cvar.att_showothers"] = "Show Others' Attachments"
|
||||
L["arccw.cvar.shelltime"] = "Case Lifetime"
|
||||
L["arccw.cvar.blur"] = "Customization Blur"
|
||||
L["arccw.cvar.blur_toytown"] = "Aim Blur"
|
||||
L["arccw.cvar.visibility"] = "Worldmodel Visibility"
|
||||
L["arccw.cvar.visibility.desc"] = "Attachments will not render past this distance. -1 for always render."
|
||||
-- ArcCW_Options_Viewmodel
|
||||
L["arccw.cvar.vm_coolsway"] = "Custom Swaying"
|
||||
L["arccw.cvar.vm_coolview"] = "Custom Camera Movement"
|
||||
L["arccw.cvar.drawbarrel"] = "Draw barrel in RT scopes (experimental)"
|
||||
L["arccw.cvar.vm_addads"] = "Viewmodel FOV in ADS"
|
||||
L["arccw.cvar.vm_right"] = "Viewmodel Right"
|
||||
L["arccw.cvar.vm_forward"] = "Viewmodel Forward"
|
||||
L["arccw.cvar.vm_up"] = "Viewmodel Up"
|
||||
L["arccw.cvar.vm_pitch"] = "Viewmodel Pitch"
|
||||
L["arccw.cvar.vm_yaw"] = "Viewmodel Yaw"
|
||||
L["arccw.cvar.vm_roll"] = "Viewmodel Roll"
|
||||
L["arccw.cvar.vm_fov"] = "Viewmodel FOV"
|
||||
L["arccw.cvar.vm_offsetwarn"] = "Warning! Viewmodel offset settings may cause clipping or other undesired effects!"
|
||||
L["arccw.cvar.vm_sway_sprint"] = "Sprint Bob" -- This is intentionally flipped
|
||||
L["arccw.cvar.vm_bob_sprint"] = "Sprint Sway" -- Ditto
|
||||
L["arccw.cvar.vm_swaywarn"] = "The following only applies when Custom Swaying is enabled"
|
||||
L["arccw.cvar.vm_look_ymult"] = "Horizontal Look Sway"
|
||||
L["arccw.cvar.vm_look_xmult"] = "Vertical Look Sway"
|
||||
L["arccw.cvar.vm_sway_xmult"] = "Bob Right"
|
||||
L["arccw.cvar.vm_sway_ymult"] = "Bob Forward"
|
||||
L["arccw.cvar.vm_sway_zmult"] = "Bob Up"
|
||||
L["arccw.cvar.vm_sway_wigglemult"] = "Bob Wiggle"
|
||||
L["arccw.cvar.vm_sway_speedmult"] = "Bob Speed"
|
||||
L["arccw.cvar.vm_sway_rotatemult"] = "Bob Rotate"
|
||||
|
||||
L["arccw.cvar.vm_accelmult"] = "Sway Tightness"
|
||||
L["arccw.cvar.vm_viewwarn"] = "The following only applies when Custom Camera Movement is enabled"
|
||||
L["arccw.cvar.vm_coolviewmult"] = "View Move Multiplier"
|
||||
-- ArcCW_Options_Crosshair
|
||||
L["arccw.crosshair.tfa"] = "TFA"
|
||||
L["arccw.crosshair.cw2"] = "CW 2.0"
|
||||
L["arccw.crosshair.cs"] = "Counter-Strike"
|
||||
L["arccw.crosshair.light"] = "Lightweight"
|
||||
L["arccw.cvar.crosshair"] = "Enable Crosshair"
|
||||
L["arccw.cvar.crosshair_length"] = "Crosshair Length"
|
||||
L["arccw.cvar.crosshair_thickness"] = "Crosshair Thickness"
|
||||
L["arccw.cvar.crosshair_gap"] = "Crosshair Gap Scale"
|
||||
L["arccw.cvar.crosshair_dot"] = "Show Center Dot"
|
||||
L["arccw.cvar.crosshair_shotgun"] = "Use Shotgun Prongs"
|
||||
L["arccw.cvar.crosshair_equip"] = "Use Equipment Prongs"
|
||||
L["arccw.cvar.crosshair_static"] = "Static Crosshair"
|
||||
L["arccw.cvar.crosshair_trueaim"] = "Accurate Crosshair"
|
||||
L["arccw.cvar.crosshair_clump"] = "Use CW2-Style Clump Circle"
|
||||
L["arccw.cvar.crosshair_clump_outline"] = "Clump Circle Outline"
|
||||
L["arccw.cvar.crosshair_clump_always"] = "Clump Circle Always On"
|
||||
L["arccw.cvar.crosshair_clr"] = "Crosshair Color"
|
||||
L["arccw.cvar.crosshair_outline"] = "Outline Size"
|
||||
L["arccw.cvar.crosshair_outline_clr"] = "Outline Color"
|
||||
L["arccw.cvar.scope_clr"] = "Sight Color"
|
||||
-- ArcCW_Options_Mults
|
||||
L["arccw.cvar.mult_damage"] = "Damage"
|
||||
L["arccw.cvar.mult_npcdamage"] = "NPC Damage"
|
||||
L["arccw.cvar.mult_range"] = "Range"
|
||||
L["arccw.cvar.mult_recoil"] = "Recoil"
|
||||
L["arccw.cvar.mult_penetration"] = "Penetration"
|
||||
L["arccw.cvar.mult_accuracy"] = "Precision"
|
||||
L["arccw.cvar.mult_hipfire"] = "Hip Dispersion"
|
||||
L["arccw.cvar.mult_movedisp"] = "Move Dispersion"
|
||||
L["arccw.cvar.mult_reloadtime"] = "Reload Time"
|
||||
L["arccw.cvar.mult_sighttime"] = "ADS Time"
|
||||
L["arccw.cvar.mult_defaultclip"] = "Default Clip"
|
||||
L["arccw.cvar.mult_attchance"] = "Random Att. Chance"
|
||||
L["arccw.cvar.mult_heat"] = "Heat Gain"
|
||||
L["arccw.cvar.mult_shootwhilesprinting"] = "Shoot While Sprinting"
|
||||
-- ArcCW_Options_Atts
|
||||
L["arccw.attdesc1"] = "ArcCW supports attachment inventory style behaviour (Like ACT3) as well as attachment locking style behaviour (Like CW2.0) as well as giving everyone all attachments for free (Like TFA Base)."
|
||||
L["arccw.attdesc2"] = "Leave all options off for ACT3 style attachment inventory behaviour."
|
||||
L["arccw.cvar.attinv_free"] = "Free Attachments"
|
||||
L["arccw.cvar.attinv_lockmode"] = "Attachment Locking"
|
||||
L["arccw.cvar.attinv_loseondie.desc"] = "Lose Attachments Modes:\n0 - Disable\n1 = Removed on death\n2 = Drop Attachment Box on death"
|
||||
L["arccw.cvar.attinv_loseondie"] = "Lose Atts. On Death"
|
||||
L["arccw.cvar.atts_pickx.desc"] = "Pick X behaviour allows you to set a limit on attachments that can be placed on any weapon.\n0 = unlimited."
|
||||
L["arccw.cvar.atts_pickx"] = "Pick X"
|
||||
L["arccw.cvar.enable_dropping"] = "Attachment Dropping"
|
||||
L["arccw.cvar.atts_spawnrand"] = "Random Attachments on Spawn"
|
||||
L["arccw.cvar.atts_ubglautoload"] = "Underbarrel Weapons Automatically Loaded"
|
||||
L["arccw.blacklist"] = "Blacklist Menu"
|
||||
-- ArcCW_Options_Server
|
||||
L["arccw.cvar.enable_customization"] = "Enable Customization"
|
||||
L["arccw.cvar.enable_customization.desc"] = "-1 will disable both customization and the entirety of the Customization UI.\n0 will not allow users to customize their weapons.\n1 will allow customization, the default."
|
||||
L["arccw.cvar.truenames"] = "True Names (Requires Restart)"
|
||||
L["arccw.cvar.equipmentammo.desc"] = "There is a limit of 255 ammo types, and enabling this option can cause problems related to this. Requires restart."
|
||||
L["arccw.cvar.equipmentammo"] = "Equipment Unique Ammo Types"
|
||||
L["arccw.cvar.equipmentsingleton.desc"] = "Singletons can be used once and then remove themselves from your inventory. Requires restart."
|
||||
L["arccw.cvar.equipmentsingleton"] = "Grenade/Equipment Singleton"
|
||||
L["arccw.cvar.equipmenttime"] = "Equipment Self-Destruct Time"
|
||||
L["arccw.cvar.throwinertia"] = "Grenade Inherit Velocity"
|
||||
L["arccw.cvar.limityear_enable"] = "Enable Year Limit"
|
||||
L["arccw.cvar.limityear"] = "Year Limit"
|
||||
L["arccw.cvar.override_crosshair_off"] = "Force Disable Crosshair"
|
||||
L["arccw.cvar.override_barrellength"] = "Enable Near-Walling"
|
||||
L["arccw.cvar.doorbust"] = "Enable Door-Busting"
|
||||
L["arccw.cvar.desync"] = "Desync Bullets"
|
||||
L["arccw.cvar.desync.desc"] = "Desync bullets between the server and the client, making the nospread cheat useless."
|
||||
L["arccw.cvar.weakensounds"] = "Weaken Sounds"
|
||||
L["arccw.cvar.weakensounds.desc"] = "Reduce all weapons' firing volume by this much decibels, making it easier to hide shooting sounds. Clamped to 60-150dB."
|
||||
-- ArcCW_Options_Dev
|
||||
L["arccw.dev_info1"] = "These are primarily related to attachments and are of use to developers only."
|
||||
L["arccw.dev_info2"] = "Settings will not save."
|
||||
L["arccw.cvar.dev_reloadonadmincleanup"] = "Reload on Admin Cleanup"
|
||||
L["arccw.cvar.dev_reloadonadmincleanup.desc"] = "Disabled by default.\nDoing an admin cleanup will reload all attachment data."
|
||||
L["arccw.cvar.dev_registerentities"] = "Register Att. Entities"
|
||||
L["arccw.cvar.dev_registerentities.desc"] = "Enabled by default.\nCreates entities for ArcCW attachments. Increases time to reload attachment data."
|
||||
L["arccw.cvar.dev_reloadatts"] = "Reload Attachment Data"
|
||||
L["arccw.cvar.dev_reloadatts.desc"] = "Reloads attachment data. Use after making a change to an attachment."
|
||||
L["arccw.cvar.dev_reloadlangs"] = "Reload Languages"
|
||||
L["arccw.cvar.dev_reloadlangs.desc"] = "Reloads all language files."
|
||||
L["arccw.cvar.dev_spawnmenureload"] = "Reload Spawnmenu"
|
||||
L["arccw.cvar.dev_spawnmenureload.desc"] = "Not exactly an ArcCW specific command, but here for the sake of convenience."
|
||||
-- TTT Menus
|
||||
L["arccw.cvar.attinv_loseondie.help"] = "If enabled, players lose attachment on death and round end."
|
||||
L["arccw.cvar.ammo_detonationmode.help"] = "Determines what happens if ammo boxes are destroyed."
|
||||
L["arccw.cvar.equipmenttime.help"] = "Applies to deployable equipment like Claymores, in seconds."
|
||||
L["arccw.cvar.ttt_bodyattinfo"] = "Body Attachment Info"
|
||||
L["arccw.cvar.ttt_bodyattinfo.help"] = "If enabled, searching a body will reveal the attachments on the weapon used to kill someone."
|
||||
L["arccw.cvar.ttt_bodyattinfo.desc"] = "0 - Off; 1 - Detectives can see; 2 - Everyone can see"
|
||||
L["arccw.cvar.attinv_free.help"] = "If enabled, players have access to all attachments.\nCustomization mode may still restrict them from using them."
|
||||
L["arccw.cvar.attinv_lockmode.help"] = "If enabled, picking up one attachment unlocks it for every weapon, a-la CW2."
|
||||
L["arccw.cvar.enable_customization.help"] = "If disabled, nobody can customize. This overrides Customization Mode."
|
||||
L["arccw.cvar.ttt_replace"] = "Auto-replace Weapons"
|
||||
L["arccw.cvar.ttt_replaceammo"] = "Auto-replace Ammo"
|
||||
L["arccw.cvar.ttt_atts"] = "Randomize Attachments"
|
||||
L["arccw.cvar.ttt_customizemode"] = "Customization Mode"
|
||||
L["arccw.cvar.ttt_customizemode.desc"] = "0 - No restrictions; 1 - Restricted; 2 - Pregame only; 3 - Traitor/Detective only"
|
||||
L["arccw.cvar.ttt_rolecrosshair"] = "Enable role-based crosshair color"
|
||||
L["arccw.cvar.ttt_inforoundstart"] = "Enable round startup info"
|
||||
|
||||
-- 2020-11-22
|
||||
L["arccw.cvar.ammo_replace"] = "Replace HL2 Ammo Entities"
|
||||
|
||||
-- 2020-11-25
|
||||
L["arccw.cvar.hud_3dfun_lite"] = "Minimal Mode"
|
||||
L["arccw.cvar.hud_3dfun_lite.desc"] = "HUD will only show up when pressing RELOAD. Hold WALK to not reload when doing so."
|
||||
L["arccw.cvar.hud_3dfun_right"] = "3D2D Offset Right"
|
||||
L["arccw.cvar.hud_3dfun_forward"] = "3D2D Offset Forward"
|
||||
L["arccw.cvar.hud_3dfun_up"] = "3D2D Offset Up"
|
||||
L["arccw.cvar.hud_3dfun_ammotype"] = "Show Ammo Type"
|
||||
L["arccw.cvar.hud_3dfun_ammotype.desc"] = "Ammo HUD will also show weapon's current ammo type."
|
||||
|
||||
-- 2021-01-03
|
||||
L["arccw.combobox.disabled"] = "0 - Disabled"
|
||||
L["arccw.cvar.attinv_loseondie.1"] = "1 - Removed on death"
|
||||
L["arccw.cvar.attinv_loseondie.2"] = "2 - Drop attachment box on death"
|
||||
L["arccw.cvar.ammo_detonationmode.-1"] = "-1 - Don't explode"
|
||||
L["arccw.cvar.ammo_detonationmode.0"] = "0 - Simple explosion"
|
||||
L["arccw.cvar.ammo_detonationmode.1"] = "1 - Fragmentation"
|
||||
L["arccw.cvar.ammo_detonationmode.2"] = "2 - Frag + Burning"
|
||||
L["arccw.cvar.enable_customization.-1"] = "-1 - Disable UI and all customization"
|
||||
L["arccw.cvar.enable_customization.0"] = "0 - Players cannot customize"
|
||||
L["arccw.cvar.enable_customization.1"] = "1 - Enabled"
|
||||
L["arccw.cvar.limityear.desc"] = "If enabled, weapons with a trivia year later than the limit cannot be spawned.\nGood for gmod realism."
|
||||
|
||||
-- 2021-01-05
|
||||
L["arccw.menus.binds"] = "Binds"
|
||||
L["arccw.bindhelp"] = "All players can use this panel to set custom bindings for ArcCW features.\n\nBecause of a Garry's Mod limitation, for custom binds you must input the command provided in chat into the console yourself."
|
||||
L["arccw.cvar.altbindsonly"] = "Custom Binds Only"
|
||||
L["arccw.cvar.altbindsonly.desc"] = "If enabled, default controls will no longer work with ArcCW weapons. Please ensure all of the below buttons are bound so you have access to them."
|
||||
L["arccw.bind.firemode"] = "Change Firemode"
|
||||
L["arccw.bind.zoom_in"] = "Scope Zoom In"
|
||||
L["arccw.bind.zoom_out"] = "Scope Zoom Out"
|
||||
L["arccw.bind.toggle_inv"] = "Customize Menu"
|
||||
L["arccw.bind.switch_scope"] = "Toggle Sights"
|
||||
L["arccw.bind.toggle_ubgl"] = "Toggle Underbarrel"
|
||||
L["arccw.bind.melee"] = "Melee"
|
||||
L["arccw.bind.msg"] = "Type into console: "
|
||||
|
||||
-- 2021-01-14
|
||||
L["arccw.cvar.mult_startunloaded"] = "Start Unloaded"
|
||||
L["arccw.cvar.mult_defaultammo"] = "Default Ammo"
|
||||
|
||||
-- 2021-01-18
|
||||
L["arccw.cvar.dev_showignored"] = "Load Ignored Atts"
|
||||
L["arccw.cvar.dev_showignored.desc"] = "Disabled by default.\nLoad attachments that have att.Ignore set to true. These attachments may be broken or unimplemented.\nThey will be highlighted in light yellow."
|
||||
L["arccw.cvar.aimassist"] = "Enable Aim Assist"
|
||||
L["arccw.cvar.aimassist.desc"] = "Allow players to snap their view to NPCs and players near their aim."
|
||||
L["arccw.cvar.aimassist_cl.desc"] = "Snap your view to nearby NPCs and players. Only usable if enabled serverside!"
|
||||
L["arccw.cvar.aimassist_head"] = "Aim Assist Seeks Head"
|
||||
L["arccw.cvar.aimassist_cone"] = "Aim Assist Cone"
|
||||
L["arccw.cvar.aimassist_distance"] = "Aim Assist Distance"
|
||||
L["arccw.cvar.aimassist_intensity"] = "Aim Assist Intensity"
|
||||
|
||||
-- 2021-01-19
|
||||
L["arccw.cvar.adjustsensthreshold"] = "Adjust Sensitivity Threshold"
|
||||
L["arccw.cvar.adjustsensthreshold.desc"] = "If your total magnification is less than this, your sensitivity will not be adjusted while in sights."
|
||||
|
||||
-- 2021-01-20
|
||||
L["arccw.cvar.crosshair_aa"] = "Aim Assist Indicator"
|
||||
|
||||
-- 2021-1-25
|
||||
L["arccw.menus.ttt_client"] = "TTT (Client)"
|
||||
L["arccw.menus.ttt_server"] = "TTT (Server)"
|
||||
L["arccw.ttt_clienthelp"] = "These options are TTT-specific, and can be changed by all players. Other tabs may contain non-TTT-specific configurations."
|
||||
L["arccw.ttt_serverhelp"] = "These options are TTT-specific, and require admin privileges to change. They are automatically networked in multiplayer games."
|
||||
L["arccw.cvar.ttt_customizemode.0"] = "0 - Unrestricted"
|
||||
L["arccw.cvar.ttt_customizemode.1"] = "1 - Restricted"
|
||||
L["arccw.cvar.ttt_customizemode.2"] = "2 - Pre-game only"
|
||||
L["arccw.cvar.ttt_customizemode.3"] = "3 - Detectives/Traitors only"
|
||||
L["arccw.cvar.ttt_bodyattinfo.1"] = "1 - Detectives can see"
|
||||
L["arccw.cvar.ttt_bodyattinfo.2"] = "2 - Everyone can see"
|
||||
L["arccw.cvar.mult_crouchdisp"] = "Crouched Dispersion"
|
||||
L["arccw.cvar.mult_crouchrecoil"] = "Crouched Recoil"
|
||||
|
||||
-- 2021-2-19
|
||||
L["arccw.cvar.dev_debug"] = "Debug Menu"
|
||||
L["arccw.cvar.dev_debug.desc"] = "Disabled by default.\nDraws a debug menu over your screen where you can view certain elements blah blah?"
|
||||
|
||||
L["arccw.cvar.attinv_sound"] = "Customization Menu Sounds"
|
||||
L["arccw.cvar.attinv_sound.desc"] = "Enable or disable sounds for the customization menu."
|
||||
|
||||
-- 2021-3-2
|
||||
L["arccw.ammohud"] = "\nAmmo HUD" -- Obsoletes "3D2D HUD" since they're basically the same now"
|
||||
L["arccw.cvar.hud_fcgbars"] = "Show Firemode Bars"
|
||||
L["arccw.bind.toggle_att"] = "Toggle Attachments"
|
||||
|
||||
-- 2021-05-05
|
||||
L["arccw.cvar.attinv_gamemodebuttons"] = "Gamemode-specific buttons"
|
||||
L["arccw.cvar.attinv_gamemodebuttons.desc"] = "Shows helpful functions for gamemodes like TTT and DarkRP.\nIn addition to using these, you can hold USE to access original keybinds as well."
|
||||
|
||||
-- 2021-05-13
|
||||
L["arccw.cvar.mult_malfunction"] = "Malfunction Chance"
|
||||
L["arccw.cvar.malfunction"] = "Malfunction Mode"
|
||||
L["arccw.cvar.malfunction.0"] = "0 - Force disable on all guns"
|
||||
L["arccw.cvar.malfunction.1"] = "1 - Enabled"
|
||||
L["arccw.cvar.malfunction.2"] = "2 - Force enable on all guns"
|
||||
|
||||
-- 2021-05-26
|
||||
L["arccw.cvar.mult_meleedamage"] = "Melee Damage"
|
||||
L["arccw.cvar.mult_meleetime"] = "Melee Time"
|
||||
|
||||
-- 2021-05-27
|
||||
L["arccw.cvar.ammonames"] = "Custom Ammo Names"
|
||||
L["arccw.cvar.ammonames.desc"] = "Replaces default ammo type names with custom ones that are a bit more realistic (such as Pulse Ammo to Rifle Ammo). Also replaces references everywhere else!"
|
||||
L["arccw.cvar.att_showground"] = "Show Ground Attachments"
|
||||
|
||||
-- 2021-06-02
|
||||
L["arccw.cvar.mult_bottomlessclip"] = "Bottomless Clip"
|
||||
L["arccw.cvar.mult_infiniteammo"] = "Infinite Ammo"
|
||||
|
||||
-- 2021-06-07
|
||||
L["arccw.cvar.bodydamagecancel"] = "Cancel Body Damage"
|
||||
L["arccw.cvar.bodydamagecancel.desc"] = "When a weapon specifies limb damage modifiers, cancel Gmod's default multipliers. Disable when you have another mod that does this."
|
||||
|
||||
L["arccw.cvar.enable_sway"] = "Enable Sway"
|
||||
L["arccw.cvar.enable_sway.desc"] = "Most weapons do not specify a sway value. If you wish to give sway to all weapons, use the 'Add Sway' slider."
|
||||
L["arccw.cvar.add_sway"] = "Add Sway"
|
||||
L["arccw.cvar.mult_sway"] = "Multiply Sway"
|
||||
|
||||
-- 2021-08-15
|
||||
L["arccw.cvar.mult_rpm"] = "Fire Rate"
|
||||
L["arccw.cvar.mult_rpm.desc"] = "May be disastrous on performance. May also be a ton of fun."
|
||||
|
||||
-- 2021-08-16
|
||||
L["arccw.cvar.dev_benchgun"] = "Benchgun"
|
||||
L["arccw.cvar.dev_benchgun.desc"] = "Places the viewmodel in a stationary position, usually at world origin."
|
||||
L["arccw.cvar.dev_benchgun_custom"] = "Benchgun Custom"
|
||||
L["arccw.cvar.dev_benchgun_custom.desc"] = "Custom location to place the viewmodel at. Use getpos and place the result here.\nExample:\nsetpos 61 -397 -63;setang 0 96 0"
|
||||
|
||||
-- 2021-08-18
|
||||
L["arccw.cvar.crosshair_prong_top"] = "Show Top Prong"
|
||||
L["arccw.cvar.crosshair_prong_left"] = "Show Left Prong"
|
||||
L["arccw.cvar.crosshair_prong_right"] = "Show Right Prong"
|
||||
L["arccw.cvar.crosshair_prong_bottom"] = "Show Bottom Prong"
|
||||
L["arccw.cvar.crosshair_tilt"] = "Tilted Crosshair"
|
||||
L["arccw.cvar.attinv_giveonspawn"] = "Give Atts. On Spawn"
|
||||
|
||||
-- 2021-10-10
|
||||
L["arccw.cvar.hud_fcgabbrev"] = "Abbreviate Firemode Names"
|
||||
|
||||
-- 2021-10-31
|
||||
L["arccw.cvar.reloadincust"] = "Reloading In Customize Menu"
|
||||
L["arccw.cvar.reloadincust.desc"] = "May allow players to cheese reload times by swapping magazine attachments.\nWill also disable left hand lowering in the customize menu."
|
||||
|
||||
-- 2021-11-11
|
||||
L["arccw.cvar.freeaim"] = "Free Aim"
|
||||
L["arccw.cvar.freeaim.1"] = "1 - Enabled"
|
||||
L["arccw.cvar.freeaim.2"] = "2 - No Dispersion Tweak"
|
||||
|
||||
-- 2021-11-24
|
||||
L["arccw.cvar.override_lunge_off"] = "Disable Melee Lunging"
|
||||
L["arccw.cvar.override_lunge_off.desc"] = "Bashing with a weapon can allow you to dash a short distance if there is a target in front. This option disables that momentum for all weapons."
|
||||
|
||||
-- 2021-11-27
|
||||
L["arccw.cvar.mult_movespeed"] = "Speed"
|
||||
L["arccw.cvar.mult_movespeedads"] = "Speed in ADS"
|
||||
L["arccw.cvar.mult_movespeedfire"] = "Speed while firing"
|
||||
|
||||
-- 2022-02-14
|
||||
L["arccw.cvar.vm_nearwall"] = "Near-wall Movement"
|
||||
L["arccw.cvar.nohl2flash"] = "Toggle attachments modes through flashlight bind"
|
||||
|
||||
-- 2022-03-24
|
||||
L["arccw.cvar.dev_alwaysready"] = "Always Use Ready Animation"
|
||||
L["arccw.cvar.dev_alwaysready.desc"] = "Always use the ready animation while drawing when available."
|
||||
|
||||
L["arccw.cvar.noinspect"] = "Disable inspect animations"
|
||||
|
||||
-- 2022-07-10
|
||||
L["arccw.cvar.override_hud_off"] = "Force Disable HUD"
|
||||
L["arccw.hud_svwarning"] = "The HUD can be disabled serverside by a server administrator."
|
||||
|
||||
-- 2023-10-10
|
||||
L["arccw.cvar.2d3d.1"] = "1 - When Pointed At"
|
||||
L["arccw.cvar.2d3d.2"] = "2 - Always"
|
||||
798
lua/arccw/client/cl_menus.lua
Normal file
798
lua/arccw/client/cl_menus.lua
Normal file
@@ -0,0 +1,798 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
--[[
|
||||
Panel table doc:
|
||||
id (any number) = data:
|
||||
type
|
||||
type args
|
||||
|
||||
types:
|
||||
h - header text
|
||||
c - control help text
|
||||
b - checkbox text var
|
||||
i - integer slider text var min max
|
||||
f - float slider (2 nums after .) text var min max
|
||||
m - color mixer text r g b a
|
||||
p - press or button text func
|
||||
t - textbox text string
|
||||
o - combo box text var choices (key - cvar, value - text)
|
||||
d - binder text var
|
||||
(you can add custom types in ArcCW.GeneratePanelElements's AddControl table)
|
||||
|
||||
Generate elements via ArcCW.GeneratePanelElements:
|
||||
panel, panel table with data
|
||||
|
||||
Add menu generation to ArcCW.ClientMenus:
|
||||
name = data:
|
||||
text - header text
|
||||
func - generator function
|
||||
]]
|
||||
|
||||
local BulletPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "c", text = "#arccw.bullet_help" },
|
||||
{ type = "b", text = "#arccw.cvar.bullet_enable", var = "arccw_bullet_enable", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.enable_penetration", var = "arccw_enable_penetration", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.enable_ricochet", var = "arccw_enable_ricochet", sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.bullet_velocity", var = "arccw_bullet_velocity", min = 0, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.bullet_gravity", var = "arccw_bullet_gravity", min = 0, max = 1200, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.bullet_drag", var = "arccw_bullet_drag", min = 0, max = 10, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.bullet_lifetime", var = "arccw_bullet_lifetime", min = 1, max = 20, sv = true},
|
||||
}
|
||||
|
||||
local ClientPanel = {
|
||||
{ type = "h", text = "#arccw.clientcfg" },
|
||||
{ type = "b", text = "#arccw.cvar.automaticreload", var = "arccw_automaticreload" },
|
||||
{ type = "c", text = "#arccw.cvar.automaticreload.desc" },
|
||||
{ type = "f", text = "#arccw.cvar.adjustsensthreshold", var = "arccw_adjustsensthreshold", min = 0, max = 50, sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.adjustsensthreshold.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.toggleads", var = "arccw_toggleads" },
|
||||
{ type = "b", text = "#arccw.cvar.autosave", var = "arccw_autosave" },
|
||||
{ type = "c", text = "#arccw.cvar.autosave.desc" },
|
||||
--{ type = "b", text = "#arccw.cvar.embracetradition", var = "arccw_hud_embracetradition" },
|
||||
--{ type = "c", text = "#arccw.cvar.embracetradition.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.glare", var = "arccw_glare" },
|
||||
{ type = "c", text = "#arccw.cvar.glare.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.shake", var = "arccw_shake" },
|
||||
{ type = "b", text = "#arccw.cvar.shakevm", var = "arccw_shakevm" },
|
||||
{ type = "c", text = "#arccw.cvar.shake_info" },
|
||||
{ type = "b", text = "#arccw.cvar.aimassist", var = "arccw_aimassist_cl" },
|
||||
{ type = "c", text = "#arccw.cvar.aimassist_cl.desc" },
|
||||
-- { type = "b", text = "#arccw.cvar.2d3d", var = "arccw_2d3d" },
|
||||
{ type = "o", text = "#arccw.cvar.2d3d", var = "arccw_2d3d",
|
||||
choices = {[0] = "#arccw.combobox.disabled", [1] = "#arccw.cvar.2d3d.1", [2] = "#arccw.cvar.2d3d.2"}},
|
||||
{ type = "c", text = "#arccw.cvar.2d3d_info" },
|
||||
{ type = "t", text = "#arccw.cvar.language", var = "arccw_language" },
|
||||
{ type = "c", text = "#arccw.cvar.language_info" },
|
||||
{ type = "b", text = "#arccw.cvar.ammonames", var = "arccw_ammonames" },
|
||||
{ type = "c", text = "#arccw.cvar.ammonames.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.noinspect", var = "arccw_noinspect" },
|
||||
}
|
||||
|
||||
local PerformancePanel = {
|
||||
--{ type = "h", text = "#arccw.clientcfg" },
|
||||
{ type = "h", text = "#arccw.performance" },
|
||||
{ type = "b", text = "#arccw.cvar.cheapscopes", var = "arccw_cheapscopes" },
|
||||
{ type = "c", text = "#arccw.cvar.cheapscopes.desc" },
|
||||
-- { type = "b", text = "#arccw.cvar.flatscopes", var = "arccw_flatscopes" },
|
||||
-- { type = "c", text = "#arccw.cvar.flatscopes.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.muzzleeffects", var = "arccw_muzzleeffects" },
|
||||
{ type = "b", text = "#arccw.cvar.fastmuzzles", var = "arccw_fastmuzzles" },
|
||||
{ type = "b", text = "#arccw.cvar.fasttracers", var = "arccw_fasttracers" },
|
||||
{ type = "b", text = "#arccw.cvar.shelleffects", var = "arccw_shelleffects" },
|
||||
{ type = "b", text = "#arccw.cvar.att_showothers", var = "arccw_att_showothers" },
|
||||
{ type = "b", text = "#arccw.cvar.att_showground", var = "arccw_att_showground" },
|
||||
{ type = "i", text = "#arccw.cvar.visibility", var = "arccw_visibility", min = -1, max = 32000},
|
||||
{ type = "c", text = "#arccw.cvar.visibility.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.blur", var = "arccw_blur" },
|
||||
{ type = "b", text = "#arccw.cvar.blur_toytown", var = "arccw_blur_toytown" },
|
||||
{ type = "b", text = "#arccw.cvar.bullet_imaginary", var = "arccw_bullet_imaginary" },
|
||||
{ type = "c", text = "#arccw.cvar.bullet_imaginary.desc" },
|
||||
{ type = "f", text = "#arccw.cvar.shelltime", var = "arccw_shelltime", min = 0, max = 180 },
|
||||
}
|
||||
|
||||
local ViewmodelPanel = {
|
||||
{ type = "b", text = "#arccw.cvar.vm_coolsway", var = "arccw_vm_coolsway" },
|
||||
{ type = "b", text = "#arccw.cvar.vm_coolview", var = "arccw_vm_coolview" },
|
||||
{ type = "h", text = "" },
|
||||
{ type = "c", text = "#arccw.cvar.vm_offsetwarn" },
|
||||
{ type = "f", text = "#arccw.cvar.vm_fov", var = "arccw_vm_fov", min = -15, max = 15 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_right", var = "arccw_vm_right", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_forward", var = "arccw_vm_forward", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_up", var = "arccw_vm_up", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_pitch", var = "arccw_vm_pitch", min = -15, max = 15 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_yaw", var = "arccw_vm_yaw", min = -15, max = 15 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_roll", var = "arccw_vm_roll", min = -15, max = 15 },
|
||||
{ type = "c", text = "" },
|
||||
{ type = "c", text = "#arccw.cvar.vm_swaywarn" },
|
||||
{ type = "f", text = "#arccw.cvar.vm_look_xmult", var = "arccw_vm_look_xmult", min = -10, max = 10 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_look_ymult", var = "arccw_vm_look_ymult", min = -10, max = 10 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_sway_xmult", var = "arccw_vm_sway_xmult", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_sway_ymult", var = "arccw_vm_sway_ymult", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_sway_zmult", var = "arccw_vm_sway_zmult", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.vm_sway_speedmult", var = "arccw_vm_sway_speedmult", min = 0, max = 2 },
|
||||
{ type = "h", text = "" },
|
||||
{ type = "c", text = "#arccw.cvar.vm_viewwarn" },
|
||||
{ type = "f", text = "#arccw.cvar.vm_coolviewmult", var = "arccw_vm_coolview_mult", min = -5, max = 5 },
|
||||
{ type = "b", text = "#arccw.cvar.vm_nearwall", var = "arccw_vm_nearwall" },
|
||||
}
|
||||
|
||||
local HudPanel = {
|
||||
{ type = "h", text = "#arccw.clientcfg" },
|
||||
{ type = "h", text = "#arccw.hud_svwarning" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_showhealth", var = "arccw_hud_showhealth" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_showhealth.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_showammo", var = "arccw_hud_showammo" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_showammo.desc" },
|
||||
{ type = "i", text = "#arccw.cvar.hud_3dfun_decay", var = "arccw_hud_3dfun_decaytime", min = 0, max = 5 },
|
||||
{ type = "c", text = "#arccw.cvar.hud_3dfun_decay.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_minimal", var = "arccw_hud_minimal" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_minimal.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_forceshow", var = "arccw_hud_forceshow" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_forceshow.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_closeonhurt", var = "arccw_attinv_closeonhurt" },
|
||||
{ type = "f", text = "#arccw.cvar.hudpos_deadzone_x", var = "arccw_hud_deadzone_x", min = 0, max = 0.5 },
|
||||
{ type = "f", text = "#arccw.cvar.hudpos_deadzone_y", var = "arccw_hud_deadzone_y", min = 0, max = 0.5 },
|
||||
{ type = "c", text = "#arccw.cvar.hudpos_deadzone.desc" },
|
||||
{ type = "f", text = "#arccw.cvar.hudpos_size", var = "arccw_hud_size", min = 0.67, max = 1.5 },
|
||||
{ type = "c", text = "#arccw.cvar.hudpos_size.desc" },
|
||||
{ type = "t", text = "#arccw.cvar.font", var = "arccw_font" },
|
||||
{ type = "c", text = "#arccw.cvar.font_info" },
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.attinv_sound", var = "arccw_cust_sounds" },
|
||||
{ type = "c", text = "#arccw.cvar.attinv_sound.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_hideunowned", var = "arccw_attinv_hideunowned" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_darkunowned", var = "arccw_attinv_darkunowned" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_onlyinspect", var = "arccw_attinv_onlyinspect" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_simpleproscons", var = "arccw_attinv_simpleproscons" },
|
||||
--{ type = "b", text = "#arccw.cvar.attinv_gamemodebuttons", var = "arccw_attinv_gamemodebuttons" },
|
||||
--{ type = "c", text = "#arccw.cvar.attinv_gamemodebuttons.desc" },
|
||||
|
||||
{ type = "h", text = "#arccw.ammohud" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_3dfun", var = "arccw_hud_3dfun" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_3dfun.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_3dfun_lite", var = "arccw_hud_3dfun_lite" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_3dfun_lite.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_fcgbars", var = "arccw_hud_fcgbars" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_fcgabbrev", var = "arccw_hud_fcgabbrev" },
|
||||
{ type = "b", text = "#arccw.cvar.hud_3dfun_ammotype", var = "arccw_hud_3dfun_ammotype" },
|
||||
{ type = "c", text = "#arccw.cvar.hud_3dfun_ammotype.desc" },
|
||||
|
||||
{ type = "f", text = "#arccw.cvar.hud_3dfun_right", var = "arccw_hud_3dfun_right", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.hud_3dfun_up", var = "arccw_hud_3dfun_up", min = -5, max = 5 },
|
||||
{ type = "f", text = "#arccw.cvar.hud_3dfun_forward", var = "arccw_hud_3dfun_forward", min = -5, max = 5 },
|
||||
}
|
||||
|
||||
local CrosshairPanel = {
|
||||
{ type = "h", text = "#arccw.clientcfg" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair", var = "arccw_crosshair" },
|
||||
{ type = "f", text = "#arccw.cvar.crosshair_length", var = "arccw_crosshair_length", min = 0, max = 10 },
|
||||
{ type = "f", text = "#arccw.cvar.crosshair_thickness", var = "arccw_crosshair_thickness", min = 0, max = 2 },
|
||||
{ type = "f", text = "#arccw.cvar.crosshair_gap", var = "arccw_crosshair_gap", min = 0, max = 2 },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_dot", var = "arccw_crosshair_dot" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_shotgun", var = "arccw_crosshair_shotgun" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_equip", var = "arccw_crosshair_equip" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_static", var = "arccw_crosshair_static" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_trueaim", var = "arccw_crosshair_trueaim" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_clump", var = "arccw_crosshair_clump" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_clump_outline", var = "arccw_crosshair_clump_outline" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_clump_always", var = "arccw_crosshair_clump_always" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_aa", var = "arccw_crosshair_aa" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_tilt", var = "arccw_crosshair_tilt" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_prong_top", var = "arccw_crosshair_prong_top" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_prong_left", var = "arccw_crosshair_prong_left" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_prong_right", var = "arccw_crosshair_prong_right" },
|
||||
{ type = "b", text = "#arccw.cvar.crosshair_prong_bottom", var = "arccw_crosshair_prong_bottom" },
|
||||
{ type = "m", text = "#arccw.cvar.crosshair_clr", r = "arccw_crosshair_clr_r", g = "arccw_crosshair_clr_g", b = "arccw_crosshair_clr_b", a = "arccw_crosshair_clr_a" },
|
||||
{ type = "f", text = "#arccw.cvar.crosshair_outline", var = "arccw_crosshair_outline", min = 0, max = 4 },
|
||||
{ type = "m", text = "#arccw.cvar.crosshair_outline_clr", r = "arccw_crosshair_outline_r", g = "arccw_crosshair_outline_g", b = "arccw_crosshair_outline_b", a = "arccw_crosshair_outline_a" },
|
||||
}
|
||||
|
||||
local BindsPanel = {
|
||||
{ type = "h", text = "#arccw.bindhelp" },
|
||||
{ type = "b", text = "#arccw.cvar.nohl2flash", var = "arccw_nohl2flash" },
|
||||
{ type = "b", text = "#arccw.cvar.altsafety", var = "arccw_altsafety" },
|
||||
{ type = "b", text = "#arccw.cvar.altbindsonly", var = "arccw_altbindsonly" },
|
||||
{ type = "c", text = "#arccw.cvar.altbindsonly.desc" },
|
||||
{ type = "d", text = "#arccw.bind.firemode", var = "arccw_firemode" },
|
||||
{ type = "d", text = "#arccw.bind.zoom_in", var = "arccw_zoom_in" },
|
||||
{ type = "d", text = "#arccw.bind.zoom_out", var = "arccw_zoom_out" },
|
||||
{ type = "d", text = "#arccw.bind.toggle_inv", var = "arccw_toggle_inv" },
|
||||
{ type = "d", text = "#arccw.bind.switch_scope", var = "arccw_switch_scope" },
|
||||
{ type = "d", text = "#arccw.bind.toggle_ubgl", var = "arccw_toggle_ubgl" },
|
||||
{ type = "d", text = "#arccw.bind.melee", var = "arccw_melee" },
|
||||
{ type = "d", text = "#arccw.bind.toggle_att", var = "arccw_toggle_att" },
|
||||
}
|
||||
|
||||
local ServerPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "o", text = "#arccw.cvar.enable_customization", var = "arccw_enable_customization", sv = true,
|
||||
choices = {[-1] = "#arccw.cvar.enable_customization.-1", [0] = "#arccw.cvar.enable_customization.0", [1] = "#arccw.cvar.enable_customization.1"}},
|
||||
{ type = "c", text = "#arccw.cvar.enable_customization.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.truenames", var = "arccw_truenames", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.equipmentammo", var = "arccw_equipmentammo", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.equipmentammo.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.equipmentsingleton", var = "arccw_equipmentsingleton", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.equipmentsingleton.desc" },
|
||||
{ type = "i", text = "#arccw.cvar.equipmenttime", var = "arccw_equipmenttime", min = 15, max = 3600, sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.throwinertia", var = "arccw_throwinertia", sv = true },
|
||||
{ type = "o", text = "#arccw.cvar.freeaim", var = "arccw_freeaim", sv = true,
|
||||
choices = {[0] = "#arccw.combobox.disabled", [1] = "#arccw.cvar.freeaim.1", [2] = "#arccw.cvar.freeaim.2"}},
|
||||
{ type = "b", text = "#arccw.cvar.override_crosshair_off", var = "arccw_override_crosshair_off", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.override_hud_off", var = "arccw_override_hud_off", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.override_barrellength", var = "arccw_override_nearwall", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.doorbust", var = "arccw_doorbust", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.override_lunge_off", var = "arccw_override_lunge_off", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.override_lunge_off.desc" },
|
||||
--[[]
|
||||
{ type = "b", text = "#arccw.cvar.limityear_enable", var = "arccw_limityear_enable", sv = true },
|
||||
{ type = "i", text = "#arccw.cvar.limityear", var = "arccw_limityear", min = 1800, max = 2100, sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.limityear.desc"},
|
||||
]]
|
||||
{ type = "b", text = "#arccw.cvar.bodydamagecancel", var = "arccw_bodydamagemult_cancel", sv = true},
|
||||
{ type = "c", text = "#arccw.cvar.bodydamagecancel.desc"},
|
||||
{ type = "b", text = "#arccw.cvar.desync", var = "arccw_desync", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.desync.desc" },
|
||||
{ type = "f", text = "#arccw.cvar.weakensounds", var = "arccw_weakensounds", min = -20, max = 30, sv = true},
|
||||
{ type = "c", text = "#arccw.cvar.weakensounds.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.reloadincust", var = "arccw_reloadincust", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.reloadincust.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.aimassist", var = "arccw_aimassist", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.aimassist.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.aimassist_head", var = "arccw_aimassist_head", sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.aimassist_cone", var = "arccw_aimassist_cone", min = 0, max = 360, sv = true},
|
||||
{ type = "f", text = "#arccw.cvar.aimassist_distance", var = "arccw_aimassist_distance", min = 128, max = 4096, sv = true},
|
||||
{ type = "f", text = "#arccw.cvar.aimassist_intensity", var = "arccw_aimassist_intensity", min = 0, max = 10, sv = true},
|
||||
}
|
||||
|
||||
local AmmoPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "o", text = "#arccw.cvar.ammo_detonationmode", var = "arccw_ammo_detonationmode", sv = true,
|
||||
choices = {[-1] = "#arccw.cvar.ammo_detonationmode.-1", [0] = "#arccw.cvar.ammo_detonationmode.0", [1] = "#arccw.cvar.ammo_detonationmode.1", [2] = "#arccw.cvar.ammo_detonationmode.2"}},
|
||||
{ type = "b", text = "#arccw.cvar.ammo_autopickup", var = "arccw_ammo_autopickup", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.ammo_largetrigger", var = "arccw_ammo_largetrigger", sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.ammo_rareskin", var = "arccw_ammo_rareskin", min = 0, max = 1, sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.ammo_chaindet", var = "arccw_ammo_chaindet", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.ammo_replace", var = "arccw_ammo_replace", sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_ammohealth", var = "arccw_mult_ammohealth", min = -1, max = 10, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_ammoamount", var = "arccw_mult_ammoamount", min = 0.1, max = 10, sv = true },
|
||||
}
|
||||
|
||||
local AttsPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "h", text = "#arccw.attdesc1" },
|
||||
{ type = "h", text = "#arccw.attdesc2" },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_free", var = "arccw_attinv_free", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.attinv_lockmode", var = "arccw_attinv_lockmode", sv = true },
|
||||
{ type = "o", text = "#arccw.cvar.attinv_loseondie", var = "arccw_attinv_loseondie", sv = true,
|
||||
choices = {[0] = "#arccw.combobox.disabled", [1] = "#arccw.cvar.attinv_loseondie.1", [2] = "#arccw.cvar.attinv_loseondie.2"}},
|
||||
{ type = "i", text = "#arccw.cvar.attinv_giveonspawn", var = "arccw_attinv_giveonspawn", min = 0, max = 100, sv = true },
|
||||
{ type = "i", text = "#arccw.cvar.atts_pickx", var = "arccw_atts_pickx", min = 0, max = 10, sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.atts_pickx.desc", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.enable_dropping", var = "arccw_enable_dropping", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.atts_spawnrand", var = "arccw_atts_spawnrand", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.atts_ubglautoload", var = "arccw_atts_ubglautoload", sv = true },
|
||||
{ type = "p", text = "#arccw.blacklist", func = function() RunConsoleCommand("arccw_blacklist") end },
|
||||
}
|
||||
|
||||
local DevPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "h", text = "#arccw.dev_info1" },
|
||||
{ type = "h", text = "#arccw.dev_info2" },
|
||||
{ type = "b", text = "#arccw.cvar.dev_reloadonadmincleanup", var = "arccw_reloadatts_mapcleanup", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_reloadonadmincleanup.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.dev_registerentities", var = "arccw_reloadatts_registerentities", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_registerentities.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.dev_showignored", var = "arccw_reloadatts_showignored", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_showignored.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.dev_debug", var = "arccw_dev_debug", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_debug.desc" },
|
||||
--{ type = "b", text = "Customization Menu Overhaul beta", var = "arccw_dev_cust2beta", sv = true },
|
||||
--{ type = "c", text = "Enable the customization menu overhaul. Remove this convar when we done doe" },
|
||||
{ type = "b", text = "#arccw.cvar.dev_alwaysready", var = "arccw_dev_alwaysready", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_alwaysready.desc" },
|
||||
{ type = "b", text = "#arccw.cvar.dev_benchgun", var = "arccw_dev_benchgun", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_benchgun.desc" },
|
||||
{ type = "t", text = "#arccw.cvar.dev_benchgun_custom", var = "arccw_dev_benchgun_custom", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.dev_benchgun_custom.desc" },
|
||||
{ type = "o", text = "Firing Info", var = "arccw_dev_shootinfo", sv = true,
|
||||
choices = {[0] = "#arccw.combobox.disabled", [1] = "1 - Damage", [2] = "2 - Penetration", [3] = "3 - Dispersion"}},
|
||||
{ type = "c", text = "Show information when shooting the weapon. Requires 'developer' ConVar to be enabled." },
|
||||
{ type = "p", text = "#arccw.cvar.dev_reloadatts", func = function() RunConsoleCommand("arccw_reloadatts") end },
|
||||
{ type = "h", text = "#arccw.cvar.dev_reloadatts.desc" },
|
||||
{ type = "p", text = "#arccw.cvar.dev_reloadlangs", func = function() RunConsoleCommand("arccw_reloadlangs") end },
|
||||
{ type = "h", text = "#arccw.cvar.dev_reloadlangs.desc" },
|
||||
{ type = "p", text = "#arccw.cvar.dev_spawnmenureload", func = function() RunConsoleCommand("spawnmenu_reload") end },
|
||||
{ type = "h", text = "#arccw.cvar.dev_spawnmenureload.desc" },
|
||||
}
|
||||
|
||||
|
||||
local ScopesPanel = {
|
||||
{ type = "h", text = "#arccw.clientcfg" },
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.cheapscopes", var = "arccw_cheapscopes" },
|
||||
{ type = "c", text = "#arccw.cvar.cheapscopesv2.desc" },
|
||||
{ type = "f", text = "#arccw.cvar.cheapscopesv2_ratio", var = "arccw_cheapscopesv2_ratio", min = 0, max = 1},
|
||||
{ type = "c", text = "#arccw.cvar.cheapscopesv2_ratio.desc" },
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.drawbarrel", var = "arccw_drawbarrel" },
|
||||
{ type = "f", text = "#arccw.cvar.vm_addads", var = "arccw_vm_add_ads", min = -0.5, max = 9 },
|
||||
{ type = "b", text = "#arccw.cvar.scopepp", var = "arccw_scopepp" },
|
||||
{ type = "b", text = "#arccw.cvar.thermalpp", var = "arccw_thermalpp" },
|
||||
{ type = "b", text = "#arccw.cvar.scopepp_refract", var = "arccw_scopepp_refract" },
|
||||
{ type = "f", text = "#arccw.cvar.scopepp_refract_ratio", var = "arccw_scopepp_refract_ratio", min = -1, max = 2 },
|
||||
|
||||
{ type = "m", text = "#arccw.cvar.scope_clr", r = "arccw_scope_r", g = "arccw_scope_g", b = "arccw_scope_b" },
|
||||
}
|
||||
|
||||
local MultsPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "f", text = "#arccw.cvar.mult_damage", var = "arccw_mult_damage", min = 0, max = 10, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_npcdamage", var = "arccw_mult_npcdamage", min = 0, max = 5, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_range", var = "arccw_mult_range", min = 0.1, max = 5, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_recoil", var = "arccw_mult_recoil", min = 0, max = 5, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_penetration", var = "arccw_mult_penetration", min = 0, max = 5, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_hipfire", var = "arccw_mult_hipfire", min = 0, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_accuracy", var = "arccw_mult_accuracy", min = 0, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_movedisp", var = "arccw_mult_movedisp", min = 0, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_reloadtime", var = "arccw_mult_reloadtime", min = 0.2, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_sighttime", var = "arccw_mult_sighttime", min = 0.25, max = 3, sv = true },
|
||||
{ type = "i", text = "#arccw.cvar.mult_defaultammo", var = "arccw_mult_defaultammo", min = 0, max = 10, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_attchance", var = "arccw_mult_attchance", min = 0, max = 10, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_heat", var = "arccw_mult_heat", min = 0, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_crouchdisp", var = "arccw_mult_crouchdisp", min = 0, max = 1, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_crouchrecoil", var = "arccw_mult_crouchrecoil", min = 0, max = 1, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_movespeed", var = "arccw_mult_movespeed", min = 0, max = 1, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_movespeedads", var = "arccw_mult_movespeedads", min = 0, max = 1, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_movespeedfire", var = "arccw_mult_movespeedfire", min = 0, max = 1, sv = true },
|
||||
|
||||
{ type = "f", text = "#arccw.cvar.mult_meleedamage", var = "arccw_mult_meleedamage", min = 0, max = 4, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_meleetime", var = "arccw_mult_meleetime", min = 0, max = 3, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_malfunction", var = "arccw_mult_malfunction", min = 0, max = 10, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_rpm", var = "arccw_mult_rpm", min = 0.1, max = 5, sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.mult_rpm.desc" },
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.mult_startunloaded", var = "arccw_mult_startunloaded", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.mult_shootwhilesprinting", var = "arccw_mult_shootwhilesprinting", sv = true },
|
||||
{ type = "o", text = "#arccw.cvar.malfunction", var = "arccw_malfunction", sv = true,
|
||||
choices = {[0] = "#arccw.cvar.malfunction.0", [1] = "#arccw.cvar.malfunction.1", [2] = "#arccw.cvar.malfunction.2"}},
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.mult_bottomlessclip", var = "arccw_mult_bottomlessclip", sv = true },
|
||||
{ type = "c", text = "Weapon feeds from reserve." },
|
||||
{ type = "b", text = "#arccw.cvar.mult_infiniteammo", var = "arccw_mult_infiniteammo", sv = true },
|
||||
{ type = "c", text = "Infinite reserve ammo." },
|
||||
|
||||
{ type = "b", text = "#arccw.cvar.enable_sway", var = "arccw_enable_sway", sv = true },
|
||||
{ type = "c", text = "#arccw.cvar.enable_sway.desc" },
|
||||
{ type = "f", text = "#arccw.cvar.add_sway", var = "arccw_add_sway", min = 0, max = 5, sv = true },
|
||||
{ type = "f", text = "#arccw.cvar.mult_sway", var = "arccw_mult_sway", min = 0, max = 10, sv = true },
|
||||
}
|
||||
|
||||
local HelpPanel = {
|
||||
{ type = "h", text = "Links to the ArcCW online wiki." },
|
||||
|
||||
{ type = "url", text = "Checking for Addon Conflicts",
|
||||
url = "https://github.com/HaodongMo/ArcCW/wiki/Help-&-Troubleshooting#checking-for-addon-conflicts", },
|
||||
{ type = "c", text = "Check for addon conflicts that may be causing issues with ArcCW weapons." },
|
||||
|
||||
{ type = "url", text = "Cheap Scopes",
|
||||
url = "https://github.com/HaodongMo/ArcCW/wiki/Help-&-Troubleshooting#cheap-scopes", },
|
||||
{ type = "c", text = "'Why are my scopes so blurry?'" },
|
||||
|
||||
{ type = "url", text = "Underbarrel Weapons",
|
||||
url = "https://github.com/HaodongMo/ArcCW/wiki/Help-&-Troubleshooting#underbarrel-weapons", },
|
||||
{ type = "c", text = "'Why aren't my underbarrels weapons working?'" },
|
||||
{ type = "c", text = "'How do I use my underbarrel weapons?'" },
|
||||
|
||||
{ type = "url", text = "Free Attachments",
|
||||
url = "https://github.com/HaodongMo/ArcCW/wiki/Help-&-Troubleshooting#free-attachments", },
|
||||
{ type = "c", text = "'Why are my attachments red?'" },
|
||||
|
||||
{ type = "url", text = "cam.End3D errors",
|
||||
url = "https://github.com/HaodongMo/ArcCW/wiki/Help-&-Troubleshooting#camend3d-errors", },
|
||||
{ type = "c", text = "'Warning: Calling cam.End3D because someone forgot to!'" },
|
||||
|
||||
}
|
||||
|
||||
local MultPresets = {
|
||||
["#preset.default"] = { -- this needs fills
|
||||
arccw_mult_damage = "1",
|
||||
arccw_mult_npcdamage = "1",
|
||||
arccw_mult_range = "1",
|
||||
arccw_mult_recoil = "1",
|
||||
arccw_mult_penetration = "1",
|
||||
arccw_mult_hipfire = "1",
|
||||
arccw_mult_movedisp = "1",
|
||||
arccw_mult_reloadtime = "1",
|
||||
arccw_mult_sighttime = "1",
|
||||
arccw_mult_defaultclip = "1",
|
||||
arccw_mult_attchance = "1",
|
||||
arccw_mult_crouchdisp = "1",
|
||||
arccw_mult_crouchrecoil = "1",
|
||||
arccw_mult_movespeed = "1",
|
||||
arccw_mult_movespeedads = "1",
|
||||
arccw_mult_movespeedfire = "1",
|
||||
arccw_mult_heat = "1",
|
||||
arccw_mult_meleetime = "1",
|
||||
arccw_mult_meleedamage = "1",
|
||||
arccw_mult_malfunction = "1",
|
||||
arccw_mult_startunloaded = "0",
|
||||
arccw_mult_shootwhilesprinting = "0",
|
||||
arccw_mult_bottomlessclip = "0",
|
||||
arccw_mult_infiniteammo = "0",
|
||||
}
|
||||
}
|
||||
|
||||
local NPCsPanel = {
|
||||
{ type = "h", text = "#arccw.adminonly" },
|
||||
{ type = "b", text = "Replace NPC Weapons", var = "arccw_npc_replace", sv = true },
|
||||
{ type = "b", text = "NPC Attachments", var = "arccw_npc_atts", sv = true },
|
||||
}
|
||||
|
||||
function ArcCW.NetworkConvar(convar, value, p)
|
||||
if IsValid(LocalPlayer()) and !LocalPlayer():IsAdmin() then return end
|
||||
if (p.TickCreated or 0) == UnPredictedCurTime() then return end
|
||||
if value == true or value == false then
|
||||
value = value and 1 or 0
|
||||
end
|
||||
if IsColor(value) then
|
||||
value = tostring(value.r) .. " " .. tostring(value.g) .. " " .. tostring(value.b) .. " " .. tostring(value.a)
|
||||
end
|
||||
|
||||
local command = convar .. " " .. tostring(value)
|
||||
|
||||
local timername = "change" .. convar
|
||||
|
||||
if timer.Exists(timername) then
|
||||
timer.Remove(timername)
|
||||
end
|
||||
|
||||
timer.Create(timername, 0.25, 1, function()
|
||||
net.Start("arccw_sendconvar")
|
||||
net.WriteString(command)
|
||||
net.SendToServer()
|
||||
end)
|
||||
end
|
||||
|
||||
function ArcCW.GeneratePanelElements(panel, table)
|
||||
local AddControl = {
|
||||
["h"] = function(p, d) return p:Help(d.text) end,
|
||||
["c"] = function(p, d) return p:ControlHelp(d.text) end,
|
||||
["b"] = function(p, d) return p:CheckBox(d.text, d.var) end,
|
||||
["i"] = function(p, d) return p:NumSlider(d.text, d.var, d.min, d.max, 0) end,
|
||||
["f"] = function(p, d) return p:NumSlider(d.text, d.var, d.min, d.max, 2) end,
|
||||
["m"] = function(p, d) --return p:AddControl("color", { Label = d.text, Red = d.r, Green = d.g, Blue = d.b, Alpha = d.a })
|
||||
local ctrl = vgui.Create("DColorMixer", p)
|
||||
ctrl:SetLabel( d.text ) ctrl:SetConVarR( d.r ) ctrl:SetConVarG( d.g ) ctrl:SetConVarB( d.b ) ctrl:SetConVarA( d.a )
|
||||
p:AddItem( ctrl ) return ctrl
|
||||
end,
|
||||
["p"] = function(p, d) local b = p:Button(d.text) b.DoClick = d.func return b end,
|
||||
["url"] = function(p, d) local b = p:Button(d.text) b.DoClick = function() gui.OpenURL(d.url) end return b end,
|
||||
["t"] = function(p, d) return p:TextEntry(d.text, d.var) end,
|
||||
["o"] = function(p, d) local cb = p:ComboBox(d.text, d.var) for k, v in pairs(d.choices) do cb:AddChoice(v, k) end return cb end,
|
||||
["d"] = function(p, d)
|
||||
local s = vgui.Create("DSizeToContents", p) s:SetSizeX(false) s:Dock(TOP) s:InvalidateLayout()
|
||||
local l = vgui.Create("DLabel", s) l:SetText(d.text) l:SetTextColor(Color(0, 0, 0)) l:Dock(TOP) l:SetContentAlignment(5)
|
||||
local bd = vgui.Create("DBinder", s)
|
||||
if input.LookupBinding(d.var) then bd:SetValue(input.GetKeyCode(input.LookupBinding(d.var))) end
|
||||
bd.OnChange = function(b, k)
|
||||
if k and input.GetKeyName(k) then
|
||||
local str = input.LookupKeyBinding(k)
|
||||
if str then
|
||||
str = string.Replace(str, d.var .. "; ", "")
|
||||
str = string.Replace(str, d.var, "")
|
||||
chat.AddText(Color(255, 255, 255), language.GetPhrase("arccw.bind.msg"), Color(255, 128, 0), "bind " .. input.GetKeyName(k) .. " \"" .. str .. "; " .. d.var .. "\"")
|
||||
else
|
||||
chat.AddText(Color(255, 255, 255), language.GetPhrase("arccw.bind.msg"), Color(255, 128, 0), "bind " .. input.GetKeyName(k) .. " " .. d.var .. "")
|
||||
end
|
||||
end
|
||||
end
|
||||
bd:Dock(TOP) p:AddItem(s) return s end
|
||||
}
|
||||
|
||||
local concommands = {
|
||||
["b"] = true,
|
||||
["i"] = true,
|
||||
["f"] = true,
|
||||
["m"] = true,
|
||||
["t"] = true,
|
||||
}
|
||||
|
||||
for _, data in SortedPairs(table) do
|
||||
local p = AddControl[data.type](panel, data)
|
||||
|
||||
if concommands[data.type] and data.sv then
|
||||
p.TickCreated = UnPredictedCurTime()
|
||||
if data.type == "b" then
|
||||
p.OnChange = function(self, bval)
|
||||
ArcCW.NetworkConvar(data.var, bval, self)
|
||||
end
|
||||
elseif data.type == "i" or data.type == "f" or data.type == "m" or data.type == "t" then
|
||||
p.OnValueChanged = function(self, bval)
|
||||
ArcCW.NetworkConvar(data.var, bval, self)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local CrosshairPresets = {
|
||||
["#preset.default"] = {
|
||||
arccw_crosshair_length = "4",
|
||||
arccw_crosshair_thickness = "1",
|
||||
arccw_crosshair_gap = "1",
|
||||
arccw_crosshair_dot = "1",
|
||||
arccw_crosshair_shotgun = "1",
|
||||
arccw_crosshair_equip = "1",
|
||||
arccw_crosshair_static = "0",
|
||||
arccw_crosshair_clump = "0",
|
||||
arccw_crosshair_clump_outline = "0",
|
||||
arccw_crosshair_clump_always = "0",
|
||||
arccw_crosshair_clr_r = "255",
|
||||
arccw_crosshair_clr_g = "255",
|
||||
arccw_crosshair_clr_b = "255",
|
||||
arccw_crosshair_clr_a = "255",
|
||||
arccw_crosshair_outline = "2",
|
||||
arccw_crosshair_outline_r = "0",
|
||||
arccw_crosshair_outline_g = "0",
|
||||
arccw_crosshair_outline_b = "0",
|
||||
arccw_crosshair_outline_a = "255",
|
||||
arccw_scope_r = "255",
|
||||
arccw_scope_g = "0",
|
||||
arccw_scope_b = "0",
|
||||
},
|
||||
["#arccw.crosshair.tfa"] = {
|
||||
arccw_crosshair_length = "8",
|
||||
arccw_crosshair_thickness = "0.4",
|
||||
arccw_crosshair_gap = "1",
|
||||
arccw_crosshair_dot = "0",
|
||||
arccw_crosshair_shotgun = "0",
|
||||
arccw_crosshair_equip = "0",
|
||||
arccw_crosshair_static = "0",
|
||||
arccw_crosshair_clump = "0",
|
||||
arccw_crosshair_clump_outline = "0",
|
||||
arccw_crosshair_clump_always = "0",
|
||||
arccw_crosshair_clr_r = "255",
|
||||
arccw_crosshair_clr_g = "255",
|
||||
arccw_crosshair_clr_b = "255",
|
||||
arccw_crosshair_clr_a = "255",
|
||||
arccw_crosshair_outline = "2",
|
||||
arccw_crosshair_outline_r = "0",
|
||||
arccw_crosshair_outline_g = "0",
|
||||
arccw_crosshair_outline_b = "0",
|
||||
arccw_crosshair_outline_a = "255",
|
||||
arccw_scope_r = "255",
|
||||
arccw_scope_g = "0",
|
||||
arccw_scope_b = "0",
|
||||
},
|
||||
["#arccw.crosshair.cw2"] = {
|
||||
arccw_crosshair_length = "3.5",
|
||||
arccw_crosshair_thickness = "0.4",
|
||||
arccw_crosshair_gap = "1",
|
||||
arccw_crosshair_dot = "0",
|
||||
arccw_crosshair_shotgun = "0",
|
||||
arccw_crosshair_equip = "0",
|
||||
arccw_crosshair_static = "0",
|
||||
arccw_crosshair_clump = "1",
|
||||
arccw_crosshair_clump_outline = "1",
|
||||
arccw_crosshair_clump_always = "0",
|
||||
arccw_crosshair_clr_r = "255",
|
||||
arccw_crosshair_clr_g = "255",
|
||||
arccw_crosshair_clr_b = "255",
|
||||
arccw_crosshair_clr_a = "200",
|
||||
arccw_crosshair_outline = "2",
|
||||
arccw_crosshair_outline_r = "0",
|
||||
arccw_crosshair_outline_g = "0",
|
||||
arccw_crosshair_outline_b = "0",
|
||||
arccw_crosshair_outline_a = "200",
|
||||
arccw_scope_r = "255",
|
||||
arccw_scope_g = "0",
|
||||
arccw_scope_b = "0",
|
||||
},
|
||||
["#arccw.crosshair.cs"] = {
|
||||
arccw_crosshair_length = "3",
|
||||
arccw_crosshair_thickness = "0.4",
|
||||
arccw_crosshair_gap = "0.4",
|
||||
arccw_crosshair_dot = "0",
|
||||
arccw_crosshair_shotgun = "0",
|
||||
arccw_crosshair_equip = "0",
|
||||
arccw_crosshair_static = "1",
|
||||
arccw_crosshair_clump = "0",
|
||||
arccw_crosshair_clump_outline = "0",
|
||||
arccw_crosshair_clump_always = "0",
|
||||
arccw_crosshair_clr_r = "0",
|
||||
arccw_crosshair_clr_g = "255",
|
||||
arccw_crosshair_clr_b = "0",
|
||||
arccw_crosshair_clr_a = "255",
|
||||
arccw_crosshair_outline = "0",
|
||||
arccw_crosshair_outline_r = "0",
|
||||
arccw_crosshair_outline_g = "0",
|
||||
arccw_crosshair_outline_b = "0",
|
||||
arccw_crosshair_outline_a = "0",
|
||||
arccw_scope_r = "255",
|
||||
arccw_scope_g = "0",
|
||||
arccw_scope_b = "0",
|
||||
},
|
||||
["#arccw.crosshair.light"] = {
|
||||
arccw_crosshair_length = "4",
|
||||
arccw_crosshair_thickness = "0.8",
|
||||
arccw_crosshair_gap = "1",
|
||||
arccw_crosshair_dot = "0",
|
||||
arccw_crosshair_shotgun = "1",
|
||||
arccw_crosshair_equip = "1",
|
||||
arccw_crosshair_static = "0",
|
||||
arccw_crosshair_clump = "1",
|
||||
arccw_crosshair_clump_outline = "1",
|
||||
arccw_crosshair_clump_always = "0",
|
||||
arccw_crosshair_clr_r = "255",
|
||||
arccw_crosshair_clr_g = "255",
|
||||
arccw_crosshair_clr_b = "255",
|
||||
arccw_crosshair_clr_a = "200",
|
||||
arccw_crosshair_outline = "2",
|
||||
arccw_crosshair_outline_r = "0",
|
||||
arccw_crosshair_outline_g = "0",
|
||||
arccw_crosshair_outline_b = "0",
|
||||
arccw_crosshair_outline_a = "200",
|
||||
arccw_scope_r = "255",
|
||||
arccw_scope_g = "0",
|
||||
arccw_scope_b = "0",
|
||||
},
|
||||
}
|
||||
|
||||
local ViewmodelPresets = {
|
||||
["#preset.default"] = {
|
||||
arccw_vm_coolsway = "1",
|
||||
arccw_vm_coolview = "1",
|
||||
arccw_vm_right = "0",
|
||||
arccw_vm_forward = "0",
|
||||
arccw_vm_up = "0",
|
||||
arccw_vm_look_xmult = "1",
|
||||
arccw_vm_look_ymult = "1",
|
||||
arccw_vm_sway_xmult = "1",
|
||||
arccw_vm_sway_ymult = "1",
|
||||
arccw_vm_sway_zmult = "1",
|
||||
arccw_vm_sway_speedmult = "1",
|
||||
arccw_vm_coolview_mult = "1",
|
||||
}
|
||||
}
|
||||
|
||||
function ArcCW_Options_Bullet(panel)
|
||||
ArcCW.GeneratePanelElements(panel, BulletPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Client(panel)
|
||||
ArcCW.GeneratePanelElements(panel, ClientPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Perf(panel)
|
||||
ArcCW.GeneratePanelElements(panel, PerformancePanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Viewmodel(panel, no_preset)
|
||||
if !no_preset then
|
||||
panel:AddControl("ComboBox", {
|
||||
MenuButton = "1",
|
||||
Label = "#Presets",
|
||||
Folder = "arccw_vm",
|
||||
CVars = { "" },
|
||||
Options = ViewmodelPresets
|
||||
})
|
||||
end
|
||||
|
||||
ArcCW.GeneratePanelElements(panel, ViewmodelPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_HUD(panel)
|
||||
ArcCW.GeneratePanelElements(panel, HudPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Dev(panel)
|
||||
ArcCW.GeneratePanelElements(panel, DevPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Crosshair(panel, no_preset)
|
||||
if !no_preset then
|
||||
panel:AddControl("ComboBox", {
|
||||
MenuButton = "1",
|
||||
Label = "#Presets",
|
||||
Folder = "arccw_crosshair",
|
||||
CVars = { "" },
|
||||
Options = CrosshairPresets
|
||||
})
|
||||
end
|
||||
ArcCW.GeneratePanelElements(panel, CrosshairPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Server(panel)
|
||||
ArcCW.GeneratePanelElements(panel, ServerPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Ammo(panel)
|
||||
ArcCW.GeneratePanelElements(panel, AmmoPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Mults(panel, no_preset)
|
||||
if !no_preset then
|
||||
panel:AddControl("ComboBox", {
|
||||
MenuButton = "1",
|
||||
Label = "#Presets",
|
||||
Folder = "arccw_mults",
|
||||
CVars = { "" },
|
||||
Options = MultPresets
|
||||
})
|
||||
end
|
||||
ArcCW.GeneratePanelElements(panel, MultsPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Atts(panel)
|
||||
ArcCW.GeneratePanelElements(panel, AttsPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_NPC(panel)
|
||||
ArcCW.GeneratePanelElements(panel, NPCsPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Binds(panel)
|
||||
ArcCW.GeneratePanelElements(panel, BindsPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Scopes(panel)
|
||||
ArcCW.GeneratePanelElements(panel, ScopesPanel)
|
||||
end
|
||||
|
||||
function ArcCW_Options_Help(panel)
|
||||
ArcCW.GeneratePanelElements(panel, HelpPanel)
|
||||
end
|
||||
|
||||
ArcCW.ClientMenus = {
|
||||
["ArcCW_Options_Client"] = { text = "#arccw.menus.client", func = ArcCW_Options_Client, tbl = ClientPanel },
|
||||
["ArcCW_Options_Help"] = { text = "Help & Troubleshooting", func = ArcCW_Options_Help, tbl = HelpPanel },
|
||||
["ArcCW_Options_Bullet"] = { text = "#arccw.menus.bullet", func = ArcCW_Options_Bullet, tbl = BulletPanel },
|
||||
["ArcCW_Options_Perf"] = { text = "#arccw.menus.perf", func = ArcCW_Options_Perf, tbl = PerformancePanel },
|
||||
["ArcCW_Options_Viewmodel"] = { text = "#arccw.menus.vmodel", func = ArcCW_Options_Viewmodel, tbl = ViewmodelPanel },
|
||||
["ArcCW_Options_HUD"] = { text = "#arccw.menus.hud", func = ArcCW_Options_HUD, tbl = HudPanel },
|
||||
["ArcCW_Options_Crosshair"] = { text = "#arccw.menus.xhair", func = ArcCW_Options_Crosshair, tbl = CrosshairPanel },
|
||||
["ArcCW_Options_Server"] = { text = "#arccw.menus.server", func = ArcCW_Options_Server, tbl = ServerPanel },
|
||||
["ArcCW_Options_Ammo"] = { text = "#arccw.menus.ammo", func = ArcCW_Options_Ammo, tbl = AmmoPanel },
|
||||
["ArcCW_Options_Atts"] = { text = "#arccw.menus.atts", func = ArcCW_Options_Atts, tbl = AttsPanel },
|
||||
["ArcCW_Options_Mults"] = { text = "#arccw.menus.mults", func = ArcCW_Options_Mults, tbl = MultsPanel },
|
||||
["ArcCW_Options_Dev"] = { text = "#arccw.menus.dev", func = ArcCW_Options_Dev, tbl = DevPanel },
|
||||
["ArcCW_Options_NPC"] = { text = "#arccw.menus.npcs", func = ArcCW_Options_NPC, tbl = NPCsPanel },
|
||||
["ArcCW_Options_Binds"] = { text = "#arccw.menus.binds", func = ArcCW_Options_Binds, tbl = BindsPanel },
|
||||
["ArcCW_Options_Scopes"] = { text = "#arccw.menus.scopes", func = ArcCW_Options_Scopes, tbl = ScopesPanel },
|
||||
}
|
||||
|
||||
hook.Add("PopulateToolMenu", "ArcCW_Options", function()
|
||||
for menu, data in pairs(ArcCW.ClientMenus) do
|
||||
spawnmenu.AddToolMenuOption("Options", "ArcCW", menu, data.text, "", "", data.func)
|
||||
end
|
||||
end)
|
||||
|
||||
-- As of 2023-11-12, this feature is only available on dev branch.
|
||||
-- Won't break anything on release branch though.
|
||||
list.Set("ContentCategoryIcons", "ArcCW - Ammo", "arccw/icon_16.png")
|
||||
list.Set("ContentCategoryIcons", "ArcCW - Attachments", "arccw/icon_16.png")
|
||||
|
||||
-- Give all categories with ArcCW weapons our icon unless one is already set
|
||||
local first_populate = true
|
||||
hook.Add("PopulateWeapons", "ArcCW_ContentCategoryIcons", function()
|
||||
if !first_populate then return end
|
||||
for i, wep in pairs(weapons.GetList()) do
|
||||
local weap = weapons.Get(wep.ClassName)
|
||||
if weap and weap.ArcCW then
|
||||
local cat = weap.Category
|
||||
if cat and !list.HasEntry("ContentCategoryIcons", cat) then
|
||||
list.Set("ContentCategoryIcons", cat, "arccw/icon_16.png")
|
||||
end
|
||||
end
|
||||
end
|
||||
first_populate = false
|
||||
end)
|
||||
41
lua/arccw/client/cl_npc.lua
Normal file
41
lua/arccw/client/cl_npc.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
--[[
|
||||
| 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("PopulateMenuBar", "ArcCW_NPCWeaponMenu", function (menubar)
|
||||
local menu = menubar:AddOrGetMenu("ArcCW NPC Weapons")
|
||||
|
||||
menu:AddCVar("None", "gmod_npcweapon", "none")
|
||||
menu:AddSpacer()
|
||||
|
||||
local weaponlist = weapons.GetList()
|
||||
|
||||
table.SortByMember(weaponlist, "PrintName", true)
|
||||
|
||||
local cats = {}
|
||||
|
||||
for _, k in pairs(weaponlist) do
|
||||
if weapons.IsBasedOn(k.ClassName, "arccw_base") and !k.NotForNPCs and !k.PrimaryBash and k.Spawnable then
|
||||
local cat = k.Category or "Other"
|
||||
|
||||
if !cats[cat] then cats[cat] = menu:AddSubMenu(cat) end
|
||||
|
||||
cats[cat]:SetDeleteSelf(false)
|
||||
cats[cat]:AddCVar(k.PrintName, "gmod_npcweapon", k.ClassName)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
net.Receive("arccw_npcgiverequest", function(len, ply)
|
||||
local class = GetConVar("gmod_npcweapon"):GetString()
|
||||
|
||||
net.Start("arccw_npcgivereturn")
|
||||
net.WriteString(class)
|
||||
net.SendToServer()
|
||||
end)
|
||||
139
lua/arccw/client/cl_singleplayer.lua
Normal file
139
lua/arccw/client/cl_singleplayer.lua
Normal file
@@ -0,0 +1,139 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
net.Receive("arccw_sp_anim", function(len, ply)
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
local key = net.ReadString()
|
||||
local mul = net.ReadFloat()
|
||||
local start = net.ReadFloat()
|
||||
local time = net.ReadBool()
|
||||
--local skip = net.ReadBool() Unused
|
||||
local ignore = net.ReadBool()
|
||||
|
||||
if !wep.ArcCW then return end
|
||||
|
||||
wep:PlayAnimation(key, mul, false, start, time, false, ignore)
|
||||
end)
|
||||
|
||||
net.Receive("arccw_sp_checkpoints", function(len, ply)
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !wep.ArcCW then return end
|
||||
|
||||
wep.CheckpointAnimation = nil
|
||||
end)
|
||||
|
||||
net.Receive("arccw_sp_lhikanim", function(len, ply)
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
local key = net.ReadString()
|
||||
local time = net.ReadFloat() or -1
|
||||
|
||||
if !wep.ArcCW then return end
|
||||
|
||||
wep:DoLHIKAnimation(key, time)
|
||||
end)
|
||||
|
||||
net.Receive("arccw_sp_health", function(len, ply)
|
||||
local ent = net.ReadEntity()
|
||||
|
||||
if !IsValid(ent) then return end
|
||||
|
||||
ent:SetHealth(0)
|
||||
ent.ArcCWCLHealth = 0
|
||||
end)
|
||||
|
||||
local clr_b = Color(160, 190, 255)
|
||||
local clr_r = Color(255, 190, 190)
|
||||
|
||||
concommand.Add("arccw_listvmanims", function()
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !wep then return end
|
||||
|
||||
local vm = LocalPlayer():GetViewModel()
|
||||
|
||||
if !vm then return end
|
||||
|
||||
local alist = vm:GetSequenceList()
|
||||
|
||||
for i = 0, #alist do
|
||||
MsgC(clr_b, i, " --- ")
|
||||
MsgC(color_white, "\t", alist[i], "\n [")
|
||||
MsgC(clr_r, "\t", vm:SequenceDuration(i), "\n")
|
||||
end
|
||||
end)
|
||||
|
||||
concommand.Add("arccw_listvmbones", function()
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !wep then return end
|
||||
|
||||
local vm = LocalPlayer():GetViewModel()
|
||||
|
||||
if !vm then return end
|
||||
|
||||
for i = 0, (vm:GetBoneCount() - 1) do
|
||||
print(i .. " - " .. vm:GetBoneName(i))
|
||||
end
|
||||
end)
|
||||
|
||||
concommand.Add("arccw_listvmatts", function()
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !wep then return end
|
||||
|
||||
local vm = LocalPlayer():GetViewModel()
|
||||
|
||||
if !vm then return end
|
||||
|
||||
local alist = vm:GetAttachments()
|
||||
|
||||
for i = 1, #alist do
|
||||
MsgC(clr_b, i, " --- ")
|
||||
MsgC(color_white, "\tindex : ", alist[i].id, "\n [")
|
||||
MsgC(clr_r, "\tname: ", alist[i].name, "\n")
|
||||
end
|
||||
end)
|
||||
|
||||
concommand.Add("arccw_listvmbgs", function()
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !wep then return end
|
||||
|
||||
local vm = LocalPlayer():GetViewModel()
|
||||
|
||||
if !vm then return end
|
||||
|
||||
local alist = vm:GetBodyGroups()
|
||||
|
||||
for i = 1, #alist do
|
||||
local alistsm = alist[i].submodels
|
||||
local active = vm:GetBodygroup(alist[i].id)
|
||||
MsgC(clr_b, alist[i].id, " -- ")
|
||||
MsgC(color_white, "\t", alist[i].name, "\n")
|
||||
if alistsm then
|
||||
for j = 0, #alistsm do
|
||||
MsgC(active == j and color_white or clr_b, "\t" .. j, " - ")
|
||||
MsgC(active == j and color_white or clr_r, alistsm[j], "\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local lastwpn = nil
|
||||
|
||||
hook.Add("Think", "ArcCW_FixDeploy", function()
|
||||
--if !game.SinglePlayer() then return end
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if wep.ArcCW and wep != lastwpn then wep:Deploy() end
|
||||
|
||||
lastwpn = wep
|
||||
end)
|
||||
47
lua/arccw/client/cl_sway.lua
Normal file
47
lua/arccw/client/cl_sway.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
--[[
|
||||
| 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 enabled = ArcCW.ConVars["enable_sway"]
|
||||
local mult = ArcCW.ConVars["mult_sway"]
|
||||
|
||||
ArcCW.SwayDir = 0
|
||||
|
||||
function ArcCW.Sway(cmd)
|
||||
|
||||
local ply = LocalPlayer()
|
||||
local wpn = ply:GetActiveWeapon()
|
||||
|
||||
if !wpn.ArcCW then return end
|
||||
|
||||
local ang = cmd:GetViewAngles()
|
||||
|
||||
if wpn:GetState() == ArcCW.STATE_SIGHTS and !wpn.NoSway and enabled:GetBool() then
|
||||
local sway = mult:GetFloat() * wpn:GetBuff("Sway")
|
||||
--sway = sway * math.Clamp(1 / (wpn:GetActiveSights().ScopeMagnification or 1), 0.1, 1)
|
||||
if wpn:InBipod() then
|
||||
sway = sway * (wpn.BipodDispersion * wpn:GetBuff_Mult("Mult_BipodDispersion"))
|
||||
end
|
||||
if sway > 0.05 then
|
||||
ang.p = math.Clamp(ang.p + math.sin(CurTime() * 1.25) * FrameTime() * sway, -89, 89)
|
||||
|
||||
ArcCW.SwayDir = ArcCW.SwayDir + math.Rand(-360, 360) * FrameTime() / math.min(sway, 1)
|
||||
|
||||
ang.p = ang.p + math.sin(ArcCW.SwayDir) * FrameTime() * sway
|
||||
ang.y = ang.y + math.cos(ArcCW.SwayDir) * FrameTime() * sway
|
||||
|
||||
-- ang.p = ang.p + math.Rand(-1, 1) * FrameTime() * sway
|
||||
-- ang.y = ang.y + math.Rand(-1, 1) * FrameTime() * sway
|
||||
|
||||
cmd:SetViewAngles(ang)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("CreateMove", "ArcCW_Sway", ArcCW.Sway)
|
||||
377
lua/arccw/client/cl_ttt.lua
Normal file
377
lua/arccw/client/cl_ttt.lua
Normal file
@@ -0,0 +1,377 @@
|
||||
--[[
|
||||
| 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.ActiveGamemode() != "terrortown" then return end
|
||||
|
||||
ArcCW.ConVars["ttt_inforoundstart"] = CreateClientConVar("arccw_ttt_inforoundstart", "1", true, false, "Whether to show ArcCW config every round.")
|
||||
ArcCW.ConVars["ttt_rolecrosshair"] = CreateClientConVar("arccw_ttt_rolecrosshair", "1", true, false, "Whether to color your crosshair according to your role.")
|
||||
|
||||
ArcCW.TTT_AttInfo = ArcCW.TTT_AttInfo or {}
|
||||
|
||||
local TTTPanel = {
|
||||
{ type = "h", text = "#arccw.ttt_serverhelp" },
|
||||
{ type = "b", text = "#arccw.cvar.ttt_replace", var = "arccw_ttt_replace", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.ammo_replace", var = "arccw_ttt_ammo", sv = true },
|
||||
{ type = "b", text = "#arccw.cvar.ttt_atts", var = "arccw_ttt_atts", sv = true },
|
||||
{ type = "o", text = "#arccw.cvar.ttt_customizemode", var = "arccw_ttt_customizemode", sv = true,
|
||||
choices = {[0] = "#arccw.cvar.ttt_customizemode.0", [1] = "#arccw.cvar.ttt_customizemode.1", [2] = "#arccw.cvar.ttt_customizemode.2", [3] = "#arccw.cvar.ttt_customizemode.3"}},
|
||||
{ type = "o", text = "#arccw.cvar.ttt_bodyattinfo", var = "arccw_ttt_bodyattinfo", sv = true,
|
||||
choices = {[0] = "#arccw.combobox.disabled", [1] = "#arccw.cvar.ttt_bodyattinfo.1", [2] = "#arccw.cvar.ttt_bodyattinfo.2"}},
|
||||
{ type = "c", text = "#arccw.cvar.ttt_bodyattinfo.help"},
|
||||
}
|
||||
|
||||
net.Receive("arccw_ttt_bodyattinfo", function()
|
||||
local rag = net.ReadEntity()
|
||||
rag = rag:EntIndex()
|
||||
ArcCW.TTT_AttInfo[rag] = {}
|
||||
local atts = net.ReadUInt(8)
|
||||
for i = 1, atts do
|
||||
local id = net.ReadUInt(ArcCW.GetBitNecessity())
|
||||
if id != 0 then
|
||||
--ArcCW.TTT_AttInfo[rag][i] = ArcCW.AttachmentIDTable[id]
|
||||
table.insert(ArcCW.TTT_AttInfo[rag], ArcCW.AttachmentIDTable[id])
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("TTTBodySearchPopulate", "ArcCW_PopulateHUD", function(processed, raw)
|
||||
|
||||
-- Attachment Info
|
||||
local mode = ArcCW.ConVars["ttt_bodyattinfo"]:GetInt()
|
||||
local attTbl = ArcCW.TTT_AttInfo[raw.eidx]
|
||||
if attTbl and !table.IsEmpty(attTbl) and (mode == 2 or (mode == 1 and raw.detective_search)) then
|
||||
local finalTbl = {
|
||||
img = "arccw/ttticons/arccw_dropattinfo.png",
|
||||
p = 10.5, -- Right after the murder weapon
|
||||
text = ArcCW.GetTranslation(mode == 1 and "ttt.bodyatt.founddet" or "ttt.bodyatt.found")
|
||||
}
|
||||
local count = table.Count(attTbl)
|
||||
if count == 1 then
|
||||
if !ArcCW.AttachmentTable[attTbl[1]] then return end
|
||||
local printName = ArcCW.GetTranslation("name." .. attTbl[1]) or ArcCW.AttachmentTable[attTbl[1]].PrintName
|
||||
finalTbl.text = finalTbl.text .. ArcCW.GetTranslation("ttt.bodyatt.att1", {att = printName})
|
||||
elseif count == 2 then
|
||||
if !ArcCW.AttachmentTable[attTbl[1]] or !ArcCW.AttachmentTable[attTbl[2]] then return end
|
||||
local printName1 = ArcCW.GetTranslation("name." .. attTbl[1]) or ArcCW.AttachmentTable[attTbl[1]].PrintName
|
||||
local printName2 = ArcCW.GetTranslation("name." .. attTbl[2]) or ArcCW.AttachmentTable[attTbl[2]].PrintName
|
||||
finalTbl.text = finalTbl.text .. ArcCW.GetTranslation("ttt.bodyatt.att2", {att1 = printName1, att2 = printName2})
|
||||
else
|
||||
finalTbl.text = finalTbl.text .. ArcCW.GetTranslation("ttt.bodyatt.att3")
|
||||
local comma = false
|
||||
for i, v in pairs(attTbl) do
|
||||
if v and ArcCW.AttachmentTable[v] then
|
||||
local printName = ArcCW.GetTranslation("name." .. v) or ArcCW.AttachmentTable[v].PrintName
|
||||
finalTbl.text = finalTbl.text .. (comma and ", " or "") .. printName
|
||||
comma = true
|
||||
end
|
||||
end
|
||||
finalTbl.text = finalTbl.text .. "."
|
||||
end
|
||||
processed.arccw_atts = finalTbl
|
||||
end
|
||||
|
||||
-- kill info
|
||||
if bit.band(raw.dmg, DMG_BUCKSHOT) == DMG_BUCKSHOT then
|
||||
processed.dmg.text = LANG.GetTranslation("search_dmg_buckshot")
|
||||
processed.dmg.img = "arccw/ttticons/kill_buckshot.png"
|
||||
elseif bit.band(raw.dmg, DMG_NERVEGAS) == DMG_NERVEGAS then
|
||||
processed.dmg.text = LANG.GetTranslation("search_dmg_nervegas")
|
||||
processed.dmg.img = "arccw/ttticons/kill_nervegas.png"
|
||||
end
|
||||
end)
|
||||
|
||||
local function AddLine(parent, str)
|
||||
local pw, ph = parent:GetSize()
|
||||
local label = vgui.Create("DLabel", parent)
|
||||
label:SetSize(pw, ScreenScale(8))
|
||||
label:Dock(TOP)
|
||||
label:DockMargin(ScreenScale(4), ScreenScale(1), ScreenScale(4), ScreenScale(1))
|
||||
label:SetFont("ArcCW_8")
|
||||
label:SetTextColor(Color(255,255,255,255))
|
||||
label:SetText(str)
|
||||
return label
|
||||
end
|
||||
|
||||
local infoBox = nil
|
||||
local function CreateInfoBox(t)
|
||||
if infoBox then
|
||||
infoBox:Remove()
|
||||
timer.Remove("ArcCW_TTT_InfoBox")
|
||||
end
|
||||
|
||||
local totalw, totalh = ScrW() * 0.25, ScrH() * 0.2
|
||||
infoBox = vgui.Create("DPanel")
|
||||
infoBox:SetSize(totalw, totalh)
|
||||
infoBox:SetPos(ScreenScale(2), ScrH() * 0.5)
|
||||
infoBox.Paint = function(span, w, h)
|
||||
surface.SetDrawColor(Color(0, 0, 0, 150))
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
local label = vgui.Create("DLabel", infoBox)
|
||||
label:SetSize(totalw, ScreenScale(12))
|
||||
label:Dock(TOP)
|
||||
label:DockMargin(ScreenScale(4), ScreenScale(2), ScreenScale(4), ScreenScale(2))
|
||||
label:SetTextColor(Color(255,255,255,255))
|
||||
label:SetFont("ArcCW_12")
|
||||
label:SetText(ArcCW.GetTranslation("ttt.roundinfo"))
|
||||
|
||||
if ArcCW.ConVars["ttt_replace"]:GetBool() then
|
||||
AddLine(infoBox, ArcCW.GetTranslation("ttt.roundinfo.replace"))
|
||||
end
|
||||
|
||||
local cmode_str = "ttt.roundinfo.cmode" .. ArcCW.ConVars["ttt_customizemode"]:GetInt()
|
||||
AddLine(infoBox, ArcCW.GetTranslation("ttt.roundinfo.cmode") .. " " .. ArcCW.GetTranslation(cmode_str))
|
||||
|
||||
local att_str = ""
|
||||
local att_cvar = ArcCW.ConVars["attinv_free"]:GetBool()
|
||||
local att_cvar2 = ArcCW.ConVars["attinv_lockmode"]:GetBool()
|
||||
local att_cvar3 = ArcCW.ConVars["attinv_loseondie"]:GetBool()
|
||||
if att_cvar then
|
||||
att_str = "ttt.roundinfo.free"
|
||||
elseif att_cvar2 then
|
||||
att_str = "ttt.roundinfo.locking"
|
||||
else
|
||||
att_str = "ttt.roundinfo.inv"
|
||||
end
|
||||
att_str = ArcCW.GetTranslation(att_str)
|
||||
if att_cvar3 == 0 then
|
||||
att_str = att_str .. ", " .. ArcCW.GetTranslation("ttt.roundinfo.persist")
|
||||
elseif !att_cvar and !att_cvar2 and att_cvar3 == 2 then
|
||||
att_str = att_str .. ", " .. ArcCW.GetTranslation("ttt.roundinfo.drop")
|
||||
end
|
||||
if ArcCW.ConVars["atts_pickx"]:GetInt() > 0 then
|
||||
att_str = att_str .. ", " .. ArcCW.GetTranslation("ttt.roundinfo.pickx") .. " " .. ArcCW.ConVars["atts_pickx"]:GetInt()
|
||||
end
|
||||
AddLine(infoBox, ArcCW.GetTranslation("ttt.roundinfo.attmode") .. " " .. att_str)
|
||||
|
||||
local binfo_cvar = ArcCW.ConVars["ttt_bodyattinfo"]:GetInt()
|
||||
AddLine(infoBox, ArcCW.GetTranslation("ttt.roundinfo.bmode") .. " " .. ArcCW.GetTranslation("ttt.roundinfo.bmode" .. binfo_cvar))
|
||||
|
||||
if ArcCW.ConVars["ammo_replace"]:GetBool() and ArcCW.ConVars["mult_ammohealth"]:GetFloat() > 0 then
|
||||
local ainfo_cvar = ArcCW.ConVars["ammo_detonationmode"]:GetInt()
|
||||
local ainfo_str = ArcCW.GetTranslation("ttt.roundinfo.amode" .. ainfo_cvar)
|
||||
if ArcCW.ConVars["ammo_chaindet"]:GetBool() then
|
||||
ainfo_str = ainfo_str .. ", " .. ArcCW.GetTranslation("ttt.roundinfo.achain")
|
||||
end
|
||||
AddLine(infoBox, ArcCW.GetTranslation("ttt.roundinfo.amode") .. " " .. ainfo_str)
|
||||
end
|
||||
|
||||
|
||||
timer.Create("ArcCW_TTT_InfoBox", t, 1, function()
|
||||
if infoBox then infoBox:Remove() end
|
||||
end)
|
||||
end
|
||||
concommand.Add("arccw_ttt_info", function()
|
||||
CreateInfoBox(20)
|
||||
end, nil, "Shows a panel detailing current ArcCW settings.")
|
||||
|
||||
local turnoff = true
|
||||
hook.Add("TTTPrepareRound", "ArcCW_TTT_Info", function()
|
||||
if ArcCW.ConVars["ttt_inforoundstart"]:GetBool() then
|
||||
CreateInfoBox(15)
|
||||
if turnoff then
|
||||
turnoff = false
|
||||
chat.AddText(Color(255,255,255), "To turn off ArcCW config info, type 'arccw_ttt_inforoundstart 0' in console.")
|
||||
end
|
||||
end
|
||||
ArcCW.TTT_AttInfo = {}
|
||||
end)
|
||||
|
||||
if !TTT2 then
|
||||
hook.Add("TTTSettingsTabs", "ArcCW_TTT", function(dtabs)
|
||||
|
||||
local padding = dtabs:GetPadding() * 2
|
||||
|
||||
local panellist = vgui.Create("DPanelList", dtabs)
|
||||
panellist:StretchToParent(0,0,padding,0)
|
||||
panellist:EnableVerticalScrollbar(true)
|
||||
panellist:SetPadding(10)
|
||||
panellist:SetSpacing(10)
|
||||
|
||||
local dgui = vgui.Create("DForm", panellist)
|
||||
dgui:SetName("#arccw.menus.ttt_client")
|
||||
dgui:Help("#arccw.ttt_clienthelp")
|
||||
dgui:CheckBox("#arccw.cvar.ttt_inforoundstart", "arccw_ttt_inforoundstart")
|
||||
dgui:CheckBox("#arccw.cvar.ttt_rolecrosshair", "arccw_ttt_rolecrosshair")
|
||||
panellist:AddItem(dgui)
|
||||
|
||||
local dgui2 = vgui.Create("DForm", panellist)
|
||||
dgui2:SetName("#arccw.menus.ttt_server")
|
||||
ArcCW.GeneratePanelElements(dgui2, TTTPanel)
|
||||
panellist:AddItem(dgui2)
|
||||
|
||||
for menu, data in SortedPairs(ArcCW.ClientMenus) do
|
||||
local form = vgui.Create("DForm", panellist)
|
||||
form:SetName(data.text)
|
||||
data.func(form, true)
|
||||
form:SetExpanded(false)
|
||||
panellist:AddItem(form)
|
||||
end
|
||||
|
||||
dtabs:AddSheet("ArcCW", panellist, "icon16/gun.png", false, false, "ArcCW")
|
||||
end)
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- TTT2-specific support
|
||||
-----------------------------
|
||||
|
||||
hook.Add("TTTRenderEntityInfo", "ArcCW_TTT2_Weapons", function(tData)
|
||||
local client = LocalPlayer()
|
||||
local ent = tData:GetEntity()
|
||||
|
||||
|
||||
if !IsValid(client) or !client:IsTerror() or !client:Alive()
|
||||
or !IsValid(ent) or tData:GetEntityDistance() > 100 or !ent:IsWeapon()
|
||||
or !ent.ArcCW or ent.Throwing then
|
||||
return
|
||||
end
|
||||
|
||||
if tData:GetAmountDescriptionLines() > 0 then
|
||||
tData:AddDescriptionLine()
|
||||
end
|
||||
|
||||
local pickx = ArcCW.ConVars["atts_pickx"]:GetInt()
|
||||
|
||||
if !ent.CertainAboutAtts then
|
||||
tData:AddDescriptionLine("??? Attachments")
|
||||
elseif ent.Attachments and ent:CountAttachments() > 0 then
|
||||
tData:AddDescriptionLine(tostring(ent:CountAttachments()) .. (pickx > 0 and ("/" .. pickx) or "") .. ArcCW.GetTranslation("ttt.attachments"), nil)
|
||||
for i, v in pairs(ent.Attachments) do
|
||||
local attName = v.Installed
|
||||
if !attName and !v.MergeSlots then
|
||||
continue
|
||||
elseif v.MergeSlots and !attName then
|
||||
for _, s in pairs(v.MergeSlots) do
|
||||
if ent.Attachments[s] and ent.Attachments[s].Installed then
|
||||
attName = ent.Attachments[s].Installed
|
||||
break
|
||||
end
|
||||
end
|
||||
if !attName then continue end
|
||||
end
|
||||
local attTbl = ArcCW.AttachmentTable[attName]
|
||||
if attTbl and v.PrintName and attTbl.PrintName then
|
||||
local printName = ArcCW.GetTranslation("name." .. attName) or attTbl.PrintName
|
||||
tData:AddDescriptionLine(ArcCW.TryTranslation(v.PrintName) .. ": " .. printName, nil, {attTbl.Icon})
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("TTTRenderEntityInfo", "ArcCW_TTT2_Ammo", function(tData)
|
||||
local client = LocalPlayer()
|
||||
local ent = tData:GetEntity()
|
||||
|
||||
if !IsValid(client) or !client:IsTerror() or !client:Alive()
|
||||
or !IsValid(ent) or tData:GetEntityDistance() > 100 or !scripted_ents.IsBasedOn(ent:GetClass(), "arccw_ammo") then
|
||||
return
|
||||
end
|
||||
|
||||
-- enable targetID rendering
|
||||
tData:EnableText()
|
||||
tData:EnableOutline()
|
||||
tData:SetOutlineColor(client:GetRoleColor())
|
||||
|
||||
tData:SetTitle(ent.PrintName)
|
||||
tData:SetSubtitle(ArcCW.GetTranslation("ttt.ammo") .. ent:GetNWInt("truecount", ent.AmmoCount))
|
||||
end)
|
||||
|
||||
function ArcCW.TTT2_PopulateSettings(parent, title, tbl)
|
||||
|
||||
local form = vgui.CreateTTT2Form(parent, title)
|
||||
|
||||
for _, data in pairs(tbl) do
|
||||
|
||||
local name = data.text
|
||||
if string.Left(name, 1) == "#" then name = string.sub(name, 2) end
|
||||
|
||||
if data.type == "h" or data.type == "c" then
|
||||
form:MakeHelp({
|
||||
label = name
|
||||
})
|
||||
end
|
||||
|
||||
local cvar = GetConVar(data.var or "")
|
||||
if !cvar then continue end
|
||||
local option
|
||||
|
||||
if data.type == "b" then
|
||||
option = form:MakeCheckBox({
|
||||
label = name,
|
||||
default = tobool(cvar:GetDefault()),
|
||||
initial = cvar:GetBool(),
|
||||
OnChange = function(self, value)
|
||||
ArcCW.NetworkConvar(data.var, value, self)
|
||||
end,
|
||||
})
|
||||
option.TickCreated = UnPredictedCurTime()
|
||||
elseif data.type == "i" or data.type == "f" then
|
||||
option = form:MakeSlider({
|
||||
label = name,
|
||||
min = data.min,
|
||||
max = data.max,
|
||||
decimal = data.type == "i" and 0 or 2,
|
||||
default = tonumber(cvar:GetDefault()),
|
||||
initial = data.type == "i" and cvar:GetInt() or cvar:GetFloat(),
|
||||
OnChange = function(self, value)
|
||||
ArcCW.NetworkConvar(data.var, value, self)
|
||||
end,
|
||||
})
|
||||
option.TickCreated = UnPredictedCurTime()
|
||||
elseif data.type == "o" then
|
||||
option = form:MakeComboBox({
|
||||
label = name,
|
||||
default = tonumber(cvar:GetDefault()),
|
||||
initial = cvar:GetInt(),
|
||||
--choices = data.choices,
|
||||
OnChange = function(self, _, _, value)
|
||||
ArcCW.NetworkConvar(data.var, value, self)
|
||||
end,
|
||||
})
|
||||
option.TickCreated = UnPredictedCurTime()
|
||||
for k, v in pairs(data.choices) do
|
||||
option:AddChoice(v, k)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- In almost all cases TTT2 lang names are identical to ISO 639-1; except for simplified / traditional Chinese
|
||||
local ttt_langtranslate = {
|
||||
["zh-cn"] = "zh_hans", -- i find it funny the original ttt's lang name for this is "simpchinese". haha simp
|
||||
["zh-tw"] = "zh_tw",
|
||||
}
|
||||
|
||||
-- This is only necessary in TTT2, where we use its interface for convars
|
||||
function ArcCW.TTT2_LoadClientLangs()
|
||||
if !TTT2 then return end
|
||||
local files = file.Find("arccw/client/cl_languages/*", "LUA")
|
||||
for _, v in pairs(files) do
|
||||
local exp = string.Explode("_", string.lower(string.Replace(v, ".lua", "")))
|
||||
|
||||
local lang = exp[#exp]
|
||||
lang = ttt_langtranslate[lang] or LANG.GetNameFromAlias(lang)
|
||||
|
||||
-- cannot add to languages that do not exist
|
||||
if !LANG.IsLanguage(lang) then
|
||||
continue
|
||||
end
|
||||
|
||||
include("arccw/client/cl_languages/" .. v)
|
||||
for phrase, str in pairs(L) do
|
||||
LANG.AddToLanguage(lang, phrase, str)
|
||||
end
|
||||
print("Loaded ArcCW cl_language file " .. v .. " with " .. table.Count(L) .. " strings for TTT2.")
|
||||
L = nil
|
||||
end
|
||||
end
|
||||
hook.Add("PostGamemodeLoaded", "ArcCW_TTT2_Localization", ArcCW.TTT2_LoadClientLangs)
|
||||
167
lua/arccw/client/cl_uc_menu.lua
Normal file
167
lua/arccw/client/cl_uc_menu.lua
Normal file
@@ -0,0 +1,167 @@
|
||||
--[[
|
||||
| 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 function DoGenericSpawnmenuRightclickMenu(self)
|
||||
local clickmenu = DermaMenu()
|
||||
|
||||
clickmenu:AddOption("#spawnmenu.menu.copy", function()
|
||||
SetClipboardText(self:GetSpawnName())
|
||||
end):SetIcon("icon16/page_copy.png")
|
||||
|
||||
if isfunction(self.OpenMenuExtra) then
|
||||
self:OpenMenuExtra(clickmenu)
|
||||
end
|
||||
|
||||
clickmenu:Open()
|
||||
end
|
||||
|
||||
|
||||
CreateClientConVar("arccw_uc_menu", 1, true, false, "Cool menu!", 0, 1) -- extra safety cause people say it not work
|
||||
|
||||
hook.Add( "PopulateWeapons", "UC_AddWeaponContent", function( pnlContent, tree, node )
|
||||
|
||||
if !GetConVar("arccw_uc_menu"):GetBool() then return end
|
||||
|
||||
local AllUCWeapons = {}
|
||||
local AllUCWeaponsByPack = {}
|
||||
for classname, _ in pairs( weapons.GetList() ) do
|
||||
local wep = weapons.Get(_.ClassName)
|
||||
if wep.Spawnable and wep.Category == "ArcCW - Urban Coalition" then
|
||||
AllUCWeapons[_.ClassName] = wep
|
||||
end
|
||||
end
|
||||
|
||||
for classname, weapondata in pairs( AllUCWeapons ) do
|
||||
local pack = weapondata.UC_CategoryPack or "_Unknown"
|
||||
if pack then
|
||||
if !AllUCWeaponsByPack[pack] then AllUCWeaponsByPack[pack] = {} end
|
||||
table.insert(AllUCWeaponsByPack[pack], classname)
|
||||
end
|
||||
end
|
||||
|
||||
-- PrintTable(AllUCWeapons)
|
||||
-- PrintTable(AllUCWeaponsByPack)
|
||||
|
||||
local NodeToUse = nil
|
||||
-- MW base devs, I tried to recreate this spawnmenu stuff without looking at the code for yours
|
||||
-- BUT I WAS FUCKING BAWLING MY EYES OUT TRYING TO GET HOW TO DO THIS NEXT LINE
|
||||
-- anyways you guys probably are not reading this so i will end it here thank you
|
||||
-- ( i had the idea to do this kinda shit like. 2 days before smgs were pushed. i'm fucking crying i crode 😭😭😭 )
|
||||
for _, UCNode in pairs(tree:Root():GetChildNodes()) do
|
||||
if UCNode:GetText() == "ArcCW - Urban Coalition" then
|
||||
NodeToUse = UCNode
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if !NodeToUse then return end
|
||||
|
||||
NodeToUse.DoPopulate = function(self)
|
||||
-- If we've already populated it - forget it.
|
||||
if (self.PropPanel) then return end
|
||||
|
||||
-- Create the container panel
|
||||
self.PropPanel = vgui.Create("ContentContainer", pnlContent)
|
||||
self.PropPanel:SetVisible(false)
|
||||
self.PropPanel:SetTriggerSpawnlistChange(false)
|
||||
|
||||
for pack, class in SortedPairs( AllUCWeaponsByPack ) do
|
||||
local label = vgui.Create("ContentHeader", NodeToUse)
|
||||
label:SetText( string.Right( pack, #pack-1 ) )
|
||||
self.PropPanel:Add(label)
|
||||
|
||||
local alphabeticallist = {}
|
||||
for _, k in pairs(class) do table.insert(alphabeticallist, {AllUCWeapons[k], PrintName = AllUCWeapons[k].PrintName}) end
|
||||
for k, e in SortedPairsByMemberValue( alphabeticallist, "PrintName" ) do
|
||||
local ent = e[1]
|
||||
CreateUCWeapon( self.PropPanel, {
|
||||
nicename = ent.PrintName or ent.ClassName,
|
||||
spawnname = ent.ClassName,
|
||||
material = ent.IconOverride or "entities/" .. ent.ClassName .. ".png",
|
||||
admin = ent.AdminOnly,
|
||||
|
||||
uc_manu = ent.Trivia_Manufacturer,
|
||||
uc_year = ent.Trivia_Year,
|
||||
uc_cali = ent.Trivia_Calibre,
|
||||
} )
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- InternalDoClick is called on the first child node before our function override.
|
||||
-- Remove its results and regenerate our cool tab
|
||||
if tree:Root():GetChildNode(0) == NodeToUse then
|
||||
NodeToUse.PropPanel:Remove()
|
||||
NodeToUse.PropPanel = nil
|
||||
NodeToUse:InternalDoClick()
|
||||
end
|
||||
end )
|
||||
|
||||
function CreateUCWeapon(container, obj)
|
||||
if !obj.material then return end
|
||||
if !obj.nicename then return end
|
||||
if !obj.spawnname then return end
|
||||
local icon = vgui.Create("UCWepSel", container)
|
||||
icon:SetContentType("weapon")
|
||||
icon:SetSpawnName(obj.spawnname)
|
||||
|
||||
icon:SetName(obj.nicename, obj.spawnname, {
|
||||
manu = obj.uc_manu,
|
||||
year = obj.uc_year,
|
||||
cali = obj.uc_cali
|
||||
})
|
||||
|
||||
icon:SetMaterial(obj.material)
|
||||
icon:SetAdminOnly(obj.admin)
|
||||
icon:SetColor(Color(135, 206, 250, 255))
|
||||
|
||||
icon.DoClick = function()
|
||||
RunConsoleCommand("gm_giveswep", obj.spawnname)
|
||||
surface.PlaySound("ui/buttonclickrelease.wav")
|
||||
end
|
||||
|
||||
icon.DoMiddleClick = function()
|
||||
RunConsoleCommand("gm_spawnswep", obj.spawnname)
|
||||
surface.PlaySound("ui/buttonclickrelease.wav")
|
||||
end
|
||||
|
||||
icon.OpenMenuExtra = function(self, menu)
|
||||
menu:AddOption("#spawnmenu.menu.spawn_with_toolgun", function()
|
||||
RunConsoleCommand("gmod_tool", "creator")
|
||||
RunConsoleCommand("creator_type", "3")
|
||||
RunConsoleCommand("creator_name", obj.spawnname)
|
||||
end):SetIcon("icon16/brick_add.png")
|
||||
|
||||
local opt = menu:AddOption("#spawnmenu.menu.use_as_npc_gun", function()
|
||||
RunConsoleCommand("gmod_npcweapon", self:GetSpawnName())
|
||||
end)
|
||||
|
||||
if self:GetSpawnName() == GetConVar("gmod_npcweapon"):GetString() then
|
||||
opt:SetIcon("icon16/monkey_tick.png")
|
||||
else
|
||||
opt:SetIcon("icon16/monkey.png")
|
||||
end
|
||||
end
|
||||
|
||||
icon.OpenMenu = DoGenericSpawnmenuRightclickMenu
|
||||
|
||||
if IsValid(container) then
|
||||
container:Add(icon)
|
||||
end
|
||||
|
||||
return icon
|
||||
end
|
||||
|
||||
|
||||
-- fixed
|
||||
-- timer.Simple(2, function()
|
||||
-- ArcCW.IncompatibleAddons["2654687324"] = "Prevents Urban Decay's M16 from properly loading."
|
||||
-- end)
|
||||
23
lua/arccw/client/cl_vrmod.lua
Normal file
23
lua/arccw/client/cl_vrmod.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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 function addmenu()
|
||||
if !vrmod then return end
|
||||
|
||||
vrmod.AddInGameMenuItem("ArcCW Customize", 3, 1, function()
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if !IsValid(wep) or !wep.ArcCW then return end
|
||||
|
||||
wep:ToggleCustomizeHUD(!IsValid(ArcCW.InvHUD))
|
||||
end)
|
||||
end
|
||||
|
||||
hook.Add("VRMod_Start", "ArcCW", addmenu)
|
||||
216
lua/arccw/client/cl_warnings.lua
Normal file
216
lua/arccw/client/cl_warnings.lua
Normal file
@@ -0,0 +1,216 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ArcCW.IncompatibleAddons = {
|
||||
-- My Hands 8.1
|
||||
["847269692"] = "Causes viewmodel flickering, double viewmodel, may crash when customization menu opens",
|
||||
|
||||
-- My Hands 8
|
||||
["1890577397"] = "Causes viewmodel flickering, double viewmodel, may crash when customization menu opens",
|
||||
|
||||
-- Quick Weapon Menu
|
||||
["306149085"] = "Makes the customize menu mouse unable to appear.",
|
||||
|
||||
-- Neurotec
|
||||
["541434990"] = "Neurotec is ancient, half the base is missing, and it flat-out doesn't work. Causes all sorts of problems. For the love of god, let go.",
|
||||
|
||||
-- Improved Combine NPCs
|
||||
["476997621"] = "Causes issues with arms.",
|
||||
|
||||
-- Realistic Bullet Overhaul
|
||||
["1588705429"] = "Causes damage calculation to not work properly.",
|
||||
|
||||
-- Quake/Half Life View bobbing
|
||||
["378401390"] = "Causes most animations to not play properly.",
|
||||
|
||||
-- Thirteen's Physgun Glow
|
||||
["111249028"] = "Causes LHIK animations to flicker and not work properly.",
|
||||
|
||||
-- Viewmodel Lagger
|
||||
["1146104662"] = "Misaligns viewmodel in sights.",
|
||||
|
||||
-- Viewmodel Lagger (fixed)
|
||||
["2566560460"] = "Misaligns viewmodel in sights.",
|
||||
|
||||
-- VTools
|
||||
["DisplayDistancePlane"] = "Tool contains faulty hook, which has been removed to keep ArcCW functional.",
|
||||
}
|
||||
|
||||
local t = ArcCW.GetTranslation
|
||||
|
||||
local function ScreenScaleMulti(input)
|
||||
return ScreenScale(input) * ArcCW.ConVars["hud_size"]:GetFloat()
|
||||
end
|
||||
|
||||
function ArcCW.MakeIncompatibleWindow(tbl)
|
||||
local startTime = CurTime()
|
||||
|
||||
local window = vgui.Create( "DFrame" )
|
||||
window:SetSize( ScrW() * 0.6, ScrH() * 0.6)
|
||||
window:Center()
|
||||
window:SetTitle("")
|
||||
window:SetDraggable(false)
|
||||
window:SetVisible(true)
|
||||
window:ShowCloseButton(false)
|
||||
window:MakePopup()
|
||||
window.Paint = function(self, w, h)
|
||||
surface.SetDrawColor(0, 0, 0, 200)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
local title = vgui.Create("DLabel", window)
|
||||
title:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(26))
|
||||
title:Dock(TOP)
|
||||
title:SetFont("ArcCW_24")
|
||||
title:SetText(t("incompatible.title"))
|
||||
title:DockMargin(ScreenScaleMulti(16), 0, ScreenScaleMulti(16), ScreenScaleMulti(8))
|
||||
|
||||
local desc = vgui.Create("DLabel", window)
|
||||
desc:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(12))
|
||||
desc:Dock(TOP)
|
||||
desc:DockMargin(ScreenScaleMulti(4), 0, ScreenScaleMulti(4), 0)
|
||||
desc:SetFont("ArcCW_12")
|
||||
desc:SetText(t("incompatible.line1"))
|
||||
desc:SetContentAlignment(5)
|
||||
|
||||
local desc2 = vgui.Create("DLabel", window)
|
||||
desc2:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(12))
|
||||
desc2:Dock(TOP)
|
||||
desc2:DockMargin(ScreenScaleMulti(4), 0, ScreenScaleMulti(4), ScreenScaleMulti(4))
|
||||
desc2:SetFont("ArcCW_12")
|
||||
desc2:SetText(t("incompatible.line2"))
|
||||
desc2:SetContentAlignment(5)
|
||||
|
||||
local neverAgain = vgui.Create("DButton", window)
|
||||
neverAgain:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(20))
|
||||
neverAgain:SetText("")
|
||||
neverAgain:Dock(BOTTOM)
|
||||
neverAgain:DockMargin(ScreenScaleMulti(48), ScreenScaleMulti(2), ScreenScaleMulti(48), ScreenScaleMulti(2))
|
||||
neverAgain.OnMousePressed = function(spaa, kc)
|
||||
if CurTime() > startTime + 10 then
|
||||
local simpleTbl = {}
|
||||
for _, v in pairs(tbl) do simpleTbl[tostring(v.wsid)] = true end
|
||||
file.Write("arccw_incompatible.txt", util.TableToJSON(simpleTbl))
|
||||
window:Close()
|
||||
window:Remove()
|
||||
chat.AddText(Color(255,0,0),t("incompatible.never.confirm"))
|
||||
end
|
||||
end
|
||||
neverAgain.Paint = function(spaa, w, h)
|
||||
local Bfg_col = Color(255, 255, 255, 255)
|
||||
local Bbg_col = Color(0, 0, 0, 200)
|
||||
|
||||
if CurTime() > startTime + 10 and spaa:IsHovered() then
|
||||
Bbg_col = Color(255, 100, 100, 100)
|
||||
Bfg_col = Color(255, 255, 255, 255)
|
||||
end
|
||||
|
||||
surface.SetDrawColor(Bbg_col)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
local txt = (CurTime() > startTime + 10) and (spaa:IsHovered() and t("incompatible.never.hover") or t("incompatible.never")) or t("incompatible.wait", {time = math.ceil(startTime + 10 - CurTime())})
|
||||
surface.SetTextColor(Bfg_col)
|
||||
surface.SetTextPos(ScreenScaleMulti(8), ScreenScaleMulti(2))
|
||||
surface.SetFont("ArcCW_12")
|
||||
surface.DrawText(txt)
|
||||
end
|
||||
|
||||
local addonList = vgui.Create("DScrollPanel", window)
|
||||
addonList:SetText("")
|
||||
addonList:Dock(FILL)
|
||||
addonList.Paint = function(span, w, h) end
|
||||
local sbar = addonList:GetVBar()
|
||||
sbar.Paint = function() end
|
||||
sbar.btnUp.Paint = function(span, w, h) end
|
||||
sbar.btnDown.Paint = function(span, w, h) end
|
||||
sbar.btnGrip.Paint = function(span, w, h)
|
||||
surface.SetDrawColor(255, 255, 255, 255)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
end
|
||||
|
||||
|
||||
local accept = vgui.Create("DButton", window)
|
||||
accept:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(20))
|
||||
accept:SetText("")
|
||||
accept:Dock(BOTTOM)
|
||||
accept:DockMargin(ScreenScaleMulti(48), ScreenScaleMulti(2), ScreenScaleMulti(48), ScreenScaleMulti(2))
|
||||
accept.OnMousePressed = function(spaa, kc)
|
||||
if CurTime() > startTime + 5 then
|
||||
window:Close()
|
||||
window:Remove()
|
||||
end
|
||||
end
|
||||
accept.Paint = function(spaa, w, h)
|
||||
local Bfg_col = Color(255, 255, 255, 255)
|
||||
local Bbg_col = Color(0, 0, 0, 200)
|
||||
|
||||
if CurTime() > startTime + 5 and spaa:IsHovered() then
|
||||
Bbg_col = Color(255, 255, 255, 100)
|
||||
Bfg_col = Color(0, 0, 0, 255)
|
||||
end
|
||||
|
||||
surface.SetDrawColor(Bbg_col)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
local txt = t("incompatible.confirm") .. ((CurTime() > startTime + 5) and "" or (" - " .. t("incompatible.wait", {time = math.ceil(startTime + 5 - CurTime())})))
|
||||
surface.SetTextColor(Bfg_col)
|
||||
surface.SetTextPos(ScreenScaleMulti(8), ScreenScaleMulti(2))
|
||||
surface.SetFont("ArcCW_12")
|
||||
surface.DrawText(txt)
|
||||
end
|
||||
|
||||
for _, addon in pairs(tbl) do
|
||||
local addonBtn = vgui.Create("DButton", window)
|
||||
addonBtn:SetSize(ScreenScaleMulti(256), ScreenScaleMulti(28))
|
||||
addonBtn:Dock(TOP)
|
||||
addonBtn:DockMargin(ScreenScaleMulti(36), ScreenScaleMulti(2), ScreenScaleMulti(36), ScreenScaleMulti(2))
|
||||
addonBtn:SetFont("ArcCW_12")
|
||||
addonBtn:SetText("")
|
||||
addonBtn:SetContentAlignment(5)
|
||||
addonBtn.Paint = function(spaa, w, h)
|
||||
local Bfg_col = Color(255, 255, 255, 255)
|
||||
local Bbg_col = Color(0, 0, 0, 200)
|
||||
|
||||
if spaa:IsHovered() then
|
||||
Bbg_col = Color(255, 255, 255, 100)
|
||||
Bfg_col = Color(0, 0, 0, 255)
|
||||
end
|
||||
|
||||
surface.SetDrawColor(Bbg_col)
|
||||
surface.DrawRect(0, 0, w, h)
|
||||
|
||||
local txt = addon.title
|
||||
surface.SetTextColor(Bfg_col)
|
||||
surface.SetTextPos(ScreenScaleMulti(18), ScreenScaleMulti(2))
|
||||
surface.SetFont("ArcCW_12")
|
||||
surface.DrawText(txt)
|
||||
|
||||
local txt2 = ArcCW.IncompatibleAddons[tostring(addon.wsid)]
|
||||
surface.SetTextColor(Bfg_col)
|
||||
surface.SetTextPos(ScreenScaleMulti(18), ScreenScaleMulti(16))
|
||||
surface.SetFont("ArcCW_8")
|
||||
surface.DrawText(txt2)
|
||||
end
|
||||
addonBtn.OnMousePressed = function(spaa, kc)
|
||||
if addon.nourl then return end
|
||||
gui.OpenURL("https://steamcommunity.com/sharedfiles/filedetails/?id=" .. tostring(addon.wsid))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("InitPostEntity", "ArcCW_CheckContent", function()
|
||||
for _, k in pairs(weapons.GetList()) do
|
||||
if weapons.IsBasedOn(k.ClassName, "arccw_base") and k.ClassName != "arccw_base" then
|
||||
return
|
||||
end
|
||||
end
|
||||
chat.AddText(Color(255,255,255), "You have installed the ArcCW base but have no weapons installed. Search the workshop for some!") -- Perhaps you want to install the CS+ pack?")
|
||||
--chat.AddText(Color(255,255,255), "https://steamcommunity.com/sharedfiles/filedetails/?id=2131058270")
|
||||
end)
|
||||
25
lua/arccw/client/hla_menu.lua
Normal file
25
lua/arccw/client/hla_menu.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
-- Now I stole yo shit
|
||||
|
||||
hook.Add( "PopulateToolMenu", "ArcCW_HLA_Options", function()
|
||||
spawnmenu.AddToolMenuOption( "Options", "ArcCW", "ArcCW_HLA_Options", "HL:A", "", "", ArcCW_HLA_Options)
|
||||
end )
|
||||
|
||||
function ArcCW_HLA_Options( CPanel )
|
||||
|
||||
CPanel:AddControl("Header", {Description = "Balancing options"})
|
||||
|
||||
CPanel:AddControl("Checkbox", {Label = "Buffs the AR1", Command = "ordinal_buff" })
|
||||
|
||||
CPanel:AddControl("Label", {Text = "This option require a restart to take effect."})
|
||||
|
||||
end
|
||||
16
lua/arccw/documentation/go_credits.lua
Normal file
16
lua/arccw/documentation/go_credits.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
/*
|
||||
|
||||
Grenades from addon [ArcCW] Gunsmith Offensive
|
||||
All credits belongs to original addon developers
|
||||
|
||||
*/
|
||||
40
lua/arccw/server/sv_convar.lua
Normal file
40
lua/arccw/server/sv_convar.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/
|
||||
--]]
|
||||
|
||||
if CLIENT then return end
|
||||
|
||||
net.Receive("arccw_sendconvar", function(len, ply)
|
||||
local command = net.ReadString()
|
||||
|
||||
if !ply:IsAdmin() then return end
|
||||
if game.SinglePlayer() then return end
|
||||
if string.sub(command, 1, 5) != "arccw" then return end
|
||||
|
||||
local cmds = string.Split(command, " ")
|
||||
|
||||
local timername = "change" .. cmds[1]
|
||||
|
||||
if timer.Exists(timername) then
|
||||
timer.Remove(timername)
|
||||
end
|
||||
|
||||
local args = {}
|
||||
for i, k in pairs(cmds) do
|
||||
if k == " " then continue end
|
||||
k = string.Trim(k, " ")
|
||||
|
||||
table.insert(args, k)
|
||||
end
|
||||
|
||||
timer.Create(timername, 0.25, 1, function()
|
||||
RunConsoleCommand(args[1], args[2])
|
||||
print("Changed " .. args[1] .. " to " .. args[2] .. ".")
|
||||
end)
|
||||
end)
|
||||
27
lua/arccw/server/sv_defaultclip.lua
Normal file
27
lua/arccw/server/sv_defaultclip.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
hook.Add("OnEntityCreated", "ArcCW_DefaultClip", function(ent)
|
||||
if !ent.ArcCW then return end
|
||||
|
||||
if ArcCW.ConVars["mult_startunloaded"]:GetBool() then
|
||||
ent.Primary.DefaultClip = 0
|
||||
elseif ent.ForceDefaultClip then
|
||||
ent.Primary.DefaultClip = ent.ForceDefaultClip
|
||||
elseif ent.Primary.DefaultClip <= 0 then
|
||||
ent.Primary.DefaultClip = ent.Primary.ClipSize
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerCanPickupWeapon", "ArcCW_EquipmentSingleton", function(ply, wep)
|
||||
if wep.ArcCW and wep.Throwing and wep.Singleton and ply:HasWeapon(wep:GetClass()) then return false end
|
||||
end)
|
||||
110
lua/arccw/server/sv_doors.lua
Normal file
110
lua/arccw/server/sv_doors.lua
Normal file
@@ -0,0 +1,110 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
function ArcCW.DoorBust(ent, vel)
|
||||
local cvar = ArcCW.ConVars["doorbust"]:GetInt()
|
||||
local t = ArcCW.ConVars["doorbust_time"]:GetFloat()
|
||||
if cvar == 0 or ent.ArcCW_DoorBusted then return end
|
||||
ent.ArcCW_DoorBusted = true
|
||||
|
||||
local oldSpeed = ent:GetInternalVariable("m_flSpeed")
|
||||
ent:Fire("SetSpeed", tostring(oldSpeed * 5), 0)
|
||||
ent:Fire("Open", "", 0)
|
||||
ent:Fire("SetSpeed", oldSpeed, 0.3)
|
||||
|
||||
if ent:GetPhysicsObject():IsValid() and cvar == 1 then
|
||||
|
||||
-- Don't remove the door, that's a silly thing to do
|
||||
ent.ArcCW_DoorOldPos = ent:GetPos()
|
||||
ent:SetNoDraw(true)
|
||||
ent:SetNotSolid(true)
|
||||
|
||||
-- Make a busted door prop and fling it
|
||||
local prop = ents.Create("prop_physics")
|
||||
prop:SetModel(ent:GetModel())
|
||||
prop:SetPos(ent:GetPos())
|
||||
prop:SetAngles(ent:GetAngles())
|
||||
prop:SetSkin(ent:GetSkin())
|
||||
prop:Spawn()
|
||||
prop:GetPhysicsObject():SetVelocity(vel)
|
||||
|
||||
ent:SetPos(ent:GetPos() - Vector(0, 0, 10000))
|
||||
|
||||
-- Make it not collide with players after a bit cause that's annoying
|
||||
timer.Create("ArcCW_DoorBust_" .. prop:EntIndex(), 2, 1, function()
|
||||
if IsValid(prop) then
|
||||
prop:SetCollisionGroup(COLLISION_GROUP_WEAPON)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Reset it after a while
|
||||
SafeRemoveEntityDelayed(prop, t)
|
||||
timer.Create("ArcCW_DoorBust_" .. ent:EntIndex(), t, 1, function()
|
||||
if IsValid(ent) then
|
||||
ent:SetNoDraw(false)
|
||||
ent:SetNotSolid(false)
|
||||
ent.ArcCW_DoorBusted = false
|
||||
ent:SetPos(ent.ArcCW_DoorOldPos)
|
||||
ent.ArcCW_DoorOldPos = nil
|
||||
end
|
||||
end)
|
||||
else
|
||||
timer.Create("ArcCW_DoorBust_" .. ent:EntIndex(), 0.5, 1, function()
|
||||
if IsValid(ent) then
|
||||
ent.ArcCW_DoorBusted = false
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function ArcCW.TryBustDoor(ent, dmginfo)
|
||||
if ArcCW.ConVars["doorbust"]:GetInt() == 0 or !IsValid(ent) or !string.find(ent:GetClass(), "door") then return end
|
||||
local wep = IsValid(dmginfo:GetAttacker()) and ((dmginfo:GetInflictor():IsWeapon() and dmginfo:GetInflictor()) or dmginfo:GetAttacker():GetActiveWeapon())
|
||||
if !wep or !wep:IsWeapon() or !wep.ArcCW or !dmginfo:IsDamageType(DMG_BUCKSHOT) then return end
|
||||
if ent:GetNoDraw() or ent.ArcCW_NoBust or ent.ArcCW_DoorBusted then return end
|
||||
|
||||
--- TTT may choose for some doors to not be openable by a crowbar, let's respect that
|
||||
if GAMEMODE.crowbar_unlocks and GAMEMODE.crowbar_unlocks[ent] != true then return end
|
||||
|
||||
-- Magic number: 119.506 is the size of door01_left
|
||||
-- The bigger the door is, the harder it is to bust
|
||||
local threshold = ArcCW.ConVars["doorbust_threshold"]:GetInt() * math.pow((ent:OBBMaxs() - ent:OBBMins()):Length() / 119.506, 2)
|
||||
|
||||
-- Because shotgun damage is done per pellet, we must count them together
|
||||
if ent.ArcCW_BustCurTime and (ent.ArcCW_BustCurTime + 0.1 < CurTime()) then
|
||||
ent.ArcCW_BustCurTime = nil
|
||||
ent.ArcCW_BustDamage = 0
|
||||
end
|
||||
if dmginfo:GetDamage() < (threshold - (ent.ArcCW_BustDamage or 0)) then
|
||||
ent.ArcCW_BustCurTime = ent.ArcCW_BustCurTime or CurTime()
|
||||
ent.ArcCW_BustDamage = (ent.ArcCW_BustDamage or 0) + dmginfo:GetDamage()
|
||||
return
|
||||
else
|
||||
ent.ArcCW_BustCurTime = nil
|
||||
ent.ArcCW_BustDamage = nil
|
||||
end
|
||||
ArcCW.DoorBust(ent, dmginfo:GetDamageForce() * 0.5)
|
||||
-- Double doors are usually linked to the same areaportal. We must destroy the second half of the double door no matter what
|
||||
for _, otherDoor in pairs(ents.FindInSphere(ent:GetPos(), 64)) do
|
||||
if ent != otherDoor and otherDoor:GetClass() == ent:GetClass() and !otherDoor:GetNoDraw() then
|
||||
ArcCW.DoorBust(otherDoor, dmginfo:GetDamageForce() * 0.5)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("PlayerUse", "ArcCW_DoorBust", function(ply, ent)
|
||||
if ent.ArcCW_DoorBusted then return false end
|
||||
end)
|
||||
|
||||
-- This hook is not called on brush doors. Let's call this, uhh, intended behavior.
|
||||
-- hook.Add("EntityTakeDamage", "ArcCW_DoorBust", ArcCW.TryBustDoor)
|
||||
39
lua/arccw/server/sv_garbage.lua
Normal file
39
lua/arccw/server/sv_garbage.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/
|
||||
--]]
|
||||
|
||||
if CLIENT then return end
|
||||
|
||||
ArcCW.ShieldPropPile = {} -- { {Model = NULL, Weapon = NULL} }
|
||||
|
||||
local function SV_ArcCW_CollectGarbage()
|
||||
local removed = 0
|
||||
|
||||
local newpile = {}
|
||||
|
||||
for _, k in pairs(ArcCW.ShieldPropPile) do
|
||||
if IsValid(k.Weapon) then
|
||||
table.insert(newpile, k)
|
||||
|
||||
continue
|
||||
end
|
||||
|
||||
SafeRemoveEntity(k.Model)
|
||||
|
||||
removed = removed + 1
|
||||
end
|
||||
|
||||
ArcCW.ShieldPropPile = newpile
|
||||
|
||||
if GetConVar("developer"):GetBool() and removed > 0 then
|
||||
print("Removed " .. tostring(removed) .. " Shield Models")
|
||||
end
|
||||
end
|
||||
|
||||
timer.Create("ArcCW Shield Model Garbage Collector", 5, 0, SV_ArcCW_CollectGarbage)
|
||||
50
lua/arccw/server/sv_net.lua
Normal file
50
lua/arccw/server/sv_net.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
if game.SinglePlayer() then
|
||||
|
||||
util.AddNetworkString("arccw_sp_lhikanim")
|
||||
util.AddNetworkString("arccw_sp_anim")
|
||||
util.AddNetworkString("arccw_sp_health")
|
||||
util.AddNetworkString("arccw_sp_checkpoints")
|
||||
|
||||
end
|
||||
|
||||
util.AddNetworkString("arccw_sendattinv")
|
||||
util.AddNetworkString("arccw_slidepos")
|
||||
util.AddNetworkString("arccw_colorindex")
|
||||
util.AddNetworkString("arccw_asktoattach")
|
||||
util.AddNetworkString("arccw_asktodetach")
|
||||
util.AddNetworkString("arccw_asktodrop")
|
||||
util.AddNetworkString("arccw_networkatts")
|
||||
util.AddNetworkString("arccw_firemode")
|
||||
util.AddNetworkString("arccw_quicknade")
|
||||
util.AddNetworkString("arccw_togglecustomize")
|
||||
util.AddNetworkString("arccw_ubgl")
|
||||
util.AddNetworkString("arccw_npcgiverequest")
|
||||
util.AddNetworkString("arccw_npcgivereturn")
|
||||
util.AddNetworkString("arccw_rqwpnnet")
|
||||
util.AddNetworkString("arccw_blacklist")
|
||||
util.AddNetworkString("arccw_sendatthp")
|
||||
util.AddNetworkString("arccw_reloadatts")
|
||||
util.AddNetworkString("arccw_sendbullet")
|
||||
util.AddNetworkString("arccw_sendconvar")
|
||||
|
||||
util.AddNetworkString("arccw_applypreset")
|
||||
|
||||
util.AddNetworkString("arccw_ttt_bodyattinfo")
|
||||
|
||||
util.AddNetworkString("arccw_networksound")
|
||||
|
||||
util.AddNetworkString("arccw_togglenum")
|
||||
|
||||
util.AddNetworkString("arccw_networktpanim")
|
||||
223
lua/arccw/server/sv_npc.lua
Normal file
223
lua/arccw/server/sv_npc.lua
Normal file
@@ -0,0 +1,223 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
ArcCW.RandomWeaponCache = {}
|
||||
|
||||
hook.Add("PlayerSpawnedNPC", "ArcCW_PlayerSpawnedNPC", function( ply, ent )
|
||||
net.Start("arccw_npcgiverequest")
|
||||
net.Send(ply)
|
||||
|
||||
ply.ArcCW_LastSpawnedNPC = ent
|
||||
end)
|
||||
|
||||
net.Receive("arccw_npcgivereturn", function(len, ply)
|
||||
local class = net.ReadString()
|
||||
local ent = ply.ArcCW_LastSpawnedNPC
|
||||
|
||||
if !ent then return end
|
||||
if !IsValid(ent) then return end
|
||||
if !ent:IsNPC() then return end
|
||||
if !class then return end
|
||||
|
||||
local wpn = weapons.Get(class)
|
||||
|
||||
if wpn and wpn.AdminOnly and !ply:IsPlayer() then return end
|
||||
if !ArcCW:WithinYearLimit(wpn) then
|
||||
return
|
||||
end
|
||||
|
||||
local cap = ent:CapabilitiesGet()
|
||||
|
||||
if bit.band(cap, CAP_USE_WEAPONS) != CAP_USE_WEAPONS then return end
|
||||
|
||||
if weapons.IsBasedOn(class, "arccw_base") and wpn.Spawnable and !wpn.NotForNPCs and (!wpn.AdminOnly or ply:IsAdmin()) then
|
||||
ent:Give(class)
|
||||
end
|
||||
end)
|
||||
|
||||
function ArcCW:GetRandomWeapon(wpn)
|
||||
local tbl = ArcCW.RandomWeaponCache[wpn] and ArcCW.RandomWeaponCache[wpn][2]
|
||||
local wgt = ArcCW.RandomWeaponCache[wpn] and ArcCW.RandomWeaponCache[wpn][1] or 0
|
||||
|
||||
if !tbl then
|
||||
tbl = {}
|
||||
for i, k in pairs(weapons.GetList()) do
|
||||
if !weapons.IsBasedOn(k.ClassName, "arccw_base") then continue end
|
||||
if k.PrimaryBash then continue end
|
||||
if !k.Spawnable then continue end
|
||||
--if !nades and k.NotForNPCs then continue end -- what does nades do???
|
||||
if k.AutoSpawnable == false then continue end
|
||||
|
||||
if !ArcCW:WithinYearLimit(k) then
|
||||
continue
|
||||
end
|
||||
|
||||
local weight = k.NPCWeight or 0
|
||||
if engine.ActiveGamemode() == "terrortown" and k.TTTWeight then
|
||||
weight = k.TTTWeight
|
||||
end
|
||||
|
||||
if wpn and engine.ActiveGamemode() == "terrortown" and k.TTTWeaponType then -- TTT weapon type(s) take priority over NPC weapon types
|
||||
if isstring(k.TTTWeaponType) then
|
||||
if k.TTTWeaponType != wpn then continue end
|
||||
elseif istable(k.TTTWeaponType) then
|
||||
if !table.HasValue(k.TTTWeaponType, wpn) then continue end
|
||||
end
|
||||
elseif wpn and k.NPCWeaponType then
|
||||
local class = wpn
|
||||
if engine.ActiveGamemode() == "terrortown" and ArcCW.TTTReplaceTable[wpn] then
|
||||
class = ArcCW.TTTReplaceTable[wpn]
|
||||
end
|
||||
if isstring(k.NPCWeaponType) then
|
||||
if k.NPCWeaponType != class then continue end
|
||||
elseif istable(k.NPCWeaponType) then
|
||||
if !table.HasValue(k.NPCWeaponType, class) then continue end
|
||||
end
|
||||
else
|
||||
local og = weapons.Get(wpn)
|
||||
|
||||
if og and og.ArcCW then continue end
|
||||
weight = 0 -- Don't spawn if there is none of either
|
||||
end
|
||||
|
||||
if weight > 0 then
|
||||
-- Don't insert 0 weight, otherwise they still spawn
|
||||
wgt = wgt + weight
|
||||
table.insert(tbl, {k.ClassName, wgt})
|
||||
end
|
||||
end
|
||||
|
||||
ArcCW.RandomWeaponCache[wpn] = {wgt, tbl}
|
||||
end
|
||||
|
||||
local r = math.random(0, wgt)
|
||||
|
||||
for _, i in pairs(tbl) do
|
||||
if i[2] >= r then
|
||||
return i[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add( "OnEntityCreated", "ArcCW_NPCWeaponReplacement", function(ent)
|
||||
if CLIENT then return end
|
||||
if ent:IsNPC() and ArcCW.ConVars["npc_replace"]:GetBool() then
|
||||
timer.Simple(0, function()
|
||||
if !ent:IsValid() then return end
|
||||
local cap = ent:CapabilitiesGet()
|
||||
|
||||
if bit.band(cap, CAP_USE_WEAPONS) != CAP_USE_WEAPONS then return end
|
||||
|
||||
local class
|
||||
|
||||
if IsValid(ent:GetActiveWeapon()) then
|
||||
class = ent:GetActiveWeapon():GetClass()
|
||||
end
|
||||
|
||||
if !class then return end
|
||||
|
||||
local wpn
|
||||
|
||||
wpn = ArcCW:GetRandomWeapon(class)
|
||||
|
||||
if wpn then
|
||||
ent:Give(wpn)
|
||||
end
|
||||
end)
|
||||
elseif ent:IsWeapon() and ((engine.ActiveGamemode() == "terrortown" and ArcCW.ConVars["ttt_replace"]:GetBool()) or (engine.ActiveGamemode() != "terrortown" and ArcCW.ConVars["npc_replace"]:GetBool())) then
|
||||
timer.Simple(0, function()
|
||||
if !ent:IsValid() then return end
|
||||
if IsValid(ent:GetOwner()) then return end
|
||||
if ent.ArcCW then return end
|
||||
|
||||
local class = ent:GetClass()
|
||||
|
||||
local wpn = ArcCW:GetRandomWeapon(class)
|
||||
|
||||
if wpn then
|
||||
local wpnent = ents.Create(wpn)
|
||||
wpnent:SetPos(ent:GetPos())
|
||||
wpnent:SetAngles(ent:GetAngles())
|
||||
|
||||
wpnent:NPC_Initialize()
|
||||
|
||||
wpnent:Spawn()
|
||||
|
||||
timer.Simple(0, function()
|
||||
if !ent:IsValid() then return end
|
||||
wpnent:OnDrop(true)
|
||||
ent:Remove()
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
-- This hook steals attachments from dropped weapons when a player walks over.
|
||||
-- Disabled cause this is called CONSTANTLY when player is over a weapon, causing massive network lag.
|
||||
-- Also it's just weird and hard to understand.
|
||||
-- hook.Add("PlayerCanPickupWeapon", "ArcCW_PlayerCanPickupWeapon", function(ply, wep)
|
||||
-- if !wep.ArcCW then return end
|
||||
-- if !ply:HasWeapon(wep:GetClass()) then return end
|
||||
|
||||
-- if wep.Singleton then return false end
|
||||
|
||||
-- if !ArcCW.EnableCustomization or ArcCW.ConVars["enable_customization"]:GetInt() < 0 or ArcCW.ConVars["attinv_free"]:GetBool() then return end
|
||||
|
||||
-- for _, i in pairs(wep.Attachments) do
|
||||
-- if i.Installed then
|
||||
-- ArcCW:PlayerGiveAtt(ply, i.Installed)
|
||||
-- end
|
||||
|
||||
-- i.Installed = nil
|
||||
-- end
|
||||
|
||||
-- ArcCW:PlayerSendAttInv(ply)
|
||||
-- wep:NetworkWeapon()
|
||||
-- end)
|
||||
|
||||
hook.Add("onDarkRPWeaponDropped", "ArcCW_DarkRP", function(ply, spawned_weapon, wep)
|
||||
if wep.ArcCW and wep.Attachments then
|
||||
for i, k in pairs(wep.Attachments) do
|
||||
if k.Installed then
|
||||
ArcCW:PlayerGiveAtt(ply, k.Installed, 1)
|
||||
end
|
||||
end
|
||||
-- Has to be sent to client or desync will happen
|
||||
ArcCW:PlayerSendAttInv(ply)
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerGiveSWEP", "ArcCW_SpawnRandomAttachments", function(ply, class, tbl)
|
||||
if weapons.IsBasedOn(class, "arccw_base") and ArcCW.ConVars["atts_spawnrand"]:GetBool() then
|
||||
-- We can't get the weapon entity here - it's spawned after the hook call.
|
||||
-- Mark the player to disable autosave tempoarily if we're spawning random attachments.
|
||||
ply.ArcCW_Sandbox_RandomAtts = true
|
||||
timer.Simple(0.0001, function()
|
||||
local wpn = ply:GetWeapon(class)
|
||||
if IsValid(ply) and IsValid(wpn) then
|
||||
wpn:NPC_SetupAttachments()
|
||||
|
||||
if ply.ArcCW_Sandbox_FirstSpawn then
|
||||
wpn:RestoreAmmo()
|
||||
ply.ArcCW_Sandbox_FirstSpawn = nil
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerSpawnedSWEP", "ArcCW_SpawnRandomAttachments", function(ply, wep)
|
||||
if wep.ArcCW and ArcCW.ConVars["atts_spawnrand"]:GetBool() then
|
||||
wep:NPC_SetupAttachments()
|
||||
end
|
||||
end)
|
||||
20
lua/arccw/server/sv_sandbox.lua
Normal file
20
lua/arccw/server/sv_sandbox.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
-- We have to do a timer because there is no "PlayerGivenSWEP" or similar
|
||||
hook.Add("PlayerGiveSWEP", "ArcCW_Autoload", function(ply, class, tbl)
|
||||
local weptbl = weapons.Get(class)
|
||||
if not weptbl or not weptbl.ArcCW then return end
|
||||
|
||||
-- Mark the player's next weapon to get ammo restore
|
||||
ply.ArcCW_Sandbox_FirstSpawn = true
|
||||
end)
|
||||
22
lua/arccw/server/sv_singleplayer.lua
Normal file
22
lua/arccw/server/sv_singleplayer.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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 CLIENT or !game.SinglePlayer() then return end
|
||||
|
||||
hook.Add("EntityTakeDamage", "ArcCW_ETD", function(npc, dmg)
|
||||
timer.Simple(0, function()
|
||||
if !IsValid(npc) then return end
|
||||
if npc:Health() <= 0 then
|
||||
net.Start("arccw_sp_health")
|
||||
net.WriteEntity(npc)
|
||||
net.Broadcast()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
98
lua/arccw/server/sv_smoke.lua
Normal file
98
lua/arccw/server/sv_smoke.lua
Normal file
@@ -0,0 +1,98 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
ArcCW.NPCsCache = ArcCW.NPCsCache or {}
|
||||
local npcs = ArcCW.NPCsCache
|
||||
|
||||
ArcCW.SmokeCache = ArcCW.SmokeCache or {}
|
||||
local smokes = ArcCW.SmokeCache
|
||||
|
||||
hook.Add("OnEntityCreated", "ArcCW_NPCSmokeCache", function(ent)
|
||||
if !ent:IsValid() then return end
|
||||
|
||||
if ent:IsNPC() then
|
||||
npcs[#npcs + 1] = ent
|
||||
elseif ent.ArcCWSmoke then
|
||||
smokes[#smokes + 1] = ent
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
hook.Add("EntityRemoved", "ArcCW_NPCSmokeCache", function(ent)
|
||||
if ent:IsNPC() then
|
||||
table.RemoveByValue(npcs, ent)
|
||||
elseif ent.ArcCWSmoke then
|
||||
table.RemoveByValue(smokes, ent)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
function ArcCW:ProcessNPCSmoke()
|
||||
if #npcs == 0 or #smokes == 0 then return end
|
||||
|
||||
for _, npc in ipairs(npcs) do
|
||||
local target = npc:GetEnemy()
|
||||
|
||||
if !target or !target:IsValid() then continue end
|
||||
|
||||
npc.ArcCW_Smoked_Time = npc.ArcCW_Smoked_Time or 0
|
||||
if npc.ArcCW_Smoked_Time > CurTime() then
|
||||
if npc.ArcCW_Smoked then
|
||||
if npc.ArcCW_Smoked_Target == target then
|
||||
npc:SetSchedule(SCHED_STANDOFF)
|
||||
debugoverlay.Cross(npc:EyePos(), 5, 0.1, Color(50, 0, 0), true)
|
||||
continue
|
||||
end
|
||||
elseif npc.ArcCW_Smoked_Target != target then
|
||||
if npc.ArcCW_Smoked then
|
||||
npc:SetSchedule(SCHED_IDLE_STAND)
|
||||
end
|
||||
npc.ArcCW_Smoked = false
|
||||
else
|
||||
continue
|
||||
end
|
||||
else
|
||||
npc.ArcCW_Smoked = false
|
||||
end
|
||||
|
||||
local sr = 256
|
||||
local maxs = Vector(sr, sr, sr)
|
||||
local mins = -maxs
|
||||
|
||||
local rayEnts = ents.FindAlongRay(npc:EyePos(), target:WorldSpaceCenter(), mins, maxs)
|
||||
local anysmoke = false
|
||||
|
||||
for _, i in ipairs(rayEnts) do
|
||||
if i.ArcCWSmoke then
|
||||
anysmoke = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if anysmoke then
|
||||
-- print("Smoke!")
|
||||
npc.ArcCW_Smoked = true
|
||||
npc.ArcCW_Smoked_Target = target
|
||||
npc:SetSchedule(SCHED_STANDOFF)
|
||||
debugoverlay.Line(npc:EyePos(), target:WorldSpaceCenter(), 1, Color(50, 0, 0), true)
|
||||
else
|
||||
if npc.ArcCW_Smoked then
|
||||
npc:SetSchedule(SCHED_IDLE_STAND)
|
||||
end
|
||||
npc.ArcCW_Smoked = false
|
||||
end
|
||||
|
||||
npc.ArcCW_Smoked_Time = CurTime() + 1
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("Think", "ArcCW_NPCSmoke", ArcCW.ProcessNPCSmoke)
|
||||
39
lua/arccw/server/sv_takedamage.lua
Normal file
39
lua/arccw/server/sv_takedamage.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/
|
||||
--]]
|
||||
|
||||
if CLIENT then return end
|
||||
|
||||
hook.Add("EntityTakeDamage", "ArcCW_DoAttDMG", function(ent, dmg)
|
||||
if !ent:IsPlayer() then return end
|
||||
|
||||
local wpn = ent:GetActiveWeapon()
|
||||
|
||||
if !wpn.ArcCW then return end
|
||||
|
||||
for i, k in pairs(wpn.Attachments) do
|
||||
if !k.Installed then continue end
|
||||
local atttbl = ArcCW.AttachmentTable[k.Installed]
|
||||
|
||||
if atttbl.Hook_PlayerTakeDamage then
|
||||
atttbl.Hook_PlayerTakeDamage(wpn, {slot = i, atthp = k.HP, dmg = dmg})
|
||||
end
|
||||
end
|
||||
|
||||
wpn:SendAttHP()
|
||||
end)
|
||||
|
||||
hook.Add("DoPlayerDeath","ArcCW_GrenadeDrop",function(ply)
|
||||
local wep = ply:GetActiveWeapon()
|
||||
if !(wep.ArcCW and wep.Throwing) then return end
|
||||
|
||||
if wep:GetGrenadePrimed() then
|
||||
wep:GrenadeDrop()
|
||||
end
|
||||
end)
|
||||
36
lua/arccw/server/sv_year.lua
Normal file
36
lua/arccw/server/sv_year.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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 CLIENT then return end
|
||||
|
||||
hook.Add( "PlayerGiveSWEP", "ArcCW_YearLimiter", function( ply, class, swep )
|
||||
local wep = weapons.Get(class)
|
||||
|
||||
if !ArcCW:WithinYearLimit(wep) then
|
||||
ply:ChatPrint( wep.PrintName .. " is outside the year limit!")
|
||||
return false
|
||||
end
|
||||
end )
|
||||
|
||||
function ArcCW:WithinYearLimit(wep)
|
||||
if !wep then return true end
|
||||
if !wep.ArcCW then return true end
|
||||
|
||||
if !ArcCW.ConVars["limityear_enable"]:GetBool() then return true end
|
||||
|
||||
local year = ArcCW.ConVars["limityear"]:GetInt()
|
||||
|
||||
if !wep.Trivia_Year then return true end
|
||||
if !isnumber(wep.Trivia_Year) then return true end
|
||||
|
||||
if wep.Trivia_Year > year then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
31
lua/arccw/shared/attachments/ammo_eft_12_525.lua
Normal file
31
lua/arccw/shared/attachments/ammo_eft_12_525.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 5.25mm Buckshot"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_def.png", "mips smooth")
|
||||
att.Description = "12/70 shell loaded with 15 5.25mm buckshot for 12ga shotguns."
|
||||
att.Desc_Pros = {
|
||||
"296 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
|
||||
att.Mult_Damage = 296/312
|
||||
att.Mult_MuzzleVelocity = 0.8
|
||||
att.Mult_Penetration = 0.3
|
||||
|
||||
att.Mult_Range = 1.2
|
||||
|
||||
att.ActivateElements = {"12525"}
|
||||
31
lua/arccw/shared/attachments/ammo_eft_12_65express.lua
Normal file
31
lua/arccw/shared/attachments/ammo_eft_12_65express.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 6.5mm Express buckshot"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_def.png", "mips smooth")
|
||||
att.Description = "12x70 shell loaded with 9 6.5mm buckshots for 12ga shotguns."
|
||||
att.Desc_Pros = {
|
||||
"315 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
|
||||
att.Mult_Damage = 315/312
|
||||
att.Mult_MuzzleVelocity = 1.03
|
||||
att.Mult_Precision = 1.15
|
||||
|
||||
att.Mult_Range = 0.8
|
||||
|
||||
att.ActivateElements = {"1265e"}
|
||||
33
lua/arccw/shared/attachments/ammo_eft_12_85magnum.lua
Normal file
33
lua/arccw/shared/attachments/ammo_eft_12_85magnum.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 8.5mm \"Magnum\" Buckshot"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_def.png", "mips smooth")
|
||||
att.Description = "A 12/70 shell loaded with 16 8.5mm buckshot pellets for 12 gauge shotguns."
|
||||
att.Desc_Pros = {
|
||||
"400 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
|
||||
att.Mult_Damage = 400/312
|
||||
att.Mult_MuzzleVelocity = 0.92
|
||||
att.Mult_Penetration = 0.6
|
||||
att.Mult_Precision = 0.85
|
||||
att.Mult_Recoil = 1.15
|
||||
|
||||
att.Mult_Range = 0.7
|
||||
|
||||
att.ActivateElements = {"1285m"}
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_ap20.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_ap20.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 AP-20 Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "A 12/70 armor-piercing slug shell for 12 gauge shotguns. Designed for law enforcement forces of our overseas ʕ•ᴥ•ʔ friends ʕ•ᴥ•ʔ."
|
||||
att.Desc_Pros = {
|
||||
"164 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 164/312
|
||||
att.Mult_MuzzleVelocity = 1.2
|
||||
att.Mult_Penetration = 12.3
|
||||
att.Mult_AccuracyMOA = 0.5
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 1.5
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12ap20"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_ap_20_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_bmg.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_bmg.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 shell with .50 BMG bullet"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_rip.png", "mips smooth")
|
||||
att.Description = "12/70 Custom made slug shell with a shortened .50 BMG tracer bullet for 12ga shotguns. No one knows, who and why is producing these strange slugs in Tarkov, but they just work... somehow."
|
||||
att.Desc_Pros = {
|
||||
"197 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 197 /312
|
||||
att.Mult_MuzzleVelocity = 0.99
|
||||
att.Mult_Penetration = 8.6
|
||||
att.Mult_AccuracyMOA = 0.5-0.129
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 0.75
|
||||
|
||||
att.Mult_DamageMin = 0.9
|
||||
att.Mult_Range = 1.1
|
||||
|
||||
att.ActivateElements = {"12bmg"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_50_bmg_m17_traccer_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_copper.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_copper.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 Copper Sabot Premier HP Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 Copper solid slug shell for 12ga shotguns."
|
||||
att.Desc_Pros = {
|
||||
"206 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 206 /312
|
||||
att.Mult_MuzzleVelocity = 1.065
|
||||
att.Mult_Penetration = 4.6
|
||||
att.Mult_AccuracyMOA = 0.2
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12cop"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_hp_copper_shell.mdl"
|
||||
36
lua/arccw/shared/attachments/ammo_eft_12_dualsabot.lua
Normal file
36
lua/arccw/shared/attachments/ammo_eft_12_dualsabot.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 Dual Sabot Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 Dual Sabot Slug shell for 12ga shotguns"
|
||||
att.Desc_Pros = {
|
||||
"85x2 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Dual slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 2
|
||||
|
||||
att.Mult_Damage = 85*2 /312
|
||||
att.Mult_Penetration = 5.6
|
||||
att.Mult_AccuracyMOA = 0.9
|
||||
att.Mult_Recoil = 1.15
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12dss"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_dual_sabot_slug_shell.mdl"
|
||||
33
lua/arccw/shared/attachments/ammo_eft_12_flechette.lua
Normal file
33
lua/arccw/shared/attachments/ammo_eft_12_flechette.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 Flechette"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_def.png", "mips smooth")
|
||||
att.Description = "12/70 shell loaded with 15 5.25mm buckshot for 12ga shotguns."
|
||||
att.Desc_Pros = {
|
||||
"200 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
|
||||
att.Mult_Damage = 200/312
|
||||
att.Mult_MuzzleVelocity = 0.77
|
||||
att.Mult_Penetration = 10.3
|
||||
att.Mult_Precision = 0.9
|
||||
|
||||
att.Mult_Range = 0.7
|
||||
|
||||
att.ActivateElements = {"12fl"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_flechette_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_ftxlite.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_ftxlite.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 FTX Custom Lite Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 FTX Custom LIte Slug shell for 12ga shotguns"
|
||||
att.Desc_Pros = {
|
||||
"183 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 183 /312
|
||||
att.Mult_MuzzleVelocity = 1.16
|
||||
att.Mult_Penetration = 6.6
|
||||
att.Mult_AccuracyMOA = 0.15
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 0.75
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12ftx"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_ftx_custom_lite_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_grizzly40.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_grizzly40.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 Grizzly 40 Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 Grizzly 40 Slug shell for 12ga shotguns"
|
||||
att.Desc_Pros = {
|
||||
"190 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 190 /312
|
||||
att.Mult_MuzzleVelocity = 0.94
|
||||
att.Mult_Penetration = 4
|
||||
att.Mult_Recoil = 1.2
|
||||
att.Mult_AccuracyMOA = 2-1.8
|
||||
att.Mult_HipDispersion = 10
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12g40"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_grizzly_40_shell.mdl"
|
||||
37
lua/arccw/shared/attachments/ammo_eft_12_lead.lua
Normal file
37
lua/arccw/shared/attachments/ammo_eft_12_lead.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 lead slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 caliber slug shell for 12ga shotguns."
|
||||
att.Desc_Pros = {
|
||||
"167 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 167 /312
|
||||
att.Mult_MuzzleVelocity = 0.89
|
||||
att.Mult_Penetration = 5
|
||||
att.Mult_AccuracyMOA = 0.2
|
||||
att.Mult_HipDispersion = 10
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12lead"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_poleva_6u_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_poleva3.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_poleva3.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 \"Poleva-3\" Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 \"Poleva-3\" expanding slug shell for 12ga shotguns"
|
||||
att.Desc_Pros = {
|
||||
"140 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 140/312
|
||||
att.Mult_MuzzleVelocity = 0.99
|
||||
att.Mult_Penetration = 5.6
|
||||
att.Mult_AccuracyMOA = 0.1
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 0.85
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12p3"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_poleva_3_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_poleva6u.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_poleva6u.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 \"Poleva-6u\" Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 \"Poleva-6u\" with FMJ slug shell for 12ga shotguns"
|
||||
att.Desc_Pros = {
|
||||
"150 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 150/312
|
||||
att.Mult_MuzzleVelocity = 1.04
|
||||
att.Mult_Penetration = 6.6
|
||||
att.Mult_AccuracyMOA = 0.25
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 0.9
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12p6u"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_poleva_6u_shell.mdl"
|
||||
37
lua/arccw/shared/attachments/ammo_eft_12_rip.lua
Normal file
37
lua/arccw/shared/attachments/ammo_eft_12_rip.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 RIP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_rip.png", "mips smooth")
|
||||
att.Description = "RIP (Radically Invasive Projectile) ammunition is a devastatingly effective choice for the anti-personnel use. This 12 cal ammo features a precision-machined solid copper lead-free projectile designed to produce huge damage to body."
|
||||
att.Desc_Pros = {
|
||||
"265 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 265 /312
|
||||
att.Mult_MuzzleVelocity = 0.99
|
||||
att.Mult_Penetration = 0.6
|
||||
att.Mult_Precision = 1.8
|
||||
att.Mult_Recoil = 1.35
|
||||
|
||||
att.Mult_DamageMin = 1.1
|
||||
att.Mult_Range = 1.5
|
||||
|
||||
att.ActivateElements = {"12rip"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_rip_shell.mdl"
|
||||
38
lua/arccw/shared/attachments/ammo_eft_12_sfhp.lua
Normal file
38
lua/arccw/shared/attachments/ammo_eft_12_sfhp.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "12/70 SuperFormance HP Slug"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/12g_slug.png", "mips smooth")
|
||||
att.Description = "12/70 SuperFormance Hollow Point slug shell for 12ga shotguns."
|
||||
att.Desc_Pros = {
|
||||
"220 DMG"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Desc_Neutrals = {
|
||||
"Slug ammo"
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_12"
|
||||
|
||||
att.Override_Num = 1
|
||||
|
||||
att.Mult_Damage = 220 /312
|
||||
att.Mult_MuzzleVelocity = 1.43
|
||||
att.Mult_Penetration = 1.6
|
||||
att.Mult_AccuracyMOA = 0.1
|
||||
att.Mult_HipDispersion = 10
|
||||
att.Mult_Recoil = 0.85
|
||||
|
||||
att.Mult_DamageMin = 0.9
|
||||
att.Mult_Range = 1.1
|
||||
|
||||
att.ActivateElements = {"12sfhp"}
|
||||
att.Override_ShellModel = "models/weapons/arccw/eft_shells/patron_12x70_slug_superformance_shell.mdl"
|
||||
27
lua/arccw/shared/attachments/ammo_eft_45_ap.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_45_ap.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = ".45 AP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/9x19AP_Icon.png")
|
||||
att.Description = "Rounds designed to penetrate armour."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_45"
|
||||
|
||||
att.Mult_Penetration = 2
|
||||
att.Mult_Damage = 0.75
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"45_AP"}
|
||||
29
lua/arccw/shared/attachments/ammo_eft_45_rip.lua
Normal file
29
lua/arccw/shared/attachments/ammo_eft_45_rip.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = ".45 RIP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/9x19RIP_Icon.png")
|
||||
att.Description = "Rounds designed to cause as much damage to flesh as possible."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_45"
|
||||
|
||||
|
||||
att.Mult_Penetration = 0.5
|
||||
|
||||
att.Mult_Damage = 1.25
|
||||
att.Mult_DamageMin = 0.75
|
||||
att.Mult_Precision = 0.35
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"45_RIP"}
|
||||
27
lua/arccw/shared/attachments/ammo_eft_545.x39_hp.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_545.x39_hp.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "5.45x39mm HP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/762x51_icon.png")
|
||||
att.Description = "A 5.45x39mm cartridge with a 3.6 gram lead core hollow-point (HP) bullet with a bimetallic semi-jacket in a steel case, intended for hunting, home defense, and target practice. The bullet in this cartridge has an excellent expansion and impact energy that give it outstanding stopping power effects, as well as being able to cause substantial negative effects on the target after impact, making it a good choice for hunting."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_ammo_545x39"
|
||||
|
||||
att.Mult_Penetration = 0.5
|
||||
att.Mult_Damage = 1.25
|
||||
att.Mult_DamageMin = 0.8
|
||||
att.Mult_Precision = 1
|
||||
att.Mult_Recoil = 1.2
|
||||
|
||||
att.ActivateElements = {"545x39_hp"}
|
||||
27
lua/arccw/shared/attachments/ammo_eft_545x39_igolnik.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_545x39_igolnik.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "5.45x39mm Igolnik"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/762x51_icon.png")
|
||||
att.Description = "A 5.45x39mm PPBS gs (GRAU Index - 7N39) cartridge with a 4 gram armor-piercing bullet with a pointed tungsten carbide core with two-layer jacket, a lead interior and a bimetallic exterior, in a steel case."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_ammo_545x39"
|
||||
|
||||
att.Mult_Penetration = 2
|
||||
att.Mult_Damage = 0.8
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1.3
|
||||
|
||||
att.ActivateElements = {"545x39_igolnik"}
|
||||
31
lua/arccw/shared/attachments/ammo_eft_556_995.lua
Normal file
31
lua/arccw/shared/attachments/ammo_eft_556_995.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "5.56x45mm M995"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/ammo_556_m855.png")
|
||||
att.Description = "A 5.56x45mm NATO M995 cartridge with a 3.4 gram armor-piercing bullet with a tungsten carbide penetrator over an aluminum base with a copper jacket, in a brass case. This cartridge was designed during the 1990s to provide United States Army personnel with capabilities to pierce light covers and light vehicles, as well as basic and intermediate ballistic body protections, in addition to providing outstanding results against some specialized protection models. However, due to its design, it has a significant bounce probability on various surfaces."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_556"
|
||||
|
||||
att.Override_Ammo = "556_M995" -- overrides the ammo type with this one
|
||||
|
||||
att.Free = true
|
||||
|
||||
att.Mult_Penetration = 2
|
||||
att.Mult_Damage = 0.75
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"995"}
|
||||
32
lua/arccw/shared/attachments/ammo_eft_556_hp.lua
Normal file
32
lua/arccw/shared/attachments/ammo_eft_556_hp.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "5.56x45mm HP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/ammo/ammo_556_m855.png")
|
||||
att.Description = "A .223 Remington (5.56x45mm) HP cartridge with a 3.6 gram lead core hollow-point bullet with a bimetallic jacket in a steel case, intended for hunting, home defense, and target practice. Despite not having the full energy of an intermediate cartridge, the bullet has a considerable stopping power effect as well as being able to cause substantial negative effects on the target after impact, at the cost of penetration capabilities, even against basic ballistic protection."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_556"
|
||||
|
||||
att.Override_Ammo = "556_HP" -- overrides the ammo type with this one
|
||||
|
||||
att.Mult_Penetration = 0.5
|
||||
|
||||
att.Free = true
|
||||
|
||||
att.Mult_Damage = 1.25
|
||||
att.Mult_DamageMin = 0.75
|
||||
att.Mult_Precision = 0.35
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"hp"}
|
||||
26
lua/arccw/shared/attachments/ammo_eft_762x25_lrnpc.lua
Normal file
26
lua/arccw/shared/attachments/ammo_eft_762x25_lrnpc.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "7.62x25 - LRNPC"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/9x19AP_Icon.png")
|
||||
att.Description = "7.62x25mm TT sport-hunting round with LRNPC (Lead Round Nose, Polymer Coated.) bullet."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_762x25"
|
||||
|
||||
att.Mult_Penetration = 0.6
|
||||
att.Mult_Damage = 1.1
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 0.9
|
||||
|
||||
att.ActivateElements = {"762x25_PST"}
|
||||
27
lua/arccw/shared/attachments/ammo_eft_762x25_pst.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_762x25_pst.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "7.62x25 - PST"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/9x19AP_Icon.png")
|
||||
att.Description = "7.62x25mm TT (Index GAU - 57-N-134S) - cartridge with a bullet with steel core Pst, steel sleeve."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_762x25"
|
||||
|
||||
att.Mult_Penetration = 1.4
|
||||
att.Mult_Damage = 0.9
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1
|
||||
|
||||
att.ActivateElements = {"762x25_PST"}
|
||||
27
lua/arccw/shared/attachments/ammo_eft_762x51_m61.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_762x51_m61.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "7.62x51mm M61"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/762x51_icon.png")
|
||||
att.Description = "A 7.62x51mm NATO M61 cartridge with a 9.8 gram armor-piercing bullet with a hardened steel core with lead cladding on the tip and a copper jacket, in a brass case. This cartridge was designed in the 1950s based on the .30-06 Springfield AP M2 cartridge to provide the United States Army with an armor-piercing bullet for 7.62x51mm NATO caliber automatic weaponry, being able to pierce through the most modern specialized ballistic body protections, in addition to provide a significant stopping power effect. However, it has a significant bounce probability on various surfaces."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_762x51"
|
||||
|
||||
att.Mult_Penetration = 2
|
||||
att.Mult_Damage = 0.75
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1.3
|
||||
|
||||
att.ActivateElements = {"762x51_m61"}
|
||||
29
lua/arccw/shared/attachments/ammo_eft_762x51_ultra.lua
Normal file
29
lua/arccw/shared/attachments/ammo_eft_762x51_ultra.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "7.62x51mm Ultra Nosler"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/762x51_icon.png")
|
||||
att.Description = "7.62x51mm Nosler cartridge of Ultra design. The bullet is loaded with two separate lead cores with a solid partition between them. The front part is torn quickly, delivering great energy. The base remains intact and provides deep penetration, even when hitting bones."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_762x51"
|
||||
|
||||
|
||||
att.Mult_Penetration = 0.5
|
||||
|
||||
att.Mult_Damage = 1.25
|
||||
att.Mult_DamageMin = 0.75
|
||||
att.Mult_Precision = 0.35
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"762x51_ultra"}
|
||||
27
lua/arccw/shared/attachments/ammo_eft_9x19_ap.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_9x19_ap.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "9x19 AP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/9x19AP_Icon.png")
|
||||
att.Description = "Rounds designed to penetrate armour."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_9x19"
|
||||
|
||||
att.Mult_Penetration = 2
|
||||
att.Mult_Damage = 0.75
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"9x19_AP"}
|
||||
27
lua/arccw/shared/attachments/ammo_eft_9x19_rip.lua
Normal file
27
lua/arccw/shared/attachments/ammo_eft_9x19_rip.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "9x19 RIP"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/9x19RIP_Icon.png")
|
||||
att.Description = "Rounds designed to cause as much damage to flesh as possible."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_9x19"
|
||||
|
||||
|
||||
att.Mult_Penetration = 0.5
|
||||
|
||||
att.Mult_Damage = 1.25
|
||||
att.Mult_DamageMin = 0.75
|
||||
att.Mult_Precision = 0.35
|
||||
att.Mult_Recoil = 1.1
|
||||
21
lua/arccw/shared/attachments/ar2_ammopulse.lua
Normal file
21
lua/arccw/shared/attachments/ar2_ammopulse.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Effecient Pulse"
|
||||
att.Icon = Material("entities/round.png")
|
||||
att.Description = "Uses a high-tech pulse round that holds more charge."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_ammo"
|
||||
|
||||
att.MagExtender = true
|
||||
35
lua/arccw/shared/attachments/ar2_homemadepulse.lua
Normal file
35
lua/arccw/shared/attachments/ar2_homemadepulse.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Homemade Pulse"
|
||||
att.Icon = Material("entities/round.png")
|
||||
att.Description = "A pulse round made from a pair of AA batteries found strewn about. It'll never round out of ammo as long as said user has suit-armor."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_ammo"
|
||||
|
||||
att.Override_Ammo = "AirboatGun"
|
||||
|
||||
att.Hook_Think = function(wep)
|
||||
if wep.Owner:Armor() >= 0 then
|
||||
wep.Owner:SetAmmo( wep.Owner:Armor(), 20)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
att.Hook_GetCapacity = function(wep, cap)
|
||||
return wep.Owner:Armor()
|
||||
end
|
||||
|
||||
att.Mult_Damage = 0.7
|
||||
att.Mult_DamageMin = 0.5
|
||||
39
lua/arccw/shared/attachments/ar2_incendarypulse.lua
Normal file
39
lua/arccw/shared/attachments/ar2_incendarypulse.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Incendary Pulse"
|
||||
att.Icon = Material("entities/fireround.png")
|
||||
att.Description = "Sets them on fire while doing more damage towards ignited targets"
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_ammo"
|
||||
|
||||
att.Hook_BulletHit = function(wep, data)
|
||||
if CLIENT then return end
|
||||
|
||||
local ent = data.tr.Entity
|
||||
|
||||
ent:Ignite(1, 300)
|
||||
|
||||
if ent:IsOnFire() then
|
||||
ent:SetHealth(ent:Health() - 5)
|
||||
ent:EmitSound("ambient/fire/gascan_ignite1.wav", 75, 100, 100, CHAN_AUTO)
|
||||
end
|
||||
end
|
||||
|
||||
att.Mult_Damage = 0.7
|
||||
att.Mult_DamageMin = 0.5
|
||||
|
||||
att.Mult_Recoil = 0.5
|
||||
|
||||
att.Mult_ShootPitch = 1.2
|
||||
28
lua/arccw/shared/attachments/ar2_lasserbeam.lua
Normal file
28
lua/arccw/shared/attachments/ar2_lasserbeam.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Lasser Pulse"
|
||||
att.Icon = Material("entities/round.png")
|
||||
att.Description = "Changes the pulse round to a lasser beam that can pierce through walls."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_ammo"
|
||||
|
||||
att.Mult_Damage = 1.5
|
||||
att.Mult_DamageMin = 4
|
||||
|
||||
att.Mult_Recoil = 4
|
||||
att.Mult_ShootPitch = 0.5
|
||||
|
||||
att.Mult_Penetration = 1000
|
||||
att.MagReducer = true
|
||||
26
lua/arccw/shared/attachments/ar2_overchargedpulse.lua
Normal file
26
lua/arccw/shared/attachments/ar2_overchargedpulse.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Overcharged Pulse"
|
||||
att.Icon = Material("entities/round.png")
|
||||
att.Description = "Power."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_ammo"
|
||||
|
||||
att.Mult_Damage = 3
|
||||
att.Mult_DamageMin = 2
|
||||
|
||||
att.Mult_Recoil = 4
|
||||
|
||||
att.Mult_ShootPitch = 0.7
|
||||
35
lua/arccw/shared/attachments/ar2hammer_blacksmith.lua
Normal file
35
lua/arccw/shared/attachments/ar2hammer_blacksmith.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Blacksmith"
|
||||
att.Icon = Material("entities/hammer.png")
|
||||
att.Description = "Makes the hammer heavier, at the cost of a decreased firerate."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_hammer"
|
||||
|
||||
att.Override_Firemodes = {
|
||||
{
|
||||
Mode = 2,
|
||||
},
|
||||
{
|
||||
Mode = 1
|
||||
},
|
||||
{
|
||||
Mode = 0
|
||||
}
|
||||
}
|
||||
|
||||
att.Mult_Recoil = 0.25
|
||||
att.Mult_ReloadTime = 1.2
|
||||
att.Mult_RPM = 0.5
|
||||
21
lua/arccw/shared/attachments/ar2hammer_blowback.lua
Normal file
21
lua/arccw/shared/attachments/ar2hammer_blowback.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Blowback"
|
||||
att.Icon = Material("entities/hammer.png")
|
||||
att.Description = "Increases the fire-rate by having a lighter hammer."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_hammer"
|
||||
|
||||
att.Mult_RPM = 1.25
|
||||
32
lua/arccw/shared/attachments/ar2hammer_deadblow.lua
Normal file
32
lua/arccw/shared/attachments/ar2hammer_deadblow.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Deadblow"
|
||||
att.Icon = Material("entities/hammer.png")
|
||||
att.Description = "Super accurate semi-auto action."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_hammer"
|
||||
|
||||
att.Override_Firemodes = {
|
||||
{
|
||||
Mode = 1
|
||||
},
|
||||
{
|
||||
Mode = 0
|
||||
}
|
||||
}
|
||||
|
||||
att.Mult_AccuracyMOA = 0.1
|
||||
att.Mult_Recoil = 0.75
|
||||
att.Mult_RPM = 0.5
|
||||
34
lua/arccw/shared/attachments/ar2hammer_jackhammer.lua
Normal file
34
lua/arccw/shared/attachments/ar2hammer_jackhammer.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Jackhammer"
|
||||
att.Icon = Material("entities/hammer.png")
|
||||
att.Description = "Makes the hammer very light, resulting in a increased firerate."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ar2_hammer"
|
||||
|
||||
att.Override_Firemodes = {
|
||||
{
|
||||
Mode = -10,
|
||||
RunAwayBurst = true,
|
||||
PostBurstDelay = 0.35,
|
||||
},
|
||||
{
|
||||
Mode = 0,
|
||||
},
|
||||
}
|
||||
|
||||
att.Mult_Recoil = 2.5
|
||||
att.Mult_ReloadTime = 0.9
|
||||
att.Mult_RPM = 5
|
||||
32
lua/arccw/shared/attachments/barrel_eft1911_match.lua
Normal file
32
lua/arccw/shared/attachments/barrel_eft1911_match.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "National match barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/1911_barrel_icon.png", "mips smooth")
|
||||
att.Description = "National match barrel for M1911A1 .45 ACP, product by Colt."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_barrel_1911"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
att.Model = "models/weapons/arc_eft_1911/eft_1911_barrel_match/models/eft_1911_barrelmatch.mdl"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.Mult_SightTime = 1.03
|
||||
|
||||
att.Mult_Recoil = 0.90
|
||||
37
lua/arccw/shared/attachments/barrel_eft1911_threaded.lua
Normal file
37
lua/arccw/shared/attachments/barrel_eft1911_threaded.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Threaded barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/1911_barrelthreaded_icon.png", "mips smooth")
|
||||
att.Description = "Threaded barrel for M1911A1 .45 ACP, product by Colt."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
"Allows for Muzzle Devices."
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_barrel_1911"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
att.Model = "models/weapons/arc_eft_1911/eft_1911_barrel_threaded/models/eft_1911_barrelthreaded.mdl"
|
||||
|
||||
att.GivesFlags = {"barrelthread"}
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.Mult_SightTime = 1.04
|
||||
|
||||
att.Mult_Recoil = 0.97
|
||||
|
||||
att.Add_BarrelLength = 1
|
||||
31
lua/arccw/shared/attachments/barrel_eft_mp153_660.lua
Normal file
31
lua/arccw/shared/attachments/barrel_eft_mp153_660.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "660mm barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mp153_b660.png", "mips smooth")
|
||||
att.Description = "Standard serially produced barrel for MP-153 shotgun, 660 mm long for 12ga shells."
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mp153_barrel"
|
||||
|
||||
att.SortOrder = 3
|
||||
|
||||
att.Mult_DrawTime = 1.05
|
||||
att.Mult_SightTime = 1.05
|
||||
att.Mult_SpeedMult = 0.975
|
||||
att.Mult_Recoil = 0.98
|
||||
att.Mult_MuzzleVelocity = 1.125
|
||||
att.Mult_Range = 1.125
|
||||
|
||||
att.ActivateElements = {"b660"}
|
||||
31
lua/arccw/shared/attachments/barrel_eft_mp153_710.lua
Normal file
31
lua/arccw/shared/attachments/barrel_eft_mp153_710.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "710mm barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mp153_b710.png", "mips smooth")
|
||||
att.Description = "Standard serially produced barrel for MP-153 shotgun, 710 mm long for 12ga shells."
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mp153_barrel"
|
||||
|
||||
att.SortOrder = 2
|
||||
|
||||
att.Mult_DrawTime = 1.09
|
||||
att.Mult_SightTime = 1.09
|
||||
att.Mult_SpeedMult = 0.955
|
||||
att.Mult_Recoil = 0.95
|
||||
att.Mult_MuzzleVelocity = 1.1521
|
||||
att.Mult_Range = 1.1521
|
||||
|
||||
att.ActivateElements = {"b710"}
|
||||
31
lua/arccw/shared/attachments/barrel_eft_mp153_750.lua
Normal file
31
lua/arccw/shared/attachments/barrel_eft_mp153_750.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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "750mm barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mp153_b750.png", "mips smooth")
|
||||
att.Description = "Standard serially produced barrel for MP-153 shotgun, 750 mm long for 12ga shells."
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mp153_barrel"
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Mult_DrawTime = 1.13
|
||||
att.Mult_SightTime = 1.13
|
||||
att.Mult_SpeedMult = 0.945
|
||||
att.Mult_Recoil = 0.94
|
||||
att.Mult_MuzzleVelocity = 1.1791
|
||||
att.Mult_Range = 1.1791
|
||||
|
||||
att.ActivateElements = {"b750"}
|
||||
46
lua/arccw/shared/attachments/barrel_usp_match.lua
Normal file
46
lua/arccw/shared/attachments/barrel_usp_match.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "USP Match Barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/usp_barrel_match.png", "mips smooth")
|
||||
att.Description = "A 153mm barrel for the special version of the USP pistol - USP Match, chambered in .45 ACP. Manufactured by Heckler & Koch."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_usp_barrel"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
// stats
|
||||
|
||||
att.Mult_Range = 1.15
|
||||
att.Mult_MuzzleVelocity = 1.05
|
||||
|
||||
att.Mult_Recoil = 0.93
|
||||
att.Mult_RecoilSide = 1.04
|
||||
att.Mult_VisualRecoilMult = 1.1
|
||||
|
||||
att.Mult_AccuracyMOA = 0.9
|
||||
att.Mult_HipDispersion = 1.1
|
||||
|
||||
att.Add_BarrelLength = 4
|
||||
|
||||
att.Mult_SpeedMult = 0.97
|
||||
|
||||
att.Mult_SightTime = 1.03
|
||||
|
||||
att.Model = "models/weapons/arc_eft_usp/atts/eft_usp_barrel_match.mdl"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
48
lua/arccw/shared/attachments/barrel_usp_threaded.lua
Normal file
48
lua/arccw/shared/attachments/barrel_usp_threaded.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Threaded Barrel"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/usp_barrel_match.png", "mips smooth")
|
||||
att.Description = "A 129mm threaded barrel for the special version of the USP pistol - USP Tactical, chambered in .45 ACP. Manufactured by Heckler & Koch."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_usp_barrel"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
// stats
|
||||
|
||||
att.Mult_Range = 1.10
|
||||
att.Mult_MuzzleVelocity = 1.02
|
||||
|
||||
att.Mult_Recoil = 0.97
|
||||
att.Mult_RecoilSide = 1.02
|
||||
att.Mult_VisualRecoilMult = 1.04
|
||||
|
||||
att.Mult_AccuracyMOA = 0.97
|
||||
att.Mult_HipDispersion = 1.05
|
||||
|
||||
att.Add_BarrelLength = 2
|
||||
|
||||
att.Mult_SpeedMult = 0.99
|
||||
|
||||
att.Mult_SightTime = 1.015
|
||||
|
||||
att.GivesFlags = {"threadedbarrel"}
|
||||
|
||||
att.Model = "models/weapons/arc_eft_usp/atts/eft_usp_barrel_threaded.mdl"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
30
lua/arccw/shared/attachments/catch_eft1911_wilson.lua
Normal file
30
lua/arccw/shared/attachments/catch_eft1911_wilson.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Extended slide stop"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/1911_catchwilson_icon.png", "mips smooth")
|
||||
att.Description = "Extended slide lever for M1911A1, product by Wilson."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_catch_1911"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
att.Model = "models/weapons/arc_eft_1911/eft_1911_catch_wilson/models/eft_1911_catchwilson.mdl"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.Mult_SightTime = 0.97
|
||||
679
lua/arccw/shared/attachments/default.lua
Normal file
679
lua/arccw/shared/attachments/default.lua
Normal file
@@ -0,0 +1,679 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Take a look at
|
||||
https://github.com/HaodongMo/ArcCW/wiki/Attachment-Parameters
|
||||
for descriptions on these
|
||||
|
||||
*/
|
||||
|
||||
att.PrintName = ""
|
||||
att.AbbrevName = "" -- Shown in lists, cust2 only
|
||||
att.Icon = nil
|
||||
att.Description = ""
|
||||
att.Desc_Pros = {}
|
||||
att.Desc_Cons = {}
|
||||
att.Desc_Neutrals = {}
|
||||
att.Slot = ""
|
||||
|
||||
att.SortOrder = 0
|
||||
|
||||
att.Spawnable = false -- generate entity
|
||||
att.AdminOnly = false -- see above
|
||||
att.Ignore = true
|
||||
att.InvAtt = nil -- use this other attachment in inventory
|
||||
att.Free = false -- attachment is always available, and doesn't need to be picked up or unlocked
|
||||
att.IgnorePickX = false -- will not increment the Pick X counter
|
||||
att.Hidden = false
|
||||
att.HideIfBlocked = false -- if the attachment cannot be attached due to flag reasons, do not show up
|
||||
att.HideIfUnavailable = false -- if the attachment is not owned, do not show up even if "Hide Unowned Attachments" is off
|
||||
att.NoRandom = false -- will not be randomly rolled
|
||||
att.RandomWeight = 1 -- random rolling weight, defaults to 1
|
||||
|
||||
att.NotForNPCs = false
|
||||
|
||||
att.AddPrefix = ""
|
||||
att.AddSuffix = ""
|
||||
|
||||
att.ToggleLockDefault = false -- if true then lock attachment from switching stats through bind (use on stocks/colored stuff)
|
||||
|
||||
att.ToggleStats = {
|
||||
-- {
|
||||
-- PrintName = "Red",
|
||||
-- AutoStatName = "On",
|
||||
-- NoAutoStat = false,
|
||||
-- Laser = true,
|
||||
-- LaserColor = Color(255, 0, 0),
|
||||
-- Mult_HipDispersion = 0.75,
|
||||
-- AdditionalSights = {
|
||||
-- {
|
||||
-- Pos = Vector(-2, 10, -4), -- relative to where att.Model is placed
|
||||
-- Ang = Angle(0, 0, -45),
|
||||
-- GlobalPos = false,
|
||||
-- GlobalAng = true,
|
||||
-- Magnification = 1
|
||||
-- }
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- PrintName = "Blue",
|
||||
-- AutoStats = true,
|
||||
-- Laser = true,
|
||||
-- LaserColor = Color(0, 0, 255),
|
||||
-- Mult_HipDispersion = 0.75,
|
||||
-- AdditionalSights = {
|
||||
-- {
|
||||
-- Pos = Vector(-2, 10, -4), -- relative to where att.Model is placed
|
||||
-- Ang = Angle(0, 0, -45),
|
||||
-- GlobalPos = false,
|
||||
-- GlobalAng = true,
|
||||
-- Magnification = 1
|
||||
-- }
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- PrintName = "Off",
|
||||
-- Laser = false,
|
||||
-- Mult_HipDispersion = 1,
|
||||
-- }
|
||||
}
|
||||
|
||||
att.KeepBaseIrons = false
|
||||
att.BaseIronsFirst = false
|
||||
|
||||
att.GivesFlags = {}
|
||||
att.RequireFlags = {}
|
||||
att.ExcludeFlags = {}
|
||||
|
||||
-- any strings present in data will be added to weapon flags
|
||||
att.Hook_ExtraFlags = function(wep, data) end
|
||||
|
||||
-- Do not use right now.
|
||||
att.SubSlots = {
|
||||
{
|
||||
PrintName = "Optic",
|
||||
Slot = {"optic", "optic_lp"}, -- OR
|
||||
Slot = "optic",
|
||||
DefaultAttName = "Iron Sights",
|
||||
DefaultAttIcon = Material(""),
|
||||
MergeSlots = {}, -- mergeslots are relative to att.SubSlots, so this entry would be [1], then [2], etc
|
||||
-- bone/wmbone is inherited
|
||||
ExtraSightDist = 0,
|
||||
Offset = { -- inherits from base slot
|
||||
vpos = Vector(0, 0, 0),
|
||||
vang = Angle(0, 0, 0),
|
||||
wpos = Vector(0, 0, 0),
|
||||
wang = Angle(0, 0, 0)
|
||||
},
|
||||
SlideAmount = {
|
||||
vmin = Vector(0, 0, 0),
|
||||
vmax = Vector(0, 0, 0),
|
||||
wmin = Vector(0, 0, 0),
|
||||
wmax = Vector(0, 0, 0),
|
||||
},
|
||||
}
|
||||
-- CorrectiveAng/Pos is inherited from base slot
|
||||
-- everything else is the same as normal slots
|
||||
}
|
||||
|
||||
att.Max = nil -- the maximum number of this attachment that can be attached.
|
||||
|
||||
att.Model = ""
|
||||
att.HideModel = false
|
||||
att.ModelBodygroups = ""
|
||||
att.ModelSkin = 0
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
att.ModelOffset = Vector(0, 0, 0)
|
||||
att.OffsetAng = Angle(0, 0, 0)
|
||||
att.ModelIsShield = false
|
||||
att.ShieldResistance = nil -- amount of penetration to get through one unit of shield
|
||||
att.ShieldBone = "ValveBiped.Bip01_R_Hand"
|
||||
|
||||
att.Charm = false
|
||||
att.CharmBone = "Charm"
|
||||
att.CharmModel = ""
|
||||
att.CharmOffset = Vector(0, 0, 0)
|
||||
att.CharmScale = Vector(1, 1, 1)
|
||||
att.CharmSkin = 0
|
||||
att.CharmBodygroups = ""
|
||||
|
||||
att.Health = 0 -- for breakable attachments
|
||||
|
||||
att.ShieldCorrectAng = Angle(0, 0, 0)
|
||||
att.ShieldCorrectPos = Vector(0, 0, 0)
|
||||
|
||||
-- amount of damage done to this attachment
|
||||
-- attachments which are even a bit damaged are not returned
|
||||
att.DamageOnShoot = 0
|
||||
att.DamageOnReload = 0
|
||||
att.DamagePerSecond = 0
|
||||
|
||||
-- {slot = int, atthp = float, dmg = DamageInfo}
|
||||
att.Hook_PlayerTakeDamage = function(wep, data) end
|
||||
|
||||
-- {slot = int, oldhp = float, dmg = float}
|
||||
att.Hook_AttTakeDamage = function(wep, data) end
|
||||
|
||||
-- {slot = int, dmg = float}
|
||||
att.Hook_AttDestroyed = function(wep, data) end
|
||||
|
||||
att.VMColor = Color(255, 255, 255)
|
||||
att.WMColor = Color(255, 255, 255)
|
||||
att.VMMaterial = ""
|
||||
att.WMMaterial = ""
|
||||
|
||||
att.DroppedModel = nil
|
||||
att.LHIKHide = false -- use this to just hide the left hand
|
||||
att.LHIK = false -- use this model for left hand IK
|
||||
att.LHIK_Animation = false
|
||||
att.LHIK_GunDriver = ""
|
||||
att.LHIK_CamDriver = ""
|
||||
|
||||
att.Override_NoHideLeftHandInCustomization = nil
|
||||
|
||||
att.ActivateElements = {}
|
||||
|
||||
att.MountPositionOverride = nil -- set between 0 to 1 to always mount in a certain position
|
||||
|
||||
att.AdditionalSights = {
|
||||
{
|
||||
Pos = Vector(0, 0, 0), -- relative to where att.Model is placed
|
||||
Ang = Angle(0, 0, 0),
|
||||
GlobalPos = false, -- solver will not correct position relative to att.Model position
|
||||
GlobalAng = false, -- solver will not correct angle
|
||||
ViewModelFOV = 45,
|
||||
ScrollFunc = ArcCW.SCROLL_ZOOM,
|
||||
ZoomLevels = 6,
|
||||
ZoomSound = "weapons/arccw/fiveseven/fiveseven_slideback.wav",
|
||||
NVScope = nil, -- enables night vision effects for scope
|
||||
NVScopeColor = Color(0, 255, 100),
|
||||
NVFullColor = false, -- night vision scope is true full color
|
||||
Thermal = true,
|
||||
ThermalScopeColor = Color(255, 255, 255),
|
||||
ThermalHighlightColor = Color(255, 255, 255),
|
||||
ThermalFullColor = false,
|
||||
ThermalScopeSimple = false,
|
||||
ThermalNoCC = false,
|
||||
ThermalBHOT = false, -- invert bright/dark
|
||||
IgnoreExtra = false, -- ignore gun-determined extra sight distance
|
||||
Contrast = 1, -- allows you to adjust the values for contrast and brightness when either NVScope or Thermal is enabled.
|
||||
Brightness = 0,
|
||||
SpecialScopeFunction = function(screen) end -- perform whatever screen space effects you like here, copy SWEP:FormThermalImaging and SWEP:FormNightVision for examples
|
||||
}
|
||||
}
|
||||
|
||||
att.UBGL = false -- is underbarrel grenade launcher
|
||||
att.UBGL_Icon = nil -- set to a IMaterial to replace icon in HUD
|
||||
|
||||
|
||||
att.UBGL_Automatic = false
|
||||
att.UBGL_ClipSize = 1
|
||||
att.UBGL_Ammo = "smg1_grenade"
|
||||
att.UBGL_RPM = 300
|
||||
|
||||
-- Use animations on the weapon itself, useful for weapon-specific UBGL
|
||||
att.UBGL_BaseAnims = false
|
||||
|
||||
-- wep: weapon
|
||||
-- ubgl: UBGL attachment slot.
|
||||
att.UBGL_Fire = function(wep, ubgl) end
|
||||
att.UBGL_Reload = function(wep, ubgl) end
|
||||
|
||||
att.Silencer = false
|
||||
|
||||
att.Bipod = false
|
||||
att.Bipod_Icon = nil -- set to a IMaterial to replace icon in HUD
|
||||
att.Mult_BipodRecoil = 0.25
|
||||
att.Mult_BipodDispersion = 0.1
|
||||
att.Override_InBipodPos = nil
|
||||
|
||||
att.Override_AlwaysPhysBullet = nil
|
||||
att.Override_NeverPhysBullet = nil
|
||||
|
||||
att.Override_AmmoPerShot = 1
|
||||
att.Override_InfiniteAmmo = nil
|
||||
att.Override_BottomlessClip = nil
|
||||
|
||||
att.MagExtender = false
|
||||
att.MagReducer = false
|
||||
att.OverrideClipSize = nil
|
||||
att.Add_ClipSize = 0
|
||||
att.BaseClipSize = nil -- currently only used to make autostats treat this as the "base" clip size for pros/cons
|
||||
|
||||
att.Override_FuseTime = nil
|
||||
|
||||
att.Laser = false
|
||||
att.LaserStrength = 1
|
||||
att.LaserBone = "laser"
|
||||
att.LaserColor = Color(255, 0, 0)
|
||||
|
||||
att.Flashlight = false
|
||||
att.FlashlightFOV = 50
|
||||
att.FlashlightHFOV = nil -- horizontal FOV
|
||||
att.FlashlightVFOV = nil -- vertical FOV
|
||||
-- basically, use HFOV + VFOV if you want it to be non square
|
||||
att.FlashlightFarZ = 512 -- how far it goes
|
||||
att.FlashlightNearZ = 4 -- how far away it starts
|
||||
att.FlashlightAttenuationType = ArcCW.FLASH_ATT_LINEAR -- LINEAR, CONSTANT, QUADRATIC are available
|
||||
att.FlashlightColor = Color(255, 255, 255)
|
||||
att.FlashlightTexture = ""
|
||||
att.FlashlightBrightness = 1
|
||||
att.FlashlightBone = "laser"
|
||||
|
||||
att.Holosight = false
|
||||
att.HolosightReticle = nil
|
||||
att.HolosightFlare = nil
|
||||
att.HolosightSize = nil
|
||||
att.HolosightBone = "holosight"
|
||||
att.HolosightPiece = nil -- the lens of the holo sight, if applicable
|
||||
att.HolosightMagnification = 1 -- magnify the lens by this much
|
||||
att.HolosightBlackbox = false
|
||||
att.HolosightNoHSP = false -- for this holosight ignore HSP
|
||||
att.HolosightConstDist = nil -- constant holosight distance, mainly for scopes with range finder
|
||||
|
||||
att.Colorable = false -- automatically use the player's color option
|
||||
att.HolosightColor = Color(255, 255, 255)
|
||||
|
||||
att.Override_Ammo = "ar2" -- overrides the ammo type with this one
|
||||
|
||||
att.Override_Firemodes = {}
|
||||
|
||||
-- you can use _Priority to determine the priority of overrides.
|
||||
-- append it to the end of an Override_ stat to set this.
|
||||
-- for example, att.Override_Firemodes_Priority = 2
|
||||
-- higher priority = will be chosen over lower priority
|
||||
-- default priority for all stats is 1.
|
||||
|
||||
-- all hooks will work when applied to the SWEP table as well
|
||||
-- e.g. SWEP.Hook_FireBullets
|
||||
|
||||
-- use A_Hook_[Add_Whatever] to hook into additive hooks.
|
||||
-- {buff = string buff, add = num add}
|
||||
-- return table
|
||||
|
||||
-- use O_Hook_[Override_Whatever] to hook into override hooks.
|
||||
-- {buff = string buff, current = any override, winningslot = int slot}
|
||||
|
||||
-- use M_Hook_[Mult_Whatever] to hook into multiply hooks.
|
||||
-- {buff = string buff, mult = num mult}
|
||||
|
||||
-- all hooks, mults, and adds will work on fire modes
|
||||
|
||||
-- called when the active sight is changed
|
||||
-- return to change activesight
|
||||
-- {active = int activesight, asight = table}
|
||||
att.Hook_SwitchActiveSights = function(wep, data) end
|
||||
|
||||
-- Allows you to directly edit the burst count
|
||||
att.Hook_GetBurstCount = function(wep, burstcount) end
|
||||
|
||||
-- Allows you to directly edit how long a burst is
|
||||
att.Hook_GetBurstLength = function(wep, length) end
|
||||
|
||||
-- Allows you to directly edit whether the weapon is reloading/inoperable
|
||||
att.Hook_GetReloading = function(wep, reloading) end
|
||||
|
||||
-- Directly modify dispersion
|
||||
att.Hook_ModDispersion = function(wep, dispersion) end
|
||||
|
||||
-- Allows you to change the weapon's name
|
||||
-- string name
|
||||
att.Hook_NameChange = function(wep, name) end
|
||||
|
||||
-- allows you to do whatever you like to the weapon VMs
|
||||
-- {vm = vm, eles = ae}
|
||||
att.Hook_ModifyBodygroups = function(wep, data) end
|
||||
|
||||
-- modify the attachment however you like; only called for the particular attachment
|
||||
-- {vm = vm, element = VElement / WElement, slottbl = slottbl, wm = false/true}
|
||||
att.Hook_ModifyAttBodygroups = function(wep, data) end
|
||||
|
||||
-- allows you to return a shotgun spread offset
|
||||
-- {n = int number, ang = angle offset}
|
||||
att.Hook_ShotgunSpreadOffset = function(wep, data) end
|
||||
|
||||
-- done before playing an effect
|
||||
-- return false to prevent playing
|
||||
-- fx: {eff = effect name, fx = EffectData()}
|
||||
att.Hook_PreDoEffects = function(wep, fx) end
|
||||
|
||||
-- return true = compatible
|
||||
-- return false = incompatible
|
||||
-- data = {slot = string or table, att = string}
|
||||
att.Hook_Compatible = function(wep, data) end
|
||||
|
||||
-- called before the bullet is made.
|
||||
att.Hook_PostFireBullets = function(wep) end
|
||||
|
||||
-- hook that lets you change the values of the bullet before it's fired.
|
||||
att.Hook_FireBullets = function(wep, bullettable) end
|
||||
|
||||
-- called after all other primary attack functions. Do stuff here.
|
||||
att.Hook_PostFireBullets = function(wep) end
|
||||
|
||||
-- return true to prevent fire
|
||||
att.Hook_ShouldNotFire = function(wep) end
|
||||
|
||||
-- return true to prevent fire, bashing, anything involving the fire button
|
||||
att.Hook_ShouldNotFireFirst = function(wep) end
|
||||
|
||||
-- return true to prevent ads
|
||||
att.Hook_ShouldNotSight = function(wep) end
|
||||
|
||||
-- return anything to select this reload animation. Bear in mind that not all guns have the same animations, so check first.
|
||||
att.Hook_SelectReloadAnimation = function(wep, curanim) end
|
||||
|
||||
-- return anything to multiply reload time by that much
|
||||
att.Hook_MultReload = function(wep, mult) end
|
||||
|
||||
-- data has entries:
|
||||
-- number count, how much ammo to add with this insert
|
||||
-- string anim, which animation to play
|
||||
-- bool empty, whether we are reloading from empty
|
||||
att.Hook_SelectInsertAnimation = function(wep, data) end
|
||||
|
||||
-- return to override fire animation
|
||||
att.Hook_SelectFireAnimation = function(wep, curanim) end
|
||||
|
||||
-- return string to change played anim
|
||||
-- string anim, animation we are attempting to play
|
||||
-- return false to block animation
|
||||
-- return nil to do nothing
|
||||
att.Hook_TranslateAnimation = function(wep, anim) end
|
||||
|
||||
-- directly changes source sequence to play
|
||||
-- seq and return can either be string or table
|
||||
att.Hook_TranslateSequence = function(wep, seq) end
|
||||
|
||||
-- called when the vm is about to play an idle animation
|
||||
-- return a value to override ianim
|
||||
att.Hook_IdleReset = function(wep, ianim) end
|
||||
|
||||
-- allows any sound to be translated to any other
|
||||
att.Hook_TranslateSound = function(wep, soundname) end
|
||||
|
||||
-- directly changes sequence to play
|
||||
-- return "DoNotPlayIdle" to stop idle animation
|
||||
att.Hook_LHIK_TranslateAnimation = function(wep, anim) end
|
||||
|
||||
-- att.Hook_TranslateAnimation = function(wep, anim)
|
||||
-- if anim == "reload" then
|
||||
-- return "reload_soh"
|
||||
-- elseif anim == "reload_empty" then
|
||||
-- return "reload_empty_soh"
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- anim is string
|
||||
att.Hook_SelectBashAnim = function(wep, anim) end
|
||||
|
||||
att.Hook_SelectFixAnim = function(wep, anim) end
|
||||
|
||||
att.Hook_PreBash = function(wep) end
|
||||
|
||||
-- data = {tr = tr, dmg = dmg}
|
||||
att.Hook_PostBash = function(wep, data) end
|
||||
|
||||
-- Called just before a physbullet will call FireBullets
|
||||
-- data.bullet - physbullet info; data.tr - trace info
|
||||
att.Hook_PhysBulletHit = function(wep, data) end
|
||||
|
||||
-- data has entries:
|
||||
-- number range, the distance the bullet had to travel
|
||||
-- number damage, the calculated damage the bullet will do
|
||||
-- number penleft, the amount of penetration the bullet still possesses
|
||||
-- enum dmgtype, the DMG_ enum of the damagetype
|
||||
-- table tr, the trace result
|
||||
-- entity att, the attacker (?)
|
||||
-- DamageInfo dmg, the damage info
|
||||
|
||||
-- changes to dmg may be overwritten later, so set damage and dmgtype instead
|
||||
att.Hook_BulletHit = function(wep, data) end
|
||||
|
||||
-- called right after BulletHit, no further changes can be applied to damage
|
||||
att.Hook_PostBulletHit = function(wep, data) end
|
||||
|
||||
-- return true to prevent reloading
|
||||
att.Hook_PreReload = function(wep) end
|
||||
|
||||
att.Hook_PostReload = function(wep) end
|
||||
|
||||
-- return true to prevent firemode change
|
||||
att.Hook_ChangeFiremode = function(wep) end
|
||||
|
||||
-- return true to ignore current bullets in clip when reloading
|
||||
att.Hook_ReloadDumpClip = function(wep) end
|
||||
|
||||
att.Hook_GetVisualBullets = function(wep) end
|
||||
|
||||
att.Hook_GetVisualClip = function(wep) end
|
||||
|
||||
-- modify what the event system be do
|
||||
-- the event is a table containing stuff that it does
|
||||
-- sh_timers last stuff timers are stupid lets not
|
||||
-- please dont return anything people kinda would wanna run events i'd imagine
|
||||
att.Hook_PrePlayEvent = function(wep, event) end
|
||||
att.Hook_PostPlayEvent = function(wep, event) end
|
||||
|
||||
-- return to set mag capacity
|
||||
att.Hook_GetCapacity = function(wep, cap) end
|
||||
|
||||
-- return false to suppress shoot sound
|
||||
-- string sound = default sound
|
||||
att.Hook_GetShootSound = function(wep, sound) end
|
||||
att.Hook_GetShootDrySound = function(wep, sound) end
|
||||
att.Hook_GetDistantShootSound = function(wep, sound) end
|
||||
|
||||
-- return a string to change the default attachment name and icon for that slot
|
||||
-- int slot = slot of attachment to name/set icon
|
||||
att.Hook_GetDefaultAttName = function(wep, slot) end
|
||||
att.Hook_GetDefaultAttIcon = function(wep, slot) end
|
||||
|
||||
-- or just add more!
|
||||
-- data has entries:
|
||||
-- string sound
|
||||
-- number volume
|
||||
-- number pitch
|
||||
att.Hook_AddShootSound = function(wep, data) end
|
||||
-- att.Hook_AddShootSound = function(wep, data)
|
||||
-- wep:MyEmitSound("weapons/pistol/pistol_fire2.wav", data.volume, data.pitch, 1, CHAN_WEAPON - 1)
|
||||
-- end
|
||||
|
||||
-- allows you to modify the weapon's rate of fire
|
||||
att.Hook_ModifyRPM = function(wep, delay) end
|
||||
|
||||
-- return a table containing Recoil, RecoilSide, VisualRecoilMult to multiply them
|
||||
-- Alternatively, edit the values in rec without returning, which supports multiple hooks changing the value
|
||||
att.Hook_ModifyRecoil = function(wep, rec) end
|
||||
|
||||
-- run in Think()
|
||||
att.Hook_Think = function(wep) end
|
||||
|
||||
-- thinking hook for att
|
||||
att.DrawFunc = function(wep, element, wm) end
|
||||
|
||||
-- after ADS starts or ends
|
||||
att.Hook_SightToggle = function(wep, enter) end
|
||||
|
||||
att.Override_Trivia_Class = nil -- "Submachine Gun"
|
||||
att.Override_Trivia_Desc = nil -- "Ubiquitous 9mm SMG. Created as a response to the need for a faster-firing and more reliable submachine gun than existing options at the time."
|
||||
att.Override_Trivia_Manufacturer = nil -- "Auschen Waffenfabrik"
|
||||
att.Override_Trivia_Calibre = nil -- "9x21mm Jager"
|
||||
att.Override_Trivia_Mechanism = nil -- "Roller-Delayed Blowback"
|
||||
att.Override_Trivia_Country = nil -- "Austria"
|
||||
att.Override_Trivia_Year = nil -- 1968
|
||||
|
||||
att.Mult_Damage = 1
|
||||
att.Mult_DamageMin = 1
|
||||
att.Mult_DamageRand = 1
|
||||
att.Mult_DamageNPC = 1 -- damage WHEN USED BY NPCS not when used against them
|
||||
att.Mult_Range = 1
|
||||
att.Mult_Penetration = 1
|
||||
att.Override_DamageType = nil
|
||||
att.Override_DamageTypeHandled = nil
|
||||
att.Override_ShootEntity = nil
|
||||
att.Mult_MuzzleVelocity = 1
|
||||
|
||||
att.Override_BodyDamageMults = nil
|
||||
|
||||
att.Override_ShotgunSpreadPattern = {}
|
||||
att.Override_ShotgunSpreadPatternOverrun = {}
|
||||
|
||||
att.Override_NoRandSpread = false -- disable (random) spread modification after bullet table override
|
||||
|
||||
att.Mult_MeleeTime = 1
|
||||
att.Mult_MeleeDamage = 1
|
||||
att.Add_MeleeRange = 0
|
||||
att.Mult_MeleeAttackTime = 1
|
||||
att.Override_MeleeDamageType = nil
|
||||
|
||||
att.Override_Lunge = nil
|
||||
att.Add_LungeLength = 0
|
||||
att.Mult_LungeLength = 1
|
||||
|
||||
-- jam/heat related buffs
|
||||
att.Override_Jamming = nil
|
||||
att.Mult_HeatCapacity = 1
|
||||
att.Mult_FixTime = 1
|
||||
att.Mult_HeatDissipation = 1
|
||||
att.Mult_HeatDelayTime = 1
|
||||
att.Override_HeatFix = nil
|
||||
att.Override_HeatLockout = nil
|
||||
att.Hook_Overheat = function(wep, heat) end
|
||||
att.Hook_PostOverheat = function(wep) end
|
||||
-- Return true to not do animation/heat locking
|
||||
att.Hook_OnOverheat = function(wep) end
|
||||
att.HeatOverflow = nil
|
||||
|
||||
-- malfunction related buffs
|
||||
att.Override_Malfunction = nil
|
||||
att.Override_MalfunctionTakeRound = nil
|
||||
att.Override_MalfunctionJam = nil
|
||||
att.Mult_MalfunctionMean = 1
|
||||
att.Mult_MalfunctionVariance = 1
|
||||
att.Mult_MalfunctionFixTime = 1
|
||||
|
||||
-- Called every time malfunction is checked. return true to cause malfunction
|
||||
att.Hook_Malfunction = function(wep, count) end
|
||||
-- Called when a malfunction is about to happen. return true to stop malfunction
|
||||
att.Hook_OnMalfunction = function(wep, count) end
|
||||
-- Called after a malfunction has occurred.
|
||||
att.Hook_PostMalfunction = function(wep) end
|
||||
|
||||
att.Override_Tracer = nil -- tracer effect name
|
||||
att.Override_TracerNum = nil
|
||||
-- att.Override_TracerCol = nil
|
||||
-- att.Mult_TracerWidth = 1
|
||||
att.TracerFinalMag = nil
|
||||
|
||||
att.Override_PhysTracerProfile = nil -- color for phys tracer.
|
||||
-- there are 8 options:
|
||||
-- 0 = normal
|
||||
-- 1 = red
|
||||
-- 2 = green
|
||||
-- 3 = blue
|
||||
-- 4 = yellow
|
||||
-- 5 = violet
|
||||
-- 6 = cyan
|
||||
-- 7 = black/invisible
|
||||
|
||||
att.Override_CanBash = nil
|
||||
|
||||
att.Override_ShotgunReload = nil
|
||||
att.Override_HybridReload = nil
|
||||
|
||||
att.Override_AutoReload = nil
|
||||
|
||||
att.Override_ManualAction = nil
|
||||
|
||||
att.Override_CanFireUnderwater = nil
|
||||
|
||||
att.Override_ChamberSize = nil
|
||||
att.Add_ChamberSize = nil
|
||||
|
||||
att.Mult_Recoil = 1
|
||||
att.Mult_RecoilSide = 1
|
||||
att.Mult_VisualRecoilMult = 1
|
||||
|
||||
att.Mult_Sway = 1
|
||||
|
||||
att.Override_ShootWhileSprint = nil
|
||||
|
||||
att.Mult_RPM = 1
|
||||
|
||||
att.Add_Num = nil
|
||||
att.Mult_Num = nil
|
||||
att.Override_Num = nil
|
||||
|
||||
att.Mult_AccuracyMOA = 1
|
||||
att.Mult_HipDispersion = 1
|
||||
att.Mult_SightsDispersion = 1
|
||||
|
||||
att.Mult_ShootVol = 1
|
||||
att.Mult_ShootPitch = 1
|
||||
|
||||
att.Mult_GlintMagnitude = 1
|
||||
|
||||
att.Override_MuzzleEffect = nil
|
||||
att.Override_FastMuzzleEffect = nil
|
||||
att.Override_GMMuzzleEffect = nil
|
||||
|
||||
att.Override_ShellEffect = nil
|
||||
att.Override_ShellMaterial = nil
|
||||
|
||||
att.Override_MuzzleEffectAttachment = nil
|
||||
att.Override_CaseEffectAttachment = nil
|
||||
|
||||
att.Mult_SpeedMult = 1
|
||||
att.Mult_SightedSpeedMult = 1
|
||||
att.Mult_ShootSpeedMult = 1
|
||||
|
||||
att.Override_HoldtypeHolstered = nil
|
||||
att.Override_HoldtypeActive = nil
|
||||
att.Override_HoldtypeSights = nil
|
||||
|
||||
att.Override_AnimShoot = nil
|
||||
|
||||
att.Override_HolsterPos = nil
|
||||
att.Override_HolsterAng = nil
|
||||
|
||||
att.Add_BarrelLength = 0
|
||||
|
||||
att.Override_BarrelOffsetSighted = nil
|
||||
att.Override_BarrelOffsetHip = nil
|
||||
|
||||
att.Mult_ReloadTime = 1
|
||||
att.Mult_DrawTime = 1
|
||||
att.Mult_SightTime = 1
|
||||
att.Mult_CycleTime = 1
|
||||
|
||||
att.AttachSound = nil
|
||||
att.DetachSound = nil
|
||||
att.ToggleSound = nil
|
||||
|
||||
-- free aim related buffs
|
||||
att.Override_FreeAimAngle = nil
|
||||
att.Mult_FreeAimAngle = nil
|
||||
att.Add_FreeAimAngle = nil
|
||||
att.Override_NeverFreeAim = nil
|
||||
att.Override_AlwaysFreeAim = nil
|
||||
|
||||
att.Hook_OnDeploy = function(wep) end
|
||||
att.Hook_OnHolster = function(wep) end
|
||||
att.Hook_OnHolsterEnd = function(wep) end
|
||||
|
||||
-- bool dodefault - set false to not do default throwing behavior
|
||||
-- vector force
|
||||
-- string shootentity
|
||||
-- number/nil fusetime
|
||||
att.Hook_Throw = function(wep, data) end
|
||||
26
lua/arccw/shared/attachments/eft_aks74u_fold.lua
Normal file
26
lua/arccw/shared/attachments/eft_aks74u_fold.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Folded Stock"
|
||||
att.Icon = Material("vgui/entities/eft_aks74u/stock_folded.png", "mips smooth")
|
||||
att.Description = "Folding the stock will make the weapon easier to handle however it will make recoil control harder"
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_aks74u_stock"
|
||||
att.ActivateElements = {"Stock_Fold"}
|
||||
|
||||
att.SortOrder = 10
|
||||
|
||||
att.Mult_Recoil = 1.5
|
||||
att.Mult_MoveSpeed = 1.1
|
||||
att.Mult_SightTime = 0.7
|
||||
26
lua/arccw/shared/attachments/eft_aks74u_gone.lua
Normal file
26
lua/arccw/shared/attachments/eft_aks74u_gone.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "No Stock"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/NoAttachment.png", "mips smooth")
|
||||
att.Description = "Removing the stock takes a ton of weight off the gun, however it also prevents you from bracing the gun against your shoulder, increasing recoil significantly."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_aks74u_stock"
|
||||
att.ActivateElements = {"Stock_Gone"}
|
||||
|
||||
att.SortOrder = 5
|
||||
|
||||
att.Mult_Recoil = 1.8
|
||||
att.Mult_MoveSpeed = 1.15
|
||||
att.Mult_SightTime = 0.4
|
||||
24
lua/arccw/shared/attachments/eft_aks74u_removereceiver.lua
Normal file
24
lua/arccw/shared/attachments/eft_aks74u_removereceiver.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "No Dust Cover"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/NoAttachment.png", "mips smooth")
|
||||
att.Description = "Removing the dust cover lets you get a nice look at the internals, however it allows dust to get into the weapon"
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_aks74u_receiever"
|
||||
att.GivesFlags = {"NoReceiver"}
|
||||
|
||||
att.Mult_Recoil = 1.02
|
||||
att.Mult_MoveSpeed = 1.1
|
||||
att.Mult_SightTime = 0.9
|
||||
36
lua/arccw/shared/attachments/eft_handguard_b11.lua
Normal file
36
lua/arccw/shared/attachments/eft_handguard_b11.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Zenit B-11"
|
||||
att.Icon = Material("vgui/entities/eft_aks74u/handguard_b11.png", "mips smooth")
|
||||
att.Description = "The integrally machined B-11 foregrip is manufactured from aluminum alloy D16T with black coating and can be installed instead of the standard-issue foregrip on the AKS-74U. The foregrip is fitted with Picatinny rail mounts on three sides, allowing for the installation of additional equipment such as tactical foregrips, flashlights, and laser designators. Manufactured by Zenit."
|
||||
|
||||
att.SortOrder = 97
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
|
||||
att.AutoStats = true
|
||||
|
||||
att.Mult_Recoil = 1.04
|
||||
att.Mult_RecoilSide = 1.07
|
||||
|
||||
att.Mult_HipDispersion = 1.15
|
||||
att.Mult_SpeedMult = 0.97
|
||||
|
||||
att.GivesFlags = {"lowerrail", "leftrail", "rightrail"}
|
||||
att.ActivateElements = {"b11_handguard"}
|
||||
att.Slot = "eftaks74u_handguard"
|
||||
|
||||
att.LHIK = false
|
||||
|
||||
att.Model = "models/entities/eft_attachments/handguard_b11/handguard_b11/models/eft_handguard_b11.mdl"
|
||||
36
lua/arccw/shared/attachments/eft_handguard_caa.lua
Normal file
36
lua/arccw/shared/attachments/eft_handguard_caa.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "CAA XRSU47SU"
|
||||
att.Icon = Material("vgui/entities/eft_aks74u/handguard_caa.png", "mips smooth")
|
||||
att.Description = "Tactical aluminum handguard for AKS-74U, AKS-74UN, AKS-74UB, designed and manufactured by CAA. Equipped with multiple rail mounts for installation of a wide range of additional equipment."
|
||||
|
||||
att.SortOrder = 97
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
|
||||
att.AutoStats = true
|
||||
|
||||
att.Mult_Recoil = 1.04
|
||||
att.Mult_RecoilSide = 1.02
|
||||
|
||||
att.Mult_HipDispersion = 1.1
|
||||
att.Mult_SpeedMult = 0.95
|
||||
|
||||
att.GivesFlags = {"lowerrail", "leftrail", "rightrail", "rearscopemount"}
|
||||
att.ActivateElements = {"Rear_Mount", "No_Mount", "caa_handguard"}
|
||||
att.Slot = "eftaks74u_handguard"
|
||||
|
||||
att.LHIK = true
|
||||
|
||||
att.Model = "models/entities/eft_attachments/handguard_caa/handguard_caa/models/eft_handguard_caa.mdl"
|
||||
37
lua/arccw/shared/attachments/eft_mag_545drum.lua
Normal file
37
lua/arccw/shared/attachments/eft_mag_545drum.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "RPK-16 95-round drum"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mags/drum545_icon.png", "mips smooth")
|
||||
att.Description = "95-round polymer Izhmash magazine for 5.45x39 ammo, for RPK-16 and compatible systems."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = {"eft_mag_ak545"}
|
||||
|
||||
att.Model = "models/entities/eft_attachments/magazines_AK/drum/models/eft_mag_545drum.mdl"
|
||||
|
||||
att.SortOrder = 99
|
||||
att.Override_ClipSize = 95
|
||||
att.Mult_ReloadTime = 1.4
|
||||
att.Mult_SightTime = 1.7
|
||||
|
||||
att.Mult_SpeedMult = 0.75
|
||||
att.Mult_SightedSpeedMult = 0.5
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_drum"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_drum_empty"
|
||||
end
|
||||
end
|
||||
34
lua/arccw/shared/attachments/eft_mag_545saiga.lua
Normal file
34
lua/arccw/shared/attachments/eft_mag_545saiga.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Saiga 10-round magazine"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mags/saiga545_icon.png", "mips smooth")
|
||||
att.Description = "10-round polymer Izhmash Saiga 545 magazine, for the AK-based civilian carbine of the same name, for 5.45x39 ammo."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = {"eft_mag_ak545"}
|
||||
|
||||
att.Model = "models/entities/eft_attachments/magazines_AK/saiga/models/saiga10round.mdl"
|
||||
|
||||
att.SortOrder = 99
|
||||
att.Override_ClipSize = 10
|
||||
att.Mult_ReloadTime = 0.85
|
||||
att.Mult_SightTime = 0.9
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_saiga"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_saiga_empty"
|
||||
end
|
||||
end
|
||||
37
lua/arccw/shared/attachments/eft_mag_6l31.lua
Normal file
37
lua/arccw/shared/attachments/eft_mag_6l31.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "6L31 60-round magazine"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mags/6l31_icon.png", "mips smooth")
|
||||
att.Description = "60-round quad-stack polymer Izhmash 6L31 magazine for 5.45x39 ammo, for AK-74 and compatible systems. Produced as a small batch, never serialized."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = {"eft_mag_ak545"}
|
||||
|
||||
att.Model = "models/entities/eft_attachments/magazines_AK/6l31/models/eft_mag_6l31.mdl"
|
||||
|
||||
att.SortOrder = 99
|
||||
att.Override_ClipSize = 40
|
||||
att.Mult_ReloadTime = 1.15
|
||||
att.Mult_SightTime = 1.15
|
||||
|
||||
att.Mult_SpeedMult = 0.95
|
||||
att.Mult_SightedSpeedMult = 0.8
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_6l31"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_6l31_empty"
|
||||
end
|
||||
end
|
||||
47
lua/arccw/shared/attachments/eft_mag_magpuldrum.lua
Normal file
47
lua/arccw/shared/attachments/eft_mag_magpuldrum.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Magpul PMAG D-60"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mags/mag_ar_magpuldrum.png", "mips smooth")
|
||||
att.Description = "The Magpul PMAG D-60 polymer 60-round magazine for 5.56x45 rounds."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = {"eft_mag_ar15"}
|
||||
|
||||
att.Model = "models/entities/eft_attachments/mags/eft_mag_magpuldrum.mdl"
|
||||
|
||||
att.SortOrder = 99
|
||||
att.Override_ClipSize = 60
|
||||
att.Mult_ReloadTime = 1.25
|
||||
att.Mult_SightTime = 1.45
|
||||
|
||||
att.Mult_MalfunctionMean = 0.5
|
||||
|
||||
att.Mult_SpeedMult = 0.88
|
||||
att.Mult_SightedSpeedMult = 0.74
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_drum"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_drum_empty"
|
||||
end
|
||||
end
|
||||
|
||||
att.Hook_TranslateAnimation = function(wep, anim)
|
||||
if anim == "exit_inspect" then
|
||||
return "exit_drum_inspect"
|
||||
elseif anim == "exit_inspect_empty" then
|
||||
return "exit_inspect_drum_empty"
|
||||
end
|
||||
end
|
||||
47
lua/arccw/shared/attachments/eft_mag_pmag10.lua
Normal file
47
lua/arccw/shared/attachments/eft_mag_pmag10.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "PMAG GEN M3 10"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/mags/mag_ar_pmag10.png", "mips smooth")
|
||||
att.Description = "10-round polymer Magpul PMAG GEN M3 10 magazine, for 5.56x45 ammunition."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = {"eft_mag_ar15"}
|
||||
|
||||
att.Model = "models/entities/eft_attachments/mags/eft_mag_pmag10.mdl"
|
||||
|
||||
att.SortOrder = 99
|
||||
att.Override_ClipSize = 10
|
||||
att.Mult_ReloadTime = 0.8
|
||||
att.Mult_SightTime = 0.8
|
||||
|
||||
att.Mult_MalfunctionMean = 1.2
|
||||
|
||||
att.Mult_SpeedMult = 1.05
|
||||
att.Mult_SightedSpeedMult = 1.1
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_10"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_10_empty"
|
||||
end
|
||||
end
|
||||
|
||||
att.Hook_TranslateAnimation = function(wep, anim)
|
||||
if anim == "exit_inspect" then
|
||||
return "exit_10_inspect"
|
||||
elseif anim == "exit_inspect_empty" then
|
||||
return "exit_inspect_10_empty"
|
||||
end
|
||||
end
|
||||
27
lua/arccw/shared/attachments/eft_mp7_ammo_ap.lua
Normal file
27
lua/arccw/shared/attachments/eft_mp7_ammo_ap.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "4.6x30mm AP SX"
|
||||
att.Icon = Material("vgui/entities/eft_mp7/eft_mp7_bullet.png")
|
||||
att.Description = "Cartridge with armor piercing bullet 4.6x30 mm."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_46x30"
|
||||
|
||||
att.Mult_Penetration = 2
|
||||
att.Mult_Damage = 0.75
|
||||
att.Mult_DamageMin = 1.25
|
||||
att.Mult_Precision = 0.25
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"46x30_AP"}
|
||||
28
lua/arccw/shared/attachments/eft_mp7_ammo_rip.lua
Normal file
28
lua/arccw/shared/attachments/eft_mp7_ammo_rip.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "4.6x30mm Action SX"
|
||||
att.Icon = Material("vgui/entities/eft_mp7/eft_mp7_bullet.png")
|
||||
att.Description = "Cartridge with jacketed hollow-point bullet 4.6x30mm."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "ammo_eft_46x30"
|
||||
|
||||
att.Mult_Penetration = 0.5
|
||||
|
||||
att.Mult_Damage = 1.25
|
||||
att.Mult_DamageMin = 0.75
|
||||
att.Mult_Precision = 0.35
|
||||
att.Mult_Recoil = 1.1
|
||||
|
||||
att.ActivateElements = {"46x30_RIP"}
|
||||
23
lua/arccw/shared/attachments/eft_mp7_folded.lua
Normal file
23
lua/arccw/shared/attachments/eft_mp7_folded.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Folded Stock"
|
||||
att.Icon = Material("vgui/entities/eft_mp7/eft_mp7_StockFolded.png", "mips smooth")
|
||||
att.Description = "Folding the stock will make the weapon easier to handle however it will make recoil control harder"
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mp7_stock"
|
||||
|
||||
att.Mult_Recoil = 1.4
|
||||
att.Mult_MoveSpeed = 1.05
|
||||
att.Mult_SightTime = 0.6
|
||||
36
lua/arccw/shared/attachments/eft_mp7_mag_30.lua
Normal file
36
lua/arccw/shared/attachments/eft_mp7_mag_30.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "30-Round Magazine"
|
||||
att.Icon = Material("vgui/entities/eft_mp7/eft_mp7_mag30.png", "mips smooth")
|
||||
att.Description = "A standard 30-round 4.6x30 magazine for the MP7 SMGs, manufactured by Heckler & Koch."
|
||||
att.SortOrder = 40
|
||||
att.Desc_Pros = {
|
||||
"pro.magcap"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mag_mp7"
|
||||
|
||||
att.Model = "models/weapons/arc_eft_mp7/eft_mp7/models/eft_mp7_mag30.mdl"
|
||||
|
||||
att.Mult_MoveSpeed = 0.95
|
||||
att.Mult_SightTime = 1.1
|
||||
att.Override_ClipSize = 30
|
||||
att.Mult_ReloadTime = 1.05
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_extended"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_extended_empty"
|
||||
end
|
||||
end
|
||||
36
lua/arccw/shared/attachments/eft_mp7_mag_40.lua
Normal file
36
lua/arccw/shared/attachments/eft_mp7_mag_40.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "40-Round Magazine"
|
||||
att.Icon = Material("vgui/entities/eft_mp7/eft_mp7_mag40.png", "mips smooth")
|
||||
att.Description = "A standard 40-round 4.6x30 magazine for the MP7 SMGs, manufactured by Heckler & Koch."
|
||||
att.SortOrder = 40
|
||||
att.Desc_Pros = {
|
||||
"pro.magcap"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mag_mp7"
|
||||
|
||||
att.Model = "models/weapons/arc_eft_mp7/eft_mp7/models/eft_mp7_mag40.mdl"
|
||||
|
||||
att.Mult_MoveSpeed = 0.9
|
||||
att.Mult_SightTime = 1.2
|
||||
att.Override_ClipSize = 40
|
||||
att.Mult_ReloadTime = 1.15
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_extended2"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_extended2_empty"
|
||||
end
|
||||
end
|
||||
41
lua/arccw/shared/attachments/eft_mp7_surpressor.lua
Normal file
41
lua/arccw/shared/attachments/eft_mp7_surpressor.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "B&T Rotex 2 silencer"
|
||||
att.Icon = Material("vgui/entities/eft_mp7/eft_mp7_surpressor.png", "mips smooth")
|
||||
att.Description = "Rotex 2 is a 4.6x30 mm suppressor produced by Brügger & Thomet."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_mp7_surpressor"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
att.Model = "models/weapons/arc_eft_mp7/eft_mp7/models/eft_mp7_surpressor.mdl"
|
||||
|
||||
att.Silencer = true
|
||||
att.Override_MuzzleEffect = "muzzleflash_suppressed"
|
||||
att.IsMuzzleDevice = true
|
||||
|
||||
att.Mult_ShootPitch = 1.1
|
||||
att.Mult_ShootVol = 0.75
|
||||
att.Mult_Range = 1.05
|
||||
|
||||
att.Mult_SightTime = 1.12
|
||||
|
||||
att.Mult_Recoil = 0.93
|
||||
att.Mult_RecoilSide = 0.93
|
||||
|
||||
att.Add_BarrelLength = 8
|
||||
41
lua/arccw/shared/attachments/eft_muzzle_aks74u.lua
Normal file
41
lua/arccw/shared/attachments/eft_muzzle_aks74u.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "6P26 Muzzle Brake"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/muzzles/muzzle_aks74u.png", "mips smooth")
|
||||
att.Description = "Standard-issue IzhMash muzzle brake for AKS-74U and AKS-74UN, installed on 24x1.5 mm threading."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_muzzle_ak545"
|
||||
|
||||
att.SortOrder = 16
|
||||
|
||||
att.Model = "models/entities/eft_attachments/muzzle_Aks74u/muzzle/models/eft_muzzle_aks74u.mdl"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.IsMuzzleDevice = true
|
||||
|
||||
att.Mult_ShootPitch = 1
|
||||
att.Mult_ShootVol = 1
|
||||
att.Mult_Range = 0.95
|
||||
|
||||
att.Mult_SightTime = 1.09
|
||||
|
||||
att.Mult_Recoil = 0.90
|
||||
att.Mult_RecoilSide = 0.85
|
||||
|
||||
att.Add_BarrelLength = 3
|
||||
42
lua/arccw/shared/attachments/eft_muzzle_ddwave.lua
Normal file
42
lua/arccw/shared/attachments/eft_muzzle_ddwave.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "WAVE muzzle brake"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/muzzles/muzzle_ddwave.png", "mips smooth")
|
||||
att.Description = "Daniel Defense Wave is a very effective muzzle brake that also serves as a platform for attaching a QD Wave sound suppressor."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_muzzle_ar15"
|
||||
|
||||
att.SortOrder = 16
|
||||
|
||||
att.Model = "models/entities/eft_attachments/eft_muzzle_ddwave.mdl"
|
||||
att.ModelBodygroups = "00"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.IsMuzzleDevice = true
|
||||
|
||||
att.Mult_ShootPitch = 1
|
||||
att.Mult_ShootVol = 1
|
||||
att.Mult_Range = 0.95
|
||||
|
||||
att.Mult_SightTime = 1.09
|
||||
|
||||
att.Mult_Recoil = 0.91
|
||||
att.Mult_RecoilSide = 0.84
|
||||
|
||||
att.Add_BarrelLength = 2
|
||||
50
lua/arccw/shared/attachments/eft_muzzle_ddwavesurpressed.lua
Normal file
50
lua/arccw/shared/attachments/eft_muzzle_ddwavesurpressed.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "WAVE QD sound suppressor"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/muzzles/muzzle_ddwavesurpressor.png", "mips smooth")
|
||||
att.Description = "Daniel Defence Wave QD sound suppressor, which can be installed over a Wave muzzle brake."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_muzzle_ar15"
|
||||
|
||||
att.SortOrder = 16
|
||||
|
||||
att.Model = "models/entities/eft_attachments/eft_muzzle_ddwave.mdl"
|
||||
att.ModelBodygroups = "01"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.Silencer = true
|
||||
att.Override_MuzzleEffect = "muzzleflash_suppressed"
|
||||
att.IsMuzzleDevice = true
|
||||
|
||||
att.Mult_HeatCapacity = 0.5
|
||||
att.Mult_HeatDissipation = 0.7
|
||||
|
||||
att.Mult_ShootPitch = 1
|
||||
att.Mult_ShootVol = 1
|
||||
att.Mult_Range = 0.86
|
||||
att.Mult_AccuracyMOA = 0.95
|
||||
|
||||
att.Mult_MuzzleVelocity = 1.02
|
||||
|
||||
att.Mult_SightTime = 1.14
|
||||
|
||||
att.Mult_Recoil = 0.84
|
||||
att.Mult_RecoilSide = 0.75
|
||||
|
||||
att.Add_BarrelLength = 16
|
||||
43
lua/arccw/shared/attachments/eft_muzzle_eft_ak_tgp.lua
Normal file
43
lua/arccw/shared/attachments/eft_muzzle_eft_ak_tgp.lua
Normal 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "TGP-A Surpressor"
|
||||
att.Icon = Material("vgui/entities/eft_attachments/muzzles/muzzle_TGP.png", "mips smooth")
|
||||
att.Description = "Tactical muzzle device/suppressor TGP-A, manufactured by State R&D Agency 'Special devices and Comms' for AK-based 5.45x39 automatic rifles."
|
||||
|
||||
att.SortOrder = 1
|
||||
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_muzzle_ak545"
|
||||
|
||||
att.SortOrder = 15
|
||||
|
||||
att.Model = "models/entities/eft_attachments/muzzle_tgp/muzzle/models/eft_muzzle_tgp.mdl"
|
||||
|
||||
att.ModelScale = Vector(1, 1, 1)
|
||||
|
||||
att.Silencer = true
|
||||
att.Override_MuzzleEffect = "muzzleflash_suppressed"
|
||||
att.IsMuzzleDevice = true
|
||||
|
||||
att.Mult_ShootPitch = 1.2
|
||||
att.Mult_ShootVol = 0.85
|
||||
att.Mult_Range = 0.9
|
||||
|
||||
att.Mult_SightTime = 1.10
|
||||
|
||||
att.Mult_Recoil = 0.97
|
||||
att.Mult_RecoilSide = 0.95
|
||||
|
||||
att.Add_BarrelLength = 8
|
||||
38
lua/arccw/shared/attachments/eft_ppsh_mag_71.lua
Normal file
38
lua/arccw/shared/attachments/eft_ppsh_mag_71.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "71-Round PPSH Drum"
|
||||
att.Icon = Material("entities/acwatt_go_ak_mag_40.png", "mips smooth")
|
||||
att.Description = "71-Round Standard Issue drum magazine for the PPSH-41"
|
||||
att.SortOrder = 40
|
||||
att.Desc_Pros = {
|
||||
"pro.magcap"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.AutoStats = true
|
||||
att.Slot = "eft_ppsh_magazine"
|
||||
|
||||
att.Model = "models/weapons/arc_eft_ppsh/eft_ppsh_drum/models/eft_ppsh_drum.mdl"
|
||||
|
||||
att.Mult_MoveSpeed = 0.9
|
||||
att.Mult_SightTime = 1.25
|
||||
att.Override_ClipSize = 71
|
||||
att.Mult_ReloadTime = 1.25
|
||||
|
||||
att.ActivateElements = {"magazine"}
|
||||
|
||||
att.Hook_SelectReloadAnimation = function(wep, anim)
|
||||
if anim == "reload" then
|
||||
return "reload_extended"
|
||||
elseif anim == "reload_empty" then
|
||||
return "reload_extended_empty"
|
||||
end
|
||||
end
|
||||
30
lua/arccw/shared/attachments/gauss_rifle_bullet_eco.lua
Normal file
30
lua/arccw/shared/attachments/gauss_rifle_bullet_eco.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Lightweight Slugs"
|
||||
att.Icon = Material("entities/acwatt_gauss_rifle_ammo.png")
|
||||
att.Description = "Shortened slugs using light alloy. Improves handling and recoil control, but damage and ranged performance is reduced."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Slot = "gauss_rifle_bullet"
|
||||
|
||||
att.AutoStats = true
|
||||
att.Mult_RangeMin = 0
|
||||
att.Mult_Range = 0.75
|
||||
att.Mult_Penetration = 0.5
|
||||
att.Mult_Recoil = 0.75
|
||||
att.Mult_MoveDispersion = 0.5
|
||||
att.Mult_HipDispersion = 0.5
|
||||
|
||||
if engine.ActiveGamemode() == "terrortown" then
|
||||
att.Free = true
|
||||
end
|
||||
28
lua/arccw/shared/attachments/gauss_rifle_bullet_extended.lua
Normal file
28
lua/arccw/shared/attachments/gauss_rifle_bullet_extended.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Extended Magazine"
|
||||
att.Icon = Material("entities/acwatt_gauss_rifle_ammo.png")
|
||||
att.Description = "Lengthened magazines containing standard iron slugs. Slower to reload."
|
||||
att.Desc_Pros = {
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Slot = "gauss_rifle_bullet"
|
||||
|
||||
att.AutoStats = true
|
||||
att.Mult_ReloadTime = 1.25
|
||||
att.MagExtender = true
|
||||
|
||||
att.ActivateElements = {"extendedmag"}
|
||||
|
||||
if engine.ActiveGamemode() == "terrortown" then
|
||||
att.Free = true
|
||||
end
|
||||
30
lua/arccw/shared/attachments/gauss_rifle_bullet_frag.lua
Normal file
30
lua/arccw/shared/attachments/gauss_rifle_bullet_frag.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Shrapnel Slugs"
|
||||
att.Icon = Material("entities/acwatt_gauss_rifle_ammo.png")
|
||||
att.Description = "Slug that explodes into shrapnel upon firing. Has reduced precision and range."
|
||||
att.Desc_Pros = {
|
||||
"+ 16 pellets per shot"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
"+20MOA Imprecision"
|
||||
}
|
||||
att.Slot = "gauss_rifle_bullet"
|
||||
|
||||
att.AutoStats = true
|
||||
att.Override_Num = 16
|
||||
att.Add_AccuracyMOA = 20
|
||||
att.Mult_Range = 0.5
|
||||
att.Mult_Penetration = 0.2
|
||||
|
||||
if engine.ActiveGamemode() == "terrortown" then
|
||||
att.Free = true
|
||||
end
|
||||
@@ -0,0 +1,45 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
att.PrintName = "Explosive Slugs"
|
||||
att.Icon = Material("entities/acwatt_gauss_rifle_ammo.png")
|
||||
att.Description = "Slug containing an explosive payload. Does less direct damage, and cannot penetrate surfaces.\nExplosive shell can take down various Combine vehicles."
|
||||
att.Desc_Pros = {
|
||||
"+ Explosion on hit"
|
||||
}
|
||||
att.Desc_Cons = {
|
||||
}
|
||||
att.Slot = "gauss_rifle_bullet"
|
||||
att.Override_DamageType = DMG_BURN
|
||||
|
||||
att.AutoStats = true
|
||||
att.Mult_Penetration = 0
|
||||
att.Mult_Damage = 0.6
|
||||
att.Mult_DamageMin = 0.6
|
||||
att.MagReducer = true
|
||||
att.ActivateElements = {"reducedmag"}
|
||||
|
||||
att.Hook_BulletHit = function(wep, data)
|
||||
local ent = data.tr.Entity
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin( data.tr.HitPos )
|
||||
util.Effect( "Explosion", effectdata)
|
||||
local rad = math.Clamp(math.ceil(wep:GetDamage(0)), 100, 500)
|
||||
util.BlastDamage(wep, wep:GetOwner(), data.tr.HitPos, rad, wep:GetDamage(data.range))
|
||||
if ent:IsValid() and ent:GetClass() == "npc_helicopter" then
|
||||
-- The Hunter Chopper is hardcoded to only take damage from HL2 airboat
|
||||
-- Screw you, Valve! Screw you!
|
||||
data.dmgtype = DMG_AIRBOAT
|
||||
end
|
||||
end
|
||||
|
||||
if engine.ActiveGamemode() == "terrortown" then
|
||||
att.Free = true
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user