This commit is contained in:
lifestorm
2024-08-04 23:12:27 +03:00
parent 8064ba84d8
commit 9c918c46e5
7081 changed files with 2173485 additions and 14 deletions

View 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/
--]]
include("shared.lua")
ENT.PopulateEntityInfo = true
local glowMaterial = Material("sprites/glow04_noz")
function ENT:OnPopulateEntityInfo(container)
local name = container:AddRow("name")
name:SetImportant()
name:SetText("Faction Intercom")
name:SizeToContents()
local description = container:AddRow("description")
description:SetText("A one-way stationary intercom locked to a specific channel.")
description:SizeToContents()
local channelID = self:GetChannel() or ""
local channel = ix.radio.channels[channelID]
if (!channel) then return end
local channelRow = container:AddRow("channel")
channelRow:SetText("Channel: " .. string.upper(channelID))
channelRow:SetBackgroundColor(channel.color)
channelRow:SizeToContents()
end
function ENT:Draw()
self:DrawModel()
local channelID = self:GetChannel() or ""
local channel = ix.radio.channels[channelID]
if (!channel) then return end
render.SetMaterial(glowMaterial)
render.DrawSprite(self:GetPos() + self:GetUp() * 2.6 + self:GetRight() * 2.3 + self:GetForward() * -3.1, 3, 3, channel.color)
end

View 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/
--]]
include("shared.lua")
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
function ENT:Initialize()
self:SetModel("models/props/cs_office/phone_p1.mdl")
self:SetMoveType(MOVETYPE_VPHYSICS)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local physicsObject = self:GetPhysicsObject()
if (IsValid(physicsObject)) then
physicsObject:Wake()
physicsObject:EnableMotion(false)
end
end

View 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/
--]]
DEFINE_BASECLASS("base_gmodentity")
ENT.Type = "anim"
ENT.Author = "Aspect™"
ENT.PrintName = "Faction Intercom"
ENT.Category = "HL2 RP"
ENT.Spawnable = true
ENT.AdminSpawnable = true
function ENT:SetupDataTables()
self:NetworkVar("String", 0, "Channel")
end