This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 8064ba84d8
commit 73479cff9e
7338 changed files with 1718883 additions and 14 deletions

View 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/
--]]
ITEM.base = "base_stackable"
ITEM.maxStackSize = 4
ITEM.name = "Pâte Biologique"
ITEM.description = "Un bocal blanc contenant une matière étrange."
ITEM.category = "Ingredient"
ITEM.model = "models/props_lab/jar01b.mdl"
ITEM.width = 1
ITEM.height = 1
ITEM.iconCam = {
pos = Vector(6.22, -199.61, 10.73),
ang = Angle(3.12, 91.84, 0),
fov = 3.64
}

View File

@@ -0,0 +1,92 @@
--[[
| 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 = "Batterie du cartel"
ITEM.model = "models/willardnetworks/gearsofindustry/wn_battery.mdl"
ITEM.category = "Combine"
ITEM.description = "Une petit batterie rechargeable de l'Union. Il y a un petit port de recharge à l'arrière, et plusieurs dispositifs indiquant son niveau de charge restant."
ITEM.iconCam = {
pos = Vector(199.98, 5.3, 7.35),
ang = Angle(0.66, -178.43, 0),
fov = 3.08
}
function ITEM:OnInstanced(invID, x, y, item)
self:SetData("charge", 0)
end
ITEM.functions.SetFullCharge = { -- sorry, for name order.
name = "Charger a Fond",
tip = "repairTip",
icon = "icon16/wrench.png",
OnRun = function(item)
item:SetData("charge", 10)
return false
end,
OnCanRun = function(item)
local client = item.player
return IsValid(client) and client:IsAdmin()
end
}
-- Setting damageInfo manually because we're doing some weirdness with the item destruction.
function ITEM:OnEntityTakeDamage(entity, damageInfo)
entity.ixDamageInfo = {damageInfo:GetAttacker(), damage, damageInfo:GetInflictor()}
end
if (SERVER) then return end
function ITEM:PopulateTooltip(tooltip)
local charge = self:GetData("charge", 0)
local color = PLUGIN.chargeIndicatorColors[charge] or Color(255, 0, 0)
local name = tooltip:GetRow("name")
name:SetBackgroundColor(color)
local chargePnl = tooltip:AddRow("charge")
chargePnl:SetBackgroundColor(color)
chargePnl:SetText("Charge: " .. (charge * 10) .. "%")
chargePnl:SizeToContents()
end
function ITEM:DrawEntity(entity)
if (entity.colorSetup) then return end
entity.GetBatteryColor = function()
local color = entity:GetNetVar("beeping", false) and Color(255, 0, 0) or PLUGIN.chargeIndicatorColors[entity:GetData("charge", 0)] or Color(0, 255, 255)
return Vector(color.r / 255, color.g / 255, color.b / 255)
end
entity.colorSetup = true
end
function ITEM:OnInventoryDraw(entity)
entity.GetBatteryColor = function()
local color = PLUGIN.chargeIndicatorColors[self:GetData("charge", 0)] or Color(255, 0, 0)
return Vector(color.r / 255, color.g / 255, color.b / 255)
end
end
matproxy.Add({
name = "BatteryColor",
init = function(self, mat, values)
self.ResultTo = values.resultvar
end,
bind = function(self, mat, ent)
if (ent.GetBatteryColor) then
mat:SetVector(self.ResultTo, ent:GetBatteryColor())
end
end
})

View 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/
--]]
ITEM.name = "Disque de données"
ITEM.model = "models/willardnetworks/gearsofindustry/wn_data_card.mdl"
ITEM.category = "Combine"
ITEM.description = "Un petit et fin disque métallique utilisé pour stocker des données."
function ITEM:GetSkin()
return self:GetData("item") and 0 or 1
end
function ITEM:PopulateTooltip(tooltip)
local item = self:GetData("item")
local itemPnl = tooltip:AddRow("item")
itemPnl:SetBackgroundColor(derma.GetColor(item and "Info" or "Error", tooltip))
itemPnl:SetText(item and ix.item.list[item] and "Article encodé: " .. ix.item.list[item].name or "Aucune donnée encodée sur le disque")
itemPnl:SizeToContents()
end

View File

@@ -0,0 +1,95 @@
--[[
| 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 = "Étiquette"
ITEM.model = "models/props_lab/box01a.mdl"
ITEM.category = "Autres"
ITEM.description = "Une étiquette pouvant être appliqué à n'importe quel objet pour changer son nom et sa description."
function ITEM:GetName()
local name = self:GetData("labelInfoName")
return self.name .. (name and (" \"" .. name .. "\"") or "")
end
function ITEM:GetDescription()
local description = self:GetData("labelInfoDesc")
return self.description .. (description and (" Le texte est le suivant : \"" .. description .. "\"") or "")
end
ITEM.functions.editAName = { -- Sorry, I wanted it at the top
name = "Modifier le nom",
icon = "icon16/tag_blue_edit.png",
OnRun = function(item, data)
local client = item.player
client:RequestString("Modifier le nom", "Saisissez le nom que doit porter cette étiquette :", function(name)
item:SetData("labelInfoName", name)
client:Notify("Vous avez changé le nom de cette étiquette.")
end, "")
return false
end
}
ITEM.functions.editDesc = {
name = "Modifier la description",
icon = "icon16/tag_blue_edit.png",
OnRun = function(item, data)
local client = item.player
client:RequestString("Modifier la description", "Saisissez la description que cette étiquette devrait avoir :", function(description)
item:SetData("labelInfoDesc", description)
client:Notify("Vous avez changé le nom de cette étiquette.")
end, "")
return false
end
}
ITEM.functions.combined = {
OnRun = function(item, data)
local targetItem = ix.item.instances[data[1]]
if (!targetItem) then return false end
if (targetItem.functions.combine) then
client:Notify("Vous ne pouvez pas apposer détiquette sur cet article.!")
return false
end
local client = item.player
if (targetItem.uniqueID == "itemlabel") then
client:Notify("Vous ne pouvez pas apposer une étiquette sur une autre étiquette!")
return false
end
local name = item:GetData("labelInfoName", false)
local description = item:GetData("labelInfoDesc", false)
if (!name and !description) then
client:Notify("Létiquette est vide!")
return false
end
targetItem:SetData("labelName", name)
targetItem:SetData("labelDescription", description)
client:Notify("Vous appliquez létiquette au " .. targetItem.name .. ".")
end,
OnCanRun = function(item, data)
return true
end
}