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,75 @@
--[[
| 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()
--[[-------------------------------------------------------------------------
TODO: PLAY ANIMATION WHEN DEPLOYING SUPPORT
---------------------------------------------------------------------------]]
ENT.Base = "base_entity"
ENT.Type = "anim"
ENT.PrintName = "Broke (Electricity)"
ENT.Category = "Helix"
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_BOTH
if SERVER then
function ENT:Initialize()
self:SetModel("models/hunter/blocks/cube025x025x025.mdl")
self:SetSolid(SOLID_VPHYSICS)
self:SetNoDraw(true)
self:SetUseType(SIMPLE_USE)
self.health = 200
self:SetNetVar("destroyed", true)
end
function ENT:Think()
local curTime = CurTime()
if self:GetNetVar("destroyed", false) == true then
if !self.nextSpark or self.nextSpark <= curTime then
if (!IsValid(self.spark)) then
self.spark = ents.Create("env_spark")
end
self.spark:SetPos(self:GetPos() + Vector(0, 10, 0))
self.spark:Fire("SparkOnce")
self.nextSpark = curTime + 4
end
end
end
function ENT:Use(user)
local item = user:GetCharacter():GetInventory():HasItem("tool_toolkit")
if self:GetNetVar("destroyed", false) == true and !item then
user:Notify("Vous avez besoin d'une boîte à outils pour réparer les dégâts") -- message when dont work and you dont have item
return false
else
if item and self:GetNetVar("destroyed", false) == true then
user:Freeze(true)
user:SetAction("Réparation en cours...", 12, function() -- line with text when you repair it
item = user:GetCharacter():GetInventory():HasItem("tool_toolkit")
if (item) then
if (item.isTool) then
item:DamageDurability(1)
end
self:SetNetVar("destroyed", false)
user:Freeze(false)
self.health = 200
self:EmitSound("physics/cardboard/cardboard_box_impact_hard7.wav", 100, 75)
self:Remove()
user:Notify("Vous avez réparé avec succès les problèmes électriques") -- message when you finish the job
end
end)
end
end
end
end

View File

@@ -0,0 +1,115 @@
--[[
| 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()
--[[-------------------------------------------------------------------------
TODO: PLAY ANIMATION WHEN DEPLOYING SUPPORT
---------------------------------------------------------------------------]]
ENT.Base = "base_entity"
ENT.Type = "anim"
ENT.PrintName = "Broken (Gas)"
ENT.Category = "Helix"
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_BOTH
sound.Add( {
name = "SteamLoop1.Play",
channel = CHAN_STATIC,
volume = 0.6,
level = 70,
pitch = { 100, 100 },
sound = "ambient/gas/steam2.wav"
} )
sound.Add( {
name = "SteamLoop2.Play",
channel = CHAN_STATIC,
volume = 0.6,
level = 70,
pitch = { 100, 100 },
sound = "ambient/gas/steam_loop1.wav"
} )
if SERVER then
function ENT:Initialize()
self:SetModel("models/hunter/blocks/cube025x025x025.mdl")
self:SetNoDraw(true)
self:DrawShadow(false)
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:SetSolid( SOLID_VPHYSICS )
self:SetUseType(SIMPLE_USE)
self.health = 200
self:SetNetVar("destroyed", true)
local self_name = "steam_base" .. self:EntIndex()
self:SetName( self_name )
local phys1 = self:GetPhysicsObject()
if ( IsValid( phys1 ) ) then
phys1:Sleep()
phys1:SetMass(100)
end
self:EmitSound("SteamLoop2.Play")
self.steam = ents.Create("env_steam")
self.steam:SetPos( self:GetPos())
self.steam:SetAngles( self:GetAngles() )
self.steam:SetKeyValue( "InitialState", "1" )
self.steam:SetKeyValue( "SpreadSpeed", 15)
self.steam:SetKeyValue( "Speed", 120 )
self.steam:SetKeyValue( "StartSize", 10 )
self.steam:SetKeyValue( "EndSize", 35 )
self.steam:SetKeyValue( "Rate", 26 )
self.steam:SetKeyValue( "JetLength", 20 )
self.steam:SetKeyValue( "renderamt", 255 )
self.steam:SetKeyValue( "type", 0 )
self.steam:SetKeyValue("spawnflags", "16" + "32")
self.steam:SetOwner( self.Owner )
self.steam:SetParent(self)
self.steam:Spawn()
self.steam:Activate()
local steam_name = "steam" .. self.steam:EntIndex()
self.steam:SetName( steam_name )
end
function ENT:OnRemove()
self:StopSound("SteamLoop1.Play")
self:StopSound("SteamLoop2.Play")
end
function ENT:Use(user)
local item = user:GetCharacter():GetInventory():HasItem("tool_toolkit")
if self:GetNetVar("destroyed", false) == true and !item then
user:Notify("Le tuyau est cassé ! Vous avez besoin d'une boîte à outils pour le réparer.") -- message when dont work and you dont have item
return false
else
if item and self:GetNetVar("destroyed", false) == true then
user:Freeze(true)
user:SetAction("Réparation en cours...", 12, function() -- line with text when you repair it
item = user:GetCharacter():GetInventory():HasItem("tool_toolkit")
if (item) then
if (item.isTool) then
item:DamageDurability(1)
end
self:SetNetVar("destroyed", false)
user:Freeze(false)
self.health = 200
self:EmitSound("physics/cardboard/cardboard_box_impact_hard7.wav", 100, 75)
self:Remove()
user:Notify("Vous avez réparé le tuyau.") -- message when you finish the job
end
end)
end
end
end
end

View File

@@ -0,0 +1,76 @@
--[[
| 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()
--[[-------------------------------------------------------------------------
TODO: PLAY ANIMATION WHEN DEPLOYING SUPPORT
---------------------------------------------------------------------------]]
ENT.Base = "base_entity"
ENT.Type = "anim"
ENT.PrintName = "Broken (Water)"
ENT.Category = "Helix"
ENT.Spawnable = true
ENT.RenderGroup = RENDERGROUP_BOTH
if SERVER then
function ENT:Initialize()
self:SetModel("models/hunter/blocks/cube025x025x025.mdl")
self:SetSolid(SOLID_VPHYSICS)
self:SetNoDraw(true)
self:SetUseType(SIMPLE_USE)
self.health = 200
self:SetNetVar("destroyed", true)
end
function ENT:Think()
local curTime = CurTime()
if self:GetNetVar("destroyed", false) == true then
if !self.nextSpark or self.nextSpark <= curTime then
if (!IsValid(self.spark)) then
self.spark = ents.Create("env_splash")
end
self.spark:SetPos(self:GetPos() + Vector(0, 10, 0))
self.spark:SetKeyValue( "scale", 3 )
self.spark:Fire("Splash")
self.nextSpark = curTime + 4
end
end
end
function ENT:Use(user)
local item = user:GetCharacter():GetInventory():HasItem("tool_toolkit")
if self:GetNetVar("destroyed", false) == true and !item then
user:Notify("L'alimentation en eau a une fuite ! Vous avez besoin d'une boîte à outils pour la réparer.") -- message when dont work and you dont have item
return false
else
if item and self:GetNetVar("destroyed", false) == true then
user:Freeze(true)
user:SetAction("Réparation en cours...", 12, function() -- line with text when you repair it
item = user:GetCharacter():GetInventory():HasItem("tool_toolkit")
if (item) then
if (item.isTool) then
item:DamageDurability(1)
end
self:SetNetVar("destroyed", false)
user:Freeze(false)
self.health = 200
self:EmitSound("physics/cardboard/cardboard_box_impact_hard7.wav", 100, 75)
self:Remove()
user:Notify("Vous avez réparé le tuyeau d'eau.") -- message when you finish the job
end
end)
end
end
end
end

View File

@@ -0,0 +1,52 @@
--[[
| 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")
surface.CreateFont( "ScaffoldFont", {
font = "Open Sans",
extended = true,
size = 30,
weight = 500
} )
function ENT:Initialize()
end
function ENT:Draw()
local TIMER;
if (self:GetNWInt('timer') < CurTime()) then
TIMER = 0
else
TIMER = (self:GetNWInt('timer')-CurTime())
end
self:DrawModel()
local Pos = self:GetPos()
local Ang = self:GetAngles()
Ang:RotateAroundAxis(Ang:Forward(), 90)
Ang:RotateAroundAxis(Ang:Right(), -90)
if LocalPlayer():GetPos():Distance(self:GetPos()) < 400 then
cam.Start3D2D(Pos + Ang:Up() * 50, Ang, 0.3)
draw.WordBox(0, -100, -190, "Échafaudage de construction", "ScaffoldFont", Color(255, 78, 69, 0), Color(240, 240, 240,255))
draw.WordBox(0, -130, -150, "Matériaux de construction: "..self:GetNWInt("ItemsRequired").."/40", "ScaffoldFont", Color(255, 78, 69, 0), Color(240, 240, 240,255)) -- /40
if self:GetNWInt("ItemsRequired") == 40 then
draw.WordBox(0, -100, -110, "Bâtiment achevé", "ScaffoldFont", Color(28, 161, 34, 0), Color(28, 161, 34,255))
end
cam.End3D2D()
end
end
function ENT:Think()
end

View File

@@ -0,0 +1,61 @@
--[[
| 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/props/de_inferno/scaffolding.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
phys:Wake()
self.items = 0
self:SetNWInt("ItemsRequired", 0)
self:SetUseType( SIMPLE_USE )
self.LastUse = 0
self.Delay = 2
end
function ENT:Use(activator)
-- Timer to pretend abuse
if self.LastUse <= CurTime() then
self.LastUse = CurTime() + self.Delay
activator:Notify("Placez-y les matériaux de construction.") -- Notify on press E
end
end
local worksound = {
"physics/wood/wood_box_break1.wav",
"physics/wood/wood_box_break2.wav",
"physics/wood/wood_crate_break2.wav",
"physics/wood/wood_plank_break3.wav"
}
function ENT:StartTouch( hitEnt )
if (self:GetNWInt("ItemsRequired") == 40) then return end -- max of items
if (hitEnt:GetClass() == "ix_item") then
if (hitEnt:GetItemID() != "buildingmaterials") then -- Check item id to accept item
return
end
hitEnt:Remove()
self.items = self.items + 1
self:SetNWInt("ItemsRequired", self.items)
self:EmitSound(worksound[math.random(1, #worksound)])
ix.saveEnts:SaveEntity(self)
--if self:GetNWInt("ItemsRequired") != 40 then return 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 = "Scaffold"
ENT.Category = "Other"
ENT.Author = "Legion"
ENT.Spawnable = true
ENT.AdminSpawnable = true

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/
--]]
include("shared.lua")
surface.CreateFont( "WashingMachine", {
font = "Roboto Light",
extended = false,
size = 25,
weight = 500,
extended = true
} )
function ENT:Initialize()
end
function ENT:Draw()
local TIMER;
if (self:GetNWInt('timer') < CurTime()) then
TIMER = 0
else
TIMER = (self:GetNWInt('timer')-CurTime())
end
self:DrawModel()
local Pos = self:GetPos()
local Ang = self:GetAngles()
Ang:RotateAroundAxis(Ang:Forward(), 90)
Ang:RotateAroundAxis(Ang:Right(), -90)
if LocalPlayer():GetPos():Distance(self:GetPos()) < 200 then
cam.Start3D2D(Pos + Ang:Up() * 14, Ang, 0.11)
if (self:GetNWInt('timer') > CurTime()) then
draw.RoundedBox(6, -47, -75, 165, 40, Color(15,15,15,225))
draw.WordBox(2, -42, -70, "Processus : "..string.ToMinutesSeconds(TIMER), "WashingMachine", Color(214, 181, 16, 200), Color(35,35,35,255))
end
draw.RoundedBox(6, -105, -125, 195, 44, Color(15,15,15,225)) -- Name
draw.RoundedBox(6, -105, -75, 50, 40, Color(15,15,15,225)) -- /3
draw.WordBox(2, -100, -117, "Machine à laver", "WashingMachine", Color(214, 181, 16, 200), Color(35,35,35,255))
draw.WordBox(2, -100, -70, self:GetNWInt("ItemsRequired").."/3", "WashingMachine", Color(214, 163, 16, 200), Color(35,35,35,255))
cam.End3D2D()
end
end
function ENT:Think()
end

View File

@@ -0,0 +1,127 @@
--[[
| 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/props_c17/FurnitureWashingmachine001a.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
phys:Wake()
self:SetNWInt("ItemsRequired", 0)
self:SetUseType( SIMPLE_USE )
self.LastUse = 0
self.Delay = 2
end
function ENT:Use(activator)
-- Timer to pretend abuse
if self.LastUse <= CurTime() then
self.LastUse = CurTime() + self.Delay
activator:Notify("Ajouter les vêtements sales.") -- Notify on press E
end
end
function ENT:StartTouch( hitEnt )
if hitEnt:GetClass() == "ix_item" then
local TimerSoundC = "plats/hall_elev_door.wav"
local WorkTime = 10 -- work time
if hitEnt:GetModel() != "models/willardnetworks/clothingitems/torso_citizen_refugee.mdl" then -- Check model to accept item
return end
if self:GetNWInt("ItemsRequired") == 3 then return end
hitEnt:Remove()
self:SetNWInt("ItemsRequired", (self:GetNWInt("ItemsRequired") + 1))
self:EmitSound("physics/body/body_medium_impact_soft5.wav")
if self:GetNWInt("ItemsRequired") != 3 then return end
self:EmitSound("items/medshot4.wav")
self:EmitSound("plats/tram_hit1.wav")
self:SetNWInt('timer', CurTime() + WorkTime)
-- Sounds after work start (if you gonna make work more than 10 seconds, add new sounds and keep timer growing
timer.Simple(0.2, function()
self:EmitSound("plats/tram_motor_start.wav")
end)
timer.Simple(0.4, function()
self:EmitSound(TimerSoundC)
self.sound = CreateSound(self, Sound("plats/tram_move.wav"))
self.sound:SetSoundLevel(50)
self.sound:PlayEx(1, 200)
end)
timer.Simple(0.8, function()
self:EmitSound(TimerSoundC)
end)
timer.Simple(1.2, function()
self:EmitSound(TimerSoundC)
end)
timer.Simple(1.4, function()
self:EmitSound(TimerSoundC)
end)
timer.Simple(2, function()
self:EmitSound(TimerSoundC)
end)
timer.Simple(4, function()
self:EmitSound("physics/cardboard/cardboard_box_impact_soft5.wav")
end)
timer.Simple(5, function()
self:EmitSound("physics/cardboard/cardboard_box_impact_hard4.wav")
end)
timer.Simple(6.5, function()
self:EmitSound("physics/flesh/flesh_impact_hard6.wav")
end)
timer.Simple(7, function()
self:EmitSound("physics/flesh/flesh_impact_hard6.wav")
end)
timer.Simple(WorkTime - 2, function()
if self.sound then
self.sound:Stop()
end
self:EmitSound("plats/elevator_large_stop1.wav")
end)
timer.Simple(WorkTime, function()
self:SetNWInt("ItemsRequired", 0)
ix.item.Spawn("clean_clothes", Vector(self:GetPos().x + 0.5, self:GetPos().y - 20, self:GetPos().z + 6)) -- Spawn item (maybe need edit some pos)
ix.item.Spawn("clean_clothes", Vector(self:GetPos().x + 0.5, self:GetPos().y - 28, self:GetPos().z + 12))
ix.item.Spawn("clean_clothes", Vector(self:GetPos().x + 0.5, self:GetPos().y - 36, self:GetPos().z + 20))
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 = "Machine à laver"
ENT.Category = "Other"
ENT.Author = "Legion"
ENT.Spawnable = true
ENT.AdminSpawnable = true