diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..914c6b0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,43 @@ +# 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.2.0] - 2018-08-06 +### Added +- New map (slash_motel) +- New killer (Norman Bates) +- Add Brazilian Portuguese translation by @Viking321 + +## [1.1.1] - 2017-08-13 +### Added +- Polish translation by @danx91 + +### Changed +- Change objectives spawn positions on slash_highschool. + +### Fixed +- Fixed shy ability on slash_subway +- Fixed shy ability on slash_selvage +- Fixed votemap + +## [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. diff --git a/README.md b/README.md index d008cb0..eca86a2 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,6 @@ If you found bug, please create an issue on github. Join the Steam group to get the latest news : http://steamcommunity.com/groups/gslashers -Play now on the official servers : -* [Server #1](steam://connect/utopia-games.net:27075) : utopia-games.net:27075 -* [Server #2](steam://connect/utopia-games.net:27107) : utopia-games.net:27107 -* [Server #3](steam://connect/utopia-games.net:27109) : utopia-games.net:27109 -* [Server #4](steam://connect/utopia-games.net:27110) : utopia-games.net:27110 - If you like this gamemode, feel free to join the Utopia-Games Steam group to get the latest news about our other and upcoming projects : http://steamcommunity.com/groups/utopia-games diff --git a/content/materials/votemap/votemap_1.png b/content/materials/votemap/votemap_1.png deleted file mode 100644 index cbcc947..0000000 Binary files a/content/materials/votemap/votemap_1.png and /dev/null differ diff --git a/content/materials/votemap/votemap_2.png b/content/materials/votemap/votemap_2.png deleted file mode 100644 index 6da3767..0000000 Binary files a/content/materials/votemap/votemap_2.png and /dev/null differ diff --git a/content/materials/votemap/votemap_3.png b/content/materials/votemap/votemap_3.png deleted file mode 100644 index e75b19e..0000000 Binary files a/content/materials/votemap/votemap_3.png and /dev/null differ diff --git a/content/materials/votemap/votemap_4.png b/content/materials/votemap/votemap_4.png deleted file mode 100644 index b3be148..0000000 Binary files a/content/materials/votemap/votemap_4.png and /dev/null differ diff --git a/content/materials/votemap/votemap_5.png b/content/materials/votemap/votemap_5.png deleted file mode 100644 index 6fc26f3..0000000 Binary files a/content/materials/votemap/votemap_5.png and /dev/null differ diff --git a/content/materials/votemap/votemap_exiticon.png b/content/materials/votemap/votemap_exiticon.png deleted file mode 100644 index 4e4b2a2..0000000 Binary files a/content/materials/votemap/votemap_exiticon.png and /dev/null differ diff --git a/content/materials/votemap/votemap_extend.png b/content/materials/votemap/votemap_extend.png deleted file mode 100644 index 4c8673f..0000000 Binary files a/content/materials/votemap/votemap_extend.png and /dev/null differ diff --git a/content/materials/votemap/votemap_highschool.png b/content/materials/votemap/votemap_highschool.png deleted file mode 100644 index 9eaf815..0000000 Binary files a/content/materials/votemap/votemap_highschool.png and /dev/null differ diff --git a/content/materials/votemap/votemap_lodge.png b/content/materials/votemap/votemap_lodge.png deleted file mode 100644 index b0fbfa2..0000000 Binary files a/content/materials/votemap/votemap_lodge.png and /dev/null differ diff --git a/content/materials/votemap/votemap_random.png b/content/materials/votemap/votemap_random.png deleted file mode 100644 index 9813122..0000000 Binary files a/content/materials/votemap/votemap_random.png and /dev/null differ diff --git a/content/materials/votemap/votemap_selvage.png b/content/materials/votemap/votemap_selvage.png deleted file mode 100644 index e6163c0..0000000 Binary files a/content/materials/votemap/votemap_selvage.png and /dev/null differ diff --git a/content/materials/votemap/votemap_subway.png b/content/materials/votemap/votemap_subway.png deleted file mode 100644 index 7e63580..0000000 Binary files a/content/materials/votemap/votemap_subway.png and /dev/null differ diff --git a/content/materials/votemap/votemap_summercamp.png b/content/materials/votemap/votemap_summercamp.png deleted file mode 100644 index c54c43d..0000000 Binary files a/content/materials/votemap/votemap_summercamp.png and /dev/null differ diff --git a/convars.txt b/convars.txt new file mode 100644 index 0000000..df7b294 --- /dev/null +++ b/convars.txt @@ -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. diff --git a/entities/entities/batesmum/cl_init.lua b/entities/entities/batesmum/cl_init.lua new file mode 100644 index 0000000..6446dc8 --- /dev/null +++ b/entities/entities/batesmum/cl_init.lua @@ -0,0 +1,12 @@ +-- Utopia Games - Slashers +-- +-- @Author: Vyn +-- @Date: 2017-07-26 00:53:59 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-09 17:05:52 + +include('shared.lua') + +function ENT:Draw() + self:DrawModel() +end diff --git a/entities/entities/batesmum/init.lua b/entities/entities/batesmum/init.lua new file mode 100644 index 0000000..8fa98e7 --- /dev/null +++ b/entities/entities/batesmum/init.lua @@ -0,0 +1,93 @@ +-- @Author: Guilhem PECH +-- @Date: 2018-01-09 11:09:22 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-11 16:59:23 +local GM = GM or GAMEMODE +AddCSLuaFile("cl_init.lua") -- Make sure clientside +AddCSLuaFile("shared.lua") -- and shared scripts are sent. +include("shared.lua") +util.AddNetworkString("slash_mother_bates") +local timer = 0 + +local radiusFar = 500 +local radiusMedium = 400 +local radiusClose = 200 + +local function getDistanceNearestPlayer(table, origin) + local result = false + + for k, v in ipairs(table) do + if v:IsValid() and v:IsPlayer() and v:Team() ~= TEAM_KILLER and (not result or v:GetPos():Distance(origin) < result) then + result = v:GetPos():Distance(origin) + end + end + + return result +end + +function ENT:Think() + local status = 0 + if not GM.ROUND.Active then return end + if (timer + 0.5) < CurTime() then + timer = CurTime() + + proximityPlayers = getDistanceNearestPlayer(ents.FindInSphere(self:GetPos(), radiusFar or 500), self:GetPos()) + + if not proximityPlayers then + print("Not") + GM.ROUND.Killer:SetWalkSpeed( GM.MAP.Killer.WalkSpeed ) + GM.ROUND.Killer:SetRunSpeed(GM.MAP.Killer.RunSpeed ) + status = 0 + elseif proximityPlayers <= radiusClose then + print("Supplosed =", GM.MAP.Killer.WalkSpeed * 1.8) + GM.ROUND.Killer:SetWalkSpeed( GM.MAP.Killer.WalkSpeed * 1.8 ) + GM.ROUND.Killer:SetRunSpeed(GM.MAP.Killer.RunSpeed * 1.8) + status = 3 + elseif proximityPlayers <= radiusMedium then + print("Supplosed =", GM.MAP.Killer.WalkSpeed * 1.3) + GM.ROUND.Killer:SetWalkSpeed( GM.MAP.Killer.WalkSpeed * 1.3 ) + GM.ROUND.Killer:SetRunSpeed(GM.MAP.Killer.RunSpeed * 1.3) + status = 2 + else + print("Supplosed =", GM.MAP.Killer.WalkSpeed * 1.1) + GM.ROUND.Killer:SetWalkSpeed( GM.MAP.Killer.WalkSpeed * 1.1 ) + GM.ROUND.Killer:SetRunSpeed(GM.MAP.Killer.RunSpeed * 1.1) + status = 1 + end + + net.Start("slash_mother_bates") + net.WriteUInt(status, 3) + net.Broadcast() + end +end + +local ragdoll = ents.Create("prop_ragdoll") + +function ENT:Initialize() + if ConVarExists("slashers_bates_far_radius") and ConVarExists("slashers_bates_medium_radius") and ConVarExists("slashers_bates_close_radius") then + radiusFar = GetConVar("slashers_bates_far_radius"):GetInt() + radiusMedium = GetConVar("slashers_bates_medium_radius"):GetInt() + radiusClose = GetConVar("slashers_bates_close_radius"):GetInt() + end + for k,v in pairs(ents.GetAll()) do + if v:GetName() == "slash_bates_points" then + v:Remove() + end + end + if (not IsValid(ragdoll)) then + ragdoll = ents.Create("prop_ragdoll") + end + ragdoll:SetModel("models/skeleton/skeleton_whole_noskins.mdl") + ragdoll:PhysicsInit(SOLID_VPHYSICS) + ragdoll:GetPhysicsObject():EnableDrag(true) + ragdoll:SetPos(self:GetPos()) + self:SetParent(ragdoll) + ragdoll:Spawn() + ragdoll:SetName("slash_bates_mother") + self:SetName("slash_bates_points") +end + +function ENT:Touch(ent) +end diff --git a/entities/entities/batesmum/shared.lua b/entities/entities/batesmum/shared.lua new file mode 100644 index 0000000..3a5459a --- /dev/null +++ b/entities/entities/batesmum/shared.lua @@ -0,0 +1,15 @@ +-- @Author: Guilhem PECH +-- @Date: 2018-01-09 11:09:22 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-09 17:05:43 + + +ENT.Type = "point" +ENT.Author = "Daryl Winters" +ENT.PrintName = "Bates Mother" +ENT.Spawnable = true +--ENT.AutomaticFrameAdvance = true + +slashers_batesmum_maxtap = 1 diff --git a/entities/entities/sls_generator/cl_init.lua b/entities/entities/sls_generator/cl_init.lua index 5ecf513..c8d8681 100755 --- a/entities/entities/sls_generator/cl_init.lua +++ b/entities/entities/sls_generator/cl_init.lua @@ -2,13 +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: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 @@ -16,6 +16,8 @@ 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 diff --git a/entities/entities/sls_jerrican/cl_init.lua b/entities/entities/sls_jerrican/cl_init.lua index efcfc3f..c0fcf00 100755 --- a/entities/entities/sls_jerrican/cl_init.lua +++ b/entities/entities/sls_jerrican/cl_init.lua @@ -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 @@ -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 diff --git a/entities/entities/sls_motherbates/cl_init.lua b/entities/entities/sls_motherbates/cl_init.lua new file mode 100644 index 0000000..fc5d316 --- /dev/null +++ b/entities/entities/sls_motherbates/cl_init.lua @@ -0,0 +1,66 @@ +-- Utopia Games - Slashers +-- +-- @Author: Guilhem PECH +-- @Date: 2017-07-26T13:54:42+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 15-Apr-2018 + +include("shared.lua") + + +local GM = GM or GAMEMODE + + +GM.oldLevel = null +GM.SoundPlayed = null + +ENT.RenderGroup = RENDERGROUP_BOTH + +GM.MommyEntity = nil + +function ENT:Initialize() + GM.MommyEntity = self +end + +function ENT:Draw() + self.Entity:DrawModel() +end + +local function HUDPaintBackground() + if LocalPlayer():Team() != TEAM_KILLER || !GM.ROUND.Active || !IsValid(GM.MommyEntity) then return end + + local pos = GM.MommyEntity:GetPos():ToScreen() + local color = Color(255,255,255) + if GM.oldLevel == 3 then + color = Color(255,0,0) + elseif GM.oldLevel == 1 then + color = Color(0,255,0) + elseif GM.oldLevel == 2 then + color = Color(255, 239, 0) + else + color = Color(255, 255, 255) + end + + surface.SetDrawColor(color) + surface.SetMaterial(Material("icons/icon_mother.png")) + surface.DrawTexturedRect(pos.x - 50, pos.y -100, 64, 64) +end +hook.Add("HUDPaintBackground", "sls_kability_HUDPaintBackground", HUDPaintBackground) + +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 + +function ENT:OnRemove() + if IsValid(GM.SoundPlayed) then + GM.SoundPlayed:Stop() + end + GM.oldLevel = null + GM.MommyEntity = null +end \ No newline at end of file diff --git a/entities/entities/sls_motherbates/init.lua b/entities/entities/sls_motherbates/init.lua new file mode 100644 index 0000000..e2ba5a6 --- /dev/null +++ b/entities/entities/sls_motherbates/init.lua @@ -0,0 +1,151 @@ +-- Utopia Games - Slashers +-- +-- @Author: Guilhem PECH +-- @Date: 2017-07-26T13:54:42+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 15-Apr-2018 + + + +local GM = GAMEMODE + +AddCSLuaFile( "cl_init.lua" ) +AddCSLuaFile( "shared.lua" ) +include('shared.lua') + +util.AddNetworkString("sls_motherradar") + +function endMusic(victim) + net.Start("sls_motherradar",true) + net.WriteUInt(0,2) + net.Send(victim) +end +hook.Add("PlayerDeath","slash_deathmusicend",endMusic) + +function ENT:Initialize() + + self.Active = false + self:SetModel("models/poly_wheelchair.mdl") + self:PhysicsInit(SOLID_VPHYSICS) + self:SetMoveType(MOVETYPE_VPHYSICS) + self:SetNWBool('activated',false) + self:SetSolid(SOLID_VPHYSICS) + self:SetUseType( SIMPLE_USE ) + + local bones = ents.Create( "prop_physics" ) + bones:SetModel( "models/skeleton/skeleton_torso.mdl" ) + bones:SetPos( self:GetPos() + Vector(-4.116044,0.400906,37.009029) ) + bones:SetAngles(self:GetAngles() + Angle(-22.855,-15.711,9.402)) + bones:SetMoveType(MOVETYPE_NONE) + bones:SetParent(self) + bones:Spawn() + + + local phys = self:GetPhysicsObject() + if phys:IsValid() then + phys:EnableMotion(true) + phys:Wake() + end + + timer.Simple( 1, function() + if(IsValid(self)) then + self:SetMoveType(MOVETYPE_NONE) + end + end ) +end + +function ENT:SpawnFunction( ply, tr ) + if ( !tr.Hit ) then return end + local ent = ents.Create("sls_motherbates") + ent:SetPos( tr.HitPos + tr.HitNormal ) + ent:Spawn() + + return ent +end +ents.Create("prop_physics") + + +function sendInfo (ply,DistSqr) + if(!IsValid(ply)) then return end + net.Start("sls_motherradar",true) + net.WriteUInt(howFar (DistSqr),2) + net.Send(ply) +end + +function howFar (pos) + if (pos) < ( 500*500 ) then + return 3 + elseif (pos) < ( 1000*1000 ) then + return 2 + elseif (pos) < ( 1500*1500 ) then + return 1 + else + return 0 + end +end + + +function ENT:FindAroundPlayers(radius) + local entsNearby = ents.FindInSphere( self:GetPos() , radius ) + local plyNearby = {} + for i,v in pairs(entsNearby) do + if (v:IsValid() and v:IsPlayer() and v:Team() ~= TEAM_KILLER and v.ClassID != CLASS_SURV_SHY) then + plyNearby[v] = v:GetPos():DistToSqr( self:GetPos() ) + sendInfo(v,plyNearby[v]) + end + end + return plyNearby +end + +function ApplyModifications(ply,pos) + if(!IsValid(ply)) then return end + if (!ply.normWalk) then ply.normWalk = ply:GetWalkSpeed() end + + if (pos) < ( 500*500 ) then + ply:SetWalkSpeed(ply.normWalk * 1.6) + ply:SetRunSpeed(ply.normWalk * 1.6) + elseif (pos) < ( 1000*1000 ) then + ply:SetWalkSpeed(ply.normWalk * 1.4) + ply:SetRunSpeed(ply.normWalk * 1.4) + elseif (pos) < ( 1500*1500 ) then + ply:SetWalkSpeed(ply.normWalk * 1.2) + ply:SetRunSpeed(ply.normWalk * 1.2) + else + ply:SetWalkSpeed(ply.normWalk) + ply:SetRunSpeed(ply.normWalk) + + end +end + + +function ENT:Think() + local plyNearby = self:FindAroundPlayers(3000) + local last = 5000*5000 + for k,v in pairs(plyNearby) do + if v < last then + sendInfo (GM.ROUND.Killer,v) + ApplyModifications(GM.ROUND.Killer,v) + last = v + end + end + self:NextThink( CurTime() + 1 ) + return true +end + +function ENT:OnTakeDamage(dmg) + +end + +function ENT:Use( activator, caller ) + if ( activator:IsPlayer() && activator ~= GM.ROUND.Killer && !GM.ROUND.WaitingPolice) then + CurrentObjective = "wainting_police" + objectifComplete() + GM.ROUND:StartWaitingPolice() + end +end + +function ENT:OnRemove() + if self:IsPlayer() then + self:GetOwner():SetWalkSpeed(ply.normWalk) + end +end diff --git a/entities/entities/sls_motherbates/shared.lua b/entities/entities/sls_motherbates/shared.lua new file mode 100644 index 0000000..2bc44db --- /dev/null +++ b/entities/entities/sls_motherbates/shared.lua @@ -0,0 +1,17 @@ +-- Utopia Games - Slashers +-- +-- @Author: Guilhem PECH +-- @Date: 2017-07-26T13:54:42+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 15-Apr-2018 + + + +ENT.Type = "anim" +ENT.Base = "base_entity" +ENT.PrintName = "Mother" +ENT.Author = "Daryl Winters" +ENT.Information = " To Call the Police" +ENT.Category = "Slashers" +ENT.Spawnable = true +ENT.AdminSpawnable = false diff --git a/entities/entities/sls_radio/cl_init.lua b/entities/entities/sls_radio/cl_init.lua index 2387b1c..f920820 100755 --- a/entities/entities/sls_radio/cl_init.lua +++ b/entities/entities/sls_radio/cl_init.lua @@ -2,13 +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: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 @@ -16,6 +16,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 diff --git a/entities/weapons/tfa_bash_base/shared.lua b/entities/weapons/tfa_bash_base/shared.lua index c204487..392adc3 100644 --- a/entities/weapons/tfa_bash_base/shared.lua +++ b/entities/weapons/tfa_bash_base/shared.lua @@ -25,7 +25,7 @@ function SWEP:AltAttack() self:SetHolstering(false) end end - + if (self:GetReloading() and self.Shotgun and !self:GetShotgunPumping() and !self:GetShotgunNeedsPump()) then self:SetShotgunCancel( true ) --[[ @@ -36,33 +36,33 @@ function SWEP:AltAttack() ]]-- return end - + if self:IsSafety() then return end - + if (self:GetChangingSilence()) then return end - + if self:GetNextSecondaryFire()>CurTime() then return end - + if self:GetReloading() then self:CompleteReload() end - + local vm = self.Owner:GetViewModel() - + --if SERVER then self:SendWeaponAnim(ACT_VM_HITCENTER) --else self:SendWeaponAnim(ACT_VM_HITCENTER) --end - - + + if !game.SinglePlayer() then timer.Simple(vm:SequenceDuration()-0.05,function() if IsValid(self) and self:OwnerIsValid() then self:SendWeaponAnim(ACT_VM_IDLE) end end) - + timer.Simple(vm:SequenceDuration()-0.01,function() if IsValid(self) and self:OwnerIsValid() then if lastresortanim and lastresortanim>-2 then @@ -71,22 +71,22 @@ function SWEP:AltAttack() end end) end - + self.tmptoggle = !self.tmptoggle - + self:SetNextPrimaryFire(CurTime()+(self.SequenceLengthOverride[ACT_VM_HITCENTER] or vm:SequenceDuration())) self:SetNextSecondaryFire(CurTime()+(self.SequenceLengthOverride[ACT_VM_HITCENTER] or vm:SequenceDuration())) - + if CLIENT then self:EmitSound(self.Secondary.BashSound ) end - + timer.Simple(self.Secondary.BashDelay,function() if IsValid(self) and self.OwnerIsValid and self:OwnerIsValid() then if (SERVER) then local pos = self.Owner:GetShootPos() local av = self.Owner:EyeAngles():Forward() - + local slash = {} slash.start = pos slash.endpos = pos + (av * self.Secondary.BashLength) @@ -95,36 +95,36 @@ function SWEP:AltAttack() slash.maxs = Vector(10, 5, 5) local slashtrace = util.TraceHull(slash) local pain = self.Secondary.BashDamage - - - + + + if slashtrace.Hit then /*if slashtrace.Entity:GetClass() == "func_door_rotating" or slashtrace.Entity:GetClass() == "prop_door_rotating" then local ply = self.Owner ply:EmitSound("ambient/materials/door_hit1.wav", 100, math.random(80, 120)) - + ply.oldname = ply:GetName() - + ply:SetName( "bashingpl" .. ply:EntIndex() ) - + slashtrace.Entity:SetKeyValue( "Speed", "500" ) - slashtrace.Entity:SetKeyValue( "Open Direction", "Both directions" ) + slashtrace.Entity:SetKeyValue( "Open Direction", "Both directions" ) slashtrace.Entity:SetKeyValue( "opendir", "0" ) slashtrace.Entity:Fire( "unlock", "", .01 ) - slashtrace.Entity:Fire( "openawayfrom", "bashingpl" .. ply:EntIndex() , .01 ) - + slashtrace.Entity:Fire( "openawayfrom", "bashingpl" .. ply:EntIndex() , .01 ) + timer.Simple(0.02, function() if IsValid(ply) then ply:SetName(ply.oldname) end end) - + timer.Simple(0.3, function() if IsValid(slashtrace.Entity) then slashtrace.Entity:SetKeyValue( "Speed", "100" ) end end) - + end*/ self:EmitSound( (slashtrace.MatType == MAT_FLESH or slashtrace.MatType == MAT_ALIENFLESH) and self.Secondary.BashHitSound_Flesh or self.Secondary.BashHitSound ) if game.GetTimeScale()>0.99 then @@ -151,28 +151,28 @@ function SWEP:AltAttack() dmg:SetDamage(pain) dmg:SetDamageType(self.Secondary.BashDamageType) slashtrace.Entity:TakeDamageInfo(dmg) - end - + end + local ent = slashtrace.Entity if IsValid(ent) and ent.GetPhysicsObject then - + local phys - + if ent:IsRagdoll() then phys = ent:GetPhysicsObjectNum(slashtrace.PhysicsBone or 0) - else + else phys = ent:GetPhysicsObject() end - + if IsValid(phys) then if ent:IsPlayer() or ent:IsNPC() then - ent:SetVelocity(ent:GetVelocity()+self.Owner:GetAimVector()*self.Secondary.BashDamage*40) - phys:SetVelocity(phys:GetVelocity()+self.Owner:GetAimVector()*self.Secondary.BashDamage*40) + ent:SetVelocity(ent:GetVelocity()+self.Owner:GetAimVector()*self.Secondary.BashDamage) + phys:SetVelocity(phys:GetVelocity()+self.Owner:GetAimVector()*self.Secondary.BashDamage) else phys:ApplyForceOffset(self.Owner:GetAimVector()*self.Secondary.BashDamage/4,slashtrace.HitPos) end end - + end end end @@ -183,11 +183,11 @@ end function SWEP:GetBashing() if !self:OwnerIsValid() then return false end local bash,vm,seq,actid - + vm = self.Owner:GetViewModel() if !IsValid(vm) then return end seq = vm:GetSequence() actid = vm:GetSequenceActivity(seq) bash = (actid==ACT_VM_HITCENTER) and vm:GetCycle()>0 and vm:GetCycle()<0.65 return bash -end \ No newline at end of file +end diff --git a/entities/weapons/tim_detector/shared.lua b/entities/weapons/tim_detector/shared.lua index 35df27a..bcdedac 100755 --- a/entities/weapons/tim_detector/shared.lua +++ b/entities/weapons/tim_detector/shared.lua @@ -99,7 +99,7 @@ end if CLIENT then function SWEP:Ping() - surface.PlaySound("effects/detector_ping.wav") + surface.PlaySound("slashers/effects/detector_ping.wav") self.startPing = true self.startEcho = CurTime() + 0.2 self.drawPingY = 0 @@ -123,7 +123,7 @@ if CLIENT then end end if found then - surface.PlaySound("effects/detector_echo.wav") + surface.PlaySound("slashers/effects/detector_echo.wav") end end @@ -151,7 +151,7 @@ if CLIENT then ang:RotateAroundAxis(ang:Right(), 270) cam.Start3D2D(pos, ang, 0.01) // Canvas: width(325) height(246) - + // Draw Ping if self.startPing then for i = 0, 10 do diff --git a/entities/weapons/weapon_batesmother/cl_init.lua b/entities/weapons/weapon_batesmother/cl_init.lua new file mode 100644 index 0000000..f8031f7 --- /dev/null +++ b/entities/weapons/weapon_batesmother/cl_init.lua @@ -0,0 +1,69 @@ +-- @Author: Guilhem PECH +-- @Date: 2018-01-09 10:40:07 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-11 15:50:02 + +include("shared.lua") +SWEP.Slot = 1 +SWEP.SlotPos = 1 +SWEP.DrawAmmo = false +SWEP.DrawCrosshair = false +language.Add("Undone_batesmum", "Undone batesmum") +SWEP.Instructions = "Left click to place it on the floor" +local batesmum_holo = nil + +function SWEP:Initialize() + self.m_bInitialized = true + +end + +function SWEP:Think() + if ( not self.m_bInitialized ) then + self:Initialize() + end +end + + + +function SWEP:Holster() + +end + + +function SWEP:PrimaryAttack() + +end + +function SWEP:SecondaryAttack() +end + +function SWEP:OnRemove() + +end + +function SWEP:GetViewModelPosition(pos, ang) + pos = pos + ang:Right() * 30 + ang:Up() * -20 + ang:Forward() * 50 + ang.pitch = ang.pitch - 10 + ang.row = ang.row + 15 + if(self:Ammo1() == 0) then + return -pos, -ang + end + return pos, ang +end + +function SWEP:DrawWorldModel() + local holdType = self:GetHoldType() + if(holdType != 'normal') then + local bone = self.Owner:LookupBone("ValveBiped.Bip01_R_Hand") + if !bone then return end + local hand_pos = self.Owner:GetBonePosition(bone) + local hand_ang = Angle(-30 , self.Owner:EyeAngles().yaw - 90, 0) + hand_pos = hand_pos + hand_ang:Forward() * - 18 + hand_ang:Right() * 3 + self:SetRenderOrigin(hand_pos) + self:SetRenderAngles(hand_ang) + self:SetModelScale(0.8) + self:DrawModel() + end +end \ No newline at end of file diff --git a/entities/weapons/weapon_batesmother/init.lua b/entities/weapons/weapon_batesmother/init.lua new file mode 100644 index 0000000..b0109fb --- /dev/null +++ b/entities/weapons/weapon_batesmother/init.lua @@ -0,0 +1,59 @@ +-- @Author: Guilhem PECH +-- @Date: 2018-01-09 10:40:07 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-11 17:03:44 + +AddCSLuaFile("shared.lua") +AddCSLuaFile("cl_init.lua") +include("shared.lua") +SWEP.Weight = 5 +SWEP.AutoSwitchTo = false +SWEP.AutoSwitchFrom = false + +local GM = GAMEMODE +function SWEP:Equip(NewOwner) + NewOwner:GiveAmmo(1, "ammo_batesmum", true) +end + +function SWEP:PrimaryAttack() + if self:Ammo1() <= 0 then + self:SecondaryAttack() + return + end + + local ent = ents.Create("sls_motherbates") + local batesmum_pos, batesmum_angle = slashers_batesmum_place(self.Owner, ent) + local tracedata = {} + tracedata.start = Vector(self.Owner:GetEyeTrace().HitPos) + tracedata.endpos = Vector(self.Owner:GetEyeTrace().HitPos) + tracedata.endpos.z = tracedata.endpos.z - 5 + if self.Owner:GetPos():Distance(self.Owner:GetEyeTrace().HitPos) > self.MaxDistance or not util.TraceLine(tracedata).HitWorld or (batesmum_angle.pitch % 360) > 45 then + ent:Remove() + return + end + + ent:Spawn() + cleanup.Add(self.Owner, "props", ent) + undo.Create("sls_motherbates") + undo.AddEntity(ent) + undo.SetPlayer(self.Owner) + undo.Finish() + self.Owner:SetAmmo(self:Ammo1() - 1, "ammo_batesmum") +end + +function SWEP:Reload() +end + +function SWEP:SecondaryAttack() + local trace = self.Owner:GetEyeTrace() + if self.Owner:GetPos():Distance(trace.HitPos) < self.MaxDistance and trace.Entity:GetClass() == "sls_motherbates" then + trace.Entity:Remove() + if (GM.MAP) then + self.Owner:SetWalkSpeed(GM.MAP.Killer.WalkSpeed) + self.Owner:SetRunSpeed(GM.MAP.Killer.WalkSpeed) + end + self.Owner:GiveAmmo(1, "ammo_batesmum", true) + end +end diff --git a/entities/weapons/weapon_batesmother/shared.lua b/entities/weapons/weapon_batesmother/shared.lua new file mode 100644 index 0000000..4830840 --- /dev/null +++ b/entities/weapons/weapon_batesmother/shared.lua @@ -0,0 +1,75 @@ +-- @Author: Guilhem PECH +-- @Date: 2018-01-09 10:40:07 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-09 18:37:18 + + +SWEP.Author = "Daryl Winters" + +SWEP.Category = "Bates" + +SWEP.Spawnable = true +SWEP.AdminSpawnable = true +SWEP.AutoSwitchTo = false +SWEP.PrintName = "Mother" + +SWEP.HoldType = "duel" +SWEP.ViewModelFOV = 70 +SWEP.ViewModelFlip = false +SWEP.UseHands = false +SWEP.ViewModel = "models/skeleton/skeleton_torso.mdl" +SWEP.WorldModel = "models/props/debris/skeleton/cr_skel_pose03.mdl" +SWEP.ShowViewModel = true + + +SWEP.Primary.ClipSize = -1 +SWEP.Primary.DefaultClip = -1 +SWEP.Primary.Automatic = false +SWEP.Primary.Ammo = "ammo_batesmum" + +SWEP.Secondary.ClipSize = -1 +SWEP.Secondary.DefaultClip = -1 +SWEP.Secondary.Automatic = false +SWEP.Secondary.Ammo = "none" + +SWEP.MaxDistance = 120 + +game.AddAmmoType( { + name = "ammo_batesmum", + dmgtype = DMG_BULLET, + tracer = TRACER_LINE, + plydmg = 0, + npcdmg = 0, + force = 2000, + minsplash = 10, + maxsplash = 5 +} ) + +function SWEP:Initialize() + self:SetHoldType( self.HoldType ) +end + +function SWEP:Think( ) + local holdType = self:GetHoldType() + if (self:Ammo1() == 0 && holdType != 'normal' ) then + self:SetHoldType('normal') + return + elseif (self:Ammo1() > 0 && holdType == 'normal') then + self:SetHoldType('duel') + end +end + +function slashers_batesmum_place(ply, ent) + local batesmum_pos = ply:GetEyeTrace().HitPos + Vector(0,0,10) + local batesmum_angle = ply:GetEyeTrace().HitNormal:Angle() + + ent:SetPos(batesmum_pos) + batesmum_angle.pitch = batesmum_angle.pitch + 90 + ent:SetAngles(batesmum_angle) + + return batesmum_pos, batesmum_angle +end + + diff --git a/gamemode/cl_init.lua b/gamemode/cl_init.lua index c286fff..be1c2de 100755 --- a/gamemode/cl_init.lua +++ b/gamemode/cl_init.lua @@ -2,8 +2,8 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:45 --- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-27 17:08:44 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 include("shared.lua") include("config.lua") @@ -38,4 +38,4 @@ end function GM:DrawDeathNotice(x, y) -end \ No newline at end of file +end diff --git a/gamemode/config.lua b/gamemode/config.lua index 6bcb2fc..44181dc 100755 --- a/gamemode/config.lua +++ b/gamemode/config.lua @@ -2,34 +2,16 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:45 --- @Last Modified by: Daryl_Winters +-- @Last Modified by: Garrus2142 -- @Last Modified time: 2017-08-07T18:52:51+02:00 local GM = GM or GAMEMODE GM.CONFIG = {} -GM.CONFIG["lang_default"] = "en" - GM.CONFIG["disabled_modules"] = { -- ["goal"] = true, -- set true to disable module } --- Classe du tueur -GM.CONFIG["killer_class_map"] = { - ["slash_highschool"] = CLASS_KILL_GHOSTFACE, - ["slash_summercamp"] = CLASS_KILL_JASON, - ["slash_selvage"] = CLASS_KILL_MYERS, - ["slash_subway"] = CLASS_KILL_PROXY, - ["slash_lodge"] = CLASS_KILL_INTRUDER -} --- Musique course poursuite -GM.CONFIG["chase_musics"] = { - ["slash_highschool"] = "slashers/ambient/chase_ghostface.wav", - ["slash_summercamp"] = "slashers/ambient/chase_jason.wav", - ["slash_selvage"] = "slashers/ambient/chase_myers.wav", - ["slash_subway"] = "slashers/ambient/chase_proxy.wav", - ["slash_lodge"] = "slashers/ambient/chase_intruder.wav" -} -- Armes pour le tueur GM.CONFIG["killer_weapons"] = { "tfa_nmrih_chainsaw", @@ -43,44 +25,11 @@ GM.CONFIG["survivors_weapons"] = { } -- Points ajoutés de choosekiller ajoutés à chaque manche terminée GM.CONFIG["round_choosekiller_add"] = 10 --- Joueurs néscessaire pour démarrer une manche -GM.CONFIG["round_min_player"] = 3 --- Temps avant de démarrer une manche (secondes) -GM.CONFIG["round_timer_start"] = 10 -- Temps de démarrage de la manche (secondes) GM.CONFIG["round_freeze_start"] = 10 --- Durée initiale de la manche (secondes) -GM.CONFIG["round_duration_base"] = 67.5 --- Durée ajouté par survivant (secondes) -GM.CONFIG["round_duration_add"] = 52.5 --- Durée ajouté par objectifs atteints -GM.CONFIG["round_duration_add_obj"] = 120 -- Durée d'attente lors d'une fin de manche GM.CONFIG["round_duration_end"] = 30 --- Nombre de manche avant de changer de carte -GM.CONFIG["round_count_nextmap"] = 5 --- Musique de start -GM.CONFIG["round_start_music"] = { - ["slash_highschool"] = "slashers_start_game_ghostface.wav", - ["slash_summercamp"] = "slashers_start_game_jason.wav", - ["slash_selvage"] = "slashers_start_game_myers.wav", - ["slash_subway"] = "slashers_start_game_proxy.wav", - ["slash_lodge"] = "slasher_start_game_intruder.wav" -} - --- Durée d'attente avant l'arrivée de la police base -GM.CONFIG["round_duration_waitingpolice_base"] = 32.5 --- Durée ajouté par survivant pour l'arrivée de la police (secondes) -GM.CONFIG["round_duration_waitingpolice_add"] = 22.5 --- Durée de la manche évacuation (secondes) -GM.CONFIG["round_duration_escape"] = { - ["slash_highschool"] = 60, - ["slash_summercamp"] = 90, - ["slash_subway"] = 90, - ["slash_selvage"] = 60, - ["slash_lodge"] = 60 -} -- Entités Killerhelp porte GM.CONFIG["killerhelp_door_entities"] = { "prop_door_rotating", @@ -95,21 +44,3 @@ GM.CONFIG["killerhelp_exit_entities"] = { "door_exit_3", "door_exit_4" } --- Durée icones porte -GM.CONFIG["killerhelp_door_duration"] = 3 --- Durée trace de pas -GM.CONFIG["killerhelp_step_duration"] = 30 - --- Custom added maps -GM.CONFIG["custom_maps"] = { - -- "gm_construct.bsp", - -- "gm_flatgrass.bsp" -} - --- Mayers ability cooldown -GM.CONFIG["myers_cooldown"] = 10 -GM.CONFIG["myers_abilitytime"] = 10 - --- Ghostface radius ability - -GM.CONFIG["ghostface_ability_radius"] = 200 -- 0 for unlimited diff --git a/gamemode/core/_includes.lua b/gamemode/core/_includes.lua index cc22e82..f55adf6 100755 --- a/gamemode/core/_includes.lua +++ b/gamemode/core/_includes.lua @@ -2,13 +2,19 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:45 --- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-27 13:32:59 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 if SERVER then + -- Convars + include("convars.lua") + AddCSLuaFile("convars.lua") -- Language include("lang/sv_lang.lua") AddCSLuaFile("lang/cl_lang.lua") + -- Maps loader + include("mapsloader.lua") + AddCSLuaFile("mapsloader.lua") -- Fonts AddCSLuaFile("fonts.lua") -- Format @@ -40,8 +46,12 @@ if SERVER then -- Slot CheckPassword include ("slot/sv_slotcheck.lua") else + -- Convars + include("convars.lua") -- Language include("lang/cl_lang.lua") + -- Maps loader + include("mapsloader.lua") -- Fonts include("fonts.lua") -- Format diff --git a/gamemode/core/class/cl_class.lua b/gamemode/core/class/cl_class.lua index 0c33054..d211594 100755 --- a/gamemode/core/class/cl_class.lua +++ b/gamemode/core/class/cl_class.lua @@ -3,13 +3,14 @@ -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:46 -- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-26 14:45:21 +-- @Last Modified time: 2017-08-09T14:10:02+02:00 local GM = GM or GAMEMODE local scrw, scrh = ScrW(), ScrH() local ICON_CROSS = Material("icons/icon_cross.png") local ICON_SAFE = Material("icons/icon_safe.png") local ICON_KEYS = Material("icons/icon_keys.png") +local FIRST local function DrawHUDSurvivor() surface.SetDrawColor(Color(255, 255, 255, 255)) @@ -21,18 +22,18 @@ local function DrawHUDBlack(numberKeyToDispach) while numberKeyToDispach > 0 do surface.SetMaterial(ICON_KEYS) surface.DrawTexturedRect(scrw - ((64 + 20) * numberKeyToDispach), scrh - 84, 64, 64) - numberKeyToDispach = numberKeyToDispach - 1 + numberKeyToDispach = numberKeyToDispach - 1 end end local function DrawHUDKiller() surface.SetDrawColor(Color(255, 255, 255, 255)) - surface.SetMaterial(GM.CLASS.Killers[LocalPlayer().ClassID].icon) + surface.SetMaterial(GM.MAP.Killer.Icon) surface.DrawTexturedRect(20, scrh - 84, 64, 64) for k, v in ipairs(GM.ROUND.Survivors) do if !GM.CLASS.Survivors[v.ClassID] then continue end - + surface.SetMaterial(GM.CLASS.Survivors[v.ClassID].icon) surface.DrawTexturedRect(scrw - ((64 + 20) * k), scrh - 84, 64, 64) if !v:Alive() then @@ -46,17 +47,17 @@ local function HUDPaint() if !IsValid(LocalPlayer()) then return end if !GM.ROUND.Active then return end if !LocalPlayer().ClassID then return end - + if LocalPlayer():Team() == TEAM_SURVIVORS && GM.CLASS.Survivors[LocalPlayer().ClassID] then DrawHUDSurvivor() - if GM.CLASS.Survivors[LocalPlayer().ClassID].name == "Black" then - if FISRT then + if LocalPlayer().ClassID == CLASS_SURV_BLACK then + if FIRST then GM.CLASS.Survivors[LocalPlayer().ClassID].keysNumber = 3 FIRST = false - end + end DrawHUDBlack(GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].keysNumber) end - elseif LocalPlayer():Team() == TEAM_KILLER && GM.CLASS.Killers[LocalPlayer().ClassID] then + elseif LocalPlayer():Team() == TEAM_KILLER then DrawHUDKiller() end end @@ -69,50 +70,14 @@ local function getUseKey() while input.LookupKeyBinding( cpt ) != "+use" && cpt < 159 do cpt = cpt + 1 end - - if cpt > KEY_Z then - if cpt == KEY_ENTER or cpt == KEY_PAD_ENTER then - return "L" - else - return ">" - end - else - return input.GetKeyName( cpt ) - end -end -local usekey = getUseKey() - -local function DrawIndicator(ent) - - - local name = string.Explode( " ", ent.PrintName )[1] - local description = ent.Information - - local x = ent:GetPos().x + ent:OBBCenter().x //Get the X position of our player - local y = ent:GetPos().y + ent:OBBCenter().y //Get the Y position of our player - local z = ent:GetPos().z + ent:OBBCenter().z //Get the Z position of our player - local zOffset = 0 - - - local pos = Vector(x,y,z+zOffset) - local pos2d = pos:ToScreen() //Change the 3D vector to a 2D one - local TitleSize = draw.GetFontHeight( "Bohemian typewriter STITLE" ) - local KeySize = draw.GetFontHeight( "KeyboardFont" ) - -- local usekey = input.LookupKeyBinding( KEY_E ) - draw.DrawText(name,"Bohemian typewriter STITLE",pos2d.x,pos2d.y,Color(255,0,0,255),TEXT_ALIGN_CENTER) - draw.DrawText(usekey.." ","KeyboardFont",pos2d.x ,pos2d.y + TitleSize + 10,Color(255,255,255,255),TEXT_ALIGN_CENTER) - draw.DrawText(description,"Bohemian typewriter SA",pos2d.x + 5, pos2d.y + TitleSize + 10 ,Color(255,255,255,255),TEXT_ALIGN_CENTER) -end - -local function Indicator() - - local SlasherEntities = ents.FindByClass( "sls_*" ) - for k,v in pairs(SlasherEntities) do - if LocalPlayer():IsLineOfSightClear( v ) and v:GetPos():Distance( LocalPlayer():GetPos()) < 150 and LocalPlayer():Team() != TEAM_KILLER and v:IsValid() then - DrawIndicator(v) + if cpt > KEY_Z then + if cpt == KEY_ENTER or cpt == KEY_PAD_ENTER then + return "L" + else + return ">" end + else + return input.GetKeyName( cpt ) end - end -hook.Add("HUDPaint", "EntityHUD", Indicator) \ No newline at end of file diff --git a/gamemode/core/class/sh_class.lua b/gamemode/core/class/sh_class.lua index 981370c..3de7834 100755 --- a/gamemode/core/class/sh_class.lua +++ b/gamemode/core/class/sh_class.lua @@ -3,7 +3,7 @@ -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:46 -- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-07T17:43:02+02:00 +-- @Last Modified time: 2017-08-10T14:33:00+02:00 local GM = GM or GAMEMODE @@ -12,6 +12,7 @@ GM.CLASS.Survivors = {} GM.CLASS.Killers = {} GM.CLASS.Survivors[CLASS_SURV_SPORTS] = {} +GM.CLASS.Survivors[CLASS_SURV_SPORTS].name = "Sports" GM.CLASS.Survivors[CLASS_SURV_SPORTS].walkspeed = 150 GM.CLASS.Survivors[CLASS_SURV_SPORTS].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_SPORTS].life = 120 @@ -20,13 +21,13 @@ GM.CLASS.Survivors[CLASS_SURV_SPORTS].model = "models/steinman/slashers/sport_pm GM.CLASS.Survivors[CLASS_SURV_SPORTS].die_sound = "slashers/effects/scream_man_1.wav" GM.CLASS.Survivors[CLASS_SURV_SPORTS].weapons = {} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_SPORTS].name = "Sports" GM.CLASS.Survivors[CLASS_SURV_SPORTS].dispname = "Trent" GM.CLASS.Survivors[CLASS_SURV_SPORTS].description = GM.LANG:GetString("class_desc_sports") GM.CLASS.Survivors[CLASS_SURV_SPORTS].icon = Material("icons/icon_sportif.png") end GM.CLASS.Survivors[CLASS_SURV_POPULAR] = {} +GM.CLASS.Survivors[CLASS_SURV_POPULAR].name = "Popular girl" GM.CLASS.Survivors[CLASS_SURV_POPULAR].walkspeed = 160 GM.CLASS.Survivors[CLASS_SURV_POPULAR].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_POPULAR].life = 80 @@ -35,13 +36,13 @@ GM.CLASS.Survivors[CLASS_SURV_POPULAR].model = "models/steinman/slashers/popular GM.CLASS.Survivors[CLASS_SURV_POPULAR].die_sound = "slashers/effects/scream_girl_1.wav" GM.CLASS.Survivors[CLASS_SURV_POPULAR].weapons = {} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_POPULAR].name = "Popular girl" GM.CLASS.Survivors[CLASS_SURV_POPULAR].dispname = "Lynda" GM.CLASS.Survivors[CLASS_SURV_POPULAR].description = GM.LANG:GetString("class_desc_popular") GM.CLASS.Survivors[CLASS_SURV_POPULAR].icon = Material("icons/icon_popular.png") end GM.CLASS.Survivors[CLASS_SURV_NERD] = {} +GM.CLASS.Survivors[CLASS_SURV_NERD].name = "Nerd" GM.CLASS.Survivors[CLASS_SURV_NERD].walkspeed = 130 GM.CLASS.Survivors[CLASS_SURV_NERD].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_NERD].life = 100 @@ -50,13 +51,13 @@ GM.CLASS.Survivors[CLASS_SURV_NERD].model = "models/steinman/slashers/nerd_pm.md GM.CLASS.Survivors[CLASS_SURV_NERD].die_sound = "slashers/effects/scream_man_1.wav" GM.CLASS.Survivors[CLASS_SURV_NERD].weapons = {"tim_detector"} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_NERD].name = "Nerd" GM.CLASS.Survivors[CLASS_SURV_NERD].dispname = "Noah" GM.CLASS.Survivors[CLASS_SURV_NERD].description = GM.LANG:GetString("class_desc_nerd") GM.CLASS.Survivors[CLASS_SURV_NERD].icon = Material("icons/icon_nerd.png") end GM.CLASS.Survivors[CLASS_SURV_FAT] = {} +GM.CLASS.Survivors[CLASS_SURV_FAT].name = "Fat boy" GM.CLASS.Survivors[CLASS_SURV_FAT].walkspeed = 130 GM.CLASS.Survivors[CLASS_SURV_FAT].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_FAT].life = 180 @@ -65,13 +66,13 @@ GM.CLASS.Survivors[CLASS_SURV_FAT].model = "models/steinman/slashers/fat_pm.mdl" GM.CLASS.Survivors[CLASS_SURV_FAT].die_sound = "slashers/effects/scream_man_1.wav" GM.CLASS.Survivors[CLASS_SURV_FAT].weapons = {} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_FAT].name = "Fat boy" GM.CLASS.Survivors[CLASS_SURV_FAT].dispname = "Franklin" GM.CLASS.Survivors[CLASS_SURV_FAT].description = GM.LANG:GetString("class_desc_fat") GM.CLASS.Survivors[CLASS_SURV_FAT].icon = Material("icons/icon_fat.png") end GM.CLASS.Survivors[CLASS_SURV_SHY] = {} +GM.CLASS.Survivors[CLASS_SURV_SHY].name = "Shy girl" GM.CLASS.Survivors[CLASS_SURV_SHY].walkspeed = 140 GM.CLASS.Survivors[CLASS_SURV_SHY].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_SHY].life = 60 @@ -80,13 +81,13 @@ GM.CLASS.Survivors[CLASS_SURV_SHY].model = "models/player/korka007/maxc.mdl" GM.CLASS.Survivors[CLASS_SURV_SHY].die_sound = "slashers/effects/scream_girl_1.wav" GM.CLASS.Survivors[CLASS_SURV_SHY].weapons = {} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_SHY].name = "Shy girl" GM.CLASS.Survivors[CLASS_SURV_SHY].dispname = "Sydney" GM.CLASS.Survivors[CLASS_SURV_SHY].description = GM.LANG:GetString("class_desc_shy") GM.CLASS.Survivors[CLASS_SURV_SHY].icon = Material("icons/icon_shy.png") end GM.CLASS.Survivors[CLASS_SURV_JUNKY] = {} +GM.CLASS.Survivors[CLASS_SURV_JUNKY].name = "Junky" GM.CLASS.Survivors[CLASS_SURV_JUNKY].walkspeed = 130 GM.CLASS.Survivors[CLASS_SURV_JUNKY].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_JUNKY].life = 110 @@ -102,6 +103,7 @@ if CLIENT then end GM.CLASS.Survivors[CLASS_SURV_EMO] = {} +GM.CLASS.Survivors[CLASS_SURV_EMO].name = "Emo" GM.CLASS.Survivors[CLASS_SURV_EMO].walkspeed = 130 GM.CLASS.Survivors[CLASS_SURV_EMO].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_EMO].life = 110 @@ -110,13 +112,13 @@ GM.CLASS.Survivors[CLASS_SURV_EMO].model = "models/steinman/slashers/emo_pm.mdl" GM.CLASS.Survivors[CLASS_SURV_EMO].die_sound = "slashers/effects/scream_girl_1.wav" GM.CLASS.Survivors[CLASS_SURV_EMO].weapons = {} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_EMO].name = "Emo" GM.CLASS.Survivors[CLASS_SURV_EMO].dispname = "Audrey" GM.CLASS.Survivors[CLASS_SURV_EMO].description = GM.LANG:GetString("class_desc_emo") GM.CLASS.Survivors[CLASS_SURV_EMO].icon = Material("icons/icon_emo.png") end GM.CLASS.Survivors[CLASS_SURV_BLACK] = {} +GM.CLASS.Survivors[CLASS_SURV_BLACK].name = "Black" GM.CLASS.Survivors[CLASS_SURV_BLACK].walkspeed = 140 GM.CLASS.Survivors[CLASS_SURV_BLACK].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_BLACK].life = 120 @@ -126,13 +128,13 @@ GM.CLASS.Survivors[CLASS_SURV_BLACK].die_sound = "slashers/effects/scream_man_1. GM.CLASS.Survivors[CLASS_SURV_BLACK].weapons = {"weapon_keys"} GM.CLASS.Survivors[CLASS_SURV_BLACK].keysNumber = 3 if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_BLACK].name = "Black" GM.CLASS.Survivors[CLASS_SURV_BLACK].dispname = "Roland" GM.CLASS.Survivors[CLASS_SURV_BLACK].description = GM.LANG:GetString("class_desc_black") GM.CLASS.Survivors[CLASS_SURV_BLACK].icon = Material("icons/icon_black.png") end GM.CLASS.Survivors[CLASS_SURV_SHERIF] = {} +GM.CLASS.Survivors[CLASS_SURV_SHERIF].name = "Sherif" GM.CLASS.Survivors[CLASS_SURV_SHERIF].walkspeed = 150 GM.CLASS.Survivors[CLASS_SURV_SHERIF].runspeed = 240 GM.CLASS.Survivors[CLASS_SURV_SHERIF].life = 130 @@ -141,66 +143,14 @@ GM.CLASS.Survivors[CLASS_SURV_SHERIF].model = "models/steinman/slashers/sheriff_ GM.CLASS.Survivors[CLASS_SURV_SHERIF].die_sound = "slashers/effects/scream_girl_1.wav" GM.CLASS.Survivors[CLASS_SURV_SHERIF].weapons = {"stun_gun"} if CLIENT then - GM.CLASS.Survivors[CLASS_SURV_SHERIF].name = "Sherif" GM.CLASS.Survivors[CLASS_SURV_SHERIF].dispname = "Gale" GM.CLASS.Survivors[CLASS_SURV_SHERIF].description = GM.LANG:GetString("class_desc_sherif") GM.CLASS.Survivors[CLASS_SURV_SHERIF].icon = Material("icons/icon_sherif.png") end -GM.CLASS.Killers[CLASS_KILL_JASON] = {} -GM.CLASS.Killers[CLASS_KILL_JASON].walkspeed = 190 -GM.CLASS.Killers[CLASS_KILL_JASON].runspeed = 240 -GM.CLASS.Killers[CLASS_KILL_JASON].model = "models/player/mkx_jason.mdl" -if CLIENT then - GM.CLASS.Killers[CLASS_KILL_JASON].name = "Jason" - GM.CLASS.Killers[CLASS_KILL_JASON].description = GM.LANG:GetString("class_desc_jason") - GM.CLASS.Killers[CLASS_KILL_JASON].icon = Material("icons/icon_jason.png") -end - -GM.CLASS.Killers[CLASS_KILL_GHOSTFACE] = {} -GM.CLASS.Killers[CLASS_KILL_GHOSTFACE].walkspeed = 190 -GM.CLASS.Killers[CLASS_KILL_GHOSTFACE].runspeed = 240 -GM.CLASS.Killers[CLASS_KILL_GHOSTFACE].model = "models/player/screamplayermodel/scream/scream.mdl" -if CLIENT then - GM.CLASS.Killers[CLASS_KILL_GHOSTFACE].name = "Ghostface" - GM.CLASS.Killers[CLASS_KILL_GHOSTFACE].description = GM.LANG:GetString("class_desc_ghostface") - GM.CLASS.Killers[CLASS_KILL_GHOSTFACE].icon = Material("icons/icon_ghostface.png") -end - -GM.CLASS.Killers[CLASS_KILL_MYERS] = {} -GM.CLASS.Killers[CLASS_KILL_MYERS].walkspeed = 200 -GM.CLASS.Killers[CLASS_KILL_MYERS].runspeed = 200 -GM.CLASS.Killers[CLASS_KILL_MYERS].model = "models/player/dewobedil/mike_myers/default_p.mdl" -if CLIENT then - GM.CLASS.Killers[CLASS_KILL_MYERS].name = "Michael Myers" - GM.CLASS.Killers[CLASS_KILL_MYERS].description = GM.LANG:GetString("class_desc_myers") - GM.CLASS.Killers[CLASS_KILL_MYERS].icon = Material("icons/icon_myers.png") -end - -GM.CLASS.Killers[CLASS_KILL_PROXY] = {} -GM.CLASS.Killers[CLASS_KILL_PROXY].walkspeed = 200 -GM.CLASS.Killers[CLASS_KILL_PROXY].runspeed = 200 -GM.CLASS.Killers[CLASS_KILL_PROXY].model = "models/slender_arrival/chaser.mdl" -if CLIENT then - GM.CLASS.Killers[CLASS_KILL_PROXY].name = "the Proxy" - GM.CLASS.Killers[CLASS_KILL_PROXY].description = GM.LANG:GetString("class_desc_proxy") - GM.CLASS.Killers[CLASS_KILL_PROXY].icon = Material("icons/icon_proxy.png") -end - -GM.CLASS.Killers[CLASS_KILL_INTRUDER] = {} -GM.CLASS.Killers[CLASS_KILL_INTRUDER].walkspeed = 200 -GM.CLASS.Killers[CLASS_KILL_INTRUDER].runspeed = 200 -GM.CLASS.Killers[CLASS_KILL_INTRUDER].model = "models/steinman/slashers/intruder_pm.mdl" -GM.CLASS.Killers[CLASS_KILL_INTRUDER].weapons = {"weapon_beartrap", "weapon_alertropes", "weapon_dooraxe"} -if CLIENT then - GM.CLASS.Killers[CLASS_KILL_INTRUDER].name = "the Intruder" - GM.CLASS.Killers[CLASS_KILL_INTRUDER].description = GM.LANG:GetString("class_desc_intruder") - GM.CLASS.Killers[CLASS_KILL_INTRUDER].icon = Material("icons/icon_intruder.png") -end - local function StartRound() for _, v in ipairs(player.GetAll()) do v.ClassID = nil end end -hook.Add("sls_round_PreStart", "sls_class_PreStart", StartRound) +hook.Add("sls_round_PreStart", "sls_class_PreStart", StartRound) \ No newline at end of file diff --git a/gamemode/core/class/sv_class.lua b/gamemode/core/class/sv_class.lua index ddeabf0..78dfcc6 100755 --- a/gamemode/core/class/sv_class.lua +++ b/gamemode/core/class/sv_class.lua @@ -17,7 +17,7 @@ function playermeta:SetSurvClass(class) self:SetTeam(TEAM_SURVIVORS) self:AllowFlashlight(false) self:SetNoCollideWithTeammates(true) - if GM.CLASS.Survivors[class].model then + if GM.CLASS.Survivors[class].model then self:SetModel(GM.CLASS.Survivors[class].model) else self:SetModel("models/player/eli.mdl") @@ -32,6 +32,7 @@ function playermeta:SetSurvClass(class) self:SetWalkSpeed(GM.CLASS.Survivors[class].walkspeed) self:SetRunSpeed(GM.CLASS.Survivors[class].runspeed) self:SetMaxHealth(GM.CLASS.Survivors[class].life) + self:SetHealth(GM.CLASS.Survivors[class].life) self:GodDisable() --self:SetNWInt("ClassID", class) self.ClassID = class @@ -39,30 +40,27 @@ end -function playermeta:SetKillClass(class) - if !GM.CLASS.Killers[class] then return false end - +function playermeta:SetupKiller() self:StripWeapons() self:SetTeam(TEAM_KILLER) self:AllowFlashlight(false) self.InitialWeapon = table.Random(GM.CONFIG["killer_weapons"]) self:Give(self.InitialWeapon) self:SetNoCollideWithTeammates(false) - self:SetModel(GM.CLASS.Killers[class].model) + self:SetModel(GM.MAP.Killer.Model) self:SetupHands() - if GM.CLASS.Killers[class].weapons then - for _, v in ipairs(GM.CLASS.Killers[class].weapons) do + if GM.MAP.Killer.ExtraWeapons then + for _, v in ipairs(GM.MAP.Killer.ExtraWeapons) do self:Give(v) end end - self:SetWalkSpeed(GM.CLASS.Killers[class].walkspeed) - self:SetRunSpeed(GM.CLASS.Killers[class].runspeed) - self:SetMaxHealth(GM.CLASS.Killers[class].life) + self:SetWalkSpeed(GM.MAP.Killer.WalkSpeed) + self:SetRunSpeed(GM.MAP.Killer.RunSpeed) + self:SetMaxHealth(100) self:GodEnable() - -- self:SetNWInt("ClassID", class) - self.ClassID = class + self.ClassID = CLASS_KILLER end function GM.CLASS:SetupSurvivors() @@ -93,4 +91,4 @@ local function PlayerShouldTakeDamage(ply, attacker) return false end end -hook.Add("PlayerShouldTakeDamage", "sls_class_PlayerShouldTakeDamage", PlayerShouldTakeDamage) \ No newline at end of file +hook.Add("PlayerShouldTakeDamage", "sls_class_PlayerShouldTakeDamage", PlayerShouldTakeDamage) diff --git a/gamemode/core/convars.lua b/gamemode/core/convars.lua new file mode 100644 index 0000000..2179b7b --- /dev/null +++ b/gamemode/core/convars.lua @@ -0,0 +1,16 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-09 23:19:12 +-- @Last Modified by: Garrus2142 +-- @Last Modified time: 2017-08-09 23:19:12 + + +CreateConVar("slashers_lang_default", "en", {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set default language of gamemode.") +CreateConVar("slashers_round_min_player", 3, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set minimum players required to start a round.") +CreateConVar("slashers_duration_base", 67.5, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Initial round duration. (in seconds)") +CreateConVar("slashers_duration_addsurv", 52.5, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Added duration per each survivors. (in seconds)") +CreateConVar("slashers_duration_addobj", 120, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Added duration per each objective completed. (in seconds)") +CreateConVar("slashers_duration_waitingpolice_base", 32.5, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Initial duration before police arrived. (in seconds)") +CreateConVar("slashers_duration_waitingpolice_addsurv", 22.5, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Added duration per each survivors before police arrived. (in seconds)") +CreateConVar("slashers_round_max", 5, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Max round before change map.") diff --git a/gamemode/core/lang/cl_lang.lua b/gamemode/core/lang/cl_lang.lua index 3a119c8..7a09877 100644 --- a/gamemode/core/lang/cl_lang.lua +++ b/gamemode/core/lang/cl_lang.lua @@ -2,7 +2,7 @@ -- -- @Author: Garrus2142 -- @Date: 2017-08-01 17:14:14 --- @Last Modified by: +-- @Last Modified by: Garrus2142 -- @Last Modified time: 2017-08-01 17:14:14 local GM = GM or GAMEMODE @@ -18,7 +18,7 @@ local function LoadLanguage(lang) local languagesPath = "slashers/gamemode/languages" local files, _ = file.Find(languagesPath .. "/*.lua", "LUA") - LANG = include(languagesPath .. "/" .. GM.CONFIG["lang_default"] .. ".lua") + LANG = include(languagesPath .. "/" .. GetConVar("slashers_lang_default"):GetString() .. ".lua") for _, v in ipairs(files) do if v == lang .. ".lua" then diff --git a/gamemode/core/mapsloader.lua b/gamemode/core/mapsloader.lua new file mode 100644 index 0000000..4941b75 --- /dev/null +++ b/gamemode/core/mapsloader.lua @@ -0,0 +1,84 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-07T19:23:20+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 + +local GM = GM or GAMEMODE + +local currentMap = game.GetMap() +local mapsLuaPath = "slashers/gamemode/maps" +local mapsLua = file.Find(mapsLuaPath .. "/*.lua", "LUA") +local mapsPath = "maps/" +local maps = file.Find(mapsPath .. "/*.bsp", "GAME") + +GM.MAPS = {} +GM.MAP = {} +GM.MAP.Killer = {} + +function GM.MAP.Killer:UseAbility( ply ) end + +-- Get list of valid maps +for _, v in ipairs(mapsLua) do + if table.HasValue(maps, string.StripExtension(v) .. ".bsp") then + table.insert(GM.MAPS, string.StripExtension(v)) + end +end + + +local function loadMapsData() + if SERVER then + util.AddNetworkString("sls_mapsloader_useability") + + if !table.HasValue(GM.MAPS, game.GetMap()) then + timer.Create("sls_error_map", 5, 0, function() + print("ERROR: The current map isn't supported by gamemode.") + end) + else + print("Loading Slashers map data " .. game.GetMap()) + AddCSLuaFile(mapsLuaPath .. "/" .. game.GetMap() .. ".lua") + include(mapsLuaPath .. "/" .. game.GetMap() .. ".lua") + end + else + + if !table.HasValue(GM.MAPS, game.GetMap()) then + timer.Create("sls_error_map", 5, 0, function() + print("ERROR: The current map isn't supported by gamemode.") + end) + else + print("Loading Slashers map data " .. game.GetMap()) + include(mapsLuaPath .. "/" .. game.GetMap() .. ".lua") + end + end +end +hook.Add("PostGamemodeLoaded","sls_mapsloadData",loadMapsData) + +if SERVER then + + local function UseAbility(len, ply) + GM.MAP.Killer:UseAbility( ply ) + end + net.Receive("sls_mapsloader_UseAbility", UseAbility) + +else + + local function getMenuKey() + local cpt = 0 + while input.LookupKeyBinding( cpt ) != "+menu" && cpt < 159 do + cpt = cpt + 1 + end + return cpt + end + + local function PlayerButtonDown(ply, button) + if !IsFirstTimePredicted() then return end + + if GM.ROUND.Active && ply:Team() == TEAM_KILLER && button == getMenuKey() then + net.Start("sls_mapsloader_useability") + net.SendToServer() + GM.MAP.Killer:UseAbility( ply ) + end + end + hook.Add("PlayerButtonDown", "sls_mapsloader_PlayerButtonDown", PlayerButtonDown) +end diff --git a/gamemode/core/notification/cl_notification.lua b/gamemode/core/notification/cl_notification.lua index 1936aca..cb00eab 100755 --- a/gamemode/core/notification/cl_notification.lua +++ b/gamemode/core/notification/cl_notification.lua @@ -36,7 +36,7 @@ function notificationPanel(notifText,notificationType) BackGroundPanel:SetSize( 512, 128 ) BackGroundPanel:AlignBottom(-128) BackGroundPanel:AlignRight(250) - BackGroundPanel:SetDrawBackground( false ) + BackGroundPanel:SetPaintBackground( false ) BackGroundPanel:SetTerm( 4.7 ) if (!CounterActiveNotif || CounterActiveNotif == 0) then CounterActiveNotif = 1 diff --git a/gamemode/core/rounds/cl_rounds.lua b/gamemode/core/rounds/cl_rounds.lua index 29cad15..6c37c29 100755 --- a/gamemode/core/rounds/cl_rounds.lua +++ b/gamemode/core/rounds/cl_rounds.lua @@ -32,7 +32,7 @@ local function HUDPaint() -- Waiting for player if GM.ROUND.WaitingPlayers then - local text = GM.LANG:GetString("round_wait_players", #player.GetAll(), GM.CONFIG["round_min_player"]) + local text = GM.LANG:GetString("round_wait_players", #player.GetAll(), GetConVar("slashers_round_min_player"):GetInt()) surface.SetFont("horror1") local tw = surface.GetTextSize(text) surface.SetTextColor(Color(255, 255, 255)) @@ -46,7 +46,6 @@ hook.Add("HUDPaint", "sls_round_HUDPaint", HUDPaint) local function PostStart() ShowTitle("SLASHERS",4) timer.Simple(4, function() - local TeamName local TeamText local ImageCharac @@ -57,15 +56,15 @@ local function PostStart() TeamName = GM.LANG:GetString("round_team_name_survivor") TeamText = GM.LANG:GetString("round_team_desc_survivor") - ImageCharac = "/characteres/"..string.lower(GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].name)..".png" + ImageCharac = "materials/characteres/"..string.lower(GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].name)..".png" CharacName = GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].dispname CharacText = GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].description elseif LocalPlayer():Team() == TEAM_KILLER then TeamName = GM.LANG:GetString("round_team_name_killer") TeamText = GM.LANG:GetString("round_team_desc_killer") - ImageCharac = "/characteres/"..string.lower(GAMEMODE.CLASS.Killers[LocalPlayer().ClassID].name)..".png" - CharacName = GAMEMODE.CLASS.Killers[LocalPlayer().ClassID].name - CharacText = GAMEMODE.CLASS.Killers[LocalPlayer().ClassID].description + ImageCharac = "materials/characteres/"..string.lower(GAMEMODE.MAP.Killer.Name)..".png" + CharacName = GAMEMODE.MAP.Killer.Name + CharacText = GAMEMODE.MAP.Killer.Desc end ShowPlayerScreen(TeamName,TeamText,CharacName,CharacText,ImageCharac,GM.CONFIG["round_freeze_start"]-3) diff --git a/gamemode/core/rounds/sh_rounds.lua b/gamemode/core/rounds/sh_rounds.lua index 3eb674e..8253c0b 100755 --- a/gamemode/core/rounds/sh_rounds.lua +++ b/gamemode/core/rounds/sh_rounds.lua @@ -2,8 +2,8 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:47 --- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-26 14:45:38 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-09T17:20:35+02:00 local GM = GM or GAMEMODE @@ -25,4 +25,15 @@ function GM.ROUND:GetSurvivorsAlive() end end return alive -end \ No newline at end of file +end + +function getSurvivorByClass(class) + if GM.ROUND.Survivors then + for _, v in ipairs(GM.ROUND.Survivors) do + if IsValid(v) && v:Alive() && v.ClassID == class then + return v + end + end + end + return nil +end diff --git a/gamemode/core/rounds/sv_rounds.lua b/gamemode/core/rounds/sv_rounds.lua index 2fc7961..56b788d 100755 --- a/gamemode/core/rounds/sv_rounds.lua +++ b/gamemode/core/rounds/sv_rounds.lua @@ -3,7 +3,7 @@ -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:48 -- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-06T10:19:06+02:00 +-- @Last Modified time: 2017-08-10T15:08:45+02:00 local GM = GM or GAMEMODE local MAPS_LIST @@ -50,7 +50,7 @@ function GM.ROUND:Start(forceKiller) playersCount = playersCount + 1 end end - if playersCount < GM.CONFIG["round_min_player"] then + if playersCount < GetConVar("slashers_round_min_player"):GetInt() then GM.ROUND.WaitingPlayers = true net.Start("sls_round_WaitingPlayers") net.WriteBool(true) @@ -95,7 +95,7 @@ function GM.ROUND:Start(forceKiller) if IsValid(GM.ROUND.Killer) then GM.ROUND.Killer:Spawn() - GM.ROUND.Killer:SetKillClass(GM.CONFIG["killer_class_map"][game.GetMap()]) + GM.ROUND.Killer:SetupKiller() GM.ROUND.Killer:SetPos(table.Random(ents.FindByClass("info_player_terrorist")):GetPos()) GM.ROUND.Killer:Freeze(true) GM.ROUND.Killer:ScreenFade(SCREENFADE.IN, Color(0, 0, 0), 2, GM.CONFIG["round_freeze_start"] - 2) @@ -106,7 +106,7 @@ function GM.ROUND:Start(forceKiller) GM.ROUND.Active = true GM.ROUND.Count = GM.ROUND.Count + 1 - GM.ROUND.EndTime = CurTime() + GM.CONFIG["round_freeze_start"] + GM.CONFIG["round_duration_base"] + (#GM.ROUND.Survivors * GM.CONFIG["round_duration_add"]) + GM.ROUND.EndTime = CurTime() + GM.CONFIG["round_freeze_start"] + GetConVar("slashers_duration_base"):GetFloat() + (#GM.ROUND.Survivors * GetConVar("slashers_duration_addsurv"):GetFloat()) hook.Run("sls_round_PostStart") net.Start("sls_round_PostStart") @@ -130,13 +130,13 @@ function GM.ROUND:Start(forceKiller) end ) - print("Start round " .. GM.ROUND.Count .. "/" .. GM.CONFIG["round_count_nextmap"]) + print("Start round " .. GM.ROUND.Count .. "/" .. GetConVar("slashers_round_max"):GetInt()) end function GM.ROUND:StartWaitingPolice() GM.ROUND.WaitingPolice = true - GM.ROUND.EndTime = CurTime() + GM.CONFIG["round_freeze_start"] + GM.CONFIG["round_duration_waitingpolice_base"] + - (#GM.ROUND:GetSurvivorsAlive() * GM.CONFIG["round_duration_waitingpolice_add"]) + GM.ROUND.EndTime = CurTime() + GM.CONFIG["round_freeze_start"] + GetConVar("slashers_duration_waitingpolice_base"):GetFloat() + + (#GM.ROUND:GetSurvivorsAlive() * GetConVar("slashers_duration_waitingpolice_addsurv"):GetFloat()) hook.Run("sls_round_StartWaitingPolice") net.Start("sls_round_StartWaitingPolice") @@ -148,7 +148,7 @@ function GM.ROUND:StartEscape() objectifComplete() GM.ROUND.WaitingPolice = false GM.ROUND.Escape = true - GM.ROUND.EndTime = CurTime() + (GM.CONFIG["round_duration_escape"][game.GetMap()] or 60) + GM.ROUND.EndTime = CurTime() + (GM.MAP.EscapeDuration or 60) -- Button escape GM.ROUND.EscapeButton = table.Random(ents.FindByName("button_escape")) @@ -192,7 +192,7 @@ function GM.ROUND:End(nowin) GM.ROUND.EndTime = nil GM.ROUND.NextStart = CurTime() + (nowin and 8 or GM.CONFIG["round_duration_end"]) - if #player.GetAll() < GM.CONFIG["round_min_player"] then + if #player.GetAll() < GetConVar("slashers_round_min_player"):GetInt() then GM.ROUND.WaitingPlayers = true net.Start("sls_round_WaitingPlayers") net.WriteBool(true) @@ -281,10 +281,10 @@ local function Think() end -- Check NextMap - if !GM.ROUND.Active && GM.ROUND.NextStart && curtime >= GM.ROUND.NextStart && GM.ROUND.Count >= GM.CONFIG["round_count_nextmap"] && GM.CONFIG["disabled_modules"]["votemap"] then - local mapindex = table.KeyFromValue(MAPS_LIST, game.GetMap()) + if !GM.ROUND.Active && GM.ROUND.NextStart && curtime >= GM.ROUND.NextStart && GM.ROUND.Count >= GetConVar("slashers_round_max"):GetInt() && GM.CONFIG["disabled_modules"]["votemap"] then + local mapindex = table.KeyFromValue(GM.MAPS, game.GetMap()) GM.ROUND.NextStart = nil - RunConsoleCommand("changelevel", mapindex == #MAPS_LIST and MAPS_LIST[1] or MAPS_LIST[mapindex + 1]) + RunConsoleCommand("changelevel", mapindex == #GM.MAPS and GM.MAPS[1] or GM.MAPS[mapindex + 1]) end -- Waiting Players @@ -295,10 +295,10 @@ local function Think() count = count + 1 end end - if count >= GM.CONFIG["round_min_player"] then + if count >= GetConVar("slashers_round_min_player"):GetInt() then GM.ROUND.WaitingPlayers = false timer.Simple(1, function() - if #player.GetAll() < GM.CONFIG["round_min_player"] then + if #player.GetAll() < GetConVar("slashers_round_min_player"):GetInt() then GM.ROUND.WaitingPlayers = true return end @@ -342,14 +342,3 @@ local function InitPostEntity() GM.ROUND.CameraAng = camera:GetAngles() end hook.Add("InitPostEntity", "sls_round_InitPostEntity", InitPostEntity) - --- List all maps slashers -do - local files = file.Find("maps/*.bsp", "GAME") - MAPS_LIST = {} - for _, v in ipairs(files) do - if string.sub(v, 1, 6) == "slash_" && GM.CONFIG["killer_class_map"][string.StripExtension(v)] != nil then - table.insert(MAPS_LIST, string.StripExtension(v)) - end - end -end diff --git a/gamemode/languages/de.lua b/gamemode/languages/de.lua new file mode 100644 index 0000000..5884b4d --- /dev/null +++ b/gamemode/languages/de.lua @@ -0,0 +1,64 @@ + + + + +local LANG = {} + +-- Haupt Spielmodus +-- Überlebende +LANG["class_desc_sports"] = "Du hast sehr viel Ausdauer und bist sehr stark. Benutze Waffen, um den Killer zu betäuben und helfe den Überlebenden wegzulaufen." +LANG["class_desc_popular"] = "Du wirst am Ende jedes Spiels über die genaue Position der Polizei informiert. Hilf den Überlebenden dadurch beim Entkommen." +LANG["class_desc_nerd"] = "Benutze deinen Detektor, um Spieler in der Nähe zu sehen. Aber Vorsicht, der Detektor kann nicht zwischen dem Killer und Überlebenden unterscheiden." +LANG["class_desc_fat"] = "Du bist der Stärkste und der am schwersten zu eliminierende Überlebende, aber du hast wenig Ausdauer." +LANG["class_desc_shy"] = "Du bist immun gegen die Hauptfähigkeit des Killers, aber du bist sehr schwach. Daher könnte der Killer dich als oberstes Ziel auswählen." +LANG["class_desc_junky"] = "Du hast eine erweiterte Sicht. Nutze dieses anstelle deiner Taschenlampe, um unentdeckt zu bleiben." +LANG["class_desc_emo"] = "Du bist immun gegen die zweite Fähigkeit des Killers. Sei allein unterwegs, um eine höhere Überlebenschance zu haben." +LANG["class_desc_black"] = "Du hast 3 Schlüssel, nutze diese um Türen zu verschließen und die Überlebenden zu schützen. Wenn du eine Tür entsperrst, bekommst du deinen Schlüssel wieder." +LANG["class_desc_sherif"] = "Du hast einen Revolver. Benutze ihn um den Killer zu betäuben, damit die anderen Überlebenden wegrennen können. Du kannst den Killer nicht töten."-- Mörder +-- Mörder +LANG["class_desc_jason"] = "Du bist der schnellste Killer und hast die Fähigkeit, Fußspuren der Überlebenden zu sehen. Verfolge diese und höre genau hin, du kannst manchmal den Herzschlag der Überlebenden hören." +LANG["class_desc_ghostface"] = "Du hast die Fähigkeit zu sehen, wenn ein Überlebender eine Tür öffnet oder schließt. Nutze dies, um den Überlebenden schnell zu finden. Denke drüber nach, geöffnete Türen wieder zu schließen, um den Überlebenden zu zwingen, die Türe erneut zu öffnen. Höre genau hin, du kannst manchmal den Herzschlag der Überlebenden hören." +LANG["class_desc_myers"] = "Du bist der langsamste Killer und hast die Fähigkeit, dich auf einen Überlebenden zu fokussieren. Nutze diese Fähigkeit vorsichtig, um den Überlebenden zu überraschen und schnell zu töten. Höre genau hin, du kannst manchmal den Herzschlag der Überlebenden hören." +LANG["class_desc_proxy"] = "Du hast die Fähigkeit, dich unsichtbar und wieder sichtbar zu machen, wenn dich kein Überlebender sieht. Nutze dies, um dem Überlebenden unauffällig zu folgen und ihn zu überraschen. Drücke deine Menü Taste (Standardmäßig 'Q'), um diese Fähigkeit zu nutzen. Höre genau hin, du kannst manchmal den Herzschlag der Überlebenden hören." +LANG["class_desc_intruder"] = "Du hast die Fähigkeit Fallen zu platzieren, welche die Überlebenden töten können. Nutze deine Alert Ropes, um einen Überlebenden zu hören, die Bärenfalle, um ihn zu neutralisieren und die Door Axt, um ihn überraschend zu töten. Höre genau hin, du kannst manchmal den Herzschlag der Überlebenden hören." +LANG["class_desc_bates"] = "Use the corpse of your dead mother to help you locate the survivors. The more a survivor is near the body, the more your speed will increase but be careful, if someone finds it, the police will be called immediately. Listen carefully, you may hear survivors' heartbeat." + +LANG["round_mission_police"] = "Die Polizei kommt in %s" +LANG["round_mission_police_killer"] = "Töte sie alle %s" +LANG["round_mission_escape"] = "Flüchte %s" +LANG["round_mission_escape_killer"] = "Lass sie nicht entkommen %s" +LANG["round_mission_objectives"] = "Erfülle die Ziele %s" +LANG["round_mission_objectives_killer"] = "Töte sie alle %s" +LANG["round_mission_jerrycan"] = "Finde %i Benzinkanister" +LANG["round_mission_jerrycan_found"] = "Du hast einen Benzinkanister gefunden!" +LANG["round_mission_generator"] = "Finde und aktiviere den Generator!" +LANG["round_mission_radio"] = "Finde und aktiviere das Radio!" +LANG["round_wait_players"] = "Warte auf Spieler %i/%i" +LANG["round_team_name_survivor"] = "ein Überlebender" +LANG["round_team_name_killer"] = "der Mörder" +LANG["round_team_desc_survivor"] = "Jeder Überlebende hat eine spezielle Fähigkeit. Dein Ziel ist es, Benzinkanister (Die Anzahl variiert je nach Spieleranzahl) zu finden, um den Generator zu befüllen und somit das Radio aktivieren zu können, um die Polizei zu rufen. Jeder Gegenstand hat mehrere Spawnpunkte, die zufällig auf der Map zerstreut sind. Teamplay und der schlaue Einsatz der Taschenlampe sind der Schlüssel zum Überleben." +LANG["round_team_desc_killer"] = "Du bist ein Mörder aus einem Slasher Film und bist unsterblich. Dein Ziel ist es, jeden der Überlebenden zu töten, bevor diese entkommen können. Du bekommst zufällig eine der folgenden Waffen: eine Axt, eine Machete oder eine Kettensäge (die mit 'R' aktiviert wird). Halte die Linke Maustaste gedrückt, um einen starken Hieb auszuführen. Du hörst den Herzschlag der Überlebenden, wenn sie sich nicht bewegen. Folge dem Geräusch, um sie zu finden." +LANG["round_notif_police_call"] = "Du hast die Polizei kontaktiert!" +LANG["round_notif_police"] = "Überlebe, bis die Polizei kommt!" +LANG["round_notif_escape"] = "Flüchte!" +LANG["round_notif_escape_killer"] = "Lasse sie nicht entkommen!" +LANG["round_notif_error_radio"] = "Du kannst das Radio nicht aktivieren!" +LANG["round_notif_error_generator"] = "Du kannst den Generator nicht aktivieren!" +LANG["round_notif_enabled_generator"] = "Du hast den Generator aktiviert!" +LANG["round_notif_player_die"] = "%s ist gestorben" +LANG["round_end_escaped"] = "Die Überlebenden sind geflüchtet... vorerst" +LANG["round_end_dead"] = "Die Überlebenden wurden ausgelöscht" + +-- Modules +LANG["antiafk_will_kicked"] = "Vorsicht, du wirst wegen Inaktivität vom Server gekickt in %s" +LANG["f1menu_you_are"] = "Du bist %s" +LANG["workshop_need_content"] = "Du brauchst extra Content vom Workshop." +LANG["workshop_get_it"] = "Bring mich hin!" +LANG["workshop_no"] = "Nein, lieber nicht." +LANG["traps_rope_hit_world"] = "Das Seil hat die Welt berührt." +LANG["traps_too_much_distance"] = "Die Entfernung ist zu groß." +LANG["killerhelp_cant_use_ability"] = "Du kannst deine Fähigkeit gerade nicht einsetzen." +LANG["votemap_title"] = "Stimme für die nächste Map!" +LANG["votemap_extend"] = "Verlängern" +LANG["votemap_random"] = "Zufällig" +return LANG diff --git a/gamemode/languages/en.lua b/gamemode/languages/en.lua index 4242a42..8bb0e72 100644 --- a/gamemode/languages/en.lua +++ b/gamemode/languages/en.lua @@ -2,8 +2,8 @@ -- -- @Author: Garrus2142 -- @Date: 2017-08-01 16:53:54 --- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-06T16:17:17+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 05-Jan-2018 local LANG = {} @@ -24,6 +24,7 @@ LANG["class_desc_ghostface"] = "You have the ability to see when a survivor open LANG["class_desc_myers"] = "You're the slowest killer and have the ability to focus one survivor at the time. Use it carefully to surprise the survivors and kill them quickly. Listen carefully, you may heard survivors' hearbeat." LANG["class_desc_proxy"] = "You have the ability to appear and disappear when not visible by a survivor. Use it to sneak and surprise your victims. Press your menu key ('A' by default) to use it. Listen carefully, you may hear survivors' heartbeat." LANG["class_desc_intruder"] = "You have the ability to place traps to help you killing the survivors. Use your alert ropes to spot the survivors, your bear traps to neutralize them and the door axe to kill them by surprise.Listen carefully, you may hear survivors' heartbeat." +LANG["class_desc_bates"] = "Use the corpse of your dead mother to help you locate the survivors. The more a survivor is near the body, the more your speed will increase but be careful, if someone finds it, the police will be called immediately. Listen carefully, you may hear survivors' heartbeat." LANG["round_mission_police"] = "Police arrives in %s" LANG["round_mission_police_killer"] = "Kill them all %s" diff --git a/gamemode/languages/fr.lua b/gamemode/languages/fr.lua index 2ab7103..03860d4 100644 --- a/gamemode/languages/fr.lua +++ b/gamemode/languages/fr.lua @@ -2,8 +2,8 @@ -- -- @Author: Guilhem PECH -- @Date: 2017-08-02T17:49:23+02:00 --- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-06T13:50:10+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 05-Jan-2018 local LANG = {} @@ -24,6 +24,7 @@ LANG["class_desc_ghostface"] = "Vous avez la capaciter de voir quand un survivan LANG["class_desc_myers"] = "Vous êtes le tueur le plus lent et vous avez la capacité de voir un survivant en permanence. Utilisez la intelligemment pour surprendre vos victimes. Ecoutez bien, vous pouvez peut être entendre le coeur des survivants battre." LANG["class_desc_proxy"] = "Vous avez la capacité de disparaitre ou de réaparaitre quand vous êtes hors du chap de vision d'un survivant. Utilisez la pour surprendre vos victimes ! Appuyez sur votre menu des objets ('A' par défaut) pour l'utiliser. Ecoutez bien, vous pouvez peut être entendre le coeur des survivants battre." LANG["class_desc_intruder"] = "Vous avez la capacité de placer des pièges pour vous aider dans vos meurtre. Utilisez l'Alert Rope pour repérer vos victimes, les Bear Trap pour les ralentir ou la Door Trap pour les tuer. Ecoutez bien, vous pouvez peut être entendre le coeur des survivants battre." +LANG["class_desc_bates"] = "Utilisez le corps de votre défunte mère pour vous aidez à localiser les survivants. Plus un survivant est proche du corps, plus vous vous déplacerez rapidement mais attention, si quelqu'un le découvre, la police sera immédiatement appelée. Ecoutez bien, vous pouvez peut être entendre le coeur des survivants battre." LANG["round_mission_police"] = "La Police arrive dans %s" LANG["round_mission_police_killer"] = "Tuez les tous %s" diff --git a/gamemode/languages/ko.lua b/gamemode/languages/ko.lua new file mode 100644 index 0000000..1fde020 --- /dev/null +++ b/gamemode/languages/ko.lua @@ -0,0 +1,61 @@ +local LANG = {} + +-- Core Gamemode +-- Survivors +LANG["class_desc_sports"] = "당신은 지구력이 매우 좋고 힘이 셉니다. 무기를 사용하여 살인마를 제압하고 생존자들이 달아날 수 있도록 도우십시오." +LANG["class_desc_popular"] = "당신은 각 게임의 끝마다 경찰의 정확한 위치를 알 수 있습니다. 이를 이용해 생존자들이 탈출하는 것을 도우십시오." +LANG["class_desc_nerd"] = "당신은 가까운 플레이어를 볼 수 있는 탐지기가 있습니다, 하지만 살인마와 생존자를 구별할 수 없습니다." +LANG["class_desc_fat"] = "당신은 매우 힘이 세고 죽이기 가장 어려운 생존자입니다. 하지만 지구력이 가장 낮습니다." +LANG["class_desc_shy"] = "당신은 살인마의 주능력에 면역입니다. 하지만 당신은 매우 약합니다. 조심하십시오, 살인마는 당신을 먼저 죽이려 할 것입니다." +LANG["class_desc_junky"] = "당신은 시력이 좋습니다. 보다 잘 숨기 위해 손전등 대신 눈을 믿으십시오." +LANG["class_desc_emo"] = "당신은 살인마의 부가 능력에 면역입니다. 살아남기 위해 혼자 다니는 것이 더 좋습니다." +LANG["class_desc_black"] = "당신에게는 세 개의 열쇠가 있습니다, 이를 이용하여 문을 잠그고 생존자들을 안전하게 지키십시오. 잠긴 문의 잠금을 해제해 열쇠를 되돌려 받을 수 있습니다." +LANG["class_desc_sherif"] = "당신은 리볼버가 있습니다. 리볼버로 살인마를 제압하여 생존자들이 달아날 수 있게 하십시오. 하지만 살인마를 죽일 수는 없습니다." +-- Killers +LANG["class_desc_jason"] = "당신은 가장 빠른 살인마이자 생존자의 발자국을 볼 수 있는 살인마입니다. 잘 들어보면 주위 생존자의 심장 박동이 들릴 것입니다." +LANG["class_desc_ghostface"] = "당신은 생존자가 문을 열고 닫는 것을 볼 수 있습니다. 생존자를 빨리 찾는 데 활용하세요. 열린 문을 닫아 생존자들이 문을 다시 열도록 유도하세요. 잘 들어보면 주위 생존자의 심장 박동이 들릴 것입니다." +LANG["class_desc_myers"] = "당신은 제일 느린 살인마입니다. 그리고 한 생존자에 집중할 수 있는 능력이 있습니다. 생존자들을 놀래키고 빠르게 죽이는 데 활용하세요. 잘 들어보면 주위 생존자의 심장 박동이 들릴 것입니다." +LANG["class_desc_proxy"] = "당신은 생존자가 보고 있지 않을 때 투명해졌다가 돌아올 수 있는 살인마입니다. 숨어 있다가 희생자를 놀래키는 데 활용하세요. 메뉴 키(기본 'A'키)를 눌러 능력을 사용하세요. 잘 들어보면 주위 생존자의 심장 박동이 들릴 것입니다." +LANG["class_desc_intruder"] = "함정을 설치해 생존자를 죽이는 데 활용할 수 있는 능력이 있습니다. 경계 로프를 사용하여 생존자의 위치를 파악하고, 곰덫을 설치해 생존자를 무력화하고 도끼로 기습해 죽이세요. 잘 들어보면 주위 생존자의 심장 박동이 들릴 것입니다." +LANG["class_desc_bates"] = "죽은 당신 어머니의 시신을 이용해 생존자의 위치를 파악하세요. 생존자가 시신 근처에 더 가까우면 가까울수록 당신의 이동 속도가 더 빨라집니다. 하지만 조심하세요. 누군가 시신을 찾는다면 경찰을 즉시 부를 수 있습니다. 잘 들어보면 주위 생존자의 심장 박동이 들릴 것입니다." + +LANG["round_mission_police"] = "%s 초 후 경찰이 도착힙니다" +LANG["round_mission_police_killer"] = "모두 죽이십시오 %s" +LANG["round_mission_escape"] = "탈출하십시오 %s" +LANG["round_mission_escape_killer"] = "그들을 놓치지 마십시오 %s" +LANG["round_mission_objectives"] = "목표를 완수하십시오 %s" +LANG["round_mission_objectives_killer"] = "모두 죽이십시오 %s" +LANG["round_mission_jerrycan"] = "연료통 %i개를 찾으십시오" +LANG["round_mission_jerrycan_found"] = "연료통을 찾았습니다 !" +LANG["round_mission_generator"] = "발전기를 찾아 작동시키십시오 !" +LANG["round_mission_radio"] = "라디오를 찾아 작동시키십시오!" +LANG["round_wait_players"] = "플레이어 기다리는 중 %i/%i" +LANG["round_team_name_survivor"] = "생존자" +LANG["round_team_name_killer"] = "살인마" +LANG["round_team_desc_survivor"] = "각각의 생존자는 특별한 퍽이 있습니다. 당신의 목표는 연료통(개수는 플레이어 숫자에 따라 달라질 수 있음)을 찾아 발전기에 연료를 채우고 라디오를 켜서 경찰에 도움을 요청하는 것입니다. 당신이 찾을 수 있는 각 요소는 가능한 여러 생성 지점이 있으며 맵 상에 무작위로 나타납니다. 팀플레이와 손전등의 절제된 사용이 생존의 중요 포인트입니다." +LANG["round_team_desc_killer"] = "당신은 호러 영화에서 나오는 살인마이며 무적입니다. 당신의 목표는 생존자들이 탈출하기 전에 모두 죽이는 것입니다. 당신은 도끼, 마체테, 전기톱(R로 킬 수 있음) 중 하나의 무기를 무작위로 받습니다. 더 강한 공격을 가하려면 왼클릭을 눌렀다가 떼세요. 당신은 생존자들이 움직이지 않을 때 심장 박동을 들을 수 있습니다. 그저 소리를 따라가기만 한다면 그들을 찾을 수 있습니다." +LANG["round_notif_police_call"] = "경찰에 신고했습니다 !" +LANG["round_notif_police"] = "경찰이 도착할 때까지 살아남으십시오 !" +LANG["round_notif_escape"] = "탈출하십시오" +LANG["round_notif_escape_killer"] = "그들을 놓치지 마십시오" +LANG["round_notif_error_radio"] = "라디오를 작동시킬 수 없습니다 !" +LANG["round_notif_error_generator"] = "발전기를 작동시킬 수 없습니다 !" +LANG["round_notif_enabled_generator"] = "발전기를 작동시켰습니다 !" +LANG["round_notif_player_die"] = "%s은(는) 죽었습니다" +LANG["round_end_escaped"] = "생존자들이 탈출했습니다... 일단은" +LANG["round_end_dead"] = "생존자들이 제거되었습니다" + +-- Modules +LANG["antiafk_will_kicked"] = "%s 초 간 움직임이 없어 곧 서버에서 추방될 것입니다" +LANG["f1menu_you_are"] = "당신은 %s입니다" +LANG["workshop_need_content"] = "스팀 창작마당에서 추가 컨텐츠를 받아야 합니다." +LANG["workshop_get_it"] = "데려가 줘!" +LANG["workshop_no"] = "아니 안 할래." +LANG["traps_rope_hit_world"] = "로프가 world를 때렸습니다" +LANG["traps_too_much_distance"] = "거리가 너무 멉니다" +LANG["killerhelp_cant_use_ability"] = "지금 능력을 사용할 수 없습니다" +LANG["votemap_title"] = "다음 맵에 투표하세요 !" +LANG["votemap_extend"] = "확장" +LANG["votemap_random"] = "무작위" +return LANG + diff --git a/gamemode/languages/pl.lua b/gamemode/languages/pl.lua new file mode 100644 index 0000000..7b77abc --- /dev/null +++ b/gamemode/languages/pl.lua @@ -0,0 +1,67 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-01 16:53:54 +-- @Last Modified by: danx91 +-- @Last Modified time: 2017-08-12 12:27 ( CET ) + +local LANG = {} + +-- Core Gamemode +-- Survivors +LANG["class_desc_sports"] = "Jesteś silny i masz dobrą kondycję, przez co możesz biegać dłużej. Używaj broni aby ogłuszyć mordercę i pomóc innym w ucieczce." +LANG["class_desc_popular"] = "Jesteś informowana o pozycji policji na końcu każdej rozgrywki. Używaj tej umiejętności aby pomóc innym w ucieczce." +LANG["class_desc_nerd"] = "Używaj wykrywacza, aby zobaczyć graczy w pobliżu, ale uważaj, bo nie dostrzegasz różnicy między mordercą a normalnymi ludźmi." +LANG["class_desc_fat"] = "Jesteś najsilniejszym i najtrudniejszym do zabicia ze wszystkich, ale za to masz słabą kondycję." +LANG["class_desc_shy"] = "Jesteś odporna na główną umiejętność mordercy, a także najsłabsza ze wszystkich. Uważaj, zabójca może próbować zabić ciebie w pierwszej kolejności." +LANG["class_desc_junky"] = "Masz lepszy wzrok od innych. Używaj go zamiast latarki, aby być mniej wykrywalnym." +LANG["class_desc_emo"] = "Jesteś odporna na specjalną umiejętność zbójcy. Trzymaj się z dala od innych aby zwiększyć swoje szanse na przeżycie." +LANG["class_desc_black"] = "Masz 3 klucze, którymi możesz zamknąć drzwi aby ochronić siebie i innych przed mordercą. Możesz odblokować drzwi by odzyskać klucz." +LANG["class_desc_sherif"] = "Masz rewolwer, który spowolni mordercę dając tobie i innym szansę na ucieczkę, ale pamiętaj nie możesz go zabić." +-- Killers +LANG["class_desc_jason"] = "Jesteś najszybszym zabójcą oraz możesz zobaczyć odciski butów pozostawione przez graczy. Słuchaj uważnie - możesz usłyszeć bicie serc ludzi w pobliżu." +LANG["class_desc_ghostface"] = "Masz zdolność, dzięki której możesz zobaczyć jak ktoś otwiera lub zamyka drzwi. Wykorzystaj ją aby szybko wytropić swoje ofiary. Pomyśl o zamykaniu otwartych drzwi, aby zmusić ocalałych do ich ponownego otwarcia. Słuchaj uważnie - możesz usłyszeć bicie serc ludzi w pobliżu." +LANG["class_desc_myers"] = "Jesteś najwolniejszym zabójcą, a także masz zdolność skupienia się na jednym graczu. Używaj jej, aby ich zaskoczyć. Słuchaj uważnie - możesz usłyszeć bicie serc ludzi w pobliżu." +LANG["class_desc_proxy"] = "Masz umiejętność do pojawiania się i znikania, gdy nikt nie widzi. Używaj jej aby zakraść się i zaskoczyć swoje ofiary. Naciśnij przycisk menu ( domyślnie 'Q' ) aby jej użyć. Słuchaj uważnie - możesz usłyszeć bicie serc ludzi w pobliżu." +LANG["class_desc_intruder"] = "Masz możliwość umieszczania pułapek aby zaskoczyć swoje ofiary. Używaj lin aby wykrywać ludzi, pułapek na misie aby ich zneutralizować oraz siekiery, którą możesz zamontować do drzwi, aby zabić ich z zaskoczenia. Słuchaj uważnie - możesz usłyszeć bicie serc ludzi w pobliżu." +LANG["class_desc_bates"] = "Use the corpse of your dead mother to help you locate the survivors. The more a survivor is near the body, the more your speed will increase but be careful, if someone finds it, the police will be called immediately. Listen carefully, you may hear survivors' heartbeat." + +LANG["round_mission_police"] = "Policja przybędzie za %s" +LANG["round_mission_police_killer"] = "Zabij ich wszystkich %s" +LANG["round_mission_escape"] = "Ucieknij %s" +LANG["round_mission_escape_killer"] = "Nie pozwól im uciec %s" +LANG["round_mission_objectives"] = "Ukończ zadania %s" +LANG["round_mission_objectives_killer"] = "Zabij ich wszystkich %s" +LANG["round_mission_jerrycan"] = "Kanistry do znalezienia: %i" +LANG["round_mission_jerrycan_found"] = "Znalazłeś kanister!" +LANG["round_mission_generator"] = "Znajdź i uruchom generator!" +LANG["round_mission_radio"] = "Znajź i uruchom radio!" +LANG["round_wait_players"] = "Oczekiwanie na graczy %i/%i" +LANG["round_team_name_survivor"] = "Jesteś uciekającym" --You are a Survivor +LANG["round_team_name_killer"] = "Jesteś zabójcą" --You are the killer +LANG["round_team_desc_survivor"] = "Każdy z uciekających ma specjalną umiejętność. Twoim celem jest znalezienie kanistrów z benzyną (ich liczba zależy od ilości graczy) aby uruchomić generator, dzięki czemu przy użyciu radia, które da możliwość zadzwonienia na policje, zapewnicie sobie drogę ucieczki. Każdy element, który musisz znaleźć ma kilka losowych miejsc w których się pojawi. Gra zespołowa i rzadkie używanie latarki jest kluczem do zwycięstwa." +LANG["round_team_desc_killer"] = "Jesteś zabójcą z filmu Slasher i jesteś nieśmiertelny. Twoim celem jest zabicie wszystkich zanim uciekną. Dostaniesz jedną z losowych broni: siekiera, maczeta lub piła motorowa (którą możesz włączyć klikając R). Aby zadać zwiększone obrażenia, możesz przytrzymać lewy klawisz i go puścić. Możesz usłyszeć bicie serc ludzi kiedy się nie ruszają. Podążaj za dźwiękiem, a napewno ich znajdziesz." +LANG["round_notif_police_call"] = "Skontaktowałeś się z policją!" +LANG["round_notif_police"] = "Przetrwaj do przyjazdu policji!" +LANG["round_notif_escape"] = "Ucieknij" +LANG["round_notif_escape_killer"] = "Nie pozwól im uciec" +LANG["round_notif_error_radio"] = "Nie możesz uruchomić radia!" +LANG["round_notif_error_generator"] = "Nie możesz uruchomić generatora!" +LANG["round_notif_enabled_generator"] = "Uruchomiłeś generator!" +LANG["round_notif_player_die"] = "%s jest martwy" +LANG["round_end_escaped"] = "Ludzie uciekli... narazie" +LANG["round_end_dead"] = "Wszyscy zostali zamordowani" + +-- Modules +LANG["antiafk_will_kicked"] = "Zostaniesz wyrzucony z serwera z powodu nieaktywność za %s" +LANG["f1menu_you_are"] = "%s" --I left it empty, because i added 'You are' to killer and survivor. I done that mainly to change 'You are [class]' to just '[class]' because after 'You are' in polish you have to change form of noun( here class name ) +LANG["workshop_need_content"] = "Możesz potrzebować dodatkowej zawartości z warsztatu." +LANG["workshop_get_it"] = "Zabierz mnie tam!" +LANG["workshop_no"] = "Nie, dziękuje." +LANG["traps_rope_hit_world"] = "Lina udeżyła w świat" +LANG["traps_too_much_distance"] = "Za duża odległość" +LANG["killerhelp_cant_use_ability"] = "Nie możesz użyć teraz specjalnej umiejętności" +LANG["votemap_title"] = "Zagłosuj na następną mapę" +LANG["votemap_extend"] = "Przedłuż" +LANG["votemap_random"] = "Losowa" +return LANG diff --git a/gamemode/languages/pt.lua b/gamemode/languages/pt.lua new file mode 100644 index 0000000..6d24191 --- /dev/null +++ b/gamemode/languages/pt.lua @@ -0,0 +1,64 @@ +-- @author: Garrus2142 +-- @Date: 2017-08-01 16:53:54 +-- @last Modified by: Daryl_Winters +-- @last Modified time: 2017-08-06T16:17:17+02:00 + +local LANG = {} + +-- Core Gamemode +-- Survivors +LANG["class_desc_sports"] = "Você possui muito vigor e também é forte. Use armas para atordoar o assassino e ajudar os sobreviventes à fugirem." +LANG["class_desc_popular"] = "Você é notificada com a posição exata da Polícia no fim de cada rodada. Use-o para ajudar os sobreviventes à fugirem" +LANG["class_desc_nerd"] = "Use o seu detector para ver jogadores próximos. Cuidado, não há diferença entre os sobreviventes e o assassino" +LANG["class_desc_fat"] = "Você é o mais forte e o mais difícil de morrer, mas possui vigor baixo." +LANG["class_desc_shy"] = "Você é imune á habilidade primária do assassino, porém é fraca. Cuidado, o assassino poderá querer te matar primeiro." +LANG["class_desc_junky"] = "Você possui uma visão melhor. Use em vez da lanterna para ter mais furtividade." +LANG["class_desc_emo"] = "Você é imune à habilidade secundária do assassino. Fique sozinha quanto se esconde para uma chance maior de sobreviver." +LANG["class_desc_black"] = "Você possui 3 chaves, use-as para trancar portas e manter os sobreviventes seguros. Você pode destrancar portas para recuperar as chaves." +LANG["class_desc_sherif"] = "Você possui um revólver. Use-o para atordoar o assassino e permitir que os sobreviventes fujam. Você não pode matar o assassino" +-- Killers +LANG["class_desc_jason"] = "Você é o assassino mais rápido e possui a habilidade de ver pegadas deixadas pelos sobreviventes. Escute bem, pois você pode ouvir a batida do coração dos sobreviventes." +LANG["class_desc_ghostface"] = "Você possui a habilidade de ver quando um sobrevivente fecha ou abre uma porta, use-a para achar-los rapidamente. Escute bem, pois você pode ouvir a batida do coração dos sobreviventes." +LANG["class_desc_myers"] = "Você é o assassino mais lento e possui a habilidade de focar um sobrevivente por vez. Use-a para assustar sobreviventes e matá-los rapidamente. Escute bem, pois você pode ouvir a batida do coração dos sobreviventes." +LANG["class_desc_proxy"] = "Você possui a habilidade de aparecer e desaparecer quando não estiver visível a um sobrevivente. Use-a para assusstar suas vítimas. Pressione o botão menu ('A' como principal) para usar-lá. Escute bem, pois você pode ouvir a batida do coração dos sobreviventes." +LANG["class_desc_intruder"] = "Você tem a habilidade de colocar armadilhas para matar sobreviventes. Use suas cordas de alerta para localizar sobreviventes, suas armadilhas de urso para neutralizar-los e o machado de porta para uma morte surpresa. Escute bem, pois você pode ouvir a batida do coração dos sobreviventes." + +LANG["round_mission_police"] = "A polícia chegará em %s" +LANG["round_mission_police_killer"] = "Mate todos eles %s" +LANG["round_mission_escape"] = "Escape %s" +LANG["round_mission_escape_killer"] = "Não os deixe ir %s" +LANG["round_mission_objectives"] = "Complete os objetivos %s" +LANG["round_mission_objectives_killer"] = "Mate todos eles %s" +LANG["round_mission_jerrycan"] = "Ache %i galão(ões)de gasolina" +LANG["round_mission_jerrycan_found"] = "Você achou um galão de gasolina !" +LANG["round_mission_generator"] = "Ache e ative o gerador !" +LANG["round_mission_radio"] = "Ache e ative o rádio !" +LANG["round_wait_players"] = "Procurando por jogadores %i/%i" +LANG["round_team_name_survivor"] = "um Sobrevivente" +LANG["round_team_name_killer"] = "o Assassino" +LANG["round_team_desc_survivor"] = "Cada sobrevivente tem uma habilidade especial. Seu objetivo é achar galões de gasolina (número varia do número de jogadores) para encher o gerador, depois ativar o rádio e chamar a polícia por ajuda. Cada elemento que você tiver que achar posssui vários pontos de spawn e surgem aleatóriamente no mapa. O trabalho em equipe e um uso moderado de sua lanterna são a chave para a sobrevivência." +LANG["round_team_desc_killer"] = "Você é um assassino de um filme slasher e é imortal. Seu objetivo é matar cada sobrevivente antes que escapem. Você é recebido com uma das seguintes armas ; o machado ; o facão ou a motoserra (que liga ao pressionar R) Para dar um ataque forte, segure o botão esquerdo do mouse e soltar. Você pode ouvir a batida do coração dos sobreviventes quando eles não estão se movendo, apenas siga o som e você irá os encontrar." +LANG["round_notif_police_call"] = "Você chamou a polícia !" +LANG["round_notif_police"] = "Sobreviva até a chegada da polícia !" +LANG["round_notif_escape"] = "Escape" +LANG["round_notif_escape_killer"] = "Não os deixe ir" +LANG["round_notif_error_radio"] = "Você não pode ativar o rádio !" +LANG["round_notif_error_generator"] = "Você não pode ativar o gerador !" +LANG["round_notif_enabled_generator"] = "Você ativou o gerador !" +LANG["round_notif_player_die"] = "%s está morto" +LANG["round_end_escaped"] = "Os sobreviventes escaparam... por enquanto" +LANG["round_end_dead"] = "Os sobreviventes foram erradicados" + +-- Modules +LANG["antiafk_will_kicked"] = "Você será kickado do servidor por inatividade em %s" +LANG["f1menu_you_are"] = "Você é o/a %s" +LANG["workshop_need_content"] = "Você precisará de conteúdo extra do Steam Workshop" +LANG["workshop_get_it"] = "Me leve até ele!" +LANG["workshop_no"] = "Não quero." +LANG["traps_rope_hit_world"] = "A corda está longe" +LANG["traps_too_much_distance"] = "Muita distância" +LANG["killerhelp_cant_use_ability"] = "Você não pode usar a habilidade agora" +LANG["votemap_title"] = "Vote para o próximo mapa !" +LANG["votemap_extend"] = "De novo" +LANG["votemap_random"] = "Aleatório" +return LANG diff --git a/gamemode/languages/ru.lua b/gamemode/languages/ru.lua index 34301db..e0f55ab 100644 --- a/gamemode/languages/ru.lua +++ b/gamemode/languages/ru.lua @@ -2,62 +2,63 @@ -- -- @Author: Packages -- @Date: 2017-08-02 8:58:00 --- @Last Modified by: Packages --- @Last Modified time: 2017-08-02 1:39:00 +-- @Last Modified by: KurimuzonAkuma +-- @Last Modified time: 2022-10-14 20:58:55 local LANG = {} -- Core Gamemode --- Survivors -LANG["class_desc_sports"] = "Вы имеете быстрый бег, и большую силу. Используйте оружие что бы замедлить/оглушить убийцу и убежать." -LANG["class_desc_popular"] = "В конце каждой игры вас уведомляют о точном положении откуда приехала полиция. Используйте его, чтобы помочь выжившим." -LANG["class_desc_nerd"] = "Используйте детектор, чтобы видеть игроков поблизости. Будьте осторожны, вы не можете различать выживших и убийцу на радаре." -LANG["class_desc_fat"] = "Вы самый толстый из выживших, чтобы вас убить нужно много времени. Это вам поможет сбежать." -LANG["class_desc_shy"] = "Вы имеете иммунитет от основной способности убийцы, но вы очень слабы. Будьте осторожны, убийца может захотеть убить вас в приоритетном порядке." -LANG["class_desc_junky"] = "У вас улучшенное зрение. Используйте его вместо фонарика для того чтобы спрятаться лучше." -LANG["class_desc_emo"] = "Вы имеете иммунитет от второй способности убийцы, но вы очень слабы. Оставайтесь в одиночестве, прячась, чтобы получить больше шансов на выживание." -LANG["class_desc_black"] = "У вас есть 3 ключа, используйте их для запирание дверей и обеспечения безопасности оставшихся в живых. Вы можете отпереть запертые двери, чтобы вернуть свои ключи." -LANG["class_desc_sherif"] = "У вас есть револьвер. Используйте его, чтобы оглушить убийцу и позволить оставшимся в живых убежать. Вы не можете убить убийцу." --- Killers -LANG["class_desc_jason"] = "Вы самый быстрый убийца и имеете возможность видеть следы оставшихся в живых, чтобы следить за ними. Слушайте внимательно, вы можете услышать сердцебиение выживших." -LANG["class_desc_ghostface"] = "У вас есть возможность видеть, когда выживший открывает или закрывает дверь, используйте его, чтобы быстро найти их. Подумайте о закрытии открытых дверей, чтобы заставить оставшихся в живых снова открыть дверь. Слушайте внимательно, вы можете услышать сердцебиение выживших." -LANG["class_desc_myers"] = "Вы самый медленный убийца и имеете возможность видеть позицию одного выжившего. Используйте его осторожно, чтобы удивить выживших и убить его быстро. Слушайте внимательно, вы можете услышать сердцебиение выживших." -LANG["class_desc_proxy"] = "У вас есть способность появляться и исчезать, когда не видно выжившим. Используйте его, чтобы прокрасться и удивить своих жертв. Нажмите клавишу меню (по умолчанию «A»), чтобы использовать способность. Слушайте внимательно, вы можете услышать сердцебиение выживших." -LANG["class_desc_intruder"] = "У вас есть возможность разместить ловушки, чтобы помочь вам убить оставшихся в живых. Используйте сигнальную веревку для выявления выживших и ваши медвежьи ловушеки чтобы нейтрализовать их и убить их топором в врасплох. Слушайте внимательно, вы можете услышать сердцебиение выживших." +-- Survivors +LANG["class_desc_sports"] = "У Вас большая выносливость и Вы очень сильны. Используйте свою биту, чтобы ненадолго замедлить убийцу и сбежать." +LANG["class_desc_popular"] = "В конце каждой игры Вас уведомляют о точном положении откуда приехала полиция. Используйте это, чтобы помочь другим выжившим сбежать." +LANG["class_desc_nerd"] = "Используйте детектор, чтобы видеть игроков поблизости. Будьте осторожны, Вы не можете отличить выживших от убийцы на радаре." +LANG["class_desc_fat"] = "Вы самый сильный и крепкий из выживших, чтобы Вас убить потребуется немало времени, однако, у Вас очень мало выносливости." +LANG["class_desc_shy"] = "У Вас есть иммунитет к основной способности убийцы, но Вы очень слабы. Будьте осторожны, у убийцы Вы будете в приоритете." +LANG["class_desc_junky"] = "У Вас улучшенное зрение. Используйте его вместо фонарика для того, чтобы быть более скрытным." +LANG["class_desc_emo"] = "Вы хладнокровны и убийца не может услышать ваше сердцебиение. Оставайтесь в одиночестве, чтобы получить больше шансов на выживание." +LANG["class_desc_black"] = "У Вас есть 3 ключа, используйте их для запирания дверей и обеспечения безопасности другим выживших. Вы можете отпереть запертые двери, чтобы вернуть свои ключи." +LANG["class_desc_sherif"] = "У Вас есть револьвер. Используйте его, чтобы оглушить убийцу и помочь выжившим сбежать." +-- Killers +LANG["class_desc_jason"] = "Вы самый быстрый убийца и можете видеть следы оставшихся в живых, чтобы следовать за ними." +LANG["class_desc_ghostface"] = "У Вас есть возможность видеть, когда выживший открывает или закрывает дверь, используйте это, чтобы быстро найти их. Подумайте о закрытии уже открытых дверей, чтобы заставить выживших выдать свое местоположение." +LANG["class_desc_myers"] = "Вы самый медленный убийца и Вы можете сфокусироваться на одном выжившем. Используйте способность осторожно, чтобы удивить выжившего и быстро убить его." +LANG["class_desc_proxy"] = "У Вас есть способность появляться и исчезать, когда Вас не видят другие выжившие. Используйте это, чтобы прокрасться и удивить своих жертв. Нажмите клавишу меню (по умолчанию «Q»), чтобы использовать способность." +LANG["class_desc_intruder"] = "У Вас есть возможность разместить ловушки, которые помогут Вам убить выживших. Используйте сигнальную веревку для обнаружения выживших, а также капканы, чтобы убить застав их врасплох." +LANG["class_desc_bates"] = "Используйте труп своей мертвой матери, чтобы помочь Вам найти оставшихся в живых. Чем больше выживших находится рядом с телом, тем больше Ваша скорость будет увеличиваться." -LANG["round_mission_police"] = "Полиция приедет в %s" -LANG["round_mission_police_killer"] = "Убейте их всех за %s минут." -LANG["round_mission_escape"] = "%s сбежал." -LANG["round_mission_escape_killer"] = "Не позволяйте им cбежать %s" +LANG["round_mission_police"] = "Полиция приедет через %s" +LANG["round_mission_police_killer"] = "Убейте их всех за %s" +LANG["round_mission_escape"] = "Бегите. %s" +LANG["round_mission_escape_killer"] = "Не дайте им cбежать %s" LANG["round_mission_objectives"] = "Закончите цели за %s" -LANG["round_mission_objectives_killer"] = "Убейте их всех за %s минут." -LANG["round_mission_jerrycan"] = "Найти %i канистры." +LANG["round_mission_objectives_killer"] = "Убейте их всех за %s" +LANG["round_mission_jerrycan"] = "Найдите канистры: %i" LANG["round_mission_jerrycan_found"] = "Вы нашли канистру!" LANG["round_mission_generator"] = "Найдите и активируйте генератор!" -LANG["round_mission_radio"] = "Найдите и активируйте радио" -LANG["round_wait_players"] = "Ожидание игроков, чтобы начать раунд %i/%i" +LANG["round_mission_radio"] = "Найдите и активируйте радио!" +LANG["round_wait_players"] = "Ожидание игроков %i/%i" LANG["round_team_name_survivor"] = "Выживший" LANG["round_team_name_killer"] = "Убийца" -LANG["round_team_desc_survivor"] = "У каждого выжившего есть особая способность. Ваша цель состоит в том, чтобы найти канистры (число, варьирующееся с количеством игроков в игре), чтобы завести генератор, чтобы вы могли включить радио, а затем вызвать полицию с помощью его. Каждый элемент, который вы должны найти, имеет много возможных точек появления и появляется случайно на карте. Командная игра и умеренное использование фонарика являются ключом к выживанию." -LANG["round_team_desc_killer"] = "Вы убийца из хоррор фильма, и вы бессмертны. Ваша цель - убить всех выживших, прежде чем они смогут убежать. Вы случайно получили одно из следующих видов оружия; Топор, мачете или бензопилу (которая включается, нажимая R). Чтобы дать более сильный удар вы можете удерживать левый клик и отпускать. Вы можете услышать сердцебиение выживших, когда они не двигаются, просто следуйте за звуком, и вы их найдете." -LANG["round_notif_police_call"] = "Вы связались с полицией!" -LANG["round_notif_police"] = "Выживете до приезда полиции!" -LANG["round_notif_escape"] = "Сбегите!" -LANG["round_notif_escape_killer"] = "Не позволяйте им убежать" +LANG["round_team_desc_survivor"] = "У каждого выжившего есть особая способность. Ваша цель состоит в том, чтобы найти канистры (количество варьируется от количества игроков на сервере), завести генератор, включить радио и вызвать с помощью него полицию. Каждый элемент, который Вы должны найти, имеет много возможных точек появления и появляется случайно на карте. Командная игра и умеренное использование фонарика являются ключом к выживанию." +LANG["round_team_desc_killer"] = "Вы убийца из хоррор фильма, и Вы бессмертны. Ваша цель - убить всех выживших, прежде чем они смогут сбежать. Вы случайно получили одно из следующих видов оружия: топор, мачете или бензопилу (которая включается на кнопку «R»). Зажмите ЛКМ и отпустите для более сильного удара. Вы можете услышать сердцебиение выживших, когда они не двигаются, просто следуйте за звуком, и Вы их найдете." +LANG["round_notif_police_call"] = "Вы вызвали полицию!" +LANG["round_notif_police"] = "Выживите до приезда полиции!" +LANG["round_notif_escape"] = "Найдите полицию!" +LANG["round_notif_escape_killer"] = "Не позволяйте им сбежать." LANG["round_notif_error_radio"] = "Вы не можете активировать радио!" LANG["round_notif_error_generator"] = "Вы не можете активировать генератор!" LANG["round_notif_enabled_generator"] = "Вы активировали генератор!" -LANG["round_notif_player_die"] = "%s умер" -LANG["round_end_escaped"] = "Убижавшие выжившие на данный момент..." +LANG["round_notif_player_die"] = "%s умер." +LANG["round_end_escaped"] = "Выжившие смогли сбежать... Пока-что." LANG["round_end_dead"] = "Все выжившие были убиты." -- Modules -LANG["antiafk_will_kicked"] = "Вас выкинет из сервера за бездействие в %s" +LANG["antiafk_will_kicked"] = "Вас выкинет из сервера за бездействие через %s" LANG["f1menu_you_are"] = "Вы %s" -LANG["workshop_need_content"] = "Вам может понадобиться дополнительный контент из Мастерской." -LANG["workshop_get_it"] = "Покажи мне!" -LANG["workshop_no"] = "Я не хочу." -LANG["traps_rope_hit_world"] = "Веревка зашла за рамки карты" +LANG["workshop_need_content"] = "Для игры на сервере желательно скачать контент" +LANG["workshop_get_it"] = "Скачать!" +LANG["workshop_no"] = "Нет, спасибо." +LANG["traps_rope_hit_world"] = "Веревка вышла за рамки карты" LANG["traps_too_much_distance"] = "Слишком большое расстояние" LANG["killerhelp_cant_use_ability"] = "Вы не можете использовать свои способности сейчас" LANG["votemap_title"] = "Голосование за карту!" diff --git a/gamemode/languages/zh-hans.lua b/gamemode/languages/zh-hans.lua new file mode 100644 index 0000000..7db0901 --- /dev/null +++ b/gamemode/languages/zh-hans.lua @@ -0,0 +1,59 @@ +local LANG = {} + +-- Core Gamemode +-- Survivors +LANG["class_desc_sports"] = "你的耐力值很高,而且很强壮。 使用武器打晕杀人魔并帮助幸存者逃跑。" +LANG["class_desc_popular"] = "报警之后,你能得知警察的位置。 帮助幸存者逃跑。" +LANG["class_desc_nerd"] = "可以使用你的探测器来看附近有没有人。 但要小心,探测器不能分出幸存者和杀人魔。" +LANG["class_desc_fat"] = "你是最胖、最难被打倒的幸存者,但你的耐力值很低。" +LANG["class_desc_shy"] = "你免疫杀人魔的主要能力,但你很虚弱。 小心一点,杀人魔可能会优先杀死你。" +LANG["class_desc_junky"] = "你的视力很好。 可以用它来取代你的手电筒,可避免被杀人魔发现。" +LANG["class_desc_emo"] = "你免疫杀人魔的副能力。 单独行动可以有更多的生存机会。" +LANG["class_desc_black"] = "你有3把钥匙,可以用它们来锁门,让幸存者保持安全。 您也可以解锁锁定的门以取回您的钥匙。" +LANG["class_desc_sherif"] = "你有一把左轮手枪。 用它击晕杀人魔,帮助幸存者逃跑。 但是你不能杀死杀人魔。" +-- Killers +LANG["class_desc_jason"] = "你是最快的杀手 , 都能见到的幸存者所留下的脚印跟随他们。 另外,你的听觉很灵敏,你会听到幸存者的心跳声。" +LANG["class_desc_ghostface"] = "你有能力看到幸存者什么时候打开或关上门,用这个能力快速找到它们。 另外,你的听觉很灵敏,你会听到幸存者的心跳声。" +LANG["class_desc_myers"] = "你是跑最慢的杀手,但是有能力可以看见一名幸存者。 小心使用它来给幸存者带来惊喜并迅速杀死他们。 另外,你的听觉很灵敏,你会听到幸存者的心跳声。" +LANG["class_desc_proxy"] = "当幸存者看不到你时,你可以现身或隐形。 用它来偷袭或吓那些幸存者。 按下按键(预设'A')来使用此能力。 另外,你的听觉很灵敏,你会听到幸存者的心跳声。" +LANG["class_desc_intruder"] = "你可以放置陷阱帮你杀死幸存者。 陷阱绳:布置完毕后,可以用来发现幸存者 捕熊陷阱:你可以用来困住它们。 另外,你的听觉很灵敏,你会听到幸存者的心跳声。" + +LANG["round_mission_police"] = "警察即将到达 %s" +LANG["round_mission_police_killer"] = "杀掉他们 %s" +LANG["round_mission_escape"] = "逃到警察的位置 %s " +LANG["round_mission_escape_killer"] = "别让他们逃走 %s" +LANG["round_mission_objectives"] = "完成右边的目标 %s" +LANG["round_mission_objectives_killer"] = "杀光他们 %s" +LANG["round_mission_jerrycan"] = "找到 %i 个油罐" +LANG["round_mission_jerrycan_found"] = "你找到了一个油罐!" +LANG["round_mission_generator"] = "找到发电机,并启动它!" +LANG["round_mission_radio"] = "找到无线电,并启动它!" +LANG["round_wait_players"] = "等待玩家 %i/%i" +LANG["round_team_name_survivor"] = "一名幸存者" +LANG["round_team_name_killer"] = "杀人魔" +LANG["round_team_desc_survivor"] = "每个幸存者都有特殊的能力。但是你们目标是找到油罐(油罐数量随着玩家的数量而变化)来启动发电机,这样你就可以打开无线电然后向警察求助。 团队合作和适度使用手电筒是生存的关键。" +LANG["round_team_desc_killer"] = "你是一个电影里的杀人魔,你是无敌的。 你的目标是杀死每一个幸存者。 你会随机获得下列武器之一; 斧头,大砍刀或电锯(使用R来打开)您可以按住左键再放开,能够产生暴击。 当幸存者不移动时,你可以听到他们的心跳,只要跟者声音,你就会发现它们。" +LANG["round_notif_police_call"] = "你联络了警察!" +LANG["round_notif_police"] = "直到警察到达后才能逃脱!" +LANG["round_notif_escape"] = "逃脱" +LANG["round_notif_escape_killer"] = "别让他们逃脱" +LANG["round_notif_error_radio"] = "你无法启动无线电!" +LANG["round_notif_error_generator"] = "你无法启动发电机!" +LANG["round_notif_enabled_generator"] = "你启动了发电机!" +LANG["round_notif_player_die"] = "%s 被杀了" +LANG["round_end_escaped"] = "幸存者已经逃脱......" +LANG["round_end_dead"] = "所有幸存者都被杀了......" + +-- Modules +LANG["antiafk_will_kicked"] = "AFK %s" +LANG["f1menu_you_are"] = "你是 %s" +LANG["workshop_need_content"] = "您可能需要Steam Workshop的额外内容。" +LANG["workshop_get_it"] = "带我去!" +LANG["workshop_no"] = "不了" +LANG["traps_rope_hit_world"] = "陷阱绳被触发" +LANG["traps_too_much_distance"] = "距离太远" +LANG["killerhelp_cant_use_ability"] = "你现在不能使用你的能力" +LANG["votemap_title"] = "为下一张地图投票!" +LANG["votemap_extend"] = "再一次" +LANG["votemap_random"] = "随机" +return LANG diff --git a/gamemode/languages/zh-tw.lua b/gamemode/languages/zh-tw.lua new file mode 100644 index 0000000..2f56841 --- /dev/null +++ b/gamemode/languages/zh-tw.lua @@ -0,0 +1,61 @@ + + +local LANG = {} + +-- Core Gamemode +-- Survivors +LANG["class_desc_sports"] = "你的耐力值很高,而且很強壯。 使用武器打暈殺人魔並幫助倖存者逃跑。" +LANG["class_desc_popular"] = "報警之後,你能得知警察的位置。 幫助倖存者逃跑。" +LANG["class_desc_nerd"] = "可以使用你的探測器來看附近有沒有人。 但要小心,探測器不能分出倖存者和殺人魔。" +LANG["class_desc_fat"] = "你是最胖、最難被打倒的倖存者,但你的耐力值很低。" +LANG["class_desc_shy"] = "你免疫殺人魔的主要能力,但你很虛弱。 小心一點,殺人魔可能會優先殺死你。" +LANG["class_desc_junky"] = "你的視力很好。 可以用它來取代你的手電筒,可避免被殺人魔發現。" +LANG["class_desc_emo"] = "你免疫殺人魔的副能力。 單獨行動可以有更多的生存機會。" +LANG["class_desc_black"] = "你有3把鑰匙,可以用它們來鎖門,讓倖存者保持安全。 您也可以解鎖鎖定的門以取回您的鑰匙。" +LANG["class_desc_sherif"] = "你有一把左輪手槍。 用它擊暈殺人魔,幫助倖存者逃跑。 但是你不能殺死殺人魔。" +-- Killers +LANG["class_desc_jason"] = "你是最快的殺手 , 都能見到的倖存者所留下的腳印跟隨他們。 另外,你的聽覺很靈敏,你會聽到倖存者的心跳聲。" +LANG["class_desc_ghostface"] = "你有能力看到倖存者什麼時候打開或關上門,用這個能力快速找到它們。 另外,你的聽覺很靈敏,你會聽到倖存者的心跳聲。" +LANG["class_desc_myers"] = "你是跑最慢的殺手,但是有能力可以看見一名倖存者。 小心使用它來給倖存者帶來驚喜並迅速殺死他們。 另外,你的聽覺很靈敏,你會聽到倖存者的心跳聲。" +LANG["class_desc_proxy"] = "當倖存者看不到你時,你可以現身或隱形。 用它來偷襲或嚇那些倖存者。 按下按鍵(預設'A')來使用此能力。 另外,你的聽覺很靈敏,你會聽到倖存者的心跳聲。" +LANG["class_desc_intruder"] = "你可以放置陷阱幫你殺死倖存者。 陷阱繩:布置完畢後,可以用來發現倖存者 捕熊陷阱:你可以用來困住它們。 另外,你的聽覺很靈敏,你會聽到倖存者的心跳聲。" + +LANG["round_mission_police"] = "警察即將到達 %s" +LANG["round_mission_police_killer"] = "殺掉他們 %s" +LANG["round_mission_escape"] = "逃到警察的位置 %s " +LANG["round_mission_escape_killer"] = "別讓他們逃走 %s" +LANG["round_mission_objectives"] = "完成右邊的目標 %s" +LANG["round_mission_objectives_killer"] = "殺光他們 %s" +LANG["round_mission_jerrycan"] = "找到 %i 個油罐" +LANG["round_mission_jerrycan_found"] = "你找到了一個油罐!" +LANG["round_mission_generator"] = "找到發電機,並啟動它!" +LANG["round_mission_radio"] = "找到無線電,並啟動它!" +LANG["round_wait_players"] = "等待玩家 %i/%i" +LANG["round_team_name_survivor"] = "一名倖存者" +LANG["round_team_name_killer"] = "殺人魔" +LANG["round_team_desc_survivor"] = "每個倖存者都有特殊的能力。但是你們目標是找到油罐(油罐數量隨著玩家的數量而變化)來啟動發電機,這樣你就可以打開無線電然後向警察求助。 團隊合作和適度使用手電筒是生存的關鍵。" +LANG["round_team_desc_killer"] = "你是一個電影裡的殺人魔,你是無敵的。 你的目標是殺死每一個倖存者。 你會隨機獲得下列武器之一; 斧頭,大砍刀或電鋸(使用R來打開)您可以按住左鍵再放開,能夠產生暴擊。 當倖存者不移動時,你可以聽到他們的心跳,只要跟者聲音,你就會發現它們。" +LANG["round_notif_police_call"] = "你聯絡了警察!" +LANG["round_notif_police"] = "直到警察到達後才能逃脫!" +LANG["round_notif_escape"] = "逃脫" +LANG["round_notif_escape_killer"] = "別讓他們逃脫" +LANG["round_notif_error_radio"] = "你無法啟動無線電!" +LANG["round_notif_error_generator"] = "你無法啟動發電機!" +LANG["round_notif_enabled_generator"] = "你啟動了發電機!" +LANG["round_notif_player_die"] = "%s 被殺了" +LANG["round_end_escaped"] = "倖存者已經逃脫......" +LANG["round_end_dead"] = "所有倖存者都被殺了......" + +-- Modules +LANG["antiafk_will_kicked"] = "AFK %s" +LANG["f1menu_you_are"] = "你是 %s" +LANG["workshop_need_content"] = "您可能需要Steam Workshop的額外內容。" +LANG["workshop_get_it"] = "帶我去!" +LANG["workshop_no"] = "不了" +LANG["traps_rope_hit_world"] = "陷阱繩被觸發" +LANG["traps_too_much_distance"] = "距離太遠" +LANG["killerhelp_cant_use_ability"] = "你現在不能使用你的能力" +LANG["votemap_title"] = "為下一張地圖投票!" +LANG["votemap_extend"] = "再一次" +LANG["votemap_random"] = "隨機" +return LANG diff --git a/gamemode/maps/slash_highschool.lua b/gamemode/maps/slash_highschool.lua new file mode 100644 index 0000000..3211d73 --- /dev/null +++ b/gamemode/maps/slash_highschool.lua @@ -0,0 +1,155 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-09 16:16:18 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-12T21:52:21+02:00 + +local GM = GM or GAMEMODE + +GM.MAP.Name = "Highschool" +GM.MAP.EscapeDuration = 60 +GM.MAP.StartMusic = "slashers_start_game_ghostface.wav" +GM.MAP.ChaseMusic = "slashers/ambient/chase_ghostface.wav" +GM.MAP.Goal = { + Generator = { + {type="sls_generator", pos=Vector( -230.557007, 567.435425, 0.243941 ), ang=Angle( -0.104, 179.841, 0.022 ),spw=false,}, + {type="sls_generator", pos=Vector( -3185.97,1998.87,-255.78 ), ang=Angle( -0.082,-88.412,-0.005 ),spw=false,}, + {type="sls_generator", pos=Vector( 1631.988892, 3082.173340, -39.728069 ), ang=Angle( -0.082, 89.379, 0.005 ),spw=false,}, + }, + + Jerrican = { + {type="sls_jerrican", pos=Vector( -337.61422729492,4208.5034179688,15.20546913147 ), ang=Angle(0.29911690950394,-107.67920684814,-0.076904296875),}, + {type="sls_jerrican", pos=Vector( -832.87280273438,3960.4450683594,15.211248397827 ), ang=Angle(-0.18193197250366,132.82957458496,-0.099609375),}, + {type="sls_jerrican", pos=Vector( -871.77398681641,3628.7075195313,143.23510742188 ), ang=Angle(-0.19817142188549,42.745780944824,0.0033673702273518),}, + {type="sls_jerrican", pos=Vector( -150.58769226074,2760.2993164063,15.171372413635 ), ang=Angle(0.31349492073059,177.90315246582,-0.090911865234375),}, + {type="sls_jerrican", pos=Vector( 363.51852416992,3913.6384277344,15.219017982483 ), ang=Angle(0.17899608612061,153.10092163086,-0.053466796875),}, + {type="sls_jerrican", pos=Vector( 954.73406982422,3905.7685546875,15.194498062134 ), ang=Angle(-0.17163632810116,122.43538665771,-0.075958251953125),}, + {type="sls_jerrican", pos=Vector( 1625.3060302734,2592.2314453125,-24.786474227905 ), ang=Angle(0.23140309751034,120.18731689453,-0.06707763671875),}, + {type="sls_jerrican", pos=Vector( -3191.2702636719,1714.2003173828,-240.66720581055 ), ang=Angle(-3.3803564292612e-05,58.764389038086,1.0351240234741e-05),}, + {type="sls_jerrican", pos=Vector( 1619.7426757813,3575.1896972656,-24.786474227905 ), ang=Angle(0.23146924376488,-93.160789489746,-0.067108154296875),}, + {type="sls_jerrican", pos=Vector( 1645.1494140625,1894.0163574219,15.282790184021 ), ang=Angle(-0.72208338975906,116.19367218018,-0.009307861328125),}, + {type="sls_jerrican", pos=Vector( 1097.1127929688,1895.4429931641,15.296053886414 ), ang=Angle(0.52100074291229,140.54516601563,-0.00146484375),}, + {type="sls_jerrican", pos=Vector( 159.30082702637,1925.9259033203,15.186881065369 ), ang=Angle(0.3425304889679,-52.143970489502,-0.088043212890625),}, + {type="sls_jerrican", pos=Vector( -1660.0640869141,2108.74609375,15.250699996948 ), ang=Angle(0.19297276437283,-24.351388931274,-0.04962158203125),}, + {type="sls_jerrican", pos=Vector( -1994.3056640625,1820.2613525391,15.238723754883 ), ang=Angle(0.22074890136719,126.39302062988,-0.05670166015625),}, + {type="sls_jerrican", pos=Vector( -2461.0461425781,2144.8525390625,-240.76989746094 ), ang=Angle(0.24104903638363,-122.06577301025,-0.05950927734375),}, + {type="sls_jerrican", pos=Vector( -1428.2978515625,1242.1107177734,49.071933746338 ), ang=Angle(0.25737193226814,144.17913818359,-0.060211181640625),}, + {type="sls_jerrican", pos=Vector( -968.86248779297,719.958984375,11.206244468689 ), ang=Angle(-0.074853546917439,-133.37257385254,0.05948481336236),}, + {type="sls_jerrican", pos=Vector( -2154.1550292969,440.65505981445,57.139801025391 ), ang=Angle(-0.19147573411465,-19.175411224365,-0.0435791015625),}, + {type="sls_jerrican", pos=Vector( -1715.4619140625,-164.66848754883,15.180100440979 ), ang=Angle(0.35804957151413,-154.51434326172,-0.09197998046875),}, + {type="sls_jerrican", pos=Vector( -1174.3892822266,284.01641845703,15.231330871582 ), ang=Angle(0.23807875812054,143.44622802734,-0.0611572265625),}, + {type="sls_jerrican", pos=Vector( -1267.7409667969,-499.57800292969,15.288521766663 ), ang=Angle(0.6395457983017,99.416877746582,-0.007659912109375),}, + {type="sls_jerrican", pos=Vector( -984.66259765625,159.22805786133,15.22987651825 ), ang=Angle(-0.15406642854214,129.9514465332,-0.0843505859375),}, + {type="sls_jerrican", pos=Vector( 748.11462402344,292.224609375,15.213750839233 ), ang=Angle(0.18704722821712,140.25053405762,-0.055694580078125),}, + {type="sls_jerrican", pos=Vector( 1029.4135742188,492.54858398438,15.237907409668 ), ang=Angle(0.14931757748127,-46.33683013916,-0.044525146484375),}, + {type="sls_jerrican", pos=Vector( 926.78326416016,-367.95364379883,15.196391105652 ), ang=Angle(-0.21430395543575,35.326824188232,-0.0638427734375),}, + {type="sls_jerrican", pos=Vector( 335.88238525391,-342.4338684082,70.468910217285 ), ang=Angle(-0.35885268449783,-81.489151000977,-0.078094482421875),}, + {type="sls_jerrican", pos=Vector( -3204.4877929688,4006.4453125,15.211122512817 ), ang=Angle(0.28541943430901,-44.340118408203,-0.07330322265625),}, + {type="sls_jerrican", pos=Vector( -2914.2302246094,2894.6203613281,15.195457458496 ), ang=Angle(-0.3221048116684,14.934867858887,-0.082733154296875),}, + {type="sls_jerrican", pos=Vector( -2755.4448242188,2460.5871582031,15.186882019043 ), ang=Angle(-0.34217804670334,120.43856048584,-0.087890625),}, + + }, + + Radio = { + {type="sls_radio", pos=Vector( 1100.4357910156,-322.15875244141,31.403644561768 ), ang=Angle(0.1441543251276,-152.83665466309,-0.03436279296875),}, + {type="sls_radio", pos=Vector( 525.01519775391,261.17346191406,36.570552825928 ), ang=Angle(-0.051851563155651,133.30648803711,0.1021229326725),}, + {type="sls_radio", pos=Vector( -215.81350708008,1152.3334960938,40.713584899902 ), ang=Angle(0.38537296652794,64.633186340332,0.072013989090919),}, + {type="sls_radio", pos=Vector( -1008.4176025391,1979.8427734375,40.412010192871 ), ang=Angle(0.018851533532143,-177.70724487305,0.009365570731461),}, + {type="sls_radio", pos=Vector( -3027.1662597656,2556.5673828125,35.318096160889 ), ang=Angle(-0.082713477313519,67.031394958496,-0.058685302734375),}, + {type="sls_radio", pos=Vector( -1743.1160888672,988.11871337891,34.235912322998 ), ang=Angle(-0.12690305709839,-155.81369018555,0.00046024887706153),}, + {type="sls_radio", pos=Vector( 649.06811523438,-309.36059570313,36.332279205322 ), ang=Angle(0.068379744887352,-90.009872436523,0.05548570305109),}, + {type="sls_radio", pos=Vector( 1208.3638916016,1954.3370361328,40.485179901123 ), ang=Angle(0.021240957081318,155.72518920898,0.01632889918983),}, + } +} + +-- Killer +GM.MAP.Killer.Name = "Ghostface" +GM.MAP.Killer.Model = "models/player/screamplayermodel/scream/scream.mdl" +GM.MAP.Killer.WalkSpeed = 190 +GM.MAP.Killer.RunSpeed = 240 +GM.MAP.Killer.ExtraWeapons = {} + +if CLIENT then + GM.MAP.Killer.Desc = GM.LANG:GetString("class_desc_ghostface") + GM.MAP.Killer.Icon = Material("icons/icon_ghostface.png") +end + +-- Convars +CreateConVar("slashers_ghostface_door_duration", 3, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set duration when the door is displayed for Ghostface.") +CreateConVar("slashers_ghostface_door_radius", 1400, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set Ghostface's ability radius. (0 to disable radius)") + +-- Ability + +if CLIENT then + local ICON_DOOR = Material("icons/icon_door.png") + local doors = {} + + local function AddDoor() + local pos, endtime + pos = net.ReadVector() + endtime = net.ReadInt(16) + + table.insert(doors, { + pos = pos, + endtime = endtime +}) +end +net.Receive("sls_kability_AddDoor", AddDoor) + +local function HUDPaintBackground() + if LocalPlayer():Team() != TEAM_KILLER then return end + local curtime = CurTime() + + for k, v in ipairs(doors) do + if curtime > v.endtime then + table.remove(doors, k) + continue + end + local pos1 = v.pos:ToScreen() + surface.SetDrawColor(Color(255, 255, 255)) + surface.SetMaterial(ICON_DOOR) + surface.DrawTexturedRect(pos1.x - 64, pos1.y - 64, 128, 128) + end +end +hook.Add("HUDPaintBackground", "sls_kability_HUDPaintBackground", HUDPaintBackground) + +local function Reset() + doors = {} +end +hook.Add("sls_round_PreStart", "sls_kability_PreStart", Reset) +hook.Add("sls_round_End", "sls_kability_End", Reset) + +else + util.AddNetworkString("sls_kability_AddDoor") + + local function AddDoor(pos, endtime) + if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) then return end + local CV_Radius = GetConVar("slashers_ghostface_door_radius") + + if CV_Radius:GetInt() != 0 then + local entsNerby = ents.FindInSphere( pos, CV_Radius:GetInt() ) + local isKillerNerby = table.HasValue( entsNerby, GM.ROUND.Killer ) + if !isKillerNerby then return end + end + + net.Start("sls_kability_AddDoor") + net.WriteVector(pos) + net.WriteInt(endtime, 16) + net.Send(GM.ROUND.Killer) +end + +local function PlayerUse(ply, ent) + if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) then return end + if ply:Team() != TEAM_SURVIVORS then return end + if ply.ClassID == CLASS_SURV_SHY then return end + if !table.HasValue(GM.CONFIG["killerhelp_door_entities"], ent:GetClass()) then return end + if ply.kh_use && ply.kh_use[ent:EntIndex()] && CurTime() <= ply.kh_use[ent:EntIndex()] then return end + local CV_DoorDuration = GetConVar("slashers_ghostface_door_duration") + + ply.kh_use = ply.kh_use or {} + ply.kh_use[ent:EntIndex()] = CurTime() + CV_DoorDuration:GetFloat() + AddDoor(ent:GetPos(), CurTime() + CV_DoorDuration:GetFloat()) +end +hook.Add("PlayerUse", "sls_kability_PlayerUse", PlayerUse) +end diff --git a/gamemode/maps/slash_lodge.lua b/gamemode/maps/slash_lodge.lua new file mode 100644 index 0000000..d54d277 --- /dev/null +++ b/gamemode/maps/slash_lodge.lua @@ -0,0 +1,97 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-07T18:00:56+02:00 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-10T16:24:10+02:00 + +local GM = GM or GAMEMODE + +GM.MAP.Name = "Lodge" +GM.MAP.EscapeDuration = 60 +GM.MAP.StartMusic = "slasher_start_game_intruder.wav" +GM.MAP.ChaseMusic = "slashers/ambient/chase_intruder.wav" +GM.MAP.Goal = { + Jerrican = { + {type="sls_jerrican", pos=Vector( -430.8125,-909.71875,15.15625 ), ang=Angle(0.3076171875,40.693359375,-0.087890625),}, + {type="sls_jerrican", pos=Vector( -554.78125,-410.09375,15.21875 ), ang=Angle(-0.703125,107.841796875,-0.0439453125),}, + {type="sls_jerrican", pos=Vector( 716.875,494.4375,15.21875 ), ang=Angle(0.263671875,-74.5751953125,-0.0439453125),}, + {type="sls_jerrican", pos=Vector( 787.71875,-63.875,219.46875 ), ang=Angle(-0.2197265625,173.9794921875,-0.087890625),}, + {type="sls_jerrican", pos=Vector( -616.21875,-1127.03125,215.1875 ), ang=Angle(0.263671875,-20.390625,-0.087890625),}, + {type="sls_jerrican", pos=Vector( 501.1875,-457,215.21875 ), ang=Angle(0.2197265625,55.1953125,-0.0439453125),}, + {type="sls_jerrican", pos=Vector( -128.09375,-291.53125,-160.78125 ), ang=Angle(-0.17578125,139.21875,-0.087890625),}, + {type="sls_jerrican", pos=Vector( 507.875,-525.78125,-134.5625 ), ang=Angle(-0.1318359375,-169.27734375,-0.087890625),}, + {type="sls_jerrican", pos=Vector( 793.78125,31.5,-160.75 ), ang=Angle(-0.1318359375,141.9873046875,-0.087890625),}, + {type="sls_jerrican", pos=Vector( -169.53125,-1200.21875,-160.75 ), ang=Angle(0.263671875,56.337890625,-0.0439453125),}, + {type="sls_jerrican", pos=Vector( 834.34375,-1197.8125,-134.53125 ), ang=Angle(0.1318359375,84.462890625,-0.0439453125),}, + {type="sls_jerrican", pos=Vector( 267.28125,-755.1875,-160.75 ), ang=Angle(-0.1318359375,-158.5546875,-0.087890625),}, + {type="sls_jerrican", pos=Vector( 321.5625,-76.5625,215.21875 ), ang=Angle(-0.1318359375,146.2939453125,-0.0439453125),}, + {type="sls_jerrican", pos=Vector( 410.6875,-601.125,15.1875 ), ang=Angle(0.3076171875,-35.068359375,-0.087890625),}, + + }, + + Radio = { + {type="sls_radio", pos=Vector( 659,306.34375,42.4375 ), ang=Angle(-0.3955078125,-156.4013671875,0),}, + {type="sls_radio", pos=Vector( -254.71875,174.0625,26.125 ), ang=Angle(0.3515625,179.6923828125,0),}, + {type="sls_radio", pos=Vector( -363.90625,-916.0625,41.9375 ), ang=Angle(-0.17578125,90,0),}, + {type="sls_radio", pos=Vector( 464.875,-1119.4375,25.625 ), ang=Angle(0,24.3896484375,0),}, + {type="sls_radio", pos=Vector( 229.21875,-367.1875,225.65625 ), ang=Angle(0,-164.00390625,0),}, + {type="sls_radio", pos=Vector( 498.5625,-346.25,-140.71875 ), ang=Angle(0,-148.271484375,0),}, + {type="sls_radio", pos=Vector( 500.71875,-831.9375,-149.375 ), ang=Angle(0.0439453125,-135.17578125,0),}, + {type="sls_radio", pos=Vector( -259.3125,286.78125,241.0625 ), ang=Angle(-0.17578125,-116.279296875,0.17578125),}, + {type="sls_radio", pos=Vector( 201.625,220.75,236.625 ), ang=Angle(-0.3515625,-83.1884765625,-0.2197265625),}, + {type="sls_radio", pos=Vector( -659.6875,-206.8125,48.34375 ), ang=Angle(0.0439453125,-13.6669921875,0),}, + + }, + + Generator = { + {type="sls_generator", pos=Vector( -541.0625,-1289.0625,0.21875 ), ang=Angle(-0.087890625,-7.91015625,0),}, + {type="sls_generator", pos=Vector( -325.71875,395.625,200.25 ), ang=Angle(-0.087890625,37.0458984375,0),}, + {type="sls_generator", pos=Vector( -313,-1327.125,200.21875 ), ang=Angle(-0.087890625,-93.4716796875,-0.0439453125),}, + {type="sls_generator", pos=Vector( 235.59375,-561.75,-175.75 ), ang=Angle(-0.087890625,-11.5576171875,-0.0439453125),}, + + } +} + +-- Killer +GM.MAP.Killer.Name = "the Intruder" +GM.MAP.Killer.Model = "models/steinman/slashers/intruder_pm.mdl" +GM.MAP.Killer.WalkSpeed = 200 +GM.MAP.Killer.RunSpeed = 200 +GM.MAP.Killer.ExtraWeapons = {"weapon_beartrap", "weapon_alertropes", "weapon_dooraxe"} + +if CLIENT then + GM.MAP.Killer.Desc = GM.LANG:GetString("class_desc_intruder") + GM.MAP.Killer.Icon = Material("icons/icon_intruder.png") + local trapsEntity = {} + local function getEntityToDrawHalo() + trapsEntity = net.ReadTable() + end + net.Receive("sls_trapspos",getEntityToDrawHalo) + + hook.Add( "PreDrawHalos", "AddHalos", function() + if LocalPlayer().ClassID != CLASS_SURV_SHY then return end + halo.Add( trapsEntity, Color( 255, 0, 0 ), 5, 5, 2 ) + end ) +else + util.AddNetworkString("sls_trapspos") + local timerTrap = 0 + local function sendTrapProximity() + if IsValid(GM.ROUND.Killer) && GM.ROUND.Active && timerTrap < CurTime() then + timerTrap = CurTime() + 1 + local shygirl = getSurvivorByClass(CLASS_SURV_SHY) + if !shygirl then return end + local entsAround = ents.FindInSphere( shygirl:GetPos(), 700 ) + local trapsAround = {} + for k,v in pairs(entsAround) do + if v:GetClass() == "beartrap" or v:GetClass() == "alertropes" or v.trapeddoor == 1 then + table.insert( trapsAround, v ) + end + end + net.Start("sls_trapspos") + net.WriteTable(trapsAround) + net.Send(shygirl) + end + end + hook.Add("Think","sls_detectProximityTraps",sendTrapProximity) +end diff --git a/gamemode/maps/slash_motel.lua b/gamemode/maps/slash_motel.lua new file mode 100644 index 0000000..5ff7100 --- /dev/null +++ b/gamemode/maps/slash_motel.lua @@ -0,0 +1,213 @@ +-- @Author: Guilhem PECH +-- @Date: 05-Jan-2018 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 +local GM = GM or GAMEMODE + + + +GM.MAP.Name = "Motel" +GM.MAP.EscapeDuration = 90 +GM.MAP.StartMusic = "slashers_start_game_bates.wav" +GM.MAP.ChaseMusic = "slashers/ambient/chase_bates.wav" + +GM.MAP.Goal = { + Jerrican = { + { + type = "sls_jerrican", + pos = Vector(-132.72776794434, 1096.9440917969, -46.418460845947), + ang = Angle(-11.512167930603, -17.985958099365, -0.28103637695313) + }, + { + type = "sls_jerrican", + pos = Vector(123.1305847168, 960.47161865234, -20.908155441284), + ang = Angle(-0.83715111017227, 152.2551574707, -0.34161376953125) + }, + { + type = "sls_jerrican", + pos = Vector(-434.62466430664, -977.69158935547, -255.93627929688), + ang = Angle(-85.384300231934, -129, 106.13331604004) + }, + { + type = "sls_jerrican", + pos = Vector(-250.34573364258, -1045.3840332031, -249.05012512207), + ang = Angle(-89.269607543945, -20.53507232666, -58.782928466797) + }, + { + type = "sls_jerrican", + pos = Vector(250.06280517578, -2957.9208984375, -283.96633911133), + ang = Angle(-3.1291873455048, -44.645122528076, 0.069202430546284) + }, + { + type = "sls_jerrican", + pos = Vector(1117.3536376953, 228.73536682129, -164.76811218262), + ang = Angle(0.76776641607285, -85.551902770996, -0.00201416015625) + }, + { + type = "sls_jerrican", + pos = Vector(1042.9167480469, 102.60068511963, -132.91305541992), + ang = Angle(0.0029051210731268, 125.01371002197, 0.049701131880283) + }, + { + type = "sls_jerrican", + pos = Vector(1130.7811279297, 352.00085449219, -164.88528442383), + ang = Angle(0.33160337805748, 134.03518676758, -0.088836669921875) + }, + { + type = "sls_jerrican", + pos = Vector(1532.0753173828, 401.02243041992, -190.75386047363), + ang = Angle(-0.35057589411736, 150.84475708008, 0.19333827495575) + }, + { + type = "sls_jerrican", + pos = Vector(-10.897481918335, -1617.4521484375, -250.09585571289), + ang = Angle(-87.549354553223, -47.964279174805, 141.82122802734) + }, + { + type = "sls_jerrican", + pos = Vector(-460.42602539063, -2192.0817871094, -284.11688232422), + ang = Angle(-26.21688079834, 90.1982421875, -0.027374267578125) + }, + { + type = "sls_jerrican", + pos = Vector(3103.1127929688, -6156.3852539063, 378.30126953125), + ang = Angle(0.47352004051208, 134.45399475098, -0.0120849609375) + } + }, + Radio = { + { + type = "sls_radio", + pos = Vector(478.4401550293, -1266.5806884766, -247.88885498047), + ang = Angle(0.062253076583147, -179.25592041016, 0.13994246721268) + }, + { + type = "sls_radio", + pos = Vector(403.36065673828, -1300.5260009766, -241.02865600586), + ang = Angle(0.080258369445801, 90.004638671875, 0.079702265560627) + }, + { + type = "sls_radio", + pos = Vector(177.14535522461, -1513.4949951172, -257.55368041992), + ang = Angle(-0.0058267875574529, -85.650054931641, 0.00013644844875671) + }, + { + type = "sls_radio", + pos = Vector(198.41107177734, -2267.7893066406, -257.55194091797), + ang = Angle(-0.0035855418536812, 98.675651550293, 0.0048219640739262) + }, + { + type = "sls_radio", + pos = Vector(-36.193283081055, -2901.6440429688, -247.77038574219), + ang = Angle(0.01403109356761, 76.468772888184, -0.01080322265625) + }, + { + type = "sls_radio", + pos = Vector(1318.7042236328, 334.52438354492, 20.178447723389), + ang = Angle(-0.40564346313477, 171.32048034668, 0.055375158786774) + }, + { + type = "sls_radio", + pos = Vector(978.34875488281, 209.58619689941, 183.30209350586), + ang = Angle(-1.5395933132822e-06, -4.6450867652893, 0.20672005414963) + }, + { + type = "sls_radio", + pos = Vector(1514.5386962891, 473.43273925781, 178.69873046875), + ang = Angle(-0.049126088619232, -121.3890838623, 0.018864806741476) + }, + { + type = "sls_radio", + pos = Vector(1211.291015625, 458.81875610352, 27.832090377808), + ang = Angle(-0.084948137402534, 90.007133483887, -0.004180908203125) + } + }, + Generator = { + { + type = "sls_generator", + pos = Vector(1361.044921875, 284.83706665039, -205.71798706055), + ang = Angle(-0.079552337527275, -65.23762512207, -0.090576171875) + }, + { + type = "sls_generator", + pos = Vector(133.97138977051, -3001.6188964844, -299.79745483398), + ang = Angle(-0.080492347478867, -66.50919342041, -0.0030517578125) + }, + { + type = "sls_generator", + pos = Vector(75.01806640625, 1272.2097167969, -66.514503479004), + ang = Angle(0.60224843025208, 19.975690841675, 1.6436053514481) + }, + { + type = "sls_generator", + pos = Vector(3291.0981445313, -6158.21875, 296.88793945313), + ang = Angle(2.6277825832367, -73.653427124023, 10.224415779114) + } + } +} + +-- Killer +GM.MAP.Killer.Name = "Norman Bates" +GM.MAP.Killer.Model = "models/steinman/slashers/bates_pm.mdl" +GM.MAP.Killer.WalkSpeed = 200 +GM.MAP.Killer.RunSpeed = 200 +GM.MAP.Killer.ExtraWeapons = {"weapon_batesmother"} + +if CLIENT then + GM.MAP.Killer.Desc = GM.LANG:GetString("class_desc_bates") + GM.MAP.Killer.Icon = Material("icons/icon_bates.png") +end + +-- Convars +CreateConVar("slashers_bates_far_radius", 400, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set the first radius (far).") +CreateConVar("slashers_bates_medium_radius", 200, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set the second radius (medium).") +CreateConVar("slashers_bates_close_radius", 100, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set the third radius (close).") + +-- Ability +-------------------The other part of the ability code is in the 'Mother' entity code +if CLIENT then + function GM:playSoundMother(file) + if IsValid(GM.SoundPlayed) then + GM.SoundPlayed:Stop() + end + sound.PlayFile( file, "", function( station,num,err ) + if ( IsValid( station ) ) then + station:Play() + station:EnableLooping(true) + GM.SoundPlayed = station + end + end) + end + + function autoEnd() + if IsValid(GM.SoundPlayed) then + GM.SoundPlayed:Stop() + end + end + hook.Add('sls_round_End',"sls_musicEndRound", autoEnd) + hook.Add('sls_round_End',"sls_musicEndRound", autoEnd) + + function GM:SoundToPlay(level) + if(LocalPlayer():Team() == 1) then return end + if level == 3 then + GM:playSoundMother("sound/slashers/effects/whisper_loop_high.wav") + elseif level == 2 then + GM:playSoundMother("sound/slashers/effects/whisper_loop_medium.wav") + elseif level == 1 then + GM:playSoundMother("sound/slashers/effects/whisper_loop_small.wav") + else + if GM.SoundPlayed then + GM.SoundPlayed:Stop() + end + end + end + + net.Receive( "sls_motherradar", function( len, ply ) + local distLevel = net.ReadUInt(2) + if GM.oldLevel != distLevel then + GM.oldLevel = distLevel + GM:SoundToPlay(distLevel) + end + end) +end diff --git a/gamemode/maps/slash_selvage.lua b/gamemode/maps/slash_selvage.lua new file mode 100644 index 0000000..605dece --- /dev/null +++ b/gamemode/maps/slash_selvage.lua @@ -0,0 +1,236 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-09 16:33:11 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 + +local GM = GM or GAMEMODE + +GM.MAP.Name = "Selvage" +GM.MAP.EscapeDuration = 60 +GM.MAP.StartMusic = "slashers_start_game_myers.wav" +GM.MAP.ChaseMusic = "slashers/ambient/chase_myers.wav" +GM.MAP.Goal = { + Jerrican = { + {type="sls_jerrican", pos=Vector( -22.718750, -1.750000, 31.187500 ), ang=Angle( 0.264, 130.913, -0.088 ),}, + {type="sls_jerrican", pos=Vector( -2128.093750, -65.156250, 42.468750 ), ang=Angle( -0.659, 92.373, 0.000 ),}, + {type="sls_jerrican", pos=Vector( 32.312500, 77.531250, 303.187500 ), ang=Angle( 0.220, -32.783, -0.088 ),}, + {type="sls_jerrican", pos=Vector( 26.750000, -15.468750, 439.218750 ), ang=Angle( -0.176, 15.381, -0.044 ),}, + {type="sls_jerrican", pos=Vector( -1571.218750, 26.093750, 42.375000 ), ang=Angle( -0.176, 160.225, -0.088 ),}, + {type="sls_jerrican", pos=Vector( 1698.062500, 1318.000000, 15.156250 ), ang=Angle( 0.308, 162.422, -0.088 ),}, + {type="sls_jerrican", pos=Vector( -2130.500000, 1292.531250, 42.468750 ), ang=Angle( 0.000, 84.595, 0.396 ),}, + {type="sls_jerrican", pos=Vector( 591.656250, 2252.843750, 16.468750 ), ang=Angle( 2.505, -57.437, 0.527 ),}, + {type="sls_jerrican", pos=Vector( -1562.312500, 1261.875000, 42.468750 ), ang=Angle( 0.571, -139.746, 0.000 ),}, + {type="sls_jerrican", pos=Vector( -814.156250, 1813.937500, 16.187500 ), ang=Angle( -0.308, 42.275, -0.088 ),}, + {type="sls_jerrican", pos=Vector( -2038.218750, 1886.656250, 15.312500 ), ang=Angle( 0.000, 170.244, 0.088 ),}, + {type="sls_jerrican", pos=Vector( -1835.062500, -1205.500000, 16.156250 ), ang=Angle( 0.527, 138.735, -0.088 ),}, + {type="sls_jerrican", pos=Vector( 476.031250, 1293.156250, 15.031250 ), ang=Angle( -0.747, 39.902, -0.044 ),}, + {type="sls_jerrican", pos=Vector( -934.343750, 941.343750, 16.187500 ), ang=Angle( -0.088, -45.571, 0.044 ),}, + {type="sls_jerrican", pos=Vector( -996.750000, -1449.562500, 15.250000 ), ang=Angle( -1.187, 124.980, 0.176 ),}, + {type="sls_jerrican", pos=Vector( -1035.125000, 269.562500, 15.250000 ), ang=Angle( 0.923, -93.076, 0.088 ),}, + {type="sls_jerrican", pos=Vector( 218.000000, 1820.906250, 16.281250 ), ang=Angle( 0.835, 32.344, -0.176 ),}, + {type="sls_jerrican", pos=Vector( -309.656250, 1814.968750, 16.187500 ), ang=Angle( -0.352, 16.260, -0.088 ),}, + {type="sls_jerrican", pos=Vector( -1279.156250, 1816.406250, 17.312500 ), ang=Angle( 1.538, 37.529, 1.099 ),}, + {type="sls_jerrican", pos=Vector( 784.843750, -1120.968750, 65.281250 ), ang=Angle( -3.691, 15.029, -0.659 ),}, + {type="sls_jerrican", pos=Vector( -1432.718750, -1383.218750, 16.187500 ), ang=Angle( 0.264, -154.072, -0.088 ),}, + {type="sls_jerrican", pos=Vector( -1910.125000, -688.000000, 16.187500 ), ang=Angle( 0.264, 123.003, -0.088 ),}, + {type="sls_jerrican", pos=Vector( 581.312500, -277.406250, 15.343750 ), ang=Angle( 0.308, -98.789, -0.835 ),}, + {type="sls_jerrican", pos=Vector( 1301.500000, 1955.375000, 23.156250 ), ang=Angle( 0.352, -126.431, -0.264 ),}, + + }, + + + Generator = { + {type="sls_generator", pos=Vector( -1579.18,-822.45,0.33 ), ang=Angle( -0.148,-43.391,0.011 ),}, + {type="sls_generator", pos=Vector( -1235.22,-780.76,0.66 ), ang=Angle( -0.016,101.245,-0.434 ),}, + {type="sls_generator", pos=Vector( 529.88,2080.05,1.25 ), ang=Angle( -0.077,0.478,-0.005 ),}, + {type="sls_generator", pos=Vector( -1094.93,877.88,0.22 ), ang=Angle( -0.088,-88.149,0.000 ),}, + {type="sls_generator", pos=Vector( -1280.27,1848.75,2.64 ), ang=Angle( -0.714,-128.655,-1.313 ),}, + {type="sls_generator", pos=Vector( -2200.02,821.98,9.21 ), ang=Angle( 1.934,90.379,-1.571 ),}, + {type="sls_generator", pos=Vector( -846.46,926.66,1.29 ), ang=Angle( -0.082,-179.863,-0.038 ),}, + {type="sls_generator", pos=Vector( 1756.17,1139.51,0.20 ), ang=Angle( -0.088,-89.995,0.000 ),}, + {type="sls_generator", pos=Vector( -1666.80,-1133.94,0.24 ), ang=Angle( -0.126,89.896,-0.022 ),}, + {type="sls_generator", pos=Vector( -1802.76,-201.91,0.29 ), ang=Angle( -0.005,13.804,0.000 ),}, + {type="sls_generator", pos=Vector( -640.50,-1504.13,0.27 ), ang=Angle( -0.011,90.324,0.038 ),}, + {type="sls_generator", pos=Vector( 794.23,1749.65,0.24 ), ang=Angle( -0.077,0.132,-0.011 ),}, + + }, + + Radio = { + {type="sls_radio", pos=Vector( 31.81,1029.38,50.84 ), ang=Angle( 0.044,180.000,0.000 ),}, + {type="sls_radio", pos=Vector( -482.13,1799.31,50.88 ), ang=Angle( 0.352,-177.891,-0.044 ),}, + {type="sls_radio", pos=Vector( -1767.28,1608.22,50.84 ), ang=Angle( -0.044,-179.692,0.044 ),}, + {type="sls_radio", pos=Vector( -763.16,646.91,50.84 ), ang=Angle( 0.220,-0.044,0.088 ),}, + {type="sls_radio", pos=Vector( -90.81,109.41,424.41 ), ang=Angle( -0.044,179.912,-0.220 ),}, + {type="sls_radio", pos=Vector( 640.31,2025.31,48.53 ), ang=Angle( 0.044,-90.000,0.000 ),}, + {type="sls_radio", pos=Vector( -1835.47,-480.56,50.84 ), ang=Angle( 0.044,0.000,0.000 ),}, + {type="sls_radio", pos=Vector( -1038.66,-611.44,50.84 ), ang=Angle( -0.088,154.600,-0.088 ),}, + {type="sls_radio", pos=Vector( 510.50,1689.53,43.34 ), ang=Angle( 0.044,90.000,0.000 ),}, + {type="sls_radio", pos=Vector( 673.06,1776.63,50.91 ), ang=Angle( -0.044,-90.000,0.044 ),}, + {type="sls_radio", pos=Vector( -1848.84,-1568.44,48.47 ), ang=Angle( -0.088,90.000,-0.044 ),}, + {type="sls_radio", pos=Vector( -1793.53,-1270.00,50.84 ), ang=Angle( 0.000,-6.987,0.000 ),}, + + } +} + +-- Killer +GM.MAP.Killer.Name = "Michael Myers" +GM.MAP.Killer.Model = "models/player/dewobedil/mike_myers/default_p.mdl" +GM.MAP.Killer.WalkSpeed = 200 +GM.MAP.Killer.RunSpeed = 200 +GM.MAP.Killer.ExtraWeapons = {} + +if CLIENT then + GM.MAP.Killer.Desc = GM.LANG:GetString("class_desc_myers") + GM.MAP.Killer.Icon = Material("icons/icon_myers.png") +end + +-- Convars +CreateConVar("slashers_myers_wallhack_cooldown", 10, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set Myers's wallhack cooldown.") +CreateConVar("slashers_myers_wallhack_duration", 10, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set Myers's wallhack duration.") + +-- Ability + +if CLIENT then + local ICON_VICTIM = Material("icons/icon_target.png") + local victimPos + + local function updateMyersAbility() + local status = net.ReadInt(2) + if status == 2 then + -- Available ! + elseif status == 1 then + surface.PlaySound("slashers/effects/michael_ability_on.wav") + elseif status == 0 then + -- Deactivated ! + end + end + net.Receive("sls_kability_update_myersability",updateMyersAbility) + + local function HUDPaintBackground() + if LocalPlayer():Team() != TEAM_KILLER || !GM.ROUND.Active || !victimPos then return end + local curtime = CurTime() + local pos = victimPos:ToScreen() + surface.SetDrawColor(Color(255, 255, 255)) + surface.SetMaterial(ICON_VICTIM) + surface.DrawTexturedRect(pos.x - 64, pos.y - 64, 128, 128) + surface.DrawTexturedRect(ScrW()-110,10,100,100) + end + hook.Add("HUDPaintBackground", "sls_kability_HUDPaintBackground", HUDPaintBackground) + + local function Reset() + victimPos = nil + end + hook.Add("sls_round_PreStart", "sls_kability_PreStart", Reset) + hook.Add("sls_round_End", "sls_kability_End", Reset) + + local function Wallhack() + local tempPos = net.ReadVector() + if tempPos == Vector(42, 42, 42) then + victimPos = nil + else + victimPos = tempPos + end + end + net.Receive("sls_kability_Wallhack", Wallhack) + +else + util.AddNetworkString("sls_kability_update_myersability") + util.AddNetworkString("sls_kability_Wallhack") + + local VictimMyers + local Timer1 = 0 + + local function findVictim() + for _, v in ipairs(GM.ROUND:GetSurvivorsAlive()) do + if v.ClassID != CLASS_SURV_SHY then + return v + end + end + end + + local lastRequestMyers = 0 + local myersAbilityActivated = false + function GM.MAP.Killer:UseAbility( ply ) + if CurTime() - lastRequestMyers < GetConVar("slashers_myers_wallhack_cooldown"):GetFloat() then + net.Start( "notificationSlasher" ) + net.WriteTable({"killerhelp_cant_use_ability"}) + net.WriteString("cross") + net.Send(ply) + return + end + if myersAbilityActivated then return end + net.Start("sls_kability_update_myersability") + net.WriteInt(1,2) + net.Send(ply) + myersAbilityActivated = true + timer.Simple(GetConVar("slashers_myers_wallhack_duration"):GetFloat(),function () + + myersAbilityActivated = false + lastRequestMyers = CurTime() + if !GM.ROUND.Active then return end + net.Start("sls_kability_update_myersability") + net.WriteInt(0,2) + net.Send(GM.ROUND.Killer) + end) + end + + local function Think() + local curtime = CurTime() + + if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) then + myersAbilityActivated = false + return + end + + if Timer1 < curtime && IsValid(VictimMyers) && VictimMyers.ClassID != CLASS_SURV_SHY then + if myersAbilityActivated then + net.Start("sls_kability_Wallhack") + net.WriteVector(VictimMyers:GetPos() + Vector(0, 0, 50)) + net.Send(GM.ROUND.Killer) + else + net.Start("sls_kability_Wallhack") + net.WriteVector(Vector(42, 42, 42)) + net.Send(GM.ROUND.Killer) + end + Timer1 = curtime + 0.5 + end + if CurTime() - lastRequestMyers == GM.CONFIG["myers_cooldown"] then + net.Start("sls_kability_update_myersability") --Send a message if the ability is available again + net.WriteInt(2,2) + net.Send(GM.ROUND.Killer) + end + + end + hook.Add("Think", "sls_kability_Think", Think) + + local function PostPlayerDeath(ply) + -- Help Myers + if GM.ROUND.Active && IsValid(GM.ROUND.Killer) && GM.ROUND.Killer:Team() == TEAM_KILLER && ply == VictimMyers then + VictimMyers = findVictim() + if !IsValid(VictimMyers) then + net.Start("sls_kability_Wallhack") + net.WriteVector(Vector(42, 42, 42)) + net.Send(GM.ROUND.Killer) + end + end + end + hook.Add("PostPlayerDeath", "sls_kability_PostPlayerDeath", PostPlayerDeath) + + local function PostStart() + if !GM.ROUND.Killer then return end + + VictimMyers = findVictim() + end + hook.Add("sls_round_PostStart", "sls_kability_PostStart", PostStart) + + local function resetEndRound() + myersAbilityActivated = false + lastRequestMyers = 0 + net.Start("sls_kability_update_myersability") + net.WriteInt(0,2) + net.Send(GM.ROUND.Killer) + end + hook.Add("sls_round_End","sls_kreset_myersamility",resetEnRound) +end diff --git a/gamemode/maps/slash_subway.lua b/gamemode/maps/slash_subway.lua new file mode 100644 index 0000000..cc1c782 --- /dev/null +++ b/gamemode/maps/slash_subway.lua @@ -0,0 +1,329 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-09 14:19:18 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-13T14:30:13+02:00 + +local GM = GM or GAMEMODE + +GM.MAP.Name = "Subway" +GM.MAP.EscapeDuration = 90 +GM.MAP.StartMusic = "slashers_start_game_proxy.wav" +GM.MAP.ChaseMusic = "slashers/ambient/chase_proxy.wav" +GM.MAP.Goal = { + Generator = { + {type="sls_generator", pos=Vector( 1555.2901611328 , 625.43389892578 , -475.79974365234 ), ang=Angle( -0.047894809395075 , 77.103637695313 , -0.008544921875 ),}, + {type="sls_generator", pos=Vector( -27.053987503052 , 1899.8416748047 , -241.46769714355 ), ang=Angle( 7.4849977493286 , -108.44499969482 , 15.359950065613 ),}, + {type="sls_generator", pos=Vector( -115.12114715576 , 692.62139892578 , 0.28063523769379 ), ang=Angle( -0.052496179938316 , 151.79542541504 , -0.08978271484375 ),}, + {type="sls_generator", pos=Vector( -994.54235839844 , 1617.1469726563 , 2.3400411605835 ), ang=Angle( -0.12257574498653 , 17.577541351318 , -0.078582763671875 ),}, + {type="sls_generator", pos=Vector( -434.90289306641 , 587.71307373047 , -315.77716064453 ), ang=Angle( -0.077189855277538 , -121.88777160645 , -0.095794677734375 ),}, + {type="sls_generator", pos=Vector( -438.56158447266 , -319.31164550781 , 320.11373901367 ), ang=Angle( -0.08602774143219 , 101.84964752197 , -0.00921630859375 ),}, + + }, + + Jerrican = { + {type="sls_jerrican", pos=Vector( 626.16522216797 , 978.21575927734 , -301.35067749023 ), ang=Angle( 0.2825101017952 , -56.027549743652 , -0.11691284179688 ),}, + {type="sls_jerrican", pos=Vector( 57.623382568359 , 1715.7739257813 , -204.49980163574 ), ang=Angle( -0.053893469274044 , 157.1390838623 , -0.028656005859375 ),}, + {type="sls_jerrican", pos=Vector( 204.26774597168 , 730.41949462891 , 32.883777618408 ), ang=Angle( 0.31352365016937 , 175.91879272461 , 0 ),}, + {type="sls_jerrican", pos=Vector( 201.55532836914 , 769.17071533203 , 32.805271148682 ), ang=Angle( -0.14990532398224 , -136.18208312988 , -0.083343505859375 ),}, + {type="sls_jerrican", pos=Vector( -528.13140869141 , 740.76495361328 , 22.293134689331 ), ang=Angle( -0.55816996097565 , -53.010009765625 , 9.742344263941e-005 ),}, + {type="sls_jerrican", pos=Vector( -583.650390625 , 727.88604736328 , 22.216133117676 ), ang=Angle( -0.42867341637611 , -49.91722869873 , -0.23440551757813 ),}, + {type="sls_jerrican", pos=Vector( -527.84094238281 , 575.70422363281 , -304.81637573242 ), ang=Angle( -0.12804166972637 , -45.465091705322 , 0.01888744905591 ),}, + {type="sls_jerrican", pos=Vector( -574.06182861328 , 601.32495117188 , 82.604270935059 ), ang=Angle( -1.4654284715652 , 179.92671203613 , -0.14865112304688 ),}, + {type="sls_jerrican", pos=Vector( 116.79051971436 , 301.06945800781 , -300.64437866211 ), ang=Angle( 0.082407273352146 , -146.74432373047 , -0.05096435546875 ),}, + {type="sls_jerrican", pos=Vector( -1038.6672363281 , 1765.6499023438 , 51.416213989258 ), ang=Angle( -0.25170168280602 , -25.032375335693 , -0.056060791015625 ),}, + {type="sls_jerrican", pos=Vector( -275.04010009766 , 612.37969970703 , 82.932144165039 ), ang=Angle( 0.51139938831329 , -177.54315185547 , -0.006683349609375 ),}, + {type="sls_jerrican", pos=Vector( 216.0818939209 , 1093.6666259766 , 127.23754882813 ), ang=Angle( 0.22192484140396 , 139.56953430176 , -0.05523681640625 ),}, + {type="sls_jerrican", pos=Vector( -129.18214416504 , -265.31353759766 , -304.75549316406 ), ang=Angle( 0.20723016560078 , -17.678632736206 , -0.0511474609375 ),}, + {type="sls_jerrican", pos=Vector( 1557.6387939453 , 444.23175048828 , -334.78649902344 ), ang=Angle( 0.23139935731888 , -128.82534790039 , -0.067047119140625 ),}, + {type="sls_jerrican", pos=Vector( -1881.3670654297 , 1112.0368652344 , -48.667213439941 ), ang=Angle( -0.0010715052485466 , -15.994430541992 , -0.00372314453125 ),}, + {type="sls_jerrican", pos=Vector( 815.59448242188 , -156.20213317871 , -332.60510253906 ), ang=Angle( -0.17519058287144 , 64.292091369629 , -0.093109130859375 ),}, + {type="sls_jerrican", pos=Vector( -1271.2581787109 , 1404.2322998047 , 51.441509246826 ), ang=Angle( -0.12189055234194 , 29.987237930298 , -0.064788818359375 ),}, + {type="sls_jerrican", pos=Vector( 59.894622802734 , 605.23504638672 , 335.27548217773 ), ang=Angle( -0.12458427250385 , -30.171409606934 , 0.054602038115263 ),}, + {type="sls_jerrican", pos=Vector( 705.19323730469 , 1387.4677734375 , 15.413906097412 ), ang=Angle( -27.819969177246 , -53.936729431152 , 0.014400095678866 ),}, + {type="sls_jerrican", pos=Vector( 603.20422363281 , -23.656675338745 , -368.80438232422 ), ang=Angle( -0.20530983805656 , 107.16015625 , -0.11239624023438 ),}, + {type="sls_jerrican", pos=Vector( 220.83174133301 , 1646.5212402344 , -240.78668212891 ), ang=Angle( 0.28037625551224 , -158.69053649902 , -0.0692138671875 ),}, + {type="sls_jerrican", pos=Vector( -1067.35546875 , 585.49768066406 , -304.80004882813 ), ang=Angle( 0.31165599822998 , -60.914974212646 , -0.076934814453125 ),}, + {type="sls_jerrican", pos=Vector( -2510.9274902344 , 191.55288696289 , -208.78524780273 ), ang=Angle( 0.27691656351089 , -22.900365829468 , -0.07110595703125 ),}, + {type="sls_jerrican", pos=Vector( 275.57260131836 , 1508.1104736328 , -223.22032165527 ), ang=Angle( -0.65892493724823 , 133.19429016113 , -0.18496704101563 ),}, + {type="sls_jerrican", pos=Vector( -2498.2856445313 , 488.92660522461 , -208.79452514648 ), ang=Angle( 0.29896232485771 , -14.056406021118 , -0.076812744140625 ),}, + {type="sls_jerrican", pos=Vector( 676.99542236328 , 853.88385009766 , -368.67318725586 ), ang=Angle( -29.379922866821 , -174.07354736328 , 0.1349038630724 ),}, + {type="sls_jerrican", pos=Vector( -1390.9174804688 , -825.71905517578 , -208.76564025879 ), ang=Angle( 0.23098495602608 , 118.17189788818 , -0.059326171875 ),}, + {type="sls_jerrican", pos=Vector( -2041.5080566406 , 173.8415222168 , -191.3046875 ), ang=Angle( -0.36626592278481 , 59.490589141846 , -0.1151123046875 ),}, + + }, + + Radio = { + {type="sls_radio", pos=Vector( 154.13287353516 , 1127.8270263672 , 44.406784057617 ), ang=Angle( -0.1512143611908 , -76.766105651855 , 0.0056725949980319 ),}, + {type="sls_radio", pos=Vector( -458.69750976563 , 817.68774414063 , 71.051460266113 ), ang=Angle( -0.068640872836113 , -16.761373519897 , -0.132568359375 ),}, + {type="sls_radio", pos=Vector( -1000.5646972656 , -185.62091064453 , -187.50686645508 ), ang=Angle( 0.095139645040035 , 160.14253234863 , -0.12103271484375 ),}, + {type="sls_radio", pos=Vector( 557.31671142578 , 800.15716552734 , -347.28604125977 ), ang=Angle( 9.1530294454856e-009 , 53.593162536621 , 0 ),}, + {type="sls_radio", pos=Vector( 88.159790039063 , 1564.6361083984 , -219.41606140137 ), ang=Angle( 0.026577176526189 , 120.38227844238 , 0.010600571520627 ),}, + {type="sls_radio", pos=Vector( -1038.0050048828 , 1808.8616943359 , 36.571212768555 ), ang=Angle( 0.018387120217085 , -44.639591217041 , 0.017833599820733 ),}, + {type="sls_radio", pos=Vector( -2350.1330566406 , 280.68765258789 , -191.60224914551 ), ang=Angle( 0.26568999886513 , 121.80404663086 , 0.086083844304085 ),}, + {type="sls_radio", pos=Vector( 762.38952636719 , 1462.7406005859 , 36.656219482422 ), ang=Angle( -0.1281670331955 , -34.088413238525 , 0.31091442704201 ),}, + } +} + +-- Killer +GM.MAP.Killer.Name = "the Proxy" +GM.MAP.Killer.Model = "models/slender_arrival/chaser.mdl" +GM.MAP.Killer.WalkSpeed = 200 +GM.MAP.Killer.RunSpeed = 200 +GM.MAP.Killer.ExtraWeapons = {} + +if CLIENT then + GM.MAP.Killer.Desc = GM.LANG:GetString("class_desc_proxy") + GM.MAP.Killer.Icon = Material("icons/icon_proxy.png") +end + + +-- Ability + +if CLIENT then + local PlyInvisible = false + + net.Receive( "sls_kability_Invisible", function( len, pl ) + PlyInvisible = net.ReadBool() + end ) + + local RED = Color(255,0,0,255) + local GREEN = Color(0,255,0,255) + local Visible + + local function isVisible() + Visible = net.ReadBool() + + end + net.Receive("sls_kability_InvisibleIndic", isVisible) + + local function InvisibleVision() + if !GM.ROUND.Active || !GM.ROUND.Survivors || LocalPlayer():Team() != TEAM_KILLER then return end + + if PlyInvisible and LocalPlayer():Alive() then + + DrawMaterialOverlay( "effects/dodge_overlay.vmt", -0.42 ) + DrawSharpen( 1.2, 1.2 ) + end + end + hook.Add( "RenderScreenspaceEffects", "sls_kability_BinocDraw", InvisibleVision ) + + local TimerView = 0 + local function CheckKillerInSight() + local v = team.GetPlayers(TEAM_KILLER)[1] + local curtime = CurTime() + local ply = LocalPlayer() + + if !ply:Alive() or !v:IsValid() or !ply:IsLineOfSightClear( v ) or v == ply then return end + + + local TargetPosMax= v:GetPos()+ v:OBBMaxs() - Vector(10,0,0) + local TargetPosCenter = v:GetPos()+v:OBBCenter() + local TargetPosMin = v:GetPos()+ v:OBBMins() + Vector(10,0,0) + + local ScreenPosMax = TargetPosMax:ToScreen() + local ScreenPosCenter = TargetPosCenter:ToScreen() + local ScreenPosMin = TargetPosMin:ToScreen() + + posPlayer = ply:GetPos() + if ( TimerView < curtime) and (posPlayer:Distance( v:GetPos()) < 150) then + net.Start( "sls_kability_survivorseekiller" ) + net.WriteFloat( curtime ) + net.SendToServer() + TimerView = curtime + 0.2 + + + elseif (TimerView < curtime) and (ScreenPosMax.x < ScrW() and ScreenPosMax.y < ScrH() and ScreenPosMin.x > 0 and ScreenPosMin.y > 0) then + -- print("KILLERSIGHT") + net.Start( "sls_kability_survivorseekiller" ) + net.WriteFloat( curtime ) + net.SendToServer() + TimerView = curtime + 0.2 + end + end + hook.Add ("Think","sls_kability_IHaveTheKillerInView",CheckKillerInSight) + + local proxyPos + local showProxy + local function receiveProxyPos() + + proxyPos = net.ReadVector() + showProxy = net.ReadBool() + + end + net.Receive("sls_proxy_sendpos",receiveProxyPos) + + local function drawIconOnProxy() + if !showProxy or !proxyPos then return end + local pos = proxyPos:ToScreen() + surface.SetDrawColor(Color(255, 255, 255)) + surface.SetMaterial(GM.MAP.Killer.Icon) + surface.DrawTexturedRect(pos.x - 64, pos.y - 64, 64, 64) + end + hook.Add("HUDPaintBackground","sls_proxyicon_draw",drawIconOnProxy) + +else + util.AddNetworkString( "sls_kability_Invisible" ) + util.AddNetworkString( "sls_kability_InvisibleIndic" ) + util.AddNetworkString( "sls_kability_survivorseekiller" ) + util.AddNetworkString("sls_proxy_sendpos") + + + local KInvisible = Color(255,255,255,0) + local KNormal = Color(255,255,255,255) + local InitialSpawnK = false + --local keyPressed = false + local KillerInView + local LastKillerInView = 0 + + local function CandisapearV2() + local curtime = CurTime() + + + if LastKillerInView > curtime - 0.5 then + KillerInView = true + else + KillerInView = false + end + + end + hook.Add("Think","sls_kability_UpdateKillerInView",CandisapearV2) + + + function ResponsePlayerSeeKiller() + LastKillerInView = net.ReadFloat() + end + net.Receive("sls_kability_survivorseekiller", ResponsePlayerSeeKiller) + + function GM.MAP.Killer:UseAbility(ply) + local PlayerWeapon = ply:GetActiveWeapon() + if KillerInView then + net.Start( "notificationSlasher" ) + net.WriteTable({"killerhelp_cant_use_ability"}) + net.WriteString("cross") + net.Send(ply) + return + end + + if !ply.InvisibleActive and !KillerInView then + + ply:EmitSound( "slashers/effects/proxy_power_on.wav" ) + + timer.Simple( 0.6, function () + + ply:SetColor(KInvisible ) + ply:SetWalkSpeed( 400 ) + ply:SetRunSpeed(400) + ply:StripWeapon(PlayerWeapon:GetClass()) + + ply:SetRenderMode(RENDERMODE_NONE ) + ply:DrawShadow( false ) + ply:AddEffects(EF_NOSHADOW) + ply.InvisibleActive = true + ply:CrosshairDisable() + + net.Start("sls_kability_Invisible") + net.WriteBool(true) + net.Send(ply) + + end) + + elseif ply.InvisibleActive and !KillerInView then + ply:EmitSound( "slashers/effects/proxy_power_off.wav" ) + + timer.Simple( 1, function () + -- ply:AddKey( IN_ATTACK ) + -- ply:AddKey( IN_ZOOM ) + ply:Give(ply.InitialWeapon) + ply:SetColor( KNormal ) + ply:SetRunSpeed( 400 ) + ply:DrawShadow( true ) + ply:SetWalkSpeed(GM.MAP.Killer.WalkSpeed) + ply:SetRunSpeed(GM.MAP.Killer.RunSpeed) + ply:SetRenderMode(RENDERMODE_TRANSALPHA ) + + ply.InvisibleActive = false + + net.Start("sls_kability_Invisible") + net.WriteBool(false) + net.Send(ply) + + end) + end + end + + + local function ResetVisibility() + for k,v in pairs(player.GetAll()) do + v:DrawShadow( true ) + if IsValid(GAMEMODE.CLASS.Killers) and GM.ROUND.Killer:Team() == TEAM_KILLER then + v:SetWalkSpeed(GAMEMODE.CLASS.Killers[CLASS_KILL_PROXY].walkspeed) + v:SetRunSpeed(GAMEMODE.CLASS.Killers[CLASS_KILL_PROXY].walkspeed) + GM.ROUND.Killer.InvisibleActive = false + end + v:SetRenderMode(RENDERMODE_TRANSALPHA ) + v:SetColor(Color(255,255,255)) + end + if (!GAMEMODE.ROUND.Killer) then return end + net.Start("sls_kability_Invisible") + net.WriteBool(false) + net.Send(GAMEMODE.ROUND.Killer) + end +hook.Add("PostPlayerDeath","sls_kability_ResetViewKiller",ResetVisibility) +hook.Add("sls_round_PostStart","sls_kability_ResetViewKillerAfterEnd",ResetVisibility) + +local timerSend = 0 +local function sendPosWhenInvisible() + if IsValid(GM.ROUND.Killer) && GM.ROUND.Active && timerSend < CurTime() then + timerSend = CurTime() + 0.5 + local shygirl = getSurvivorByClass(CLASS_SURV_SHY) + if !shygirl then return end + if !shygirl:IsLineOfSightClear(GM.ROUND.Killer) or !GM.ROUND.Killer.InvisibleActive then + net.Start("sls_proxy_sendpos") + net.WriteVector(Vector(0,0,0)) + net.WriteBool(false) + net.Send(shygirl) + return + end + + net.Start("sls_proxy_sendpos") + net.WriteVector(GM.ROUND.Killer:GetPos()) + net.WriteBool(true) + net.Send(shygirl) + end + if !GM.ROUND.Active && timerSend < CurTime() then + timerSend = CurTime() + 1 + net.Start("sls_proxy_sendpos") + net.WriteVector(Vector(0,0,0)) + net.WriteBool(false) + net.Broadcast() + end +end +hook.Add("Think","sls_sendposkillerwheninvisible",sendPosWhenInvisible) +end + +local function initCol() + local allentities = ents.GetAll() + for k, v in pairs(allentities) do + if (v:IsPlayer()) or (v:GetClass() == "prop_door_rotating") then + v:SetCustomCollisionCheck( true ) + end + end +end +hook.Add( "InitPostEntity", "sls_kability_CustomInit", initCol) +hook.Add("sls_round_PostStart","sls_kability_TestInit", initCol) + + +local function ShouldCollide( ent1, ent2 ) + if ent1:IsPlayer() and ent1:GetColor().a == 0 and ent2:GetClass() == "prop_door_rotating" or + ent2:IsPlayer() and ent2:GetColor().a == 0 and ent1:GetClass() == "prop_door_rotating" then + return false + end + if ent1:IsPlayer() and ent1:GetColor().a == 0 or + ent2:IsPlayer() and ent2:GetColor().a == 0 then + return false + end + return true +end +hook.Add("ShouldCollide", "sls_kability_ShouldCollide", ShouldCollide) diff --git a/gamemode/maps/slash_summercamp.lua b/gamemode/maps/slash_summercamp.lua new file mode 100644 index 0000000..86ed83a --- /dev/null +++ b/gamemode/maps/slash_summercamp.lua @@ -0,0 +1,156 @@ +-- Utopia Games - Slashers +-- +-- @Author: Garrus2142 +-- @Date: 2017-08-09 13:41:40 +-- @Last Modified by: Garrus2142 +-- @Last Modified time: 2017-08-09 13:41:40 + +local GM = GM or GAMEMODE + +GM.MAP.Name = "Summercamp" +GM.MAP.EscapeDuration = 90 +GM.MAP.StartMusic = "slashers_start_game_jason.wav" +GM.MAP.ChaseMusic = "slashers/ambient/chase_jason.wav" +GM.MAP.Goal = { + Generator = { + {type="sls_generator", pos=Vector( 1678.174683, 5552.737305, 215.173004 ), ang=Angle( -0.483, 6.740, -0.121 ),spw=false ,}, + {type="sls_generator", pos=Vector( -2755.215576, -1942.527344, 27.788239 ), ang=Angle( 3.708, -36.244, -0.005 ),spw=false,}, + {type="sls_generator", pos=Vector( 6499.022461, -1667.111450, 11.305360 ), ang=Angle( 0.297, 41.523, 0.176 ),spw=false,}, + }, + + Jerrican = { + {type="sls_jerrican", pos=Vector( 986.629150, 1900.260864, 275.224335 ), ang=Angle( -31.284, 3.741, -0.192 ), spw = false,}, + {type="sls_jerrican", pos=Vector( 132.203217, 1687.506958, 275.231934 ), ang=Angle( -0.148, -179.006, -0.115 ),spw = false,}, + {type="sls_jerrican", pos=Vector( -198.006714, 3428.893799, 275.202301 ), ang=Angle( 0.577, -0.022, -0.115 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 1155.607666, 1691.713379, 275.225677 ), ang=Angle( 0.472, -0.027, -0.093 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 835.292908, 3425.746338, 275.231995 ), ang=Angle( 0.445, -0.027, -0.088 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 3954.628174, 3936.639893, 265.443634 ), ang=Angle( -0.236, -0.044, 0.401 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 1055.940552, 5541.725098, 275.162415 ), ang=Angle( 0.066, 44.324, 0.000 ),spw = false,}, + {type="sls_jerrican", pos=Vector( -2709.210693, -1529.358643, 73.433403 ), ang=Angle( 0.797, 0.000, -0.088 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 829.121765, 355.968048, 79.252518 ), ang=Angle( -0.352, 0.027, -0.071 ),spw = false,}, + {type="sls_jerrican", pos=Vector( -194.238800, 354.712860, 79.294006 ), ang=Angle( -0.170, 0.027, -0.033 ),spw = false,}, + {type="sls_jerrican", pos=Vector( -870.087891, -610.642456, 79.196129 ), ang=Angle( 0.604, -0.022, -0.121 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 131.326981, -1380.994995, 79.235001 ), ang=Angle( 0.434, -0.027, -0.082 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 1152.339355, -1376.056885, 79.235016 ), ang=Angle( 0.428, -0.027, -0.082 ),spw = false,}, + {type="sls_jerrican", pos=Vector( -780.021362, -929.935791, 19.447821 ), ang=Angle( 1.807, 56.799, 0.324 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 8045.914551, -1821.616089, 32.290798 ), ang=Angle( 0.593, -39.265, 0.000 ),spw = false,}, + {type="sls_jerrican", pos=Vector( 5475.315918, 3365.187500, 223.280289 ), ang=Angle( -0.747, 7.454, -0.005 ),spw = false,}, + {type="sls_jerrican", pos=Vector( -792.936462, 5763.221191, 263.126678 ), ang=Angle( 82.183, -179.995,169.547 ),spw = false,}, + }, + + Radio = { + {type="sls_radio", pos=Vector( 1226.423584, 5450.633301, 304.424774 ), ang=Angle( -0.137, -43.237, 0.044 ),spw = false,}, + {type="sls_radio", pos=Vector( 7130.218262, -1156.360596, 28.896412 ), ang=Angle( 0.247, 14.738, -0.033 ),spw = false,}, + {type="sls_radio", pos=Vector( 4618.899902, -671.850220, 31.748055 ), ang=Angle( 1.165, 101.294, 0.220 ),spw = false,}, + } +} + +-- Killer +GM.MAP.Killer.Name = "Jason" +GM.MAP.Killer.Model = "models/player/mkx_jason.mdl" +GM.MAP.Killer.WalkSpeed = 190 +GM.MAP.Killer.RunSpeed = 240 +GM.MAP.Killer.ExtraWeapons = {} + +if CLIENT then + GM.MAP.Killer.Desc = GM.LANG:GetString("class_desc_jason") + GM.MAP.Killer.Icon = Material("icons/icon_jason.png") +end + +-- Convars +CreateConVar("slashers_jason_step_duration", 30, {FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Set duration when the footstep is displayed for Jason.") + +-- Ability + +if CLIENT then + local ICON_STEP = Material("icons/footsteps.png") + local steps = {} + + local function AddStep() + local ply, pos, ang, endtime + + ply = net.ReadEntity() + pos = net.ReadVector() + ang = net.ReadAngle() + endtime = net.ReadInt(16) + + ang.p = 0 + ang.r = 0 + + local fpos = pos + if ply.LastFoot then + fpos = fpos + ang:Right() * 5 + else + fpos = fpos + ang:Right() * -5 + end + ply.LastFoot = !ply.LastFoot + + local trace = {} + trace.start = fpos + trace.endpos = trace.start + Vector(0, 0, -10) + trace.filter = ply + local tr = util.TraceLine(trace) + + if tr.Hit then + local tbl = {} + tbl.pos = tr.HitPos + tbl.foot = foot + tbl.endtime = endtime + tbl.angle = ang.y + tbl.normal = Vector(0, 0, 1) + table.insert(steps, tbl) + end + end + net.Receive("sls_kability_AddStep", AddStep) + + local maxDistance = 600 ^ 2 + local function PostDrawTranslucentRenderables() + local pos = EyePos() + + cam.Start3D(pos, EyeAngles()) + render.SetMaterial(ICON_STEP) + for k, v in ipairs(steps) do + if CurTime() > v.endtime then + table.remove(steps, k) + continue + end + if (v.pos - pos):LengthSqr() < maxDistance then + render.DrawQuadEasy(v.pos + v.normal, v.normal, 10, 20, Color(255, 255, 255), v.angle) + end + end + cam.End3D() + end + hook.Add("PostDrawTranslucentRenderables", "sls_kability_PostDrawTranslucentRenderables", PostDrawTranslucentRenderables) + + local function Reset() + steps = {} + end + hook.Add("sls_round_PreStart", "sls_kability_PreStart", Reset) + hook.Add("sls_round_End", "sls_kability_End", Reset) + +else + util.AddNetworkString("sls_kability_AddStep") + + local function PlayerFootstep(ply, pos, foot, sound, volume, filter) + if ply:GetColor() == Color(255,255,255,0) then return true end + if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) then return end + if ply:Team() != TEAM_SURVIVORS then return end + if ply.ClassID == CLASS_SURV_SHY then return end + + net.Start("sls_kability_AddStep") + net.WriteEntity(ply) + net.WriteVector(pos) + net.WriteAngle(ply:GetAimVector():Angle()) + net.WriteInt(CurTime() + GetConVar("slashers_jason_step_duration"):GetFloat(), 16) + net.Send(GM.ROUND.Killer) + end + hook.Add("PlayerFootstep", "sls_kability_PlayerFootstep", PlayerFootstep) +end + +hook.Add( "PlayerFootstep", "sls_kability_CDisableSoundFootStepsUnique", function( ply, pos, foot, sound, volume, filter ) + if ply:GetColor().a == 0 then + return true + else + return + end +end ) diff --git a/gamemode/modules/chasemode/cl_chasemode.lua b/gamemode/modules/chasemode/cl_chasemode.lua index 284e0b5..e681c39 100755 --- a/gamemode/modules/chasemode/cl_chasemode.lua +++ b/gamemode/modules/chasemode/cl_chasemode.lua @@ -2,18 +2,16 @@ -- -- @Author: Guilhem PECH -- @Date: 2017-07-26T13:54:42+02:00 --- @Last Modified by: Guilhem PECH +-- @Last modified by: Guilhem PECH local Timer1 = 0 local GM = GM or GAMEMODE - local function HaveASurvivorInSight() - local killer = team.GetPlayers(TEAM_KILLER)[1] - if !IsValid(killer) then return end + if !IsValid(GM.ROUND.Killer) then return end if LocalPlayer():Team() != TEAM_KILLER then return end local curtime = CurTime() if Timer1 > curtime then return end @@ -21,16 +19,16 @@ local function HaveASurvivorInSight() local SurvivorsPly = player.GetAll() for k,v in pairs(SurvivorsPly) do - if killer:GetPos():Distance(v:GetPos()) < 1000 && LocalPlayer():IsLineOfSightClear( v ) and v:IsValid() and v ~= LocalPlayer() then + if GM.ROUND.Killer:GetPos():Distance(v:GetPos()) < 1000 && LocalPlayer():IsLineOfSightClear( v ) && v:IsValid() && v != LocalPlayer() then - local TargetPosMax= v:GetPos()+ v:OBBMaxs() - Vector(10,0,0) - local TargetPosMin = v:GetPos()+ v:OBBMins() + Vector(10,0,0) + local TargetPosMax = v:GetPos() + v:OBBMaxs() - Vector(10,0,0) + local TargetPosMin = v:GetPos() + v:OBBMins() + Vector(10,0,0) local ScreenPosMax = TargetPosMax:ToScreen() local ScreenPosMin = TargetPosMin:ToScreen() - if (ScreenPosMax.x < ScrW() and ScreenPosMax.y < ScrH() and ScreenPosMin.x > 0 and ScreenPosMin.y > 0) then + if (ScreenPosMax.x < ScrW() && ScreenPosMax.y < ScrH() && ScreenPosMin.x > 0 && ScreenPosMin.y > 0) then net.Start( "sls_killerseesurvivor" ) net.WriteEntity( v ) @@ -48,7 +46,7 @@ local ChaseSound local function InitValue() if !IsValid(LocalPlayer()) then return end - ChaseSound = CreateSound( LocalPlayer(), GAMEMODE.CONFIG["chase_musics"][game.GetMap()]) + ChaseSound = CreateSound( LocalPlayer(), GM.MAP.ChaseMusic) LocalPlayer().LastViewByKillerTime = 0 LocalPlayer().ChaseSoundPlaying = false end @@ -65,14 +63,13 @@ net.Receive( "sls_chaseactivated", LastViewByKiller) local function chaseMusic() - curtime= CurTime() - - if (!LocalPlayer():Alive() and LocalPlayer().ChaseSoundPlaying) then ChaseSound:FadeOut(1.2) end + curtime = CurTime() + if (!LocalPlayer():Alive() && LocalPlayer().ChaseSoundPlaying) then ChaseSound:FadeOut(1.2) end if (!LocalPlayer():Alive()) then return end - if !(LocalPlayer().LastViewByKillerTime) then return end + if !LocalPlayer().LastViewByKillerTime then return end - if (LocalPlayer().LastViewByKillerTime > curtime - 3 and !LocalPlayer().ChaseSoundPlaying) then + if (LocalPlayer().LastViewByKillerTime > curtime - 3 && !LocalPlayer().ChaseSoundPlaying) then timer.Simple(3, function() if LocalPlayer().LastViewByKillerTime > curtime - 3 then @@ -81,7 +78,7 @@ local function chaseMusic() end end) LocalPlayer().ChaseSoundPlaying = true - elseif LocalPlayer().ChaseSoundPlaying and LocalPlayer().LastViewByKillerTime < curtime - 5 then + elseif LocalPlayer().ChaseSoundPlaying && LocalPlayer().LastViewByKillerTime < curtime - 5 then ChaseSound:FadeOut(1.2) LocalPlayer().ChaseSoundPlaying = false end diff --git a/gamemode/modules/chasemode/sv_chasemode.lua b/gamemode/modules/chasemode/sv_chasemode.lua old mode 100755 new mode 100644 index 4609d6e..0fa5125 --- a/gamemode/modules/chasemode/sv_chasemode.lua +++ b/gamemode/modules/chasemode/sv_chasemode.lua @@ -1,26 +1,25 @@ --- Utopia Games - Slashers --- --- @Author: Guilhem PECH --- @Date: 2017-07-26T15:18:58+02:00 --- @Last Modified by: Guilhem PECH --- @Last Modified time: 2017-07-26T17:52:15+02:00 - - - -util.AddNetworkString( "sls_killerseesurvivor" ) -util.AddNetworkString( "sls_chaseactivated" ) - -local function relayChase() - local ply = net.ReadEntity() - local color = net.ReadUInt(8) - local time = CurTime() - if !IsValid(GAMEMODE.ROUND.Killer) then return end - if color != 0 then - - net.Start( "sls_chaseactivated" ) - net.WriteFloat(time) - net.Send(ply) - - end -end -net.Receive( "sls_killerseesurvivor", relayChase) +-- @Author: Guilhem PECH +-- @Date: 21-Oct-2018 +-- @Email: guilhempech@gmail.com +-- @Project: Slashers +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 + + +util.AddNetworkString( "sls_killerseesurvivor" ) +util.AddNetworkString( "sls_chaseactivated" ) + +local function relayChase() + local ply = net.ReadEntity() + local color = net.ReadUInt(8) + local time = CurTime() + if !IsValid(GAMEMODE.ROUND.Killer) then return end + if color != 0 then + + net.Start( "sls_chaseactivated" ) + net.WriteFloat(time) + net.Send(ply) + + end +end +net.Receive( "sls_killerseesurvivor", relayChase) diff --git a/gamemode/modules/entityindicator/cl_entityindicator.lua b/gamemode/modules/entityindicator/cl_entityindicator.lua new file mode 100644 index 0000000..7647ea4 --- /dev/null +++ b/gamemode/modules/entityindicator/cl_entityindicator.lua @@ -0,0 +1,50 @@ +-- Utopia Games - Slashers +-- +-- @Author: Guilhem PECH +-- @Date: 2017-08-09T14:06:19+02:00 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-09T14:56:48+02:00 + +--- Show stuff on objective entity + +local function getUseKey() + local cpt = 0 + while input.LookupKeyBinding( cpt ) != "+use" && cpt < 159 do + cpt = cpt + 1 + end + + if cpt > KEY_Z then + if cpt == KEY_ENTER or cpt == KEY_PAD_ENTER then + return "L" + else + return ">" + end + else + return input.GetKeyName( cpt ) + end +end + +local usekey = getUseKey() +function DrawIndicator(ent) + + + local name = string.Explode( " ", ent.PrintName )[1] + local description = ent.Information + + local x = ent:GetPos().x + ent:OBBCenter().x //Get the X position of our player + local y = ent:GetPos().y + ent:OBBCenter().y //Get the Y position of our player + local z = ent:GetPos().z + ent:OBBCenter().z //Get the Z position of our player + local zOffset = 0 + + + local pos = Vector(x,y,z+zOffset) + local pos2d = pos:ToScreen() //Change the 3D vector to a 2D one + local TitleSize = draw.GetFontHeight( "Bohemian typewriter STITLE" ) + local KeySize = draw.GetFontHeight( "KeyboardFont" ) + -- local usekey = input.LookupKeyBinding( KEY_E ) + cam.Start2D() + draw.DrawText(name,"Bohemian typewriter STITLE",pos2d.x,pos2d.y,Color(255,0,0,255),TEXT_ALIGN_CENTER) + draw.DrawText(usekey.." ","KeyboardFont",pos2d.x ,pos2d.y + TitleSize + 10,Color(255,255,255,255),TEXT_ALIGN_CENTER) + draw.DrawText(description,"Bohemian typewriter SA",pos2d.x + 5, pos2d.y + TitleSize + 10 ,Color(255,255,255,255),TEXT_ALIGN_CENTER) + cam.End2D() +end diff --git a/gamemode/modules/f1menu/cl_f1menu.lua b/gamemode/modules/f1menu/cl_f1menu.lua index a76574f..c88c60a 100755 --- a/gamemode/modules/f1menu/cl_f1menu.lua +++ b/gamemode/modules/f1menu/cl_f1menu.lua @@ -2,7 +2,7 @@ -- -- @Author: Guilhem PECH -- @Date: 2017-07-26T13:50:55+02:00 --- @Last Modified by: Daryl_Winters +-- @Last Modified by: Garrus2142 -- @Last Modified time: 2017-08-07T17:46:37+02:00 local GM = GAMEMODE or GM @@ -17,7 +17,7 @@ function ShowPlayerScreen(TeamName,TeamText,CharacName,CharacText,ImageCharac,Ti BackGroundPanel = vgui.Create( "DPanel" ) BackGroundPanel:SetSize( ScrW(),ScrH() ) BackGroundPanel:Dock(FILL) - BackGroundPanel:SetDrawBackground( true ) + BackGroundPanel:SetPaintBackground( true ) local PersoPANEL = vgui.Create("DPanel",BackGroundPanel) PersoPANEL:SetPaintBackground( true ) @@ -29,8 +29,10 @@ function ShowPlayerScreen(TeamName,TeamText,CharacName,CharacText,ImageCharac,Ti local img_charac = vgui.Create( "DImage", PersoPANEL ) if !ImageCharac then - ImageCharac = "/characteres/default.png" + ImageCharac = "materials/characteres/default.png" end + + local tryCacheMaterial = Material( ImageCharac ) img_charac:SetImage( ImageCharac ) img_charac:SetTall((1/1.5)*ScrH()) img_charac:SetWide((1/1.5)*ScrH()/1080*987) @@ -115,7 +117,7 @@ end net.Receive( "sls_f1_menu", function () local TeamName = " " local TeamText = " " - local ImageCharac = "/characteres/default.png" + local ImageCharac = "materials/characteres/default.png" local CharacName = " " if timed then return end @@ -129,20 +131,20 @@ net.Receive( "sls_f1_menu", function () TeamName = GM.LANG:GetString("round_team_name_survivor") TeamText = GM.LANG:GetString("round_team_desc_survivor") - ImageCharac = "/characteres/"..string.lower(GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].name)..".png" - CharacName = GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].dispname - CharacText = GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].description + ImageCharac = "materials/characteres/"..string.lower(GAMEMODE.CLASS.Survivors[LocalPlayer().ClassID].name)..".png" + CharacName = GM.CLASS.Survivors[LocalPlayer().ClassID].dispname + CharacText = GM.CLASS.Survivors[LocalPlayer().ClassID].description elseif LocalPlayer():Team() == 1 then TeamName = GM.LANG:GetString("round_team_name_killer") TeamText = GM.LANG:GetString("round_team_desc_killer") - ImageCharac = "/characteres/"..string.lower(GAMEMODE.CLASS.Killers[LocalPlayer().ClassID].name)..".png" - CharacName = GM.CLASS.Killers[LocalPlayer().ClassID].name - CharacText = GAMEMODE.CLASS.Killers[LocalPlayer().ClassID].description + ImageCharac = "materials/characteres/"..string.lower(GAMEMODE.MAP.Killer.Name)..".png" + CharacName = GM.MAP.Killer.Name + CharacText = GM.MAP.Killer.Desc else TeamName = "unnafected" TeamText = "unaffected" - ImageCharac = "/characteres/default.png" + ImageCharac = "materials/characteres/default.png" CharacName = "Unaffected" CharacText = "none" end @@ -150,18 +152,25 @@ net.Receive( "sls_f1_menu", function () ShowPlayerScreen(TeamName,TeamText,CharacName,CharacText,ImageCharac,0) end) +function RemoveMenuIfExist() + if IsValid(BackGroundPanel) then + BackGroundPanel:Remove() + end +end +hook.Add("sls_round_End","removeScreenWhenRoundEnd",RemoveMenuIfExist) + function ShowTitle(Title,Second) - local BackGroundPanel = vgui.Create( "DPanel" ) - BackGroundPanel:SetSize( ScrW(),ScrH() ) + local BackPanel = vgui.Create( "DPanel" ) + BackPanel:SetSize( ScrW(),ScrH() ) - BackGroundPanel:Dock(FILL) - BackGroundPanel:SetDrawBackground( true ) - BackGroundPanel:SetBackgroundColor(Color( 0, 0, 0, 250 )) - BackGroundPanel:SetTerm( 5.5 ) - surface.PlaySound( "/slashers/effects/notif_2.wav" ) - BackGroundPanel:Center() + BackPanel:Dock(FILL) + BackPanel:SetPaintBackground( true ) + BackPanel:SetBackgroundColor(Color( 0, 0, 0, 250 )) + BackPanel:SetTerm( 5.5 ) + surface.PlaySound( "slashers/effects/notif_2.wav" ) + BackPanel:Center() - local titleLabel = vgui.Create("DLabel",BackGroundPanel) + local titleLabel = vgui.Create("DLabel", BackPanel ,"Title") titleLabel:Center() titleLabel:SetFont( "Friday13" ) titleLabel:Dock(FILL) @@ -173,7 +182,7 @@ function ShowTitle(Title,Second) titleLabel:SlideUp( 0.2 ) timer.Simple( 0.3, function() - BackGroundPanel:Remove() + BackPanel:Remove() end) end ) end diff --git a/gamemode/modules/goal/cl_objective.lua b/gamemode/modules/goal/cl_objective.lua index 78358a2..a32e24c 100755 --- a/gamemode/modules/goal/cl_objective.lua +++ b/gamemode/modules/goal/cl_objective.lua @@ -2,14 +2,9 @@ -- -- @Author: Guilhem PECH -- @Date: 2017-07-26T13:54:42+02:00 --- @Last Modified by: +-- @Last Modified by: Garrus2142 -- @Last Modified time: 2017-07-26T22:29:36+02:00 - - -AddCSLuaFile() - - net.Receive( "objectiveSlasher", function() local NotifText = net.ReadTable() local NotifType = net.ReadString() @@ -121,7 +116,7 @@ end OBJPanel:SetSize( 512, 128 ) OBJPanel:AlignTop(-128) OBJPanel:AlignRight(100) - OBJPanel:SetDrawBackground( false ) + OBJPanel:SetPaintBackground( false ) -- Blood background diff --git a/gamemode/modules/goal/sv_currentobjective.lua b/gamemode/modules/goal/sv_currentobjective.lua index b945693..952d59b 100755 --- a/gamemode/modules/goal/sv_currentobjective.lua +++ b/gamemode/modules/goal/sv_currentobjective.lua @@ -2,7 +2,7 @@ -- -- @Author: Guilhem PECH -- @Date: 2017-07-26T13:54:42+02:00 --- @Last Modified by: +-- @Last Modified by: Garrus2142 -- @Last Modified time: 2017-07-26T15:16:16+02:00 @@ -25,10 +25,10 @@ hook.Add( "sls_round_PostStart", "StartObjectives", function( ply, text, public hook.Add( "sls_NextObjective", "Next Objective", function() if (CurrentObjective == "find_jerrican") then CurrentObjective = "activate_generator" - GAMEMODE.ROUND:UpdateEndTime(GAMEMODE.ROUND.EndTime + GAMEMODE.CONFIG["round_duration_add_obj"]) + GAMEMODE.ROUND:UpdateEndTime(GAMEMODE.ROUND.EndTime + GetConVar("slashers_duration_addobj"):GetFloat()) elseif (CurrentObjective == "activate_generator") then CurrentObjective = "activate_radio" - GAMEMODE.ROUND:UpdateEndTime(GAMEMODE.ROUND.EndTime + GAMEMODE.CONFIG["round_duration_add_obj"]) + GAMEMODE.ROUND:UpdateEndTime(GAMEMODE.ROUND.EndTime + GetConVar("slashers_duration_addsurv"):GetFloat()) elseif (CurrentObjective == "activate_radio") then CurrentObjective ="wainting_police" GAMEMODE.ROUND:StartWaitingPolice() diff --git a/gamemode/modules/goal/sv_randomplacement.lua b/gamemode/modules/goal/sv_randomplacement.lua index 802ec26..83f4662 100755 --- a/gamemode/modules/goal/sv_randomplacement.lua +++ b/gamemode/modules/goal/sv_randomplacement.lua @@ -2,257 +2,16 @@ -- -- @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-26 22:32:02 - - -local MapData = { - - slash_summercamp = { - - Generator = { - {type="sls_generator", pos=Vector( 1678.174683, 5552.737305, 215.173004 ), ang=Angle( -0.483, 6.740, -0.121 ),spw=false ,}, - {type="sls_generator", pos=Vector( -2755.215576, -1942.527344, 27.788239 ), ang=Angle( 3.708, -36.244, -0.005 ),spw=false,}, - {type="sls_generator", pos=Vector( 6499.022461, -1667.111450, 11.305360 ), ang=Angle( 0.297, 41.523, 0.176 ),spw=false,}, - }, - - Jerrican = { - {type="sls_jerrican", pos=Vector( 986.629150, 1900.260864, 275.224335 ), ang=Angle( -31.284, 3.741, -0.192 ), spw = false,}, - {type="sls_jerrican", pos=Vector( 132.203217, 1687.506958, 275.231934 ), ang=Angle( -0.148, -179.006, -0.115 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -198.006714, 3428.893799, 275.202301 ), ang=Angle( 0.577, -0.022, -0.115 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 1155.607666, 1691.713379, 275.225677 ), ang=Angle( 0.472, -0.027, -0.093 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 835.292908, 3425.746338, 275.231995 ), ang=Angle( 0.445, -0.027, -0.088 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 3954.628174, 3936.639893, 265.443634 ), ang=Angle( -0.236, -0.044, 0.401 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 1055.940552, 5541.725098, 275.162415 ), ang=Angle( 0.066, 44.324, 0.000 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -2709.210693, -1529.358643, 73.433403 ), ang=Angle( 0.797, 0.000, -0.088 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 829.121765, 355.968048, 79.252518 ), ang=Angle( -0.352, 0.027, -0.071 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -194.238800, 354.712860, 79.294006 ), ang=Angle( -0.170, 0.027, -0.033 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -870.087891, -610.642456, 79.196129 ), ang=Angle( 0.604, -0.022, -0.121 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 131.326981, -1380.994995, 79.235001 ), ang=Angle( 0.434, -0.027, -0.082 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 1152.339355, -1376.056885, 79.235016 ), ang=Angle( 0.428, -0.027, -0.082 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -780.021362, -929.935791, 19.447821 ), ang=Angle( 1.807, 56.799, 0.324 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 8045.914551, -1821.616089, 32.290798 ), ang=Angle( 0.593, -39.265, 0.000 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 5475.315918, 3365.187500, 223.280289 ), ang=Angle( -0.747, 7.454, -0.005 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -792.936462, 5763.221191, 263.126678 ), ang=Angle( 82.183, -179.995,169.547 ),spw = false,}, - }, - - Radio = { - {type="sls_radio", pos=Vector( 1226.423584, 5450.633301, 304.424774 ), ang=Angle( -0.137, -43.237, 0.044 ),spw = false,}, - {type="sls_radio", pos=Vector( 7130.218262, -1156.360596, 28.896412 ), ang=Angle( 0.247, 14.738, -0.033 ),spw = false,}, - {type="sls_radio", pos=Vector( 4618.899902, -671.850220, 31.748055 ), ang=Angle( 1.165, 101.294, 0.220 ),spw = false,}, - }, - - - }, - - slash_highschool = { - Generator = { - {type="sls_generator", pos=Vector( -230.557007, 567.435425, 0.243941 ), ang=Angle( -0.104, 179.841, 0.022 ),spw=false,}, - {type="sls_generator", pos=Vector( -3185.97,1998.87,-255.78 ), ang=Angle( -0.082,-88.412,-0.005 ),spw=false,}, - {type="sls_generator", pos=Vector( 1631.988892, 3082.173340, -39.728069 ), ang=Angle( -0.082, 89.379, 0.005 ),spw=false,}, - }, - - Jerrican = { - {type="sls_jerrican", pos=Vector( 1640.621338, 1963.723511, 22.168455 ), ang=Angle( 0.709, -69.340, -0.005 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 1098.769043, 1996.015015, 22.516426 ), ang=Angle( -0.330, -130.836, -0.038 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -3158.965576, 1744.980957, -240.749039 ), ang=Angle( -0.187, 25.686, -0.044 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -1658.887451, 1844.536011, 16.802458 ), ang=Angle( 0.247 ,89.824, -0.005 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 1096.024292, 1857.869507, 16.578562 ), ang=Angle( 24.620, 142.581, 0.137 ),spw = false,}, - {type="sls_jerrican", pos=Vector( 1645.787231, 1854.194824, 16.291689 ), ang=Angle( 0.588, 177.220, 0.000 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -2149.268555, 1830.002563, 16.219990 ), ang=Angle( 0.450, 75.817, -0.275 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -2158.761230, -486.748199, 16.207558 ), ang=Angle( -0.275, 45.851, -0.027 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -2145.092529, 488.334808, 16.342915 ), ang=Angle( -0.060, 44.769, -0.280 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -1650.676758, 485.838318, 16.260302 ), ang=Angle( -0.159, -23.676, -0.088 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -1133.220459, 488.161591, 16.258362 ), ang=Angle( -0.159, -15.315, -0.088 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -620.295959, 490.353088, 16.198181 ), ang=Angle( 0.258, -11.217, -0.071 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -615.532837, -489.418457, 16.191908 ), ang=Angle( 0.269, 1.758, -0.077 ),spw = false,}, - {type="sls_jerrican", pos=Vector( -1131.976807 ,-487.101868, 16.207989 ), ang=Angle( 0.242, 3.521, -0.066 ),spw = false,}, - }, - - Radio = { - {type="sls_radio", pos=Vector( -1015.359558, 1984.683960, 40.387001 ), ang=Angle( 0.016, 179.989, 0.055 ),spw = false,}, - {type="sls_radio", pos=Vector( 1081.431396, -323.156342, 31.447535 ), ang=Angle( -0.176, -87.693, -0.005 ),spw = false,}, - {type="sls_radio", pos=Vector( 649.651917, -313.385010, 36.436779 ), ang=Angle( 0.280, -79.052, -0.093 ),spw = false,}, - {type="sls_radio", pos=Vector( 1079.011475, 230.000366, 32.502056 ), ang=Angle( -0.137,-96.757, 0.044 ),spw = false,}, - {type="sls_radio", pos=Vector( -206.554825, 1439.213135, 40.607414 ), ang=Angle( -0.104, -79.629, 0.027 ),spw = false,}, - }, - - - }, - - slash_selvage = { - Jerrican = { - {type="sls_jerrican", pos=Vector( -22.718750, -1.750000, 31.187500 ), ang=Angle( 0.264, 130.913, -0.088 ),}, - {type="sls_jerrican", pos=Vector( -2128.093750, -65.156250, 42.468750 ), ang=Angle( -0.659, 92.373, 0.000 ),}, - {type="sls_jerrican", pos=Vector( 32.312500, 77.531250, 303.187500 ), ang=Angle( 0.220, -32.783, -0.088 ),}, - {type="sls_jerrican", pos=Vector( 26.750000, -15.468750, 439.218750 ), ang=Angle( -0.176, 15.381, -0.044 ),}, - {type="sls_jerrican", pos=Vector( -1571.218750, 26.093750, 42.375000 ), ang=Angle( -0.176, 160.225, -0.088 ),}, - {type="sls_jerrican", pos=Vector( 1698.062500, 1318.000000, 15.156250 ), ang=Angle( 0.308, 162.422, -0.088 ),}, - {type="sls_jerrican", pos=Vector( -2130.500000, 1292.531250, 42.468750 ), ang=Angle( 0.000, 84.595, 0.396 ),}, - {type="sls_jerrican", pos=Vector( 591.656250, 2252.843750, 16.468750 ), ang=Angle( 2.505, -57.437, 0.527 ),}, - {type="sls_jerrican", pos=Vector( -1562.312500, 1261.875000, 42.468750 ), ang=Angle( 0.571, -139.746, 0.000 ),}, - {type="sls_jerrican", pos=Vector( -814.156250, 1813.937500, 16.187500 ), ang=Angle( -0.308, 42.275, -0.088 ),}, - {type="sls_jerrican", pos=Vector( -2038.218750, 1886.656250, 15.312500 ), ang=Angle( 0.000, 170.244, 0.088 ),}, - {type="sls_jerrican", pos=Vector( -1835.062500, -1205.500000, 16.156250 ), ang=Angle( 0.527, 138.735, -0.088 ),}, - {type="sls_jerrican", pos=Vector( 476.031250, 1293.156250, 15.031250 ), ang=Angle( -0.747, 39.902, -0.044 ),}, - {type="sls_jerrican", pos=Vector( -934.343750, 941.343750, 16.187500 ), ang=Angle( -0.088, -45.571, 0.044 ),}, - {type="sls_jerrican", pos=Vector( -996.750000, -1449.562500, 15.250000 ), ang=Angle( -1.187, 124.980, 0.176 ),}, - {type="sls_jerrican", pos=Vector( -1035.125000, 269.562500, 15.250000 ), ang=Angle( 0.923, -93.076, 0.088 ),}, - {type="sls_jerrican", pos=Vector( 218.000000, 1820.906250, 16.281250 ), ang=Angle( 0.835, 32.344, -0.176 ),}, - {type="sls_jerrican", pos=Vector( -309.656250, 1814.968750, 16.187500 ), ang=Angle( -0.352, 16.260, -0.088 ),}, - {type="sls_jerrican", pos=Vector( -1279.156250, 1816.406250, 17.312500 ), ang=Angle( 1.538, 37.529, 1.099 ),}, - {type="sls_jerrican", pos=Vector( 784.843750, -1120.968750, 65.281250 ), ang=Angle( -3.691, 15.029, -0.659 ),}, - {type="sls_jerrican", pos=Vector( -1432.718750, -1383.218750, 16.187500 ), ang=Angle( 0.264, -154.072, -0.088 ),}, - {type="sls_jerrican", pos=Vector( -1910.125000, -688.000000, 16.187500 ), ang=Angle( 0.264, 123.003, -0.088 ),}, - {type="sls_jerrican", pos=Vector( 581.312500, -277.406250, 15.343750 ), ang=Angle( 0.308, -98.789, -0.835 ),}, - {type="sls_jerrican", pos=Vector( 1301.500000, 1955.375000, 23.156250 ), ang=Angle( 0.352, -126.431, -0.264 ),}, - - }, - - - Generator = { - {type="sls_generator", pos=Vector( -1579.18,-822.45,0.33 ), ang=Angle( -0.148,-43.391,0.011 ),}, - {type="sls_generator", pos=Vector( -1235.22,-780.76,0.66 ), ang=Angle( -0.016,101.245,-0.434 ),}, - {type="sls_generator", pos=Vector( 529.88,2080.05,1.25 ), ang=Angle( -0.077,0.478,-0.005 ),}, - {type="sls_generator", pos=Vector( -1094.93,877.88,0.22 ), ang=Angle( -0.088,-88.149,0.000 ),}, - {type="sls_generator", pos=Vector( -1280.27,1848.75,2.64 ), ang=Angle( -0.714,-128.655,-1.313 ),}, - {type="sls_generator", pos=Vector( -2200.02,821.98,9.21 ), ang=Angle( 1.934,90.379,-1.571 ),}, - {type="sls_generator", pos=Vector( -846.46,926.66,1.29 ), ang=Angle( -0.082,-179.863,-0.038 ),}, - {type="sls_generator", pos=Vector( 1756.17,1139.51,0.20 ), ang=Angle( -0.088,-89.995,0.000 ),}, - {type="sls_generator", pos=Vector( -1666.80,-1133.94,0.24 ), ang=Angle( -0.126,89.896,-0.022 ),}, - {type="sls_generator", pos=Vector( -1802.76,-201.91,0.29 ), ang=Angle( -0.005,13.804,0.000 ),}, - {type="sls_generator", pos=Vector( -640.50,-1504.13,0.27 ), ang=Angle( -0.011,90.324,0.038 ),}, - {type="sls_generator", pos=Vector( 794.23,1749.65,0.24 ), ang=Angle( -0.077,0.132,-0.011 ),}, - - }, - - Radio = { - {type="sls_radio", pos=Vector( 31.81,1029.38,50.84 ), ang=Angle( 0.044,180.000,0.000 ),}, - {type="sls_radio", pos=Vector( -482.13,1799.31,50.88 ), ang=Angle( 0.352,-177.891,-0.044 ),}, - {type="sls_radio", pos=Vector( -1767.28,1608.22,50.84 ), ang=Angle( -0.044,-179.692,0.044 ),}, - {type="sls_radio", pos=Vector( -763.16,646.91,50.84 ), ang=Angle( 0.220,-0.044,0.088 ),}, - {type="sls_radio", pos=Vector( -90.81,109.41,424.41 ), ang=Angle( -0.044,179.912,-0.220 ),}, - {type="sls_radio", pos=Vector( 640.31,2025.31,48.53 ), ang=Angle( 0.044,-90.000,0.000 ),}, - {type="sls_radio", pos=Vector( -1835.47,-480.56,50.84 ), ang=Angle( 0.044,0.000,0.000 ),}, - {type="sls_radio", pos=Vector( -1038.66,-611.44,50.84 ), ang=Angle( -0.088,154.600,-0.088 ),}, - {type="sls_radio", pos=Vector( 510.50,1689.53,43.34 ), ang=Angle( 0.044,90.000,0.000 ),}, - {type="sls_radio", pos=Vector( 673.06,1776.63,50.91 ), ang=Angle( -0.044,-90.000,0.044 ),}, - {type="sls_radio", pos=Vector( -1848.84,-1568.44,48.47 ), ang=Angle( -0.088,90.000,-0.044 ),}, - {type="sls_radio", pos=Vector( -1793.53,-1270.00,50.84 ), ang=Angle( 0.000,-6.987,0.000 ),}, - - }, - - }, - slash_lodge = { - Jerrican = { - {type="sls_jerrican", pos=Vector( -430.8125,-909.71875,15.15625 ), ang=Angle(0.3076171875,40.693359375,-0.087890625),}, - {type="sls_jerrican", pos=Vector( -554.78125,-410.09375,15.21875 ), ang=Angle(-0.703125,107.841796875,-0.0439453125),}, - {type="sls_jerrican", pos=Vector( 716.875,494.4375,15.21875 ), ang=Angle(0.263671875,-74.5751953125,-0.0439453125),}, - {type="sls_jerrican", pos=Vector( 787.71875,-63.875,219.46875 ), ang=Angle(-0.2197265625,173.9794921875,-0.087890625),}, - {type="sls_jerrican", pos=Vector( -616.21875,-1127.03125,215.1875 ), ang=Angle(0.263671875,-20.390625,-0.087890625),}, - {type="sls_jerrican", pos=Vector( 501.1875,-457,215.21875 ), ang=Angle(0.2197265625,55.1953125,-0.0439453125),}, - {type="sls_jerrican", pos=Vector( -128.09375,-291.53125,-160.78125 ), ang=Angle(-0.17578125,139.21875,-0.087890625),}, - {type="sls_jerrican", pos=Vector( 507.875,-525.78125,-134.5625 ), ang=Angle(-0.1318359375,-169.27734375,-0.087890625),}, - {type="sls_jerrican", pos=Vector( 793.78125,31.5,-160.75 ), ang=Angle(-0.1318359375,141.9873046875,-0.087890625),}, - {type="sls_jerrican", pos=Vector( -169.53125,-1200.21875,-160.75 ), ang=Angle(0.263671875,56.337890625,-0.0439453125),}, - {type="sls_jerrican", pos=Vector( 834.34375,-1197.8125,-134.53125 ), ang=Angle(0.1318359375,84.462890625,-0.0439453125),}, - {type="sls_jerrican", pos=Vector( 267.28125,-755.1875,-160.75 ), ang=Angle(-0.1318359375,-158.5546875,-0.087890625),}, - {type="sls_jerrican", pos=Vector( 321.5625,-76.5625,215.21875 ), ang=Angle(-0.1318359375,146.2939453125,-0.0439453125),}, - {type="sls_jerrican", pos=Vector( 410.6875,-601.125,15.1875 ), ang=Angle(0.3076171875,-35.068359375,-0.087890625),}, - - }, - - Radio = { - {type="sls_radio", pos=Vector( 659,306.34375,42.4375 ), ang=Angle(-0.3955078125,-156.4013671875,0),}, - {type="sls_radio", pos=Vector( -254.71875,174.0625,26.125 ), ang=Angle(0.3515625,179.6923828125,0),}, - {type="sls_radio", pos=Vector( -363.90625,-916.0625,41.9375 ), ang=Angle(-0.17578125,90,0),}, - {type="sls_radio", pos=Vector( 464.875,-1119.4375,25.625 ), ang=Angle(0,24.3896484375,0),}, - {type="sls_radio", pos=Vector( 229.21875,-367.1875,225.65625 ), ang=Angle(0,-164.00390625,0),}, - {type="sls_radio", pos=Vector( 498.5625,-346.25,-140.71875 ), ang=Angle(0,-148.271484375,0),}, - {type="sls_radio", pos=Vector( 500.71875,-831.9375,-149.375 ), ang=Angle(0.0439453125,-135.17578125,0),}, - {type="sls_radio", pos=Vector( -259.3125,286.78125,241.0625 ), ang=Angle(-0.17578125,-116.279296875,0.17578125),}, - {type="sls_radio", pos=Vector( 201.625,220.75,236.625 ), ang=Angle(-0.3515625,-83.1884765625,-0.2197265625),}, - {type="sls_radio", pos=Vector( -659.6875,-206.8125,48.34375 ), ang=Angle(0.0439453125,-13.6669921875,0),}, - - }, - - Generator = { - {type="sls_generator", pos=Vector( -541.0625,-1289.0625,0.21875 ), ang=Angle(-0.087890625,-7.91015625,0),}, - {type="sls_generator", pos=Vector( -325.71875,395.625,200.25 ), ang=Angle(-0.087890625,37.0458984375,0),}, - {type="sls_generator", pos=Vector( -313,-1327.125,200.21875 ), ang=Angle(-0.087890625,-93.4716796875,-0.0439453125),}, - {type="sls_generator", pos=Vector( 235.59375,-561.75,-175.75 ), ang=Angle(-0.087890625,-11.5576171875,-0.0439453125),}, - - }, - - }, - - slash_subway = { - Generator = { - {type="sls_generator", pos=Vector( 1555.2901611328 , 625.43389892578 , -475.79974365234 ), ang=Angle( -0.047894809395075 , 77.103637695313 , -0.008544921875 ),}, - {type="sls_generator", pos=Vector( -27.053987503052 , 1899.8416748047 , -241.46769714355 ), ang=Angle( 7.4849977493286 , -108.44499969482 , 15.359950065613 ),}, - {type="sls_generator", pos=Vector( -115.12114715576 , 692.62139892578 , 0.28063523769379 ), ang=Angle( -0.052496179938316 , 151.79542541504 , -0.08978271484375 ),}, - {type="sls_generator", pos=Vector( -994.54235839844 , 1617.1469726563 , 2.3400411605835 ), ang=Angle( -0.12257574498653 , 17.577541351318 , -0.078582763671875 ),}, - {type="sls_generator", pos=Vector( -434.90289306641 , 587.71307373047 , -315.77716064453 ), ang=Angle( -0.077189855277538 , -121.88777160645 , -0.095794677734375 ),}, {type="sls_generator", pos=Vector( -438.56158447266 , -319.31164550781 , 320.11373901367 ), ang=Angle( -0.08602774143219 , 101.84964752197 , -0.00921630859375 ),}, - - }, - - Jerrican = { - {type="sls_jerrican", pos=Vector( 626.16522216797 , 978.21575927734 , -301.35067749023 ), ang=Angle( 0.2825101017952 , -56.027549743652 , -0.11691284179688 ),}, - {type="sls_jerrican", pos=Vector( 57.623382568359 , 1715.7739257813 , -204.49980163574 ), ang=Angle( -0.053893469274044 , 157.1390838623 , -0.028656005859375 ),}, - {type="sls_jerrican", pos=Vector( 204.26774597168 , 730.41949462891 , 32.883777618408 ), ang=Angle( 0.31352365016937 , 175.91879272461 , 0 ),}, - {type="sls_jerrican", pos=Vector( 201.55532836914 , 769.17071533203 , 32.805271148682 ), ang=Angle( -0.14990532398224 , -136.18208312988 , -0.083343505859375 ),}, - {type="sls_jerrican", pos=Vector( -528.13140869141 , 740.76495361328 , 22.293134689331 ), ang=Angle( -0.55816996097565 , -53.010009765625 , 9.742344263941e-005 ),}, - {type="sls_jerrican", pos=Vector( -583.650390625 , 727.88604736328 , 22.216133117676 ), ang=Angle( -0.42867341637611 , -49.91722869873 , -0.23440551757813 ),}, - {type="sls_jerrican", pos=Vector( -527.84094238281 , 575.70422363281 , -304.81637573242 ), ang=Angle( -0.12804166972637 , -45.465091705322 , 0.01888744905591 ),}, - {type="sls_jerrican", pos=Vector( -574.06182861328 , 601.32495117188 , 82.604270935059 ), ang=Angle( -1.4654284715652 , 179.92671203613 , -0.14865112304688 ),}, - {type="sls_jerrican", pos=Vector( 116.79051971436 , 301.06945800781 , -300.64437866211 ), ang=Angle( 0.082407273352146 , -146.74432373047 , -0.05096435546875 ),}, - {type="sls_jerrican", pos=Vector( -1038.6672363281 , 1765.6499023438 , 51.416213989258 ), ang=Angle( -0.25170168280602 , -25.032375335693 , -0.056060791015625 ),}, - {type="sls_jerrican", pos=Vector( -275.04010009766 , 612.37969970703 , 82.932144165039 ), ang=Angle( 0.51139938831329 , -177.54315185547 , -0.006683349609375 ),}, - {type="sls_jerrican", pos=Vector( 216.0818939209 , 1093.6666259766 , 127.23754882813 ), ang=Angle( 0.22192484140396 , 139.56953430176 , -0.05523681640625 ),}, - {type="sls_jerrican", pos=Vector( -129.18214416504 , -265.31353759766 , -304.75549316406 ), ang=Angle( 0.20723016560078 , -17.678632736206 , -0.0511474609375 ),}, - {type="sls_jerrican", pos=Vector( 1557.6387939453 , 444.23175048828 , -334.78649902344 ), ang=Angle( 0.23139935731888 , -128.82534790039 , -0.067047119140625 ),}, - {type="sls_jerrican", pos=Vector( -1881.3670654297 , 1112.0368652344 , -48.667213439941 ), ang=Angle( -0.0010715052485466 , -15.994430541992 , -0.00372314453125 ),}, - {type="sls_jerrican", pos=Vector( 815.59448242188 , -156.20213317871 , -332.60510253906 ), ang=Angle( -0.17519058287144 , 64.292091369629 , -0.093109130859375 ),}, - {type="sls_jerrican", pos=Vector( -1271.2581787109 , 1404.2322998047 , 51.441509246826 ), ang=Angle( -0.12189055234194 , 29.987237930298 , -0.064788818359375 ),}, - {type="sls_jerrican", pos=Vector( 59.894622802734 , 605.23504638672 , 335.27548217773 ), ang=Angle( -0.12458427250385 , -30.171409606934 , 0.054602038115263 ),}, - {type="sls_jerrican", pos=Vector( 705.19323730469 , 1387.4677734375 , 15.413906097412 ), ang=Angle( -27.819969177246 , -53.936729431152 , 0.014400095678866 ),}, - {type="sls_jerrican", pos=Vector( 603.20422363281 , -23.656675338745 , -368.80438232422 ), ang=Angle( -0.20530983805656 , 107.16015625 , -0.11239624023438 ),}, - {type="sls_jerrican", pos=Vector( 220.83174133301 , 1646.5212402344 , -240.78668212891 ), ang=Angle( 0.28037625551224 , -158.69053649902 , -0.0692138671875 ),}, - {type="sls_jerrican", pos=Vector( -1067.35546875 , 585.49768066406 , -304.80004882813 ), ang=Angle( 0.31165599822998 , -60.914974212646 , -0.076934814453125 ),}, - {type="sls_jerrican", pos=Vector( -2510.9274902344 , 191.55288696289 , -208.78524780273 ), ang=Angle( 0.27691656351089 , -22.900365829468 , -0.07110595703125 ),}, - {type="sls_jerrican", pos=Vector( 275.57260131836 , 1508.1104736328 , -223.22032165527 ), ang=Angle( -0.65892493724823 , 133.19429016113 , -0.18496704101563 ),}, - {type="sls_jerrican", pos=Vector( -2498.2856445313 , 488.92660522461 , -208.79452514648 ), ang=Angle( 0.29896232485771 , -14.056406021118 , -0.076812744140625 ),}, - {type="sls_jerrican", pos=Vector( 676.99542236328 , 853.88385009766 , -368.67318725586 ), ang=Angle( -29.379922866821 , -174.07354736328 , 0.1349038630724 ),}, - {type="sls_jerrican", pos=Vector( -1390.9174804688 , -825.71905517578 , -208.76564025879 ), ang=Angle( 0.23098495602608 , 118.17189788818 , -0.059326171875 ),}, - {type="sls_jerrican", pos=Vector( -2041.5080566406 , 173.8415222168 , -191.3046875 ), ang=Angle( -0.36626592278481 , 59.490589141846 , -0.1151123046875 ),}, - - }, - - Radio = { - {type="sls_radio", pos=Vector( 154.13287353516 , 1127.8270263672 , 44.406784057617 ), ang=Angle( -0.1512143611908 , -76.766105651855 , 0.0056725949980319 ),}, - {type="sls_radio", pos=Vector( -458.69750976563 , 817.68774414063 , 71.051460266113 ), ang=Angle( -0.068640872836113 , -16.761373519897 , -0.132568359375 ),}, - {type="sls_radio", pos=Vector( -1000.5646972656 , -185.62091064453 , -187.50686645508 ), ang=Angle( 0.095139645040035 , 160.14253234863 , -0.12103271484375 ),}, - {type="sls_radio", pos=Vector( 557.31671142578 , 800.15716552734 , -347.28604125977 ), ang=Angle( 9.1530294454856e-009 , 53.593162536621 , 0 ),}, - {type="sls_radio", pos=Vector( 88.159790039063 , 1564.6361083984 , -219.41606140137 ), ang=Angle( 0.026577176526189 , 120.38227844238 , 0.010600571520627 ),}, - {type="sls_radio", pos=Vector( -1038.0050048828 , 1808.8616943359 , 36.571212768555 ), ang=Angle( 0.018387120217085 , -44.639591217041 , 0.017833599820733 ),}, - {type="sls_radio", pos=Vector( -2350.1330566406 , 280.68765258789 , -191.60224914551 ), ang=Angle( 0.26568999886513 , 121.80404663086 , 0.086083844304085 ),}, - {type="sls_radio", pos=Vector( 762.38952636719 , 1462.7406005859 , 36.656219482422 ), ang=Angle( -0.1281670331955 , -34.088413238525 , 0.31091442704201 ),}, - }, - - - }, - -} - - +local GM = GM or GAMEMODE local function Spawn_SlashGen() - local mapData = MapData[game.GetMap()] --Check we have data for this map - if mapData then --If we have data for this map - for k, v in pairs( mapData ) do + if GM.MAP.Goal then --If we have data for this map + for k, v in pairs( GM.MAP.Goal ) do - if (v == mapData.Jerrican) then + if (v == GM.MAP.Goal.Jerrican) then nbEntToSpawn = 3 * math.ceil( (#player.GetAll() / 3) ) else nbEntToSpawn = 0 @@ -283,9 +42,8 @@ end hook.Add( "sls_round_PostStart", "Slasher Generator Spawn", Spawn_SlashGen ) hook.Add( "sls_round_PreStart", "sls_ReinitObjectives", function( ply, text, public ) - local mapData = MapData[game.GetMap()] --Check we have data for this map - if mapData then --If we have data for this map - for k, v in pairs( mapData ) do + if GM.MAP.Goal then --If we have data for this map + for k, v in pairs( GM.MAP.Goal ) do for m, w in pairs( v ) do w.spw = false end diff --git a/gamemode/modules/killerhelp/cl_killerhelp.lua b/gamemode/modules/killerhelp/cl_killerhelp.lua index 4ee6d6e..7d226d6 100755 --- a/gamemode/modules/killerhelp/cl_killerhelp.lua +++ b/gamemode/modules/killerhelp/cl_killerhelp.lua @@ -3,37 +3,20 @@ -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:50 -- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-07T18:37:28+02:00 +-- @Last Modified time: 2017-08-10T14:50:31+02:00 local GM = GM or GAMEMODE -local doors = {} local exit_police -local steps = {} -local victimPos -local ICON_DOOR = Material("icons/icon_door.png") -local ICON_STEP = Material("icons/footsteps.png") -local ICON_VICTIM = Material("icons/icon_target.png") local ICON_EXITHELP = Material("icons/icon_exit.png") + sound.Add({ name = "killerhelp.heartbeat", channel = CHAN_STATIC, sound = "slashers/effects/heartbeat_loop.wav" }) -local function AddDoor() - local pos, endtime - pos = net.ReadVector() - endtime = net.ReadInt(16) - - table.insert(doors, { - pos = pos, - endtime = endtime - }) -end -net.Receive("sls_killerhelp_AddDoor", AddDoor) - local function AddExit() local pos, endtime pos = net.ReadVector() @@ -44,52 +27,9 @@ local function AddExit() end net.Receive("sls_popularhelp_AddExit", AddExit) -local function getMenuKey() - local cpt = 0 - while input.LookupKeyBinding( cpt ) ~= "+menu" && cpt < 159 do - cpt = cpt + 1 - end - return cpt -end - - -local function requestPosSurvivor(ply, button) - if GM.ROUND.Active && GM.ROUND.Survivors && ply:Team() == TEAM_KILLER && button == getMenuKey() then - net.Start("sls_myers_request") - net.SendToServer() - end -end -hook.Add("PlayerButtonDown","sls_killerhelp_myersRequest",requestPosSurvivor) - -local function updateMyersAbility() - local status = net.ReadInt(2) - if status == 2 then - -- Available ! - elseif status == 1 then - -- Activated ! - elseif status == 0 then - -- Deactivated ! - end -end -net.Receive("sls_update_myersability",updateMyersAbility) - local function HUDPaintBackground() local curtime = CurTime() - -- Killerhelp - if LocalPlayer():Team() == TEAM_KILLER then - for k, v in ipairs(doors) do - if curtime > v.endtime then - table.remove(doors, k) - continue - end - local pos1 = v.pos:ToScreen() - surface.SetDrawColor(Color(255, 255, 255)) - surface.SetMaterial(ICON_DOOR) - surface.DrawTexturedRect(pos1.x - 64, pos1.y - 64, 128, 128) - end - end - -- Popularhelp if LocalPlayer():Team() != TEAM_KILLER && exit_police then if !GM.ROUND.Active then @@ -101,76 +41,9 @@ local function HUDPaintBackground() surface.DrawTexturedRect(pos1.x - 64, pos1.y - 64, 128, 128) end end - - -- Victim Myers - if LocalPlayer():Team() == TEAM_KILLER && LocalPlayer().ClassID == CLASS_KILL_MYERS && GM.ROUND.Active && victimPos then - local pos2 = victimPos:ToScreen() - surface.SetDrawColor(Color(255, 255, 255)) - surface.SetMaterial(ICON_VICTIM) - surface.DrawTexturedRect(pos2.x - 64, pos2.y - 64, 128, 128) - surface.DrawTexturedRect(ScrW()-110,10,100,100) - end end hook.Add("HUDPaintBackground", "sls_killerhelp_HUDPaintBackground", HUDPaintBackground) -local function AddStep() - local ply, pos, ang, endtime - - ply = net.ReadEntity() - pos = net.ReadVector() - ang = net.ReadAngle() - endtime = net.ReadInt(16) - - ang.p = 0 - ang.r = 0 - - local fpos = pos - if ply.LastFoot then - fpos = fpos + ang:Right() * 5 - else - fpos = fpos + ang:Right() * -5 - end - ply.LastFoot = !ply.LastFoot - - local trace = {} - trace.start = fpos - trace.endpos = trace.start + Vector(0, 0, -10) - trace.filter = ply - local tr = util.TraceLine(trace) - - if tr.Hit then - local tbl = {} - tbl.pos = tr.HitPos - tbl.foot = foot - tbl.endtime = endtime - tbl.angle = ang.y - tbl.normal = Vector(0, 0, 1) - table.insert(steps, tbl) - end -end -net.Receive("sls_killerhelp_AddStep", AddStep) - -local maxDistance = 600 ^ 2 -local function PostDrawTranslucentRenderables() - if LocalPlayer().ClassID != CLASS_KILL_JASON then return end - - local pos = EyePos() - - cam.Start3D(pos, EyeAngles()) - render.SetMaterial(ICON_STEP) - for k, v in ipairs(steps) do - if CurTime() > v.endtime then - table.remove(steps, k) - continue - end - if (v.pos - pos):LengthSqr() < maxDistance then - render.DrawQuadEasy(v.pos + v.normal, v.normal, 10, 20, Color(255, 255, 255), v.angle) - end - end - cam.End3D() -end -hook.Add("PostDrawTranslucentRenderables", "sls_killerhelp_PostDrawTranslucentRenderables", PostDrawTranslucentRenderables) - local function Think() if !GM.ROUND.Active || !GM.ROUND.Survivors || LocalPlayer():Team() != TEAM_KILLER then return end @@ -200,98 +73,3 @@ local function Reset() end hook.Add("sls_round_PreStart", "sls_killerhelp_PreStart", Reset) hook.Add("sls_round_End", "sls_killerhelp_End", Reset) - -local function Wallhack() - local tempPos = net.ReadVector() - if tempPos == Vector(42, 42, 42) then - victimPos = nil - else - victimPos = tempPos - end -end -net.Receive("sls_killerhelp_Wallhack", Wallhack) - -/** PROXYHELP **/ - -local PlyInvisible = false - -net.Receive( "sls_Invisible", function( len, pl ) - PlyInvisible = net.ReadBool() -end ) - -local RED = Color(255,0,0,255) -local GREEN = Color(0,255,0,255) -local Visible - -local function isVisible() - Visible = net.ReadBool() - -end -net.Receive("sls_InvisibleIndic", isVisible) - -local function InvisibleVision() - if !GM.ROUND.Active || !GM.ROUND.Survivors || LocalPlayer():Team() != TEAM_KILLER then return end - - if PlyInvisible and LocalPlayer():Alive() then - - DrawMaterialOverlay( "effects/dodge_overlay.vmt", -0.42 ) - DrawSharpen( 1.2, 1.2 ) - end -end -hook.Add( "RenderScreenspaceEffects", "BinocDraw", InvisibleVision ) - - -local enableKeyActivated = false -local menuKey = getMenuKey() -local function enableAbilityI() - if !GM.ROUND.Active || !GM.ROUND.Survivors || LocalPlayer():Team() != TEAM_KILLER then return end - if GM.ROUND.Killer.ClassID ~= CLASS_KILL_PROXY then return end - if input.IsButtonDown( menuKey ) and !enableKeyActivated then - - net.Start( "sls_EnableInvisibility" ) - net.WriteEntity(LocalPlayer()) - net.SendToServer() - enableKeyActivated = true - - else - if !input.IsButtonDown( menuKey ) then - enableKeyActivated = false - end - end -end -hook.Add ("HUDPaint","CheckEnableKey",enableAbilityI) - -local TimerView = 0 -local function CheckKillerInSight() - local v = team.GetPlayers(TEAM_KILLER)[1] - local curtime = CurTime() - local ply = LocalPlayer() - - if !ply:IsLineOfSightClear( v ) or !v:IsValid() or v == ply then return end - - - local TargetPosMax= v:GetPos()+ v:OBBMaxs() - Vector(10,0,0) - local TargetPosCenter = v:GetPos()+v:OBBCenter() - local TargetPosMin = v:GetPos()+ v:OBBMins() + Vector(10,0,0) - - local ScreenPosMax = TargetPosMax:ToScreen() - local ScreenPosCenter = TargetPosCenter:ToScreen() - local ScreenPosMin = TargetPosMin:ToScreen() - - posPlayer = ply:GetPos() - if ( TimerView < curtime) and (posPlayer:Distance( v:GetPos()) < 150) then - net.Start( "sls_survivorseekiller" ) - net.WriteFloat( curtime ) - net.SendToServer() - TimerView = curtime + 0.2 - - - elseif (TimerView < curtime) and (ScreenPosMax.x < ScrW() and ScreenPosMax.y < ScrH() and ScreenPosMin.x > 0 and ScreenPosMin.y > 0) then - -- print("KILLERSIGHT") - net.Start( "sls_survivorseekiller" ) - net.WriteFloat( curtime ) - net.SendToServer() - TimerView = curtime + 0.2 - end -end -hook.Add ("Think","sls_IHaveTheKillerInView",CheckKillerInSight) diff --git a/gamemode/modules/killerhelp/sh_killerhelp.lua b/gamemode/modules/killerhelp/sh_killerhelp.lua index 2621e06..dbf6d27 100755 --- a/gamemode/modules/killerhelp/sh_killerhelp.lua +++ b/gamemode/modules/killerhelp/sh_killerhelp.lua @@ -2,15 +2,15 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:50 --- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-26 14:48:35 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-09T17:20:41+02:00 hook.Add( "PlayerFootstep", "CDisableSoundFootStepsUnique", function( ply, pos, foot, sound, volume, filter ) - if ply:GetColor().a == 0 then - return true + if ply:GetColor().a == 0 then + return true else - return - end + return + end end ) local function initCol() @@ -36,4 +36,4 @@ local function ShouldCollide( ent1, ent2 ) end return true end -hook.Add("ShouldCollide", "sls_killerhelp_ShouldCollide", ShouldCollide) \ No newline at end of file +hook.Add("ShouldCollide", "sls_killerhelp_ShouldCollide", ShouldCollide) diff --git a/gamemode/modules/killerhelp/sv_killerhelp.lua b/gamemode/modules/killerhelp/sv_killerhelp.lua index 9ec7118..6cef7ec 100755 --- a/gamemode/modules/killerhelp/sv_killerhelp.lua +++ b/gamemode/modules/killerhelp/sv_killerhelp.lua @@ -2,34 +2,14 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:50 --- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-07T18:52:38+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 + local GM = GM or GAMEMODE -util.AddNetworkString("sls_killerhelp_AddDoor") -util.AddNetworkString("sls_killerhelp_AddStep") -util.AddNetworkString("sls_killerhelp_Wallhack") util.AddNetworkString("sls_popularhelp_AddExit") -util.AddNetworkString("sls_EnableInvisibility") -util.AddNetworkString("sls_myers_request") -util.AddNetworkString("sls_update_myersability") - -local VictimMyers -local Timer1 = 0 - -local function AddDoor(pos, endtime) - if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) then return end - if GM.CONFIG["ghostface_ability_radius"] != 0 then - local entsNerby = ents.FindInSphere( pos, GM.CONFIG["ghostface_ability_radius"] ) - local isKillerNerby = table.HasValue( ents, GM.ROUND.Killer ) - if !isKillerNerby then return end - end - net.Start("sls_killerhelp_AddDoor") - net.WriteVector(pos) - net.WriteInt(endtime, 16) - net.Send(GM.ROUND.Killer) -end +util.AddNetworkString("sls_killerseesurvivor") local function AddExit(pos) if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) then return end @@ -38,14 +18,6 @@ local function AddExit(pos) net.Send(GM.ROUND.Survivors) end -local function findVictim() - for _, v in ipairs(GM.ROUND:GetSurvivorsAlive()) do - if v.ClassID != CLASS_SURV_SHY then - return v - end - end -end - function FindNearestEntity( Name, pos, range ) local nearestEnt; @@ -87,61 +59,6 @@ local function ExitAppear() end hook.Add("sls_round_StartEscape", "sls_round_exitIcon", ExitAppear) -local function PlayerUse(ply, ent) - if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) || GM.ROUND.Killer.ClassID != CLASS_KILL_GHOSTFACE then return end - if ply:Team() != TEAM_SURVIVORS then return end - if GAMEMODE.CLASS.Survivors[ply.ClassID].name == "Shy girl" then return end - if !table.HasValue(GM.CONFIG["killerhelp_door_entities"], ent:GetClass()) then return end - if ply.kh_use && ply.kh_use[ent:EntIndex()] && CurTime() <= ply.kh_use[ent:EntIndex()] then return end - - ply.kh_use = ply.kh_use or {} - ply.kh_use[ent:EntIndex()] = CurTime() + GM.CONFIG["killerhelp_door_duration"] - - AddDoor(ent:GetPos(), CurTime() + GM.CONFIG["killerhelp_door_duration"]) -end -hook.Add("PlayerUse", "sls_killerhelp_PlayerUse", PlayerUse) - -local function PlayerFootstep(ply, pos, foot, sound, volume, filter) - if ply:GetColor() == Color(255,255,255,0) then return true end - if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) || GM.ROUND.Killer.ClassID != CLASS_KILL_JASON then return end - if ply:Team() != TEAM_SURVIVORS then return end - if GAMEMODE.CLASS.Survivors[ply.ClassID].name == "Shy girl" then return end - - net.Start("sls_killerhelp_AddStep") - net.WriteEntity(ply) - net.WriteVector(pos) - net.WriteAngle(ply:GetAimVector():Angle()) - net.WriteInt(CurTime() + GM.CONFIG["killerhelp_step_duration"], 16) - net.Send(GM.ROUND.Killer) -end -hook.Add("PlayerFootstep", "sls_killerhelp_PlayerFootstep", PlayerFootstep) - -local lastRequestMyers = 0 -local myersAbilityActivated = false -local function receiveRequestMyers() - if CurTime() - lastRequestMyers < GM.CONFIG["myers_cooldown"] then - net.Start( "notificationSlasher" ) - net.WriteTable({"killerhelp_cant_use_ability"}) - net.WriteString("cross") - net.Send(GM.ROUND.Killer) - return - end - if myersAbilityActivated then return end - net.Start("sls_update_myersability") - net.WriteInt(1,2) - net.Send(GM.ROUND.Killer) - myersAbilityActivated = true - timer.Simple(GM.CONFIG["myers_abilitytime"],function () - myersAbilityActivated = false - lastRequestMyers = CurTime() - net.Start("sls_update_myersability") - net.WriteInt(0,2) - net.Send(GM.ROUND.Killer) - end) -end -net.Receive("sls_myers_request",receiveRequestMyers) - - local DIST_RESET = 350 ^ 2 local CAMP_DELAY = 15 local function Think() @@ -169,27 +86,6 @@ local function Think() end end - -- Help Myers - local curtime = CurTime() - if !GM.ROUND.Active || !IsValid(GM.ROUND.Killer) || !GM.ROUND.Survivors then return end - if GM.ROUND.Killer.ClassID == CLASS_KILL_MYERS && Timer1 < curtime && IsValid(VictimMyers) && VictimMyers.ClassID != CLASS_SURV_SHY then - if myersAbilityActivated then - net.Start("sls_killerhelp_Wallhack") - net.WriteVector(VictimMyers:GetPos() + Vector(0, 0, 50)) - net.Send(GM.ROUND.Killer) - else - net.Start("sls_killerhelp_Wallhack") - net.WriteVector(Vector(42, 42, 42)) - net.Send(GM.ROUND.Killer) - end - Timer1 = curtime + 0.5 - end - if CurTime() - lastRequestMyers == GM.CONFIG["myers_cooldown"] then - net.Start("sls_update_myersability") --Send a message if the ability is available again - net.WriteInt(2,2) - net.Send(GM.ROUND.Killer) - end - end hook.Add("Think", "sls_killerhelp_Think", Think) @@ -198,19 +94,6 @@ local function PlayerDeath(ply) end hook.Add("PlayerDeath", "sls_killerhelp_PlayerDeath", PlayerDeath) -local function PostPlayerDeath(ply) - -- Help Myers - if GM.ROUND.Active && IsValid(GM.ROUND.Killer) && GM.ROUND.Killer.ClassID == CLASS_KILL_MYERS && ply == VictimMyers then - VictimMyers = findVictim() - if !IsValid(VictimMyers) then - net.Start("sls_killerhelp_Wallhack") - net.WriteVector(Vector(42, 42, 42)) - net.Send(GM.ROUND.Killer) - end - end -end -hook.Add("PostPlayerDeath", "sls_killerhelp_PostPlayerDeath", PostPlayerDeath) - local function PreStart() for _, v in ipairs(player.GetAll()) do if IsValid(v) then @@ -221,122 +104,3 @@ local function PreStart() end end hook.Add("sls_round_PreStart", "sls_killerhelp_PreStart", PreStart) - -local function PostStart() - if !GM.ROUND.Killer then return end - if GM.ROUND.Killer.ClassID == CLASS_KILL_MYERS then - VictimMyers = findVictim() - end -end -hook.Add("sls_round_PostStart", "sls_killerhelp_PostStart", PostStart) - -/*** ProxyHelp **/ - -util.AddNetworkString( "sls_Invisible" ) -util.AddNetworkString( "sls_InvisibleIndic" ) -util.AddNetworkString("sls_survivorseekiller") - -local KInvisible = Color(255,255,255,0) -local KNormal = Color(255,255,255,255) -local InitialSpawnK = false ---local keyPressed = false -local KillerInView -local LastKillerInView = 0 - -local function CandisapearV2() - local curtime = CurTime() - - - if LastKillerInView > curtime - 0.5 then - KillerInView = true - else - KillerInView = false - end - -end -hook.Add("Think","UpdateKillerInView",CandisapearV2) - - -function ResponsePlayerSeeKiller() - LastKillerInView = net.ReadFloat() -end -net.Receive("sls_survivorseekiller", ResponsePlayerSeeKiller) - -local function disapearKiller() - local KillerPly = GM.ROUND.Killer - local PlayerWeapon = KillerPly:GetActiveWeapon() - if KillerInView then - net.Start( "notificationSlasher" ) - net.WriteTable({"killerhelp_cant_use_ability"}) - net.WriteString("cross") - net.Send(KillerPly) - return - end - - if !KillerPly.InvisibleActive and !KillerInView then - - KillerPly:EmitSound( "slashers/effects/proxy_power_on.wav" ) - - timer.Simple( 0.6, function () - - KillerPly:SetColor(KInvisible ) - KillerPly:SetWalkSpeed( 400 ) - KillerPly:SetRunSpeed(400) - KillerPly:StripWeapon(PlayerWeapon:GetClass()) - - KillerPly:SetRenderMode(RENDERMODE_NONE ) - KillerPly:DrawShadow( false ) - KillerPly:AddEffects(EF_NOSHADOW) - KillerPly.InvisibleActive = true - KillerPly:CrosshairDisable() - - net.Start("sls_Invisible") - net.WriteBool(true) - net.Send(KillerPly) - - end) - - elseif KillerPly.InvisibleActive and !KillerInView then - KillerPly:EmitSound( "slashers/effects/proxy_power_off.wav" ) - - timer.Simple( 1, function () - -- KillerPly:AddKey( IN_ATTACK ) - -- KillerPly:AddKey( IN_ZOOM ) - KillerPly:Give(KillerPly.InitialWeapon) - KillerPly:SetColor( KNormal ) - KillerPly:SetRunSpeed( 400 ) - KillerPly:DrawShadow( true ) - KillerPly:SetWalkSpeed(GAMEMODE.CLASS.Killers[CLASS_KILL_PROXY].walkspeed) - KillerPly:SetRunSpeed(GAMEMODE.CLASS.Killers[CLASS_KILL_PROXY].walkspeed) - KillerPly:SetRenderMode(RENDERMODE_TRANSALPHA ) - - KillerPly.InvisibleActive = false - - net.Start("sls_Invisible") - net.WriteBool(false) - net.Send(KillerPly) - - end) - end -end -net.Receive( "sls_EnableInvisibility", disapearKiller) - - -local function ResetVisibility() - for k,v in pairs(player.GetAll()) do - v:DrawShadow( true ) - if IsValid(GAMEMODE.CLASS.Killers) and GM.ROUND.Killer.ClassID == CLASS_KILL_PROXY then - v:SetWalkSpeed(GAMEMODE.CLASS.Killers[CLASS_KILL_PROXY].walkspeed) - v:SetRunSpeed(GAMEMODE.CLASS.Killers[CLASS_KILL_PROXY].walkspeed) - GM.ROUND.Killer.InvisibleActive = false - end - v:SetRenderMode(RENDERMODE_TRANSALPHA ) - v:SetColor(Color(255,255,255)) - end - if (!GAMEMODE.ROUND.Killer) then return end - net.Start("sls_Invisible") - net.WriteBool(false) - net.Send(GAMEMODE.ROUND.Killer) -end -hook.Add("PostPlayerDeath","sls_ResetViewKiller",ResetVisibility) -hook.Add("sls_round_PostStart","ResetViewKillerAfterEnd",ResetVisibility) diff --git a/gamemode/modules/observer/sv_observer.lua b/gamemode/modules/observer/sv_observer.lua index 3045ff4..050f074 100755 --- a/gamemode/modules/observer/sv_observer.lua +++ b/gamemode/modules/observer/sv_observer.lua @@ -3,7 +3,7 @@ -- @Author: Garrus2142 -- @Date: 2017-07-25 16:15:50 -- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-27 18:08:05 +-- @Last Modified time: 2017-08-09T15:57:36+02:00 local GM = GM or GAMEMODE @@ -128,3 +128,11 @@ local function PlayerInitialSpawn(ply) end) end hook.Add("PlayerInitialSpawn", "sls_round_PlayerInitialSpawn", PlayerInitialSpawn) + + +local function DeadChat(rext,teamOnly,listener,speaker) + if speaker:IsPlayer() and !speaker:Alive() and listener:Alive() then + return false + end +end +hook.Add("PlayerCanSeePlayersChat","sls_observer_chat",DeadChat) diff --git a/gamemode/modules/scoreboard/cl_scoreboard.lua b/gamemode/modules/scoreboard/cl_scoreboard.lua index 66fc452..55e7a29 100755 --- a/gamemode/modules/scoreboard/cl_scoreboard.lua +++ b/gamemode/modules/scoreboard/cl_scoreboard.lua @@ -48,8 +48,8 @@ local function HUDDrawScoreBoard() -- ICON local drawIcon = false - if v:Team() == TEAM_KILLER && v.ClassID != 0 && GM.CLASS.Killers[v.ClassID] then - surface.SetMaterial(GM.CLASS.Killers[v.ClassID].icon) + if v:Team() == TEAM_KILLER then + surface.SetMaterial(GM.MAP.Killer.Icon) drawIcon = true elseif v:Team() == TEAM_SURVIVORS && v.ClassID != 0 && GM.CLASS.Survivors[v.ClassID] then surface.SetMaterial(GM.CLASS.Survivors[v.ClassID].icon) @@ -117,4 +117,4 @@ local function OnTeamWin(winner) end end) end -hook.Add("sls_round_OnTeamWin", "sls_scoreboard_OnTeamWin", OnTeamWin) \ No newline at end of file +hook.Add("sls_round_OnTeamWin", "sls_scoreboard_OnTeamWin", OnTeamWin) diff --git a/gamemode/modules/shop/sv_hook.lua b/gamemode/modules/shop/sv_hook.lua index f66c7f3..a964e9a 100644 --- a/gamemode/modules/shop/sv_hook.lua +++ b/gamemode/modules/shop/sv_hook.lua @@ -13,4 +13,5 @@ local function OpenShop(ply) net.Send(ply) end end + hook.Add("ShowSpare2", "shop_ShowSpare2", OpenShop) diff --git a/gamemode/modules/soundscape/cl_soundscape.lua b/gamemode/modules/soundscape/cl_soundscape.lua index a2f9585..3889fef 100755 --- a/gamemode/modules/soundscape/cl_soundscape.lua +++ b/gamemode/modules/soundscape/cl_soundscape.lua @@ -72,7 +72,7 @@ local function StartAmbient(level) station:Play() timer.Create("sls_sambient", station:GetLength() + 0.1, 0, function() local percent = GetPercentSurvivorDead() - + if level != percent then timer.Remove("sls_sambient") StartAmbient(percent) @@ -87,9 +87,9 @@ end local function StartRound() -- Suppression du timer sambient if timer.Exists("sls_sambient") then timer.Remove("sls_sambient") end - + -- Start round sound - sound.PlayFile("sound/slashers/ambient/" .. GAMEMODE.CONFIG["round_start_music"][game.GetMap()], "noplay", function(station) + sound.PlayFile("sound/slashers/ambient/" .. GAMEMODE.MAP.StartMusic, "noplay", function(station) if IsValid(station) then station:SetVolume(0.5) station:Play() @@ -149,4 +149,4 @@ local function JumpScare() end end end -hook.Add("Think", "sls_soundscape_JumpScare", JumpScare) \ No newline at end of file +hook.Add("Think", "sls_soundscape_JumpScare", JumpScare) diff --git a/gamemode/modules/traps/sv_dooraxe.lua b/gamemode/modules/traps/sv_dooraxe.lua index b77718c..60d9746 100644 --- a/gamemode/modules/traps/sv_dooraxe.lua +++ b/gamemode/modules/traps/sv_dooraxe.lua @@ -2,8 +2,8 @@ -- -- @Author: Vyn -- @Date: 2017-07-26 12:14:08 --- @Last Modified by: Vyn --- @Last Modified time: 2017-07-26 15:21:36 +-- @Last Modified by: Daryl_Winters +-- @Last Modified time: 2017-08-09T19:14:23+02:00 if SERVER then hook.Add( "PlayerUse", "slashers_dooraxe_playeruse", function(ply, ent) @@ -22,4 +22,4 @@ if SERVER then end) ent.trapeddoor = 2 end ) -end \ No newline at end of file +end diff --git a/gamemode/modules/votemap/cl_votemap.lua b/gamemode/modules/votemap/cl_votemap.lua index 455c947..614c5e2 100644 --- a/gamemode/modules/votemap/cl_votemap.lua +++ b/gamemode/modules/votemap/cl_votemap.lua @@ -3,7 +3,7 @@ -- @Author: Guilhem PECH -- @Date: 2017-08-06T09:43:46+02:00 -- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-06T20:53:07+02:00 +-- @Last Modified time: 2017-08-10T18:22:57+02:00 local GM = GAMEMODE or GM @@ -13,10 +13,12 @@ net.Receive("slash_sendmaplist",function () slashersMaps = net.ReadTable() end) -local backVote + local horizonBar +local oneMaps = {} local function openVotemap() + oneMaps = {} backVote = vgui.Create( "DPanel" ) backVote.isOpen = true local scrw = ScrW() @@ -47,12 +49,12 @@ local function openVotemap() end horizonBar = vgui.Create("DPanel",backVote,"horBar") - horizonBar:SetDrawBackground(false) + horizonBar:SetPaintBackground(false) local index local oneMap = vgui.Create("DPanel",horizonBar,"extend") - oneMap:SetDrawBackground(false) + oneMap:SetPaintBackground(false) local oneMapImage = vgui.Create("DImageButton",oneMap,"extend_button") oneMapImage:SetImage("votemap/votemap_extend.png","vgui/avatar_default") oneMapImage:SetSize(192,512) @@ -69,15 +71,22 @@ local function openVotemap() oneMapImage.DoClick = function() net.Start("slash_summitvote") net.WriteString("extend") - net.WriteEntity(LocalPlayer()) net.SendToServer() end + local voteCountPanel = vgui.Create("DPanel",oneMap) + voteCountPanel:SetTall(120) + voteCountPanel:SetPaintBackground(false) + voteCountPanel:MoveBelow(oneMap:GetChildren()[2], -30) + voteCountPanel:CenterHorizontal(0.5) + + table.insert( oneMaps, oneMap ) + for k,v in pairs(slashersMaps) do if v != game.GetMap()..".bsp" then oneMap = vgui.Create("DPanel",horizonBar,v) - oneMap:SetDrawBackground(false) + oneMap:SetPaintBackground(false) oneMapImage = vgui.Create("DImageButton",oneMap,v.."_button") local indexToSplit = string.find( v, "_") oneMapImage:SetImage("votemap/votemap"..string.StripExtension( string.sub( v, indexToSplit ) )..".png","vgui/avatar_default") @@ -98,17 +107,21 @@ local function openVotemap() oneMapImage.DoClick = function() net.Start("slash_summitvote") net.WriteString(v) - net.WriteEntity(LocalPlayer()) net.SendToServer() end oneMap:SizeToChildren(true,true) - + voteCountPanel = vgui.Create("DPanel",oneMap) + voteCountPanel:SetTall(120) + voteCountPanel:SetPaintBackground(false) + voteCountPanel:MoveBelow(oneMap:GetChildren()[2], -30) + voteCountPanel:CenterHorizontal(0.5) + table.insert( oneMaps, oneMap ) end end oneMap = vgui.Create("DPanel",horizonBar,"random") - oneMap:SetDrawBackground(false) + oneMap:SetPaintBackground(false) oneMapImage = vgui.Create("DImageButton",oneMap,"random_button") oneMapImage:SetImage("votemap/votemap_random.png","vgui/avatar_default") oneMapImage:SetSize(192,512) @@ -124,9 +137,39 @@ local function openVotemap() oneMapImage.DoClick = function() net.Start("slash_summitvote") net.WriteString("random") - net.WriteEntity(LocalPlayer()) net.SendToServer() end + voteCountPanel = vgui.Create("DPanel",oneMap) + voteCountPanel:SetTall(120) + voteCountPanel:SetPaintBackground(true) + voteCountPanel:MoveBelow(oneMap:GetChildren()[2], -30) + + table.insert( oneMaps, oneMap ) + + for k,v in pairs(oneMaps) do + local votePanelCount = v:GetChild(2) + votePanelCount:SetWide(v:GetWide()) + votePanelCount:AlignLeft(0) + local count1 = vgui.Create("DImage",votePanelCount) + count1:SetImage("votemap/votemap_1.png","vgui/avatar_default") + count1:SetKeepAspect( true ) + count1:SetSize(120,120) + + + + local count = vgui.Create("DImage",votePanelCount) + count:SetImage("votemap/votemap_1.png","vgui/avatar_default") + count:SetKeepAspect( true ) + count:SetSize(120,120) + count:MoveRightOf(count1,0) + + + votePanelCount:SizeToChildren(true,false) + votePanelCount:SetPaintBackground(false) + count1:Hide() + count:Hide() + end + horizonBar:SizeToChildren(true,true) horizonBar:MoveBelow(titleLabel, 30) @@ -136,11 +179,11 @@ local function openVotemap() backVote:SetPos( (ScrW() - backVote:GetWide())/2, (ScrH() - backVote:GetTall())/2 ) -- Set the position of the panel net.Start("slash_summitvote") + net.WriteString("") net.SendToServer() end net.Receive("slash_openvotemap",function () - -if IsValid(backVote) then + if IsValid(backVote) then backVote.isOpen = false backVote:Remove() gui.EnableScreenClicker( backVote.isOpen ) @@ -153,37 +196,36 @@ end) local function receiveVoteStat() local voteData = net.ReadTable() - - if !backVote.isOpen or !backVote:IsVisible() then return end - for k,v in pairs(backVote:GetChildren()[3]:GetChildren()) do + if !IsValid(backVote) then return end + if !backVote.isOpen then return end + for k,v in pairs(oneMaps) do local nbCurVote = voteData[v:GetName()] or 0 + local votePanelCount = v:GetChild(2) - if v:ChildCount() == 3 then - v:GetChild(2):Remove() + if nbCurVote == 0 then + votePanelCount:GetChild(1):Hide() + votePanelCount:GetChild(0):Hide() end + if nbCurVote <= 5 and nbCurVote > 0 then - local count = vgui.Create("DImage",v,"vote_"..v:GetName().."_nbCurVote") - count:SetImage("votemap/votemap_"..nbCurVote ..".png","vgui/avatar_default") - count:SetSize(120,120) - count:SetKeepAspect( true ) - count:MoveBelow(v:GetChildren()[2], -30) - count:CenterHorizontal(0.5) + votePanelCount:GetChild(0):SetImage("votemap/votemap_"..nbCurVote ..".png","vgui/avatar_default") + votePanelCount:GetChild(0):Show() + votePanelCount:GetChild(0):Center() + votePanelCount:GetChild(1):Hide() + elseif nbCurVote > 5 then - local count1 = vgui.Create("DImage",v,"vote_"..v:GetName().."_nbCurVote") - count1:SetImage("votemap/votemap_5.png","vgui/avatar_default") - count1:SetKeepAspect( true ) - count1:SetSize(120,120) - count1:MoveBelow(v:GetChildren()[2],-20) - - local count = vgui.Create("DImage",v,"vote_"..v:GetName().."_nbCurVote") - count:SetImage("votemap/votemap_"..nbCurVote - 5 ..".png","vgui/avatar_default") - count:SetKeepAspect( true ) - count:SetSize(100,100) - count:MoveRightOf(count1,0) + + votePanelCount:GetChild(0):SetImage("votemap/votemap_5.png","vgui/avatar_default") + votePanelCount:GetChild(0):AlignLeft(0) + votePanelCount:GetChild(0):Show() + + votePanelCount:GetChild(1):SetImage("votemap/votemap_"..nbCurVote - 5 ..".png","vgui/avatar_default") + votePanelCount:GetChild(1):MoveRightOf(votePanelCount:GetChild(0),-20) + votePanelCount:GetChild(1):Show() end horizonBar:SizeToChildren(false,true) diff --git a/gamemode/modules/votemap/sv_votemap.lua b/gamemode/modules/votemap/sv_votemap.lua index 4defbf3..2a9a8a3 100644 --- a/gamemode/modules/votemap/sv_votemap.lua +++ b/gamemode/modules/votemap/sv_votemap.lua @@ -2,8 +2,8 @@ -- -- @Author: Guilhem PECH -- @Date: 2017-08-06T09:44:00+02:00 --- @Last Modified by: Daryl_Winters --- @Last Modified time: 2017-08-06T19:49:23+02:00 +-- @Last modified by: Guilhem PECH +-- @Last modified time: 2018-01-01T18:45:28+01:00 util.AddNetworkString("slash_sendvotedata") util.AddNetworkString("slash_summitvote") @@ -12,26 +12,32 @@ util.AddNetworkString("slash_sendmaplist") local GM = GAMEMODE or GM -local slashersMaps = file.Find( "maps/slash_*.bsp", "GAME" ) -table.Add(slashersMaps, GM.ROUND.custom_maps ) local currentVote = {} local countVote = {} +local allMaps = table.Copy(GM.MAPS) + +local function getRandomMaps(numbers,blacklist) + res = {} + for i=1,numbers do + table.Random(allMaps) + end +end local function sendCurrentVoteStat(ply) + table.RemoveByValue(allMaps,game.GetMap()) net.Start("slash_sendmaplist") - net.WriteTable(slashersMaps) + net.WriteTable(allMaps) net.Send(ply) end hook.Add("PlayerInitialSpawn", "slash_sendmaplist", sendCurrentVoteStat) -local function receiveVote() +local function receiveVote(len, player) local map = net.ReadString() - local player = net.ReadEntity() - if map != nil and player != nil then + if map != "" then currentVote[player] = map end - for k,v in pairs(slashersMaps) do + for k,v in pairs(GM.MAPS) do countVote[v] = #table.KeysFromValue(currentVote,v) end countVote["extend"] = #table.KeysFromValue(currentVote,"extend") @@ -51,7 +57,7 @@ end hook.Add("PlayerButtonDown","slash_openvotemap",openVoteMap ) local function changeMap() - if !GM.ROUND.Active && GM.ROUND.NextStart && CurTime() >= GM.ROUND.NextStart && GM.ROUND.Count >= GM.CONFIG["round_count_nextmap"] then + if GM.ROUND.Count > GetConVar("slashers_round_max"):GetInt() then local winner = table.GetWinningKey( countVote ) countVote = {} currentVote = {} @@ -61,16 +67,16 @@ local function changeMap() PrintMessage( HUD_PRINTTALK, "Map extended !" ) return elseif winner == "random" then - winner = slashersMaps[ math.random( #slashersMaps ) ] + winner = GM.MAPS[ math.random( #GM.MAPS ) ] end - GM.ROUND.NextStart = nil - RunConsoleCommand("changelevel", string.StripExtension( winner)) + print("Map changed to",string.StripExtension( winner)) + RunConsoleCommand("changelevel", string.StripExtension( winner)) end end -hook.Add("Think", "sls_votemap_Think", changeMap) +hook.Add("sls_round_PostStart", "sls_votemap_Checkchange", changeMap) local function autoOpen() - if GM.ROUND.Count == GM.CONFIG["round_count_nextmap"] then + if GM.ROUND.Count == GetConVar("slashers_round_max"):GetInt() then net.Start("slash_openvotemap") net.Broadcast() end diff --git a/gamemode/modulesloader.lua b/gamemode/modulesloader.lua index 68b177a..960ae39 100644 --- a/gamemode/modulesloader.lua +++ b/gamemode/modulesloader.lua @@ -2,12 +2,12 @@ -- -- @Author: Garrus2142 -- @Date: 2017-07-27 17:07:04 --- @Last Modified by: Garrus2142 --- @Last Modified time: 2017-07-27 17:07:59 - +-- @Last modified by: Guilhem PECH +-- @Last modified time: 21-Oct-2018 local modulesPath = "slashers/gamemode/modules" local _, directories = file.Find(modulesPath .. "/*", "LUA") + if SERVER then print("--- MODULES ---") end for _, mod in ipairs(directories) do if GM.CONFIG["disabled_modules"][mod] then continue end @@ -30,4 +30,4 @@ for _, mod in ipairs(directories) do end end end -end \ No newline at end of file +end diff --git a/gamemode/shared.lua b/gamemode/shared.lua index 92a9a67..286f5ef 100755 --- a/gamemode/shared.lua +++ b/gamemode/shared.lua @@ -7,13 +7,15 @@ GM.Name = "Slashers"; GM.Author = "Garrus2142"; -SLASHERS = {} -SLASHERS.ROUND = {} +GM.Version = "1.1.0" +GM.Github = "https://github.com/Garrus2142/Slashers/" +GM.Workshop = "http://steamcommunity.com/sharedfiles/filedetails/?id=1092007703" TEAM_KILLER = 1; TEAM_SURVIVORS = 2; -- Classes +CLASS_KILLER = 1001 CLASS_SURV_SPORTS = 1 CLASS_SURV_POPULAR = 2 CLASS_SURV_NERD = 3 @@ -23,11 +25,13 @@ CLASS_SURV_JUNKY = 6 CLASS_SURV_EMO = 7 CLASS_SURV_BLACK = 8 CLASS_SURV_SHERIF = 9 -CLASS_KILL_JASON = 101 -CLASS_KILL_GHOSTFACE = 102 -CLASS_KILL_MYERS = 103 -CLASS_KILL_PROXY = 104 -CLASS_KILL_INTRUDER = 105 team.SetUp(TEAM_KILLER, "Murderer", Color(255, 0, 0), false); -team.SetUp(TEAM_SURVIVORS, "Survivors", Color(0, 0, 255), false); \ No newline at end of file +team.SetUp(TEAM_SURVIVORS, "Survivors", Color(0, 0, 255), false); + +-- Header message +print("\n### This server run Slashers Gamemode by Utopia-Games ###\n") +print("Version: " .. GM.Version) +print("Workshop: " .. GM.Workshop) +print("Github: " .. GM.Github) +print("\n### Thanks for playing ###\n") diff --git a/slashers.txt b/slashers.txt index 144590d..f45907b 100755 --- a/slashers.txt +++ b/slashers.txt @@ -2,6 +2,7 @@ { "base" "base" "title" "Slashers" + "category" "pvp" "maps" "^slash_" "menusystem" "1" "workshopid" "1092007703"