Skip to content

Commit

Permalink
Merge branch 'experimental'
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrus2142 committed Aug 10, 2017
2 parents 677c5c2 + b00a8af commit 0139cbf
Show file tree
Hide file tree
Showing 56 changed files with 2,178 additions and 1,092 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2017-08-10
### Added
- Language support system. (Make your own in gamemode/languages/xx.lua)
- Russian translation by @RealPackages.
- German translation by @Sodak.
- French translation by @Guilhem-Pech.
- Votemap.
- Add config convars. See convars.txt for description.

### Changed
- Add toggle for f1menu.
- Ghostface's ability has now a detection radius.
- Myers's ability has now a cooldown.
- Dead player can't chat with a live player.
- The shy girl can see trap on slash_lodge and see the Proxy icon if he invisible on slash_subway.
- [*For developpers*] New killer/map system. Incompatible with older custom killer/map.

### Removed
- Config vars in config.lua replaced by convars.
43 changes: 43 additions & 0 deletions convars.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"slashers_antiafk_afkmsgtime" = "15"
game server_can_execute lua_server
- Set afk message duration before being kick

"slashers_antiafk_afktime" = "60"
game server_can_execute lua_server
- Set afktime duration in seconds

"slashers_antiafk_enable" = "0" ( def. "1" )
game server_can_execute lua_server
- Enable / Disable antiafk

"slashers_round_max" = "5"
game replicated server_can_execute lua_server
- Max round before change map.

"slashers_duration_waitingpolice_addsurv" = "22.500000" ( def. "22.5" )
game replicated server_can_execute lua_server
- Added duration per each survivors before police arrived. (in seconds)

"slashers_duration_waitingpolice_base" = "32.500000" ( def. "32.5" )
game replicated server_can_execute lua_server
- Initial duration before police arrived. (in seconds)

"slashers_duration_addobj" = "120"
game replicated server_can_execute lua_server
- Added duration per each objective completed. (in seconds)

"slashers_duration_addsurv" = "52.500000" ( def. "52.5" )
game replicated server_can_execute lua_server
- Added duration per each survivors. (in seconds)

"slashers_duration_base" = "67.500000" ( def. "67.5" )
game replicated server_can_execute lua_server
- Initial round duration. (in seconds)

"slashers_round_min_player" = "3"
game replicated server_can_execute lua_server
- Set minimum players required to start a round.

"slashers_lang_default" = "en"
game replicated server_can_execute lua_server
- Set default language of gamemode.
6 changes: 2 additions & 4 deletions entities/entities/beartrap/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- @Author: Vyn
-- @Date: 2017-07-26 12:09:24
-- @Last Modified by: Vyn
-- @Last Modified time: 2017-07-26 15:19:51
-- @Last Modified time: 2017-07-27 18:54:03


AddCSLuaFile( "cl_init.lua" ) -- Make sure clientside
Expand Down Expand Up @@ -78,9 +78,7 @@ function ENT:Initialize()
local phys = self:GetPhysicsObject()
if (phys:IsValid()) then
phys:Wake()
timer.Simple(1, function()
self:GetPhysicsObject():EnableMotion(false) -- Freeze trap entity
end)
self:GetPhysicsObject():EnableMotion(false)
end
end

Expand Down
12 changes: 7 additions & 5 deletions entities/entities/sls_generator/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@
--
-- @Author: Guilhem PECH
-- @Date: 2017-07-26T13:54:42+02:00
-- @Last Modified by: Guilhem PECH
-- @Last Modified time: 2017-07-26T15:16:10+02:00
-- @Last Modified by: Daryl_Winters
-- @Last Modified time: 2017-08-10T14:50:49+02:00



include("shared.lua")

ENT.RenderGroup = RENDERGROUP_BOTH
function ENT:Initialize()
end

function ENT:Draw()
self.Entity:DrawModel()
end

function ENT:Think()

function ENT:DrawTranslucent()
if LocalPlayer():IsLineOfSightClear( self.Entity ) and self.Entity:GetPos():Distance( LocalPlayer():GetPos()) < 150 and LocalPlayer():Team() != TEAM_KILLER then
DrawIndicator(self.Entity)
end
end
10 changes: 5 additions & 5 deletions entities/entities/sls_generator/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
-- @Author: Guilhem PECH
-- @Date: 2017-07-26T13:54:42+02:00
-- @Last Modified by: Guilhem PECH
-- @Last Modified by: Garrus2142
-- @Last Modified time: 2017-07-26T22:25:56+02:00


