This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 0e770b2b49
commit df294d03aa
7526 changed files with 4011945 additions and 15 deletions

View File

@@ -0,0 +1,82 @@
--[[
| 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 = "base_assembly"
ITEM.name = "Taban Montaj Kiti"
ITEM.description = "Bu ahşap paket, bir dizi talimatın yanı sıra, Crafting aparatı için çok sayıda farklı bileşen parçası içerir."
ITEM.category = "Tools"
ITEM.width = 3
ITEM.height = 3
ITEM.model = "models/props_junk/wood_crate001a.mdl"
ITEM.useSound = "physics/metal/metal_box_break1.wav"
ITEM.openedItem = "tool_craftingbench"
ITEM.openRequirement = "tool_toolkit"
ITEM.functions.Assemble = {
icon = "icon16/wrench.png",
OnCanRun = function(item)
return !IsValid(item.entity)
end,
OnRun = function(item)
local client = item.player
if (client.CantPlace) then
client:NotifyLocalized("assembleCant")
return false
end
client.CantPlace = true
timer.Simple(3, function()
if (client) then
client.CantPlace = false
end
end)
local character = client:GetCharacter()
local inventory = character:GetInventory()
local requirementTable = ix.item.list[item.openRequirement]
local requirementName = requirementTable.name or item.openRequirement
local openerItem = inventory:HasItem(item.openRequirement)
if (!openerItem) then
client:NotifyLocalized("assembleMissingRequirement", requirementName)
return false
else
if (item.openedItem) then
local openedItemName = ix.item.list[item.openedItem].name or item.openedItem
local openedItemWidth, openedItemHeight = ix.item.list[item.openedItem].width, ix.item.list[item.openedItem].height
timer.Simple(0.25, function()
if (inventory:FindEmptySlot(openedItemWidth, openedItemHeight)) then
inventory:Add(item.openedItem)
if (openerItem.isTool) then
openerItem:DamageDurability(1)
end
client:EmitSound(item.useSound)
client:NotifyLocalized("assembleSuccess", openedItemName)
else
client:NotifyLocalized("assembleNoSpace", openedItemWidth, openedItemHeight)
inventory:Add(item.uniqueID)
end
end)
else
return false
end
end
end
}

View 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/
--]]
ITEM.name = "Üretim Bileşenleri Tabanı"
ITEM.description = "Sadece dosya yapılandırması için, bir öğe değil."
ITEM.category = "Crafting Components"
ITEM.base = "base_stackable"
ITEM.maxStackSize = 8

View File

