This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 0e770b2b49
commit 94063e4369
7342 changed files with 1718932 additions and 14 deletions

View File

@@ -0,0 +1,31 @@
--[[
| 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/
--]]
include("shared.lua")
ENT.PopulateEntityInfo = true
function ENT:OnPopulateEntityInfo(container)
local name = container:AddRow("name")
name:SetImportant()
name:SetText("Nid d'oiseau")
name:SizeToContents()
local description = container:AddRow("description")
description:SetText("Un petit nid d'oiseau, composé de batons et de feuilles...")
description:SizeToContents()
local progress = container:AddRow("progress")
progress:SetText("Batons : " .. self:GetNetVar("progress", 0) .. "/30")
progress:SetBackgroundColor(derma.GetColor("Info", container))
progress:SizeToContents()
end

View File

@@ -0,0 +1,97 @@
--[[
| 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/
--]]
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/fless/exodus/gnezdo.mdl")
self:SetUseType(SIMPLE_USE)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetRenderMode(RENDERMODE_TRANSCOLOR)
self:SetNetVar("progress", 0)
local physObj = self:GetPhysicsObject()
if (IsValid(physObj)) then
physObj:EnableMotion(false)
physObj:Sleep()
end
ix.saveEnts:SaveEntity(self)
end
function ENT:SetProgress(progress)
self:SetNetVar("progress", progress)
if (progress < 30) then
self:SetColor(Color(255, 255, 255, 155 * (progress / 30) + 100))
else
local model = self:GetModel()
local data = ix.container.stored[model]
local container = ents.Create("ix_container")
container:SetPos(self:GetPos())
container:SetAngles(self:GetAngles())
container:SetModel(model)
container:Spawn()
ix.inventory.New(0, "container:" .. model, function(inventory)
inventory.vars.isBag = true
inventory.vars.isContainer = true
if (IsValid(container)) then
container:SetInventory(inventory)
if (ix.plugin.list.containers) then
ix.plugin.list.containers:SaveContainer()
end
end
end)
local physObj = container:GetPhysicsObject()
if (IsValid(physObj)) then
physObj:EnableMotion(false)
physObj:Sleep()
end
self:Remove()
end
end
function ENT:StartTouch(entity)
local progress = self:GetNetVar("progress", 0)
if (progress <= 30 and entity:GetClass() == "ix_item") then
local item = ix.item.instances[entity.ixItemID]
if (item.uniqueID == "woodstick") then
self:SetProgress(progress + item:GetStackSize())
entity:EmitSound("physics/cardboard/cardboard_box_break" .. math.random(1, 3) .. ".wav")
local position = entity:LocalToWorld(entity:OBBCenter())
local effect = EffectData()
effect:SetStart(position)
effect:SetOrigin(position)
effect:SetScale(1)
util.Effect("GlassImpact", effect)
entity:Remove()
end
end
end

View File

@@ -0,0 +1,17 @@
--[[
| 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/
--]]
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Bird Nest"
ENT.Author = "Aspect™"
ENT.Category = "HL2 RP"
ENT.Spawnable = false