aboutsummaryrefslogtreecommitdiff
path: root/gamemode/shared/itemsystem/weapons
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-08-27 17:08:46 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-08-27 17:08:46 -0400
commit9adcb3c73a8d0e7ecfe66b30da630c6c2e67f03a (patch)
treed65b57e144317e5b49ccdd549b2f97c61d54bd1d /gamemode/shared/itemsystem/weapons
parentd4f197a35c207c9891d3f4dc5e9708af48c935de (diff)
downloadartery-9adcb3c73a8d0e7ecfe66b30da630c6c2e67f03a.tar.gz
artery-9adcb3c73a8d0e7ecfe66b30da630c6c2e67f03a.tar.bz2
artery-9adcb3c73a8d0e7ecfe66b30da630c6c2e67f03a.zip
Moved prayers to their own system
Diffstat (limited to 'gamemode/shared/itemsystem/weapons')
-rw-r--r--gamemode/shared/itemsystem/weapons/knuckledclaw.lua18
-rw-r--r--gamemode/shared/itemsystem/weapons/seratedknife.lua13
2 files changed, 16 insertions, 15 deletions
diff --git a/gamemode/shared/itemsystem/weapons/knuckledclaw.lua b/gamemode/shared/itemsystem/weapons/knuckledclaw.lua
index 7f610fa..467439e 100644
--- a/gamemode/shared/itemsystem/weapons/knuckledclaw.lua
+++ b/gamemode/shared/itemsystem/weapons/knuckledclaw.lua
@@ -4,7 +4,7 @@
local item = {}
--Required, a name, all item names must be unique
-item.Name = "Scrap Hammer"
+item.Name = "Knuckled Claws"
--Optional, a tooltip to display
item.Tooltip = "Bits of scrap put togeather to resembel a hammer"
@@ -115,7 +115,7 @@ item.onClick = function(self,owner)
local movementtbl = {
["forward"] = function()
owner:SetLuaAnimation("fist_swing_up")
- timer.Simple(2.33,function()
+ timer.Simple(1.75,function()
owner:StopLuaAnimation("fist_swing_up")
end)
local hits = ART.swingarc(owner,{
@@ -134,7 +134,7 @@ item.onClick = function(self,owner)
end,
["backward"] = function()
owner:SetLuaAnimation("fist_swing_down")
- timer.Simple(2.33,function()
+ timer.Simple(1.75,function()
owner:StopLuaAnimation("fist_swing_down")
end)
local hits = ART.swingarc(owner,{
@@ -152,12 +152,9 @@ item.onClick = function(self,owner)
end)
end,
["left"] = function()
-
- end,
- ["right"] = function()
- owner:SetLuaAnimation("fist_swing_right")
- timer.Simple(2.33,function()
- owner:StopLuaAnimation("fist_swing_right")
+ owner:SetLuaAnimation("fist_swing_left")
+ timer.Simple(2,function()
+ owner:StopLuaAnimation("fist_swing_left")
end)
local hits = ART.swingarc(owner,{
0.5,0.57,0.65,0.73
@@ -173,6 +170,9 @@ item.onClick = function(self,owner)
print("Hit",tr.Entity)
end)
end,
+ ["right"] = function()
+
+ end,
}
movementtbl[ART.playermovedir(owner)]()
end
diff --git a/gamemode/shared/itemsystem/weapons/seratedknife.lua b/gamemode/shared/itemsystem/weapons/seratedknife.lua
index 8571074..a6d4c55 100644
--- a/gamemode/shared/itemsystem/weapons/seratedknife.lua
+++ b/gamemode/shared/itemsystem/weapons/seratedknife.lua
@@ -4,7 +4,7 @@
local item = {}
--Required, a name, all item names must be unique
-item.Name = "Scrap Hammer"
+item.Name = "Serated Knife"
--Optional, a tooltip to display
item.Tooltip = "Bits of scrap put togeather to resembel a hammer"
@@ -105,17 +105,18 @@ end
--Optional, what to do when the player clicks, and this item is in the slot in inventory. only works for items equipable in left and right
item.lastSwing = {}
+local animationtime = 1.833333
item.onClick = function(self,owner)
item.lastSwing[owner] = item.lastSwing[owner] or 0
if item.lastSwing[owner] > CurTime() then
print("returning because item.lastSwing is " .. item.lastSwing[owner], "but Curtime is",CurTime())
return end
- item.lastSwing[owner] = CurTime()+1.25
+ item.lastSwing[owner] = CurTime()+animationtime
local fow,rig,up = owner:GetForward(),owner:GetRight(),owner:GetUp()
local movementtbl = {
["forward"] = function()
owner:SetLuaAnimation("knife_swing_up")
- timer.Simple(2.33,function()
+ timer.Simple(animationtime,function()
owner:StopLuaAnimation("knife_swing_up")
end)
local hits = ART.swingarc(owner,{
@@ -134,7 +135,7 @@ item.onClick = function(self,owner)
end,
["backward"] = function()
owner:SetLuaAnimation("knife_swing_down")
- timer.Simple(2.33,function()
+ timer.Simple(animationtime,function()
owner:StopLuaAnimation("knife_swing_down")
end)
local hits = ART.swingarc(owner,{
@@ -153,7 +154,7 @@ item.onClick = function(self,owner)
end,
["left"] = function()
owner:SetLuaAnimation("knife_swing_left")
- timer.Simple(2.33,function()
+ timer.Simple(animationtime,function()
owner:StopLuaAnimation("knife_swing_left")
end)
local hits = ART.swingarc(owner,{
@@ -172,7 +173,7 @@ item.onClick = function(self,owner)
end,
["right"] = function()
owner:SetLuaAnimation("knife_swing_right")
- timer.Simple(2.33,function()
+ timer.Simple(animationtime,function()
owner:StopLuaAnimation("knife_swing_right")
end)
local hits = ART.swingarc(owner,{