diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-22 15:33:18 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-05-22 15:33:18 -0400 |
| commit | 675a4327c1653512655963288e9a0c9acb40bf77 (patch) | |
| tree | ac1260ef1e7d410e17f375c8333d3f11cd944040 | |
| parent | e84d85263c6ef55af98cb213c5462107a0170506 (diff) | |
| download | gmstranded-675a4327c1653512655963288e9a0c9acb40bf77.tar.gz gmstranded-675a4327c1653512655963288e9a0c9acb40bf77.tar.bz2 gmstranded-675a4327c1653512655963288e9a0c9acb40bf77.zip | |
Since the new item system, drinking water no longer works the way it used to
| -rw-r--r-- | gamemode/chatcommands.lua | 14 | ||||
| -rw-r--r-- | gamemode/cl_qmenu.lua | 2 | ||||
| -rw-r--r-- | gamemode/init.lua | 6 | ||||
| -rw-r--r-- | gamemode/processes.lua | 36 |
4 files changed, 0 insertions, 58 deletions
diff --git a/gamemode/chatcommands.lua b/gamemode/chatcommands.lua index 374d483..3f1759d 100644 --- a/gamemode/chatcommands.lua +++ b/gamemode/chatcommands.lua @@ -174,20 +174,6 @@ GMS.RegisterChatCmd( CHATCMD ) local CHATCMD = {} -CHATCMD.Command = "drink" -CHATCMD.Desc = "Drink a water bottle." -CHATCMD.CCName = "gms_drinkbottle" - -function CHATCMD:Run( ply ) - GAMEMODE.DrinkFromBottle( ply ) -end - -GMS.RegisterChatCmd( CHATCMD ) - ----------------------------------------------------------------------------------------------------- - -local CHATCMD = {} - CHATCMD.Command = "dropweapon" CHATCMD.Desc = "Drop your current weapon." CHATCMD.CCName = "gms_dropweapon" diff --git a/gamemode/cl_qmenu.lua b/gamemode/cl_qmenu.lua index ebac4e6..3c557d9 100644 --- a/gamemode/cl_qmenu.lua +++ b/gamemode/cl_qmenu.lua @@ -107,8 +107,6 @@ PANEL.SmallButs["Sleep"] = "gms_sleep" PANEL.SmallButs["Wake up"] = "gms_wakeup" PANEL.SmallButs["Drop weapon"] = "gms_dropweapon" PANEL.SmallButs["Steal"] = "gms_steal" -PANEL.SmallButs["Make campfire"] = "gms_makefire" -PANEL.SmallButs["Drink bottle of water"] = "gms_drinkbottle" PANEL.SmallButs["Take medicine"] = "gms_takemedicine" PANEL.SmallButs["Combinations"] = "gms_combinations" PANEL.SmallButs["Structures"] = "gms_structures" diff --git a/gamemode/init.lua b/gamemode/init.lua index 48acecd..7ba8b25 100644 --- a/gamemode/init.lua +++ b/gamemode/init.lua @@ -418,12 +418,6 @@ for k,v in pairs(GM.Plantables) do end) end -function GM.DrinkFromBottle( ply, cmd, args ) - if ( ply:GetResource( "Water_Bottles" ) < 1 ) then ply:SendMessage( "You need a water bottle.", 3, Color( 200, 0, 0, 255 ) ) return end - ply:DoProcess( "DrinkBottle", 1.5 ) -end -concommand.Add( "gms_drinkbottle", GM.DrinkFromBottle ) - function GM.EatBerry( ply, cmd, args ) if ( ply:GetResource( "Berries" ) < 1 ) then ply:SendMessage( "You need some berries.", 3, Color( 200, 0, 0, 255 ) ) return end ply:DoProcess( "EatBerry", 1.5 ) diff --git a/gamemode/processes.lua b/gamemode/processes.lua index c647dd1..854a3d8 100644 --- a/gamemode/processes.lua +++ b/gamemode/processes.lua @@ -828,42 +828,6 @@ end GMS.RegisterProcess( "BottleWater", PROCESS ) /*--------------------------------------------------------- - Drink bottle ----------------------------------------------------------*/ -local PROCESS = {} - -function PROCESS:OnStart() - self.Owner:MakeProcessBar( "Drinking Bottle", self.Time, self.Cancel ) - self.StartTime = CurTime() - - self:PlaySound() -end - -function PROCESS:PlaySound() - if ( CurTime() - self.StartTime > self.Time ) then return end - if ( !self.Owner.InProcess || self.StartTime != self.Owner.ProcessTable.StartTime ) then return end - - if ( self.Owner:Alive() ) then - self.Owner:EmitSound( Sound( "npc/barnacle/barnacle_gulp" .. math.random( 1, 2 ) .. ".wav" ) ) - timer.Simple( 0.75, function() self:PlaySound() end ) - end -end - -function PROCESS:OnStop() - self.Owner:DecResource( "Water_Bottles", 1 ) - self.Owner:SendMessage( "You're a little less thirsty now.", 3, Color( 10, 200, 10, 255 ) ) - if ( self.Owner.Thirst <= 750 ) then - self.Owner:SetThirst( self.Owner.Thirst + 250 ) - elseif ( self.Owner.Thirst >= 750 ) then - self.Owner:SetThirst( 1000 ) - end -end - -PROCESS.Cancel = false - -GMS.RegisterProcess( "DrinkBottle", PROCESS ) - -/*--------------------------------------------------------- Take Medicine ---------------------------------------------------------*/ local PROCESS = {} |
