diff options
Diffstat (limited to 'gamemode/itemsystem/items/researchtable.lua')
| -rw-r--r-- | gamemode/itemsystem/items/researchtable.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gamemode/itemsystem/items/researchtable.lua b/gamemode/itemsystem/items/researchtable.lua index b347828..9f00251 100644 --- a/gamemode/itemsystem/items/researchtable.lua +++ b/gamemode/itemsystem/items/researchtable.lua @@ -1,6 +1,6 @@ ITEM.Name = "Research Table"
ITEM.Class = "structure"
-ITEM.Desc = "A table to find recepies\nPlace 10 wood, sap, and rock in the table to discover a new recipe."
+ITEM.Desc = "A table to find recepies\nHold down shift to snap"
ITEM.Model = "models/props_junk/wood_crate001a.mdl"
ITEM.Icon = Material("wintersurvival2/hud/ws2_icons/icon_recipe.png")
ITEM.Recipe = {
@@ -40,13 +40,15 @@ function ITEM:OnPrimary(pl,tr) if (tr.Hit) then
local drop = ents.Create("ws_researchtable")
- drop:SetAngles(Angle(0,pl:GetAimVector():Angle().y+90,0))
+ local Aim = Angle(0,pl:GetAimVector():Angle().y+90,0)
local Pos = tr.HitPos
- if(GM:KeyPress(pl,IN_SPEED)) then
+ 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)
+ Ang.yaw = Ang.yaw - (Ang.yaw%15)
end
+ drop:SetAngles(Aim)
drop:SetPos(Pos)
drop:Spawn()
drop:Activate()
|
