mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
35
gamemodes/darkrp/plugins/bird/items/sh_birdegg.lua
Normal file
35
gamemodes/darkrp/plugins/bird/items/sh_birdegg.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
--[[
|
||||
| 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 = "Oeuf d'oiseau"
|
||||
ITEM.model = "models/willardnetworks/food/egg2.mdl"
|
||||
ITEM.description = "Cet objet fragile et délicat semble avoir été tout juste pondu. Sa coquille est lisse et possède une teinte délicate, comme si elle avait été peinte à l'aquarelle. On peut facilement imaginer les petits piaillements de l'oisillon qui grandira à l'intérieur de cet œuf."
|
||||
ITEM.category = "Nourriture"
|
||||
|
||||
ITEM.functions.Hatch = {
|
||||
name = "Éclore",
|
||||
icon = "icon16/briefcase.png",
|
||||
OnRun = function(item)
|
||||
if (item:GetData("hatchTime", 0) < os.time()) then
|
||||
net.Start("birdEggHatch")
|
||||
net.Send(item.player)
|
||||
|
||||
return false
|
||||
else
|
||||
item.player:Notify("L'oeuf n'est pas encore prêt d'éclore !")
|
||||
|
||||
return false
|
||||
end
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return item.player:Team() == FACTION_BIRD
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
--[[
|
||||
| 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 = "Bâton"
|
||||
ITEM.model = "models/props_debris/wood_splinters01a.mdl"
|
||||
ITEM.description = "Un petit bâton de bois. Totalement inutile pour vous."
|
||||
ITEM.birdDescription = "Un petit bâton en bois, lisse et poli, de la taille d'un doigt, avec une extrémité pointue et l'autre légèrement incurvée. Cet objet est souvent utilisé par les oiseaux pour construire leur nid."
|
||||
ITEM.category = "Déchets"
|
||||
ITEM.maxStackSize = 10
|
||||
|
||||
function ITEM:GetDescription()
|
||||
return LocalPlayer():Team() == FACTION_BIRD and self.birdDescription or self.description
|
||||
end
|
||||
|
||||
ITEM.functions.BuildNest = {
|
||||
name = "Constuire un nid",
|
||||
icon = "icon16/basket.png",
|
||||
OnRun = function(item)
|
||||
local client = item.player
|
||||
local target = client:GetEyeTraceNoCursor().Entity
|
||||
|
||||
if (target and target:GetClass() == "ix_birdnest") then
|
||||
local progress = target:GetNetVar("progress", 0)
|
||||
local stackSize = item:GetStackSize()
|
||||
|
||||
target:SetProgress(progress + stackSize)
|
||||
target:EmitSound("physics/cardboard/cardboard_box_break" .. math.random(1, 3) .. ".wav")
|
||||
|
||||
local position = target:LocalToWorld(target:OBBCenter())
|
||||
|
||||
local effect = EffectData()
|
||||
effect:SetStart(position)
|
||||
effect:SetOrigin(position)
|
||||
effect:SetScale(1)
|
||||
util.Effect("GlassImpact", effect)
|
||||
|
||||
item:RemoveStack(stackSize)
|
||||
else
|
||||
client.isBuildingNest = true
|
||||
|
||||
net.Start("toggleBuildingNest")
|
||||
net.WriteBool(true)
|
||||
net.Send(client)
|
||||
end
|
||||
|
||||
return false
|
||||
end,
|
||||
OnCanRun = function(item)
|
||||
return !IsValid(item.entity) and item.player:Team() == FACTION_BIRD
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user