From c26040e5d1cb71d5ea6e1c67d16b660ae6706ddf Mon Sep 17 00:00:00 2001 From: Robotboy655 Date: Tue, 28 Jan 2014 13:38:46 +0200 Subject: [PATCH] Balloon Fix & Tool Content * Added more overlay materials * Added some materials to Material tool * Added new trails from TF2 * Added 2 new effects to Emitter * Added 2 new options to Utilities menu * Fixed Balloon tool erroring --- .../entities/entities/gmod_emitter.lua | 26 +++++++++++++++++++ .../weapons/gmod_tool/stools/balloon.lua | 1 + .../weapons/gmod_tool/stools/material.lua | 5 ++++ .../weapons/gmod_tool/stools/trails.lua | 24 ++++++++++++----- garrysmod/lua/autorun/utilities_menu.lua | 5 +++- garrysmod/lua/postprocess/overlay.lua | 21 ++++++++++++++- .../localization/en/postprocessing.properties | 16 ++++++++++++ .../localization/en/spawnmenu.properties | 2 ++ .../resource/localization/en/tool.properties | 9 +++++++ 9 files changed, 101 insertions(+), 8 deletions(-) diff --git a/garrysmod/gamemodes/sandbox/entities/entities/gmod_emitter.lua b/garrysmod/gamemodes/sandbox/entities/entities/gmod_emitter.lua index 20bda90e80..897d583cdd 100644 --- a/garrysmod/gamemodes/sandbox/entities/entities/gmod_emitter.lua +++ b/garrysmod/gamemodes/sandbox/entities/entities/gmod_emitter.lua @@ -387,3 +387,29 @@ list.Set( "EffectType", "glassimpact", { end }) + +list.Set( "EffectType", "bloodimpact", { + print = "#effecttype.bloodimpact", + material = "gui/effects/bloodimpact.png", + func = function( ent, pos, angle, scale ) + + local effectdata = EffectData() + effectdata:SetOrigin( pos ) + util.Effect( "BloodImpact", effectdata, true, true ) + + end +}) + +list.Set( "EffectType", "muzzleeffect", { + print = "#effecttype.muzzleeffect", + material = "gui/effects/muzzleeffect.png", + func = function( ent, pos, angle, scale ) + + local effectdata = EffectData() + effectdata:SetOrigin( pos + angle:Forward() * 4 ) + effectdata:SetAngles( angle ) + effectdata:SetScale( scale ) + util.Effect( "MuzzleEffect", effectdata, true, true ) + + end +}) diff --git a/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/balloon.lua b/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/balloon.lua index fc1941999e..851aa506df 100644 --- a/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/balloon.lua +++ b/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/balloon.lua @@ -202,6 +202,7 @@ function TOOL:Think() if ( !IsValid( self.GhostEntity ) || self.GhostEntity.model != self:GetClientInfo( "model" ) ) then local modeltable = list.Get( "BalloonModels" )[ self:GetClientInfo( "model" ) ] + if ( !modeltable ) then return end self:MakeGhostEntity( modeltable.model, Vector( 0, 0, 0 ), Angle( 0, 0, 0 ) ) if ( IsValid( self.GhostEntity ) ) then self.GhostEntity.model = self:GetClientInfo( "model" ) end diff --git a/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/material.lua b/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/material.lua index e42c441196..2695b72a99 100644 --- a/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/material.lua +++ b/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/material.lua @@ -62,6 +62,11 @@ function TOOL:RightClick( trace ) end +if ( IsMounted( "tf" ) ) then + list.Add( "OverrideMaterials", "models/player/shared/gold_player" ) + list.Add( "OverrideMaterials", "models/player/shared/ice_player" ) +end + list.Add( "OverrideMaterials", "models/wireframe" ) list.Add( "OverrideMaterials", "debug/env_cubemap_model" ) list.Add( "OverrideMaterials", "models/shadertest/shader3" ) diff --git a/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/trails.lua b/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/trails.lua index 261e402c3b..ec844dfcf6 100644 --- a/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/trails.lua +++ b/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/trails.lua @@ -133,14 +133,26 @@ end -- own file placed in autorun or something. -- list.Set( "trail_materials", "#trail.plasma", "trails/plasma" ) -list.Set( "trail_materials", "#trail.tube", "trails/tube" ) -list.Set( "trail_materials", "#trail.electric", "trails/electric" ) -list.Set( "trail_materials", "#trail.smoke", "trails/smoke" ) -list.Set( "trail_materials", "#trail.laser", "trails/laser" ) -list.Set( "trail_materials", "#trail.physbeam", "trails/physbeam" ) -list.Set( "trail_materials", "#trail.love", "trails/love" ) +list.Set( "trail_materials", "#trail.tube", "trails/tube" ) +list.Set( "trail_materials", "#trail.electric", "trails/electric" ) +list.Set( "trail_materials", "#trail.smoke", "trails/smoke" ) +list.Set( "trail_materials", "#trail.laser", "trails/laser" ) +list.Set( "trail_materials", "#trail.physbeam", "trails/physbeam" ) +list.Set( "trail_materials", "#trail.love", "trails/love" ) list.Set( "trail_materials", "#trail.lol", "trails/lol" ) +if ( IsMounted( "tf" ) ) then + list.Set( "trail_materials", "#trail.beam001_blu", "effects/beam001_blu" ) + list.Set( "trail_materials", "#trail.beam001_red", "effects/beam001_red" ) + list.Set( "trail_materials", "#trail.beam001_white", "effects/beam001_white" ) + list.Set( "trail_materials", "#trail.arrowtrail_blu", "effects/arrowtrail_blu" ) + list.Set( "trail_materials", "#trail.arrowtrail_red", "effects/arrowtrail_red" ) + list.Set( "trail_materials", "#trail.repair_claw_trail_blue", "effects/repair_claw_trail_blue" ) + list.Set( "trail_materials", "#trail.repair_claw_trail_red", "effects/repair_claw_trail_red" ) + list.Set( "trail_materials", "#trail.australiumtrail_red", "effects/australiumtrail_red" ) + list.Set( "trail_materials", "#trail.beam_generic01", "effects/beam_generic01" ) +end + function TOOL.BuildCPanel( CPanel ) CPanel:AddControl( "Header", { Description = "#tool.trails.desc" } ) diff --git a/garrysmod/lua/autorun/utilities_menu.lua b/garrysmod/lua/autorun/utilities_menu.lua index 86683821bc..dd83ac1505 100644 --- a/garrysmod/lua/autorun/utilities_menu.lua +++ b/garrysmod/lua/autorun/utilities_menu.lua @@ -24,11 +24,14 @@ local function ServerSettings( CPanel ) CPanel:AddControl( "TextBox", { Label = "#utilities.password", Command = "sv_password", WaitForEnter = "1" } ) + CPanel:AddControl( "CheckBox", { Label = "#utilities.kickerrornum", Command = "sv_kickerrornum" } ) + CPanel:AddControl( "CheckBox", { Label = "#utilities.allowcslua", Command = "sv_allowcslua" } ) + CPanel:AddControl( "Slider", { Label = "#utilities.gravity", Type = "Float", Command = "sv_gravity", Min = "-200", Max = "600" } ) CPanel:AddControl( "Slider", { Label = "#utilities.timescale", Type = "Float", Command = "phys_timescale", Min = "0", Max = "2" } ) CPanel:AddControl( "Slider", { Label = "#utilities.iterations", Type = "Integer", Command = "gmod_physiterations", Min = "1", Max = "10" } ) - CPanel:AddControl( "Header", { Description = "#utilities.sandboxsettingss" } ) + CPanel:AddControl( "Header", { Description = "#utilities.sandboxsettings" } ) CPanel:AddControl( "TextBox", { Label = "#persistent_mode", Command = "sbox_persist", WaitForEnter = "1" } ) diff --git a/garrysmod/lua/postprocess/overlay.lua b/garrysmod/lua/postprocess/overlay.lua index 8e465f880c..de35dde744 100644 --- a/garrysmod/lua/postprocess/overlay.lua +++ b/garrysmod/lua/postprocess/overlay.lua @@ -51,8 +51,27 @@ list.Set( "OverlayMaterials", "#overlay_pp.shield", { Material = "models/props list.Set( "OverlayMaterials", "#overlay_pp.froested", { Material = "models/props_c17/frostedglass_01a", Icon = "models/props_c17/frostedglass_01a" } ) list.Set( "OverlayMaterials", "#overlay_pp.tankglass", { Material = "models/props_lab/tank_glass001", Icon = "models/props_lab/tank_glass001" } ) list.Set( "OverlayMaterials", "#overlay_pp.globe", { Material = "models/props_combine/tprings_globe", Icon = "models/props_combine/tprings_globe" } ) -list.Set( "OverlayMaterials", "#overlay_pp.fisheye", { Material = "models/props_c17/fisheyelens", Icon = "models/props_c17/fisheyelens" } ) +list.Set( "OverlayMaterials", "#overlay_pp.fisheye", { Material = "models/props_c17/fisheyelens", Icon = "models/props_c17/fisheyelens" } ) list.Set( "OverlayMaterials", "#overlay_pp.rendertarget", { Material = "models/overlay_rendertarget", Icon = "models/overlay_rendertarget" } ) +list.Set( "OverlayMaterials", "#overlay_pp.strider_pinch_dudv", { Material = "models/strider_pinch_dudv", Icon = "effects/strider_pinch_dudv" } ) +list.Set( "OverlayMaterials", "#overlay_pp.teleport", { Material = "effects/tp_eyefx/tpeye", Icon = "effects/tp_eyefx/tpeye" } ) +list.Set( "OverlayMaterials", "#overlay_pp.teleport2", { Material = "effects/tp_eyefx/tpeye2", Icon = "effects/tp_eyefx/tpeye2" } ) +list.Set( "OverlayMaterials", "#overlay_pp.teleport3", { Material = "effects/tp_eyefx/tpeye3", Icon = "effects/tp_eyefx/tpeye3" } ) +list.Set( "OverlayMaterials", "#overlay_pp.tvnoise", { Material = "effects/tvscreen_noise002a", Icon = "effects/tvscreen_noise002a" } ) +list.Set( "OverlayMaterials", "#overlay_pp.water_warp01", { Material = "effects/water_warp01", Icon = "effects/water_warp01" } ) + +if ( IsMounted( "tf" ) ) then + list.Set( "OverlayMaterials", "#overlay_pp.jarate", { Material = "effects/jarate_overlay", Icon = "effects/jarate_overlay" } ) + list.Set( "OverlayMaterials", "#overlay_pp.invuln_overlay_red", { Material = "effects/invuln_overlay_red", Icon = "effects/invuln_overlay_red" } ) + list.Set( "OverlayMaterials", "#overlay_pp.invuln_overlay_blu", { Material = "effects/invuln_overlay_blue", Icon = "effects/invuln_overlay_blue" } ) + list.Set( "OverlayMaterials", "#overlay_pp.water_warp", { Material = "effects/water_warp", Icon = "effects/water_warp" } ) + list.Set( "OverlayMaterials", "#overlay_pp.water_warp_2fort", { Material = "effects/water_warp_2fort", Icon = "effects/water_warp_2fort" } ) + list.Set( "OverlayMaterials", "#overlay_pp.water_warp_well", { Material = "effects/water_warp_well", Icon = "effects/water_warp_well" } ) + list.Set( "OverlayMaterials", "#overlay_pp.bleed_overlay", { Material = "effects/bleed_overlay", Icon = "effects/bleed_overlay" } ) + list.Set( "OverlayMaterials", "#overlay_pp.bombinomicon_distortion", { Material = "effects/bombinomicon_distortion", Icon = "effects/bombinomicon_distortion" } ) + list.Set( "OverlayMaterials", "#overlay_pp.dodge_overlay", { Material = "effects/dodge_overlay", Icon = "effects/dodge_overlay" } ) + list.Set( "OverlayMaterials", "#overlay_pp.distortion_normal", { Material = "effects/distortion_normal001", Icon = "effects/distortion_normal001" } ) +end list.Set( "PostProcess", "#overlay_pp", { diff --git a/garrysmod/resource/localization/en/postprocessing.properties b/garrysmod/resource/localization/en/postprocessing.properties index 67d4dce76f..a4ff7b19ca 100644 --- a/garrysmod/resource/localization/en/postprocessing.properties +++ b/garrysmod/resource/localization/en/postprocessing.properties @@ -16,6 +16,22 @@ overlay_pp.tankglass=Fuel Tank overlay_pp.globe=Globe overlay_pp.fisheye=Fish Eye overlay_pp.rendertarget=Render Target +overlay_pp.strider_pinch_dudv=Strider Pinch +overlay_pp.teleport=Teleport +overlay_pp.teleport2=Teleport 2 +overlay_pp.teleport3=Teleport 3 +overlay_pp.tvnoise=TV Noise +overlay_pp.water_warp01=Water +overlay_pp.jarate=Jarate +overlay_pp.invuln_overlay_red=RED Uber +overlay_pp.invuln_overlay_blu=BLU Uber +overlay_pp.water_warp=Water +overlay_pp.water_warp_2fort=Water 2Fort +overlay_pp.water_warp_well=Water Well +overlay_pp.bleed_overlay=Bleed +overlay_pp.bombinomicon_distortion=Bombinomicon +overlay_pp.dodge_overlay=Dodge +overlay_pp.distortion_normal=Distortion # Shaders diff --git a/garrysmod/resource/localization/en/spawnmenu.properties b/garrysmod/resource/localization/en/spawnmenu.properties index f609fecf51..a546499562 100644 --- a/garrysmod/resource/localization/en/spawnmenu.properties +++ b/garrysmod/resource/localization/en/spawnmenu.properties @@ -33,6 +33,8 @@ utilities.password=Server Password\: utilities.gravity=Gravity\: utilities.timescale=Physics Timescale\: utilities.iterations=Physics Iterations\: +utilities.kickerrornum=Kick for clientside errors +utilities.allowcslua=Allow clientside scripts KP_INS=Numpad 0 KP_END=Numpad 1 diff --git a/garrysmod/resource/localization/en/tool.properties b/garrysmod/resource/localization/en/tool.properties index d7f8cd1cca..3c4168e075 100644 --- a/garrysmod/resource/localization/en/tool.properties +++ b/garrysmod/resource/localization/en/tool.properties @@ -351,6 +351,15 @@ trail.laser=Laser trail.physbeam=Physics Beam trail.love=Hearts trail.lol=LOL +trail.beam001_blu=BLU Tube +trail.beam001_red=RED Tube +trail.beam001_white=White Tube +trail.arrowtrail_blu=BLU Arrow Trail +trail.arrowtrail_red=RED Arrow Trail +trail.repair_claw_trail_blue=BLU Wave +trail.repair_claw_trail_red=RED Wave +trail.australiumtrail_red=Australium +trail.beam_generic01=Generic tool.inflator.name=Inflator tool.inflator.desc=Inflate a ragdoll/NPC