From 81d3d4eb333e226432a591461b84ed12f5ac9a3f Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 21 Jul 2018 19:08:34 -0400 Subject: Various updates * Animation api now allows sequences to be played * items now have a .inv attribute that is set when they are added to shaped or equipment inventories * Refactored the way skill inventory is structured * Added some more methods to cl_common to move items around on a player * Minor update to nrequire to display purple message when asked to include a file that dosn't exist. --- gamemode/core/animation/cl_animate.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gamemode/core/animation/cl_animate.lua') diff --git a/gamemode/core/animation/cl_animate.lua b/gamemode/core/animation/cl_animate.lua index fd322a1..c7dc19d 100644 --- a/gamemode/core/animation/cl_animate.lua +++ b/gamemode/core/animation/cl_animate.lua @@ -11,3 +11,26 @@ net.Receive("art_stop_animation",function() local anim = net.ReadString() what:StopLuaAnimation(anim) end) + +local sequences = {} +net.Receive("art_start_sequence",function() + local who = net.ReadEntity() + local seq = net.ReadUInt(31) + local time = net.ReadFloat() + local untilstoped = net.ReadBool() + local speed = net.ReadFloat() + sequences[who] = sequences[who] or {} + who:SetCycle(0) + if untilstoped then + sequences[who] = {CurTime() + 9999999, seq, speed} + else + sequences[who] = {CurTime() + time, seq, speed} + end +end) + +net.Receive("art_end_sequence",function() + local who = net.ReadEntity() + sequences[who] = nil +end) + +return sequences -- cgit v1.2.3-70-g09d2