Skip to content

Commit

Permalink
Merge pull request #13 from fluffy-servers/1.3.1
Browse files Browse the repository at this point in the history
1.3.1 / 1.3.2 Update Changes
  • Loading branch information
Robert Fraser authored May 17, 2019
2 parents b5fbaf7 + 00cccdc commit 291d4d0
Show file tree
Hide file tree
Showing 60 changed files with 1,598 additions and 492 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ murder/
sandbox/
svr/
terrortown/
fluffy_mg_base/content/materials/
fluffy_mg_base/gamemode/db_config.lua

fluffy_incoming_standalone/
Expand Down
9 changes: 7 additions & 2 deletions fluffy_balls/gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end
function GM:CollectBall(ply)
local balls = ply:GetNWInt("Balls", 0)
ply:SetNWInt("Balls", balls+1)
GAMEMODE:AddStatPoints(ply, 'total_balls', 1)
GAMEMODE:AddStatPoints(ply, 'Balls Collected', 1)

ply:EmitSound('buttons/blip1.wav', 50, math.Clamp(100 + balls*5, 100, 255))

Expand Down Expand Up @@ -90,4 +90,9 @@ function GM:GetWinningPlayer()

-- Return the winner! Yay!
return bestplayer
end
end

-- Register XP for Balls
hook.Add('RegisterStatsConversions', 'AddBallsStatConversions', function()
GAMEMODE:AddStatConversion('Balls Collected', 'Total Balls', 0.05)
end)
1 change: 1 addition & 0 deletions fluffy_bombtag/entities/weapons/bt_bomb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function SWEP:Trace()
ent:SetTime(self.Owner:GetTime())
ent:StripWeapons()
self.Owner:StripWeapon("bt_bomb")
self.Owner:AddStatPoints('Bomb Passes', 1)
timer.Simple(0.1, function() ent:Give("bt_bomb") end)
end
end
Expand Down
5 changes: 3 additions & 2 deletions fluffy_bombtag/entities/weapons/bt_punch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SWEP.ViewModel = "models/weapons/c_357.mdl"
SWEP.WorldModel = "models/weapons/w_357.mdl"
SWEP.UseHands = true
SWEP.Primary.Sound = Sound( "Weapon_AR2.Single" )
SWEP.Primary.Delay = 0.4

function SWEP:Initialize()
self:SetWeaponHoldType(self.HoldType)
Expand All @@ -33,9 +34,9 @@ end

function SWEP:PrimaryAttack()
self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)

self.Weapon:EmitSound(self.Primary.Sound, 100, math.random(110,130) )
self.Weapon:EmitSound(self.Primary.Sound, 100, math.random(110,130))
self.Weapon:ShootBullets(self.Primary.Damage, self.Primary.NumShots, self.Primary.Cone)
end

Expand Down
13 changes: 10 additions & 3 deletions fluffy_bombtag/gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include('ply_extension.lua')

-- Players get the punch weapon by default
function GM:PlayerLoadout(ply)
ply:StripWeapons()
ply:SetCarrier(false)
ply:Give('bt_punch')
end
Expand Down Expand Up @@ -81,7 +82,7 @@ end)
function GM:StatsRoundWin(winners)
for k,v in pairs(player.GetAll()) do
if v:Alive() and !v.Spectating then
GAMEMODE:AddStatPoints(v, 'survived_rounds', 1)
GAMEMODE:AddStatPoints(v, 'Survived Rounds', 1)
end
end
end
Expand All @@ -99,6 +100,12 @@ function GM:DoPlayerDeath( ply, attacker, dmginfo )
for k,v in pairs(player.GetAll()) do
if !v:Alive() or v == ply or v.Spectating then continue end
v:AddFrags(1)
GAMEMODE:AddStatPoints(v, 'bombtag_score', 1)
GAMEMODE:AddStatPoints(v, 'Explosions Survived', 1)
end
end
end

-- Register XP for Bomb Tag
hook.Add('RegisterStatsConversions', 'AddBombTagStatConversions', function()
GAMEMODE:AddStatConversion('Bomb Passes', 'Bomb Tagged', 0.5)
GAMEMODE:AddStatConversion('Explosions Survived', 'Explosions Survived', 0.25)
end)
11 changes: 8 additions & 3 deletions fluffy_climb/gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ hook.Add('RoundEnd', 'ClimbHeightPoints', function()
if v.BestHeight then
local ratio = v.BestHeight/GAMEMODE.CurrentHeight
local p = math.Clamp(math.floor(ratio * 100), 0, 100)
v:AddStatPoints('ClimbHeight', p)
v:AddStatPoints('Distance', p)
v:AddFrags(math.floor(p/10))
end

if v:Alive() and not v.Spectating then
v:AddFrags(1)
v:AddStatPoints('SurvivedRounds', 1)
v:AddStatPoints('Survived Rounds', 1)
end
end
end)
Expand All @@ -81,4 +81,9 @@ function GM:ClimbVictory(ply)
GAMEMODE:EndRound(ply)

GAMEMODE:EntityCameraAnnouncement(ply, GAMEMODE.RoundCooldown or 5, Vector(0, 0, 72))
end
end

-- Register XP for Paintball
hook.Add('RegisterStatsConversions', 'AddClimbStatConversions', function()
GAMEMODE:AddStatConversion('Distance', 'Distance Climbed', 0.01)
end)
11 changes: 9 additions & 2 deletions fluffy_cratewars/gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ hook.Add('PropBreak', 'TrackBrokenCrates', function(ply, prop)
if !ply.SmashedCrates then return end
ply.SmashedCrates = ply.SmashedCrates + 1
ply:SetNWInt("Crates", ply.SmashedCrates)
ply:AddStatPoints('Crates', 1)
ply:AddStatPoints('Crates Smashed', 1)

-- Award bonuses to the player if lucky
if prop.BonusWeapon then
Expand All @@ -121,6 +121,7 @@ hook.Add('PropBreak', 'TrackBrokenCrates', function(ply, prop)

local text = GAMEMODE.WeaponOptions[prop.BonusWeapon][1]
GAMEMODE:PlayerOnlyAnnouncement(ply, 1, text or 'Bonus!', 1)
ply:AddStatPoints('Bonuses Earned', 1)
end
end )

Expand Down Expand Up @@ -164,4 +165,10 @@ function GM:EntityTakeDamage(target, dmginfo)
else
return
end
end
end

-- Register XP for Crate Wars
hook.Add('RegisterStatsConversions', 'AddCrateWarsStatConversions', function()
GAMEMODE:AddStatConversion('Crates Smashed', 'Destroyed Crates', 0.1)
GAMEMODE:AddStatConversion('Bonuses Earned', 'Bonuses Earned', 0)
end)
2 changes: 2 additions & 0 deletions fluffy_dodgeball/gamemode/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ GM.WinBySurvival = true

GM.DeathSounds = true

GM.SpawnProtection = true -- Spawn protection enabled

function GM:Initialize()

end
12 changes: 12 additions & 0 deletions fluffy_duckhunt/entities/entities/duckhunt_win.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ENT.Base = "base_entity"
ENT.Type = "brush"

-- Award players that touch this entity a round win
function ENT:StartTouch(ent)
if IsValid(self) and ent:IsPlayer() then
if not ent:Alive() or ent.Spectating then return end
if ent:Team() != TEAM_BLUE then return end
self:Remove()
GAMEMODE:EndRound(ent)
end
end
12 changes: 12 additions & 0 deletions fluffy_duckhunt/entities/entities/svr_wintrigger.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ENT.Base = "base_entity"
ENT.Type = "brush"

-- Award players that touch this entity a round win
function ENT:StartTouch(ent)
if IsValid(self) and ent:IsPlayer() then
if not ent:Alive() or ent.Spectating then return end
if ent:Team() != TEAM_BLUE then return end
self:Remove()
GAMEMODE:EndRound(ent)
end
end
47 changes: 0 additions & 47 deletions fluffy_duckhunt/entities/entities/svr_wintrigger/init.lua

This file was deleted.

20 changes: 13 additions & 7 deletions fluffy_duckhunt/gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ function GM:PlayerLoadout( ply )
if ply:Team() == TEAM_BLUE then
-- Runners
ply:StripWeapons()
ply:SetWalkSpeed( 325 )
ply:SetRunSpeed( 375 )
ply:SetWalkSpeed(350)
ply:SetRunSpeed(400)
elseif ply:Team() == TEAM_RED then
-- Snipers
ply:Give('sniper_normal')
ply:SetWalkSpeed( 425 )
ply:SetRunSpeed( 500 )
ply:SetWalkSpeed(475)
ply:SetRunSpeed(525)
end
end

Expand All @@ -32,13 +32,13 @@ function GM:HandleEndRound(reason)
elseif type(reason) == 'Player' then
-- Winning player gets 3 points
reason:AddFrags(3)
GAMEMODE:AddStatPoints(reason, 'RoundWins', 1)
GAMEMODE:AddStatPoints(reason, 'Finished First', 1)

-- Other survivors get 1 point
if reason:Team() == TEAM_BLUE then
team.AddScore(TEAM_BLUE, 1)
for k,v in pairs( team.GetPlayers(TEAM_BLUE) ) do
GAMEMODE:AddStatPoints(v, 'survived_rounds', 1)
GAMEMODE:AddStatPoints(v, 'Survived Rounds', 1)
if v != reason then v:AddFrags(1) end
end
end
Expand All @@ -51,4 +51,10 @@ end

function GM:StatsRoundWin()
-- Handled above
end
end

-- Register XP for Duck Hunt
hook.Add('RegisterStatsConversions', 'AddDuckHuntStatConversions', function()
GAMEMODE:AddStatConversion('Finished First', 'Finished First', 5)
GAMEMODE:AddStatConversion('Runners Sniped', 'Runners Sniped', 0.5)
end)
1 change: 1 addition & 0 deletions fluffy_duckhunt/gamemode/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ GM.RoundCooldown = 5 -- How long between each round?

GM.CanSuicide = false -- Should players be able to die at will? :(
GM.ThirdPersonEnabled = false -- This gamemode overrides some functions to do with this
GM.SpawnProtection = true -- Spawn protection enabled

function GM:CreateTeams()
if ( !GAMEMODE.TeamBased ) then return end
Expand Down
2 changes: 1 addition & 1 deletion fluffy_incoming/gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ end

-- Equivalent of 1XP for every 100% of distance travelled
hook.Add('RegisterStatsConversions', 'AddIncomingStatConversions', function()
GAMEMODE:AddStatConversion('Distance', 'Slope Distance', 0.01)
GAMEMODE:AddStatConversion('Distance', 'Distance Travelled', 0.01)
end)

IncludeResFolder( "materials/models/clannv/incoming/" )
Expand Down
21 changes: 21 additions & 0 deletions fluffy_infection/entities/entities/npc_skeleton.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
AddCSLuaFile()

ENT.Base = 'npc_zo_base'
ENT.PrintName = 'Skeleton'

if CLIENT then
language.Add('npc_skeleton', 'Skeleton' )
end

-- Speed
ENT.Speed = 160
ENT.WalkSpeedAnimation = 0.6
ENT.Acceleration = 200
ENT.MoveType = 1

-- Health & Other
ENT.Model = "models/player/skeleton.mdl"
ENT.BaseHealth = 200
ENT.Damage = 25
ENT.ModelScale = 1
ENT.Color = Color(0, 0, 255)
23 changes: 23 additions & 0 deletions fluffy_infection/entities/entities/npc_skeleton_gold.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AddCSLuaFile()

ENT.Base = 'npc_zo_base'
ENT.PrintName = 'Gold Skeleton'

if CLIENT then
language.Add('npc_skeleton_gold', 'Gold Skeleton' )
end

-- Speed
ENT.Speed = 225
ENT.WalkSpeedAnimation = 0.6
ENT.Acceleration = 200
ENT.MoveType = 1

-- Health & Other
ENT.Model = "models/player/skeleton.mdl"
ENT.BaseHealth = 200
ENT.Damage = 25
ENT.ModelScale = 1.25
ENT.BoldColor = Color(212, 175, 55)

ENT.CollisionSide = 10
23 changes: 23 additions & 0 deletions fluffy_infection/entities/entities/npc_skeleton_mini.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AddCSLuaFile()

ENT.Base = 'npc_zo_base'
ENT.PrintName = 'Mini Skeleton'

if CLIENT then
language.Add('npc_skeleton_mini', 'Mini Skeleton' )
end

-- Speed
ENT.Speed = 300
ENT.WalkSpeedAnimation = 0.6
ENT.Acceleration = 200
ENT.MoveType = 1

-- Health & Other
ENT.Model = "models/player/skeleton.mdl"
ENT.BaseHealth = 10
ENT.Damage = 15
ENT.ModelScale = 0.75
ENT.BoldColor = Color(255, 159, 243)

ENT.CollisionSide = 4
Loading

0 comments on commit 291d4d0

Please sign in to comment.