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
}

View File

@@ -0,0 +1,15 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Cracked Printer"
ITEM.uniqueID = "newspaper_printer_cracked"
ITEM.description = "A cracked newspaper printer that can print shady newspapers."
ITEM.ent = "ix_crackedprinter"

View File

@@ -0,0 +1,15 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
ITEM.name = "Newspaper Printer"
ITEM.uniqueID = "newspaper_printer"
ITEM.description = "A newspaper printer that can print newspapers."
ITEM.ent = "ix_newspaperprinter"

View File

@@ -0,0 +1,19 @@
--[[
| 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 = "Black Ink"
ITEM.uniqueID = "black_ink"
ITEM.model = "models/gibs/metal_gib2.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.description = "A black ink cartridge."
ITEM.category = "Writing"

View File

@@ -0,0 +1,80 @@
--[[
| 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 = "Pin"
ITEM.uniqueID = "pin"
ITEM.model = "models/items/crossbowrounds.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.description = "A pin. Used to hang up papers etc. on the walls."
ITEM.category = "Writing"
function ITEM:MakeNail(nailedEnt, pos, ang, client)
pos = nailedEnt:LocalToWorld( pos )
nailedEnt:GetPhysicsObject():EnableMotion(false)
local nail = ents.Create( "gmod_nail" )
nail:SetPos( pos )
nail:SetAngles( ang )
nail:SetParent( nailedEnt )
nail:Spawn()
nail:Activate()
local item = ix.item.instances[nailedEnt.ixItemID]
item:SetData("pin", true)
item:SetData("owner", client:GetCharacter():GetID())
nail.itemparentID = nailedEnt.ixItemID
nail.itemparentPos = nailedEnt:GetPos()
nail.itemparentAngs = nailedEnt:GetAngles()
ix.saveEnts:SaveEntity(nail)
end
ITEM.functions.Pin = {
OnRun = function(item)
local client = item.player
local trace = client:GetEyeTrace()
-- Bail if we hit world or a client
if ( !trace.Entity:IsValid() or trace.Entity:IsPlayer() ) then return false end
if ( SERVER and !util.IsValidPhysicsObject( trace.Entity, trace.PhysicsBone ) ) then return false end
local tr = {}
tr.start = trace.HitPos
tr.endpos = trace.HitPos + (client:GetAimVector() * 16.0)
tr.filter = { client, trace.Entity }
local trTwo = util.TraceLine( tr )
if ( trTwo.Hit and !trTwo.Entity:IsPlayer() ) then
if trace.Entity:GetClass() != "ix_item" then
client:NotifyLocalized("Only items can be pinned!")
return false
end
-- Client can bail now
if ( CLIENT ) then return true end
local vOrigin = trace.HitPos - (client:GetAimVector() * 8.0)
local vDirection = client:GetAimVector():Angle()
vOrigin = trace.Entity:WorldToLocal( vOrigin )
item:MakeNail( trace.Entity, vOrigin, vDirection, client )
client:EmitSound("weapons/crossbow/hit1.wav", 110)
else
client:NotifyLocalized("Could not find anything to pin!")
return false
end
end
}

View 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/
--]]
ITEM.name = "Book"
ITEM.model = "models/willardnetworks/misc/book.mdl"
ITEM.identifier = "book"
ITEM.holdData = {
vectorOffset = {
right = 1.5,
up = -4,
forward = -5.5
},
angleOffset = {
right = 0,
up = 30,
forward = 0
},
}

View 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/
--]]
ITEM.uniqueID = "bulkbox_paper_pins"
ITEM.name = "Paper and Pins Box"
ITEM.description = "A box containing a set of five papers and pins. How convenient."
ITEM.category = "Boxes"
ITEM.model = "models/items/item_item_crate.mdl"
ITEM.width = 2
ITEM.height = 2
ITEM.colorAppendix = {["red"] = "Please ensure you have 10 free inventory slots before converting this into it's individual script form."}
ITEM.functions.Convert = {
name = "Convert",
icon = "icon16/wrench.png",
OnRun = function(item)
local client = item.player
local inventory = client:GetCharacter():GetInventory()
inventory:Add("paper", 5)
inventory:Add("pin", 5)
client:Notify("You have converted the " .. item.name .. " into its relevant set.")
end
}

View 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/
--]]
ITEM.name = "Newspaper"
ITEM.model = "models/props_junk/garbage_newspaper001a.mdl"
ITEM.identifier = "newspaper"
ITEM.holdData = {
vectorOffset = {
right = -1,
up = 2,
forward = 1
},
angleOffset = {
right = 0,
up = 90,
forward = -90
},
}
function ITEM:OnInstanced()
if self.data and self.data.data then
if self.data.data.writingID then self:SetData("writingID", self.data.data.writingID) end
if self.data.data.title then self:SetData("title", self.data.data.title) end
if self.data.data.cracked then self:SetData("cracked", self.data.data.cracked) end
end
end

View 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/
--]]
ITEM.name = "Notepad"
ITEM.model = "models/props_lab/clipboard.mdl"
ITEM.identifier = "notepad"
ITEM.holdData = {
vectorOffset = {
right = 0.7,
up = -3,
forward = 0
},
angleOffset = {
right = 20,
up = 90,
forward = -90
},
}

View File

@@ -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/
--]]
ITEM.name = "Paper"
ITEM.model = "models/props_c17/paper01.mdl"
ITEM.identifier = "paper"
ITEM.holdData = {
vectorOffset = {
right = 0,
up = -3,
forward = 1
},
angleOffset = {
right = -15,
up = 90,
forward = 90
},
}
ITEM.functions.zTear = { -- I want it to be last
name = "Tear",
icon = "icon16/textfield_delete.png",
OnRun = function(item)
local client = item.player
client:RequestConfirmation("Confirm Tear", "Are you sure you want to tear this paper?", function(confirmation)
if (!confirmation) then return end
client:Notify("You tear the paper apart.")
item:Remove()
end)
return false
end,
OnCanRun = function(item)
return !item.entity or !IsValid(item.entity)
end
}