@@ -0,0 +1,13 @@
--[[
| 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 = "Dummy Base"
ITEM.description = "Just for file structuring, not an item."
ITEM.category = "Dummy"

View File

@@ -0,0 +1,13 @@
--[[
| 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 = "Expedition Base"
ITEM.description = "Just for file structuring, not an item."
ITEM.category = "Expedition"

View 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/
--]]
ITEM.name = "Ingredient Base"
ITEM.description = "Just for file structuring, not an item."
ITEM.category = "Ingredients"
ITEM.base = "base_stackable"
ITEM.maxStackSize = 8

View File

@@ -0,0 +1,13 @@
--[[
| 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 = "Junk Base"
ITEM.description = "Just for file structuring, not an item."
ITEM.category = "Junk"

View File

@@ -0,0 +1,227 @@
--[[
| 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 = "Liquor Base"
ITEM.model = Model("models/props_junk/garbage_takeoutcarton001a.mdl")
ITEM.description = "A base for alcoholic consumables."
ITEM.width = 1
ITEM.height = 1
ITEM.category = "Consumable"
ITEM.useSound = {"npc/barnacle/barnacle_crunch3.wav", "npc/barnacle/barnacle_crunch2.wav"}
ITEM.hunger = 0
ITEM.thirst = 0
ITEM.health = 0
ITEM.damage = 0
ITEM.strength = 25
ITEM.abv = 10
ITEM.colorAppendix = {}
ITEM.base = "base_stackable"
ITEM.maxStackSize = 1
ITEM.boosts = {
strength = 3,
agility = -3,
perception = -2,
intelligence = 1
}
ITEM.grade = "LOW" -- ix.inebriation.grades
function ITEM:GetBoostAppend()
local boostAppend = {}
if (self.boosts) then
boostAppend[#boostAppend + 1] = "SHORT-TERM BOOSTS:\n"
if (self.boosts.strength) then
boostAppend[#boostAppend + 1] = string.format("Strength: %d\n", self.boosts.strength)
end
if (self.boosts.agility) then
boostAppend[#boostAppend + 1] = string.format("Agility: %d\n", self.boosts.agility)
end
if (self.boosts.intelligence) then
boostAppend[#boostAppend + 1] = string.format("Intelligence: %d\n", self.boosts.intelligence)
end
if (self.boosts.perception) then
boostAppend[#boostAppend + 1] = string.format("Perception: %d", self.boosts.perception)
end
end
return table.concat(boostAppend, "")
end
function ITEM:GetColorAppendix()
local tbl = {
["yellow"] = self:GetBoostAppend(),
["blue"] = "\nABV: "..tostring(self.abv or 0).."%%"
}
if (self.shotsPerItem and self.shotsPoured) then
tbl["red"] = "Glasses Left: "..tostring(self.shotsPerItem - self.shotsPoured)
end
if (self.grade and ix.inebriation.grades[self.grade]) then
local _grade = ix.inebriation.grades[self.grade]
if (_grade and _grade.appendText) then
tbl["green"] = "Grade: ".._grade.appendText
end
end
return tbl
end
function ITEM:OnInstanced()
if (!self:GetData("stack")) then
self:SetStack(self:GetStackSize())
end
end
local function consume(item, client, character)
if (item.useSound) then
if (istable(item.useSound)) then
client:EmitSound(table.Random(item.useSound))
else
client:EmitSound(item.useSound)
end
end
if item.OnConsume then
item:OnConsume(client, character)
end
if (item.thirst > 0) then
character:SetThirst(math.Clamp(character:GetThirst() - (client:Team() == FACTION_BIRD and item.thirst * 2 or item.thirst), 0, 100))
end
if (item.hunger > 0) then
character:SetHunger(math.Clamp(character:GetHunger() - (client:Team() == FACTION_BIRD and item.hunger * 2 or item.hunger), 0, 100))
end
if (item.health > 0) then
client:SetHealth(math.Clamp(client:Health() + (client:Team() == FACTION_BIRD and item.health * 2 or item.health), 0, client:GetMaxHealth()))
end
if (item.strength > 0) then
if (ix.inebriation and ix.inebriation.allowedFactions[character:GetFaction()]) then
character:SetInebriation(character:GetInebriation() + item.strength)
client:SetNetVar("inebriation", character:GetInebriation())
end
end
if (item.grade) then
local grade = ix.inebriation.grades[item.grade]
if (grade.damage > 0) then
client:SetHealth(math.Clamp(client:Health() - grade.damage, 0, client:GetMaxHealth()))
end
end
if (item.boosts) then
for k, v in pairs(item.boosts) do
character:SetSpecialBoost(k, v, true)
end
end
end
ITEM.functions.Consume = {
icon = "icon16/user.png",
OnRun = function(item)
local client = item.player
local character = item.player:GetCharacter()
consume(item, client, character)
end
}
ITEM.functions.give = {
name = "Use on character",
tip = "giveTip",
icon = "icon16/user_go.png",
OnCanRun = function(item)
if (item.entity) then return false end
local trace = item.player:GetEyeTraceNoCursor()
local target = trace.Entity
if (!IsValid(target)) then
return false
end
if (CLIENT and target:GetClass() == "prop_ragdoll") then
return true
end
if (target:GetClass() == "prop_ragdoll" and IsValid(target.ixPlayer)) then
target = target.ixPlayer
end
if (!target:IsPlayer() or !target:GetCharacter()) then
return false
end
if (target:Health() >= target:GetMaxHealth()) then
local targetChar = target:GetCharacter()
if (targetChar:GetHealing("fakeHealth") == 0 and targetChar:GetBleedout() == -1) then
return false
end
end
return true
end,
OnRun = function(item)
local trace = item.player:GetEyeTraceNoCursor()
local target = trace.Entity
if (target:GetClass() == "prop_ragdoll" and IsValid(target.ixPlayer)) then
target = target.ixPlayer
end
local targetChar = target:GetCharacter()
consume(item, target, targetChar)
end,
}
ITEM.functions.Pour = {
OnCanRun = function(item)
return item.shareable and ix.item.list[item.shotItem]
end,
OnRun = function(item)
local client = item.player
local character = item.player:GetCharacter()
local inventory = character:GetInventory()
local itemName = ix.item.list[item.shotItem] and ix.item.list[item.shotItem].uniqueID or item.shotItem
if (!itemName) then
client:NotifyLocalized("Invalid item.")
return
end
local tr = client:GetEyeTrace()
ix.item.Spawn(itemName, tr.HitPos, function(_item, _)
_item.grade = item.grade or "LOW"
end)
client:NotifyLocalized("You have poured a glass of "..item.name..".")
item.shotsPoured = item.shotsPoured + 1
if (item.shotsPoured >= item.shotsPerItem) then
client:NotifyLocalized("You have poured the last glass of "..item.name..".")
if (item.junk) then
if (!inventory:Add(item.junk)) then
ix.item.Spawn(item.junk, client)
end
end
else
-- don't remove the item if it's not the last shot
return false
end
end
}

View 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/
--]]
ITEM.name = "Medical Components Base"
ITEM.description = "Just for file structuring, not an item."
ITEM.category = "Medical Components"
ITEM.base = "base_stackable"
ITEM.maxStackSize = 4

View File

@@ -0,0 +1,187 @@
--[[
| 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 = "Workbench Base"
ITEM.description = "It is a workbench. Can only be picked up by the first person to place it."
ITEM.category = "Workbenches"
ITEM.isWorkbench = true
ITEM.functions.place = {
name = "Yerleştir",
tip = "Place the workbench",
icon = "icon16/brick_add.png",
OnRun = function(item)
local client = item.player
if (!client:Alive()) then return false end
client:EmitSound("physics/cardboard/cardboard_box_break3.wav")
client.previousWep = client:GetActiveWeapon():GetClass()
client:Give("weapon_workbench_placer")
client:SelectWeapon("weapon_workbench_placer")
local weapon = client:GetActiveWeapon()
weapon:SetInfo(item.uniqueID, item.model)
return false
end,
OnCanRun = function(item)
return (!IsValid(item.entity))
end
}
ITEM.functions.Use = {
name = "Kullan",
icon = "icon16/wrench.png",
OnCanRun = function(itemTable)
return IsValid(itemTable.entity)
end,
OnClick = function(itemTable)
LocalPlayer().lastSelectedSkill = itemTable.workbenchSkill
ix.gui.lastMenuTab = 3
if (!IsValid(ix.gui.menu)) then
vgui.Create("ixMenu")
end
end,
OnRun = function(itemTable)
return false
end
}
ITEM.functions.PackUp = {
name = "Paketle",
icon = "icon16/box.png",
OnRun = function(item)
local client = item.player
local character = client and IsValid(client) and client.GetCharacter and client:GetCharacter()
local inventory = character:GetInventory()
local toolkit = inventory:HasItem("tool_toolkit")
if (!toolkit) then
client:Notify("Bu tezgahı toplamak için bir alet takımına ihtiyacınız var!")
return false
end
if (item:GetData("bolted", false)) then
client:Notify("Bu tezgah cıvatalandı!")
return false
end
local placerData = item:GetData("placer", false)
if placerData and character:GetID() != placerData then
client:Notify("Bu tezgahın sahibi sen değilsin!")
return false
end
client:SetAction("Packing up workbench...", 10, function()
if (inventory:Add(item.uniqueID .. "_assembly")) then
toolkit:DamageDurability(1)
client:Notify("Çalışma tezgahı paketlendi.")
else
client:Notify("Bu tezgahı toplamak için yeterli envanter alanınız yok!")
return false
end
end)
end,
OnCanRun = function(item)
return !item.noPackUp
end
}
ITEM.functions.Bolt = {
name = "Cıvatala",
icon = "icon16/wrench.png",
OnRun = function(item)
local client = item.player
local inventory = client:GetCharacter():GetInventory()
local toolkit = inventory:HasItem("tool_toolkit")
if (!toolkit) then
client:Notify("Bu tezgahı yıkmak için bir araç setine ihtiyacınız var!")
return false
end
client:SetAction("Tezgahı cıvatalıyorsun...", 10, function()
item:SetData("bolted", true)
client:Notify("Çalışma tezgahını cıvataladınız.")
end)
toolkit:DamageDurability(1)
return false
end,
OnCanRun = function(itemTable)
return itemTable.entity and itemTable.entity:IsValid() and !itemTable:GetData("bolted", false)
end
}
ITEM.functions.UnBolt = {
name = "Sök",
icon = "icon16/wrench_orange.png",
OnRun = function(item)
local client = item.player
if (client:IsAdmin()) then
item:SetData("bolted", false)
client:Notify("Tezgah söküldü.")
else
client:Notify("Tezgah sökme işlemi yetkili gözetimi gerektirir. Lütfen devam etmeden önce biriyle iletişime geçin!")
end
return false
end,
OnCanRun = function(itemTable)
return itemTable.entity and itemTable.entity:IsValid() and itemTable:GetData("bolted", false)
end
}
ITEM.postHooks.drop = function(item, result)
if (item.player and !item:GetData("placer")) then
item:SetData("placer", item.player:GetCharacter():GetID())
end
end
function ITEM:CanTransfer(oldInventory, newInventory)
local placerData = self:GetData("placer", false)
local newInvOwner = newInventory and newInventory.GetOwner and newInventory:GetOwner()
if newInventory and newInvOwner then
if newInvOwner and IsValid(newInvOwner) then
if placerData and newInvOwner.GetCharacter and newInvOwner:GetCharacter():GetID() != placerData then
newInvOwner:Notify("Bu tezgahın sahibi sen değilsin!")
return false
end
end
end
return true
end
function ITEM:OnEntityCreated(entity)
timer.Simple(1, function()
if (IsValid(entity)) then
local physObj = entity:GetPhysicsObject()
physObj:EnableMotion(false)
end
end)
end
function ITEM:OnEntityTakeDamage(entity, damage)
return false
end