Expand Down Expand Up @@ -35,7 +35,7 @@ sound.Add( {
local engine_fuelingSound = Sound("ambient/water/leak_1.wav")

function ENT:Initialize()

self.Active = false
self:SetModel("models/props_vehicles/generatortrailer01.mdl")
self:PhysicsInit(SOLID_NONE)
Expand Down Expand Up @@ -90,12 +90,12 @@ function ENT:Use(activator, caller)
net.Send(caller)

net.Start( "notificationSlasher" )
net.WriteString("You activated the generator !")
net.WriteTable({"round_notif_enabled_generator"})
net.WriteString("safe")
net.Send(caller)

net.Start( "objectiveSlasher" )
net.WriteString("Find and activate the radio!")
net.WriteTable({"round_mission_radio"})
net.WriteString("caution")
net.SendOmit(GM.ROUND.Killer)
self.Active = true
Expand All @@ -105,7 +105,7 @@ function ENT:Use(activator, caller)
self:SetUseType( SIMPLE_USE )
if (!self:GetNWBool( 'activated')) then
net.Start( "notificationSlasher" )
net.WriteString("You can't activate the generator !")
net.WriteTable({"round_notif_error_generator"})
net.WriteString("cross")
net.Send(caller)
end
Expand Down
11 changes: 9 additions & 2 deletions entities/entities/sls_jerrican/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
--
-- @Author: Guilhem PECH
-- @Date: 2017-07-26T13:54:42+02:00
-- @Last Modified by: Guilhem PECH
-- @Last Modified time: 2017-07-26T15:16:12+02:00
-- @Last Modified by: Daryl_Winters
-- @Last Modified time: 2017-08-09T15:07:21+02:00



include("shared.lua")
ENT.RenderGroup = RENDERGROUP_BOTH

function ENT:Initialize()
end
Expand All @@ -16,6 +17,12 @@ function ENT:Draw()
self.Entity:DrawModel()
end

function ENT:DrawTranslucent()
if LocalPlayer():IsLineOfSightClear( self.Entity ) and self.Entity:GetPos():Distance( LocalPlayer():GetPos()) < 150 and LocalPlayer():Team() != TEAM_KILLER then
DrawIndicator(self.Entity)
end
end

function ENT:Think()

end
12 changes: 6 additions & 6 deletions entities/entities/sls_jerrican/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
--
-- @Author: Guilhem PECH
-- @Date: 2017-07-26T13:54:42+02:00
-- @Last Modified by: Guilhem PECH
-- @Last Modified by: Garrus2142
-- @Last Modified time: 2017-07-26T22:25:37+02:00



local GM = GAMEMODE
local GM = GM or GAMEMODE

AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:Initialize()

self.Active = false
self:SetModel("models/props_junk/gascan001a.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
Expand Down Expand Up @@ -48,19 +48,19 @@ function ENT:Use(ply)
self:Remove()
NbJerricanToFound = NbJerricanToFound - 1
net.Start( "notificationSlasher" )
net.WriteString("You found a jerrycan !")
net.WriteTable({"round_mission_jerrycan_found"})
net.WriteString("safe")
net.Send(ply)


net.Start( "modifyObjectiveSlasher" )
net.WriteString("Find " .. NbJerricanToFound .." jerrycan(s)")
net.WriteTable({"round_mission_jerrycan", NbJerricanToFound})
net.SendOmit(GM.ROUND.Killer)

end
if (NbJerricanToFound == 0) then
net.Start( "objectiveSlasher" )
net.WriteString("Find and activate the Generator !")
net.WriteTable({"round_mission_generator"})
net.WriteString("caution")
net.SendOmit(GM.ROUND.Killer)

Expand Down
12 changes: 9 additions & 3 deletions entities/entities/sls_radio/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@
--
-- @Author: Guilhem PECH
-- @Date: 2017-07-26T13:54:42+02:00
-- @Last Modified by: Guilhem PECH
-- @Last Modified time: 2017-07-26T15:16:13+02:00
-- @Last Modified by: Daryl_Winters
-- @Last Modified time: 2017-08-09T15:07:23+02:00



include("shared.lua")

ENT.RenderGroup = RENDERGROUP_BOTH
function ENT:Initialize()
end

function ENT:Draw()
self.Entity:DrawModel()
end

function ENT:DrawTranslucent()
if LocalPlayer():IsLineOfSightClear( self.Entity ) and self.Entity:GetPos():Distance( LocalPlayer():GetPos()) < 150 and LocalPlayer():Team() != TEAM_KILLER then
DrawIndicator(self.Entity)
end
end

function ENT:Think()

end
10 changes: 5 additions & 5 deletions entities/entities/sls_radio/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
-- @Author: Guilhem PECH
-- @Date: 2017-07-26T13:54:42+02:00
-- @Last Modified by: Guilhem PECH
-- @Last Modified by: Garrus2142
-- @Last Modified time: 2017-07-26T22:25:43+02:00


Expand All @@ -23,7 +23,7 @@ sound.Add( {
} )

function ENT:Initialize()

self.Active = false
self:SetModel("models/props_lab/citizenradio.mdl")
self:PhysicsInit(SOLID_NONE)
Expand Down Expand Up @@ -55,12 +55,12 @@ end
function ENT:Use(ply)
if CurrentObjective == "activate_radio" && ply:Team() == TEAM_SURVIVORS then
net.Start( "notificationSlasher" )
net.WriteString("You contacted the police !")
net.WriteTable({"round_notif_police_call"})
net.WriteString("safe")
net.Send(ply)

net.Start( "objectiveSlasher" )
net.WriteString("Survive until the police arrival !")
net.WriteTable({"round_notif_police"})
net.WriteString("caution")
net.SendOmit(GM.ROUND.Killer)

Expand All @@ -70,7 +70,7 @@ function ENT:Use(ply)
else
if (!self:GetNWBool( 'activated')) then
net.Start( "notificationSlasher" )
net.WriteString("You can't activate the radio !")
net.WriteTable({"round_notif_error_radio"})
net.WriteString("cross")
net.Send(ply)
end
Expand Down
20 changes: 10 additions & 10 deletions entities/weapons/weapon_alertropes/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
-- @Author: Vyn
-- @Date: 2017-07-26 00:51:28
-- @Last Modified by: Vyn
-- @Last Modified by: Garrus2142
-- @Last Modified time: 2017-07-26 15:20:28

AddCSLuaFile ("shared.lua")
Expand All @@ -11,7 +11,7 @@ AddCSLuaFile ("cl_init.lua")
include("shared.lua")

SWEP.Weight = 5

SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false

Expand All @@ -34,7 +34,7 @@ local function traceline_hitworld(pos1, pos2)
end
return false
end

function SWEP:PrimaryAttack()

if self:Ammo1() <= 0 then return end
Expand All @@ -48,18 +48,18 @@ function SWEP:PrimaryAttack()
if traceline_hitworld(self.Owner:GetEyeTrace().HitPos, self.firsthook:GetPos()) or traceline_hitworld(self.firsthook:GetPos(), self.Owner:GetEyeTrace().HitPos)then
--self.Owner:PrintMessage(HUD_PRINTCENTER, "Hit world") -- A remplacer par la notif (1/2)
net.Start("notificationSlasher")
net.WriteString("The rope hit the world")
net.WriteTable({"traps_rope_hit_world"})
net.WriteString("cross")
net.Send(self.Owner)
return
end

-- PrintMessage(HUD_PRINTTALK, "Current distance: "..self.firsthook:GetPos():Distance(self.Owner:GetEyeTrace().HitPos))

if self.firsthook:GetPos():Distance(self.Owner:GetEyeTrace().HitPos) > 200 then
--self.Owner:PrintMessage(HUD_PRINTCENTER, "Too much distance") -- A remplacer par la notif (2/2)
net.Start("notificationSlasher")
net.WriteString("Too much distance")
net.WriteTable({"traps_too_much_distance"})
net.WriteString("cross")
net.Send(self.Owner)
return
Expand All @@ -71,20 +71,20 @@ function SWEP:PrimaryAttack()
slashers_alertropes_place(self.Owner, ent)

ent:Spawn()

if !IsValid(self.firsthook) then
self.firsthook = ent
elseif IsValid(self.firsthook) then
ent:LinkHook(self.firsthook)
self.firsthook:LinkHook(ent)
ent:StartTrace()
constraint.Rope(ent, self.firsthook, 0, 0, Vector(0, 0, -3), Vector(0, 0, -3), 100, 100, 0, 1, "cable/cable.vmt", true )
constraint.Rope(ent, self.firsthook, 0, 0, Vector(0, 0, -3), Vector(0, 0, -3), 100, 100, 0, 1, "cable/cable.vmt", true )
self.firsthook = nil
self.Owner:SetAmmo(self:Ammo1() - 1, "ammo_alertropes")
end

cleanup.Add(self.Owner, "props", ent)

undo.Create("alertropes")
undo.AddEntity(ent)
undo.SetPlayer(self.Owner)
Expand All @@ -99,4 +99,4 @@ end

function SWEP:SecondaryAttack()

end
end
Loading

0 comments on commit 0139cbf

Please sign in to comment.