diff options
Diffstat (limited to 'gamemode/itemsystem/items/infuser.lua')
| -rw-r--r-- | gamemode/itemsystem/items/infuser.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gamemode/itemsystem/items/infuser.lua b/gamemode/itemsystem/items/infuser.lua index d2f72ad..53aedf7 100644 --- a/gamemode/itemsystem/items/infuser.lua +++ b/gamemode/itemsystem/items/infuser.lua @@ -1,6 +1,6 @@ ITEM.Name = "Infuser"
ITEM.Class = "structure"
-ITEM.Desc = "Cast enchantments\nPlace runes nearby to boost magical power and have different effects"
+ITEM.Desc = "Cast enchantments\nPlace runes nearby to boost magical power and have different effects\nHold down shift to snap"
ITEM.Model = "models/props_junk/wood_crate002a.mdl"
ITEM.Icon = Material("settlement/icon_researchtable")
ITEM.Recipe = {
@@ -42,8 +42,16 @@ function ITEM:OnPrimary(pl,tr) if (tr.Hit) then
local drop = ents.Create("ws_infuser")
- drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0))
- drop:SetPos(tr.HitPos)
+ local Aim = Angle(0,pl:GetAimVector():Angle().y+90,0)
+ local Pos = tr.HitPos
+ if(pl:KeyDown(IN_SPEED)) then
+ Pos.x = Pos.x - (Pos.x%20)
+ Pos.y = Pos.y - (Pos.y%20)
+ Pos.z = Pos.z - (Pos.z%20)
+ Aim.yaw = Aim.yaw - (Aim.yaw%15)
+ end
+ drop:SetAngles(Aim)
+ drop:SetPos(Pos)
drop:Spawn()
drop:Activate()
|
