diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-24 18:08:10 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-24 18:08:10 -0400 |
| commit | 61bc16dae5a1b61bcd237d9f0be36125829d95b1 (patch) | |
| tree | c9deebda1190e23073240d2bbe4ecabee668d742 /entities | |
| parent | 0f3211e4fb0cf27684079e6195995947c9f9027f (diff) | |
| download | artery-61bc16dae5a1b61bcd237d9f0be36125829d95b1.tar.gz artery-61bc16dae5a1b61bcd237d9f0be36125829d95b1.tar.bz2 artery-61bc16dae5a1b61bcd237d9f0be36125829d95b1.zip | |
Various update
Diffstat (limited to 'entities')
| -rw-r--r-- | entities/entities/art_droppeditem/init.lua | 25 | ||||
| -rw-r--r-- | entities/entities/info_huntablespawn/cl_init.lua | 56 | ||||
| -rw-r--r-- | entities/entities/info_huntablespawn/init.lua | 1 | ||||
| -rw-r--r-- | entities/entities/info_huntablespawn/shared.lua | 15 | ||||
| -rw-r--r-- | entities/entities/info_townienode/shared.lua | 9 |
5 files changed, 16 insertions, 90 deletions
diff --git a/entities/entities/art_droppeditem/init.lua b/entities/entities/art_droppeditem/init.lua index a403dd0..effc96b 100644 --- a/entities/entities/art_droppeditem/init.lua +++ b/entities/entities/art_droppeditem/init.lua @@ -15,16 +15,21 @@ function ENT:Initialize() assert(self.Item ~= nil, "Attempted to drop something without .Item set!") self.ItemName = self.Item.Name self.ItemData = self.Item.Data - if self.Item.onDropped then - self:SetColor(Color(0,0,0,0)) - local od = self.Item.onDropped - if od ~= nil then - timer.Simple(1,function() - if self and self.Item then - od(self.Item,self) - end - end) - end + local phoney = itm.GetItemFromData(self.ItemName,self.ItemData) + print("About to check for onDropped",phoney,phoney.onDropped) + PrintTable(phoney) + if phoney.onDropped ~= nil then + timer.Simple(1,function() + phoney:onDropped(self) + self:SetColor(Color(0,0,0,0)) + end) + -- print("Item had onDropped") + -- self:SetColor(Color(0,0,0,0)) + -- timer.Simple(0,function() + -- if self and self.Item then + -- self.Item:onDropped(self) + -- end + -- end) end print("Dropped item spawned at", self:GetPos()) self:DrawShadow(false) diff --git a/entities/entities/info_huntablespawn/cl_init.lua b/entities/entities/info_huntablespawn/cl_init.lua index f851bf9..ec800fb 100644 --- a/entities/entities/info_huntablespawn/cl_init.lua +++ b/entities/entities/info_huntablespawn/cl_init.lua @@ -10,60 +10,4 @@ function ENT:Draw() --self:DrawModel() render.SetColorMaterial() render.DrawSphere( self:GetPos(), 10, 30, 30, Color( 255, 0, 0, 100 ) ) - -end - -/*--------------------------------------------------------- - Name: DrawTranslucent - Desc: Draw translucent ----------------------------------------------------------*/ -function ENT:DrawTranslucent() - - // This is here just to make it backwards compatible. - // You shouldn't really be drawing your model here unless it's translucent - - --self:Draw() - -end - -/*--------------------------------------------------------- - Name: BuildBonePositions - Desc: ----------------------------------------------------------*/ -function ENT:BuildBonePositions( NumBones, NumPhysBones ) - - // You can use this section to position the bones of - // any animated model using self:SetBonePosition( BoneNum, Pos, Angle ) - - // This will override any animation data and isn't meant as a - // replacement for animations. We're using this to position the limbs - // of ragdolls. - -end - - - -/*--------------------------------------------------------- - Name: SetRagdollBones - Desc: ----------------------------------------------------------*/ -function ENT:SetRagdollBones( bIn ) - - // If this is set to true then the engine will call - // DoRagdollBone (below) for each ragdoll bone. - // It will then automatically fill in the rest of the bones - - self.m_bRagdollSetup = bIn - -end - - -/*--------------------------------------------------------- - Name: DoRagdollBone - Desc: ----------------------------------------------------------*/ -function ENT:DoRagdollBone( PhysBoneNum, BoneNum ) - - // self:SetBonePosition( BoneNum, Pos, Angle ) - end diff --git a/entities/entities/info_huntablespawn/init.lua b/entities/entities/info_huntablespawn/init.lua index 9fa7f7e..709c019 100644 --- a/entities/entities/info_huntablespawn/init.lua +++ b/entities/entities/info_huntablespawn/init.lua @@ -1,6 +1,7 @@ --[[ This entity gives townies things to do ]] +print("hello test") AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) diff --git a/entities/entities/info_huntablespawn/shared.lua b/entities/entities/info_huntablespawn/shared.lua index 8b42e7f..05d3819 100644 --- a/entities/entities/info_huntablespawn/shared.lua +++ b/entities/entities/info_huntablespawn/shared.lua @@ -1,23 +1,8 @@ ENT.Base = "base_entity" -//WS stuff -ENT.Drops = nil -ENT.OnDammage = nil -ENT.Speed = 0 -ENT.Model = nil - -ENT.Behave = nil -ENT.Act = nil - /*--------------------------------------------------------- Name: OnRemove Desc: Called just before entity is deleted ---------------------------------------------------------*/ function ENT:OnRemove() end - -function ENT:DoActivity(npc) - if not self.onActivity() then - print("Node without activity, this might be an error!") - end -end diff --git a/entities/entities/info_townienode/shared.lua b/entities/entities/info_townienode/shared.lua index ca23db4..e16aff4 100644 --- a/entities/entities/info_townienode/shared.lua +++ b/entities/entities/info_townienode/shared.lua @@ -1,14 +1,5 @@ ENT.Base = "base_entity" -//WS stuff asdfs -ENT.Drops = nil -ENT.OnDammage = nil -ENT.Speed = 0 -ENT.Model = nil - -ENT.Behave = nil -ENT.Act = nil - /*--------------------------------------------------------- Name: OnRemove Desc: Called just before entity is deleted |
