This commit is contained in:
lifestorm
2024-08-05 18:40:29 +03:00
parent 9f505a0646
commit c6d9b6f580
8044 changed files with 1853472 additions and 21 deletions

View File

@@ -0,0 +1,68 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
ITEM.name = "Newspaper Printer Base"
ITEM.model = "models/willardnetworks/plotter.mdl"
ITEM.width = 2
ITEM.height = 2
ITEM.skin = 1
ITEM.description = ""
ITEM.category = "Writing"
ITEM.ent = ""
ITEM.functions.Place = {
OnRun = function(itemTable)
local client = itemTable.player
local entity = ents.Create(itemTable.ent)
local trace = client:GetEyeTraceNoCursor()
if (trace.HitPos:Distance( client:GetShootPos() ) <= 192) and !client.CantPlace then
entity:SetPos(trace.HitPos)
entity:Spawn()
entity:SetNWInt("owner", client:GetCharacter():GetID())
client.CantPlace = true
if itemTable:GetData("paper") then
entity.paper = itemTable:GetData("paper")
entity:SetPaper(entity.paper)
end
if itemTable:GetData("ink") then
entity.ink = itemTable:GetData("ink")
entity:SetInk(entity.ink)
end
if itemTable:GetData("registeredCID") then
entity.registeredCID = itemTable:GetData("registeredCID")
end
if (IsValid(entity)) then
entity:SetAngles(Angle(0, client:EyeAngles().yaw + 180, 0))
end
ix.saveEnts:SaveEntity(entity)
timer.Simple(3, function()
if client then
client.CantPlace = false
end
end)
elseif client.CantPlace then
client:NotifyLocalized("You cannot place this right now!")
return false
else
client:NotifyLocalized("You cannot place it that far away!..")
return false
end
end
}

View File

@@ -0,0 +1,57 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLUGIN = PLUGIN
ITEM.name = "Writing Base"
ITEM.model = "models/error.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.identifier = "base"
ITEM.description = ""
ITEM.category = "Writing"
ITEM.bAllowMultiCharacterInteraction = true
function ITEM:GetName()
local title = self:GetData("title")
if title and title != "" then return title end
return self.name
end
function ITEM:GetDescription()
return "A "..self.identifier.." to read or write on."
end
function ITEM:SetBodygroups(bodygroups)
self:SetData("bodygroups", bodygroups)
end
function ITEM:GetModelBodygroups()
return self:GetData("bodygroups") or ""
end
ITEM.functions.Write = {
name = "Read/Write",
tip = "Read/Write on this object.",
icon = "icon16/text_align_center.png",
OnRun = function(item)
local client = item.player
if !IsValid(client) then return false end
if (SERVER) then
PLUGIN:OpenWriting(client, item)
end
return false
end
}