Trim trailing whitespaces

This commit is contained in:
Redox 2023-08-19 21:38:03 +02:00
parent ed7dc55d67
commit 9d56c2d8ec
No known key found for this signature in database
GPG Key ID: C10A433A95068388
11 changed files with 25 additions and 25 deletions

View File

@ -16,7 +16,7 @@ AnimStack = {
local top = self:getTop()
if top ~= part then
if top then top:OnStackStop() end
-- Remove self from stack to move to end and also prevent things from breaking because table.RemoveByValue() only removes the first instance
table.RemoveByValue(stack, part)
table.insert(stack, part)
@ -28,7 +28,7 @@ AnimStack = {
pop = function(self, part)
part:OnStackStop()
local stack = self.stack
-- Remove self from animation stack
if table.RemoveByValue(stack, part) == #stack + 1 then
-- This was the current animation so play the next in the stack

View File

@ -200,7 +200,7 @@ end
function PART:OnDraw()
local part = self.EndPoint
if self.Materialm and self.StartColorC and self.EndColorC and part:IsValid() and part.GetWorldPosition then
local pos, ang = self:GetDrawPosition()
render.SetMaterial(self.Materialm)

View File

@ -35,12 +35,12 @@ BUILDER:StartStorableVars()
BUILDER:EndStorableVars()
function PART:SetEvent(event)
local reset = (self.Arguments == "") or
local reset = (self.Arguments == "") or
(self.Arguments ~= "" and self.Event ~= "" and self.Event ~= event)
self.Event = event
self:SetWarning()
self:GetDynamicProperties(reset)
self:GetDynamicProperties(reset)
end
local function get_default(typ)
@ -95,8 +95,8 @@ function PART:GetDynamicProperties(reset_to_default)
}
local arg = tbl[key]
if arg.get() == nil or reset_to_default then
if udata.default then
if arg.get() == nil or reset_to_default then
if udata.default then
arg.set(udata.default)
else
arg.set(nil)
@ -824,8 +824,8 @@ PART.OldEvents = {
command = {
arguments = {{find = "string"}, {time = "number"}, {hide_in_eventwheel = "boolean"}},
userdata = {
{default = "change_me", editor_friendly = "CommandName"},
{default = 0.1, editor_friendly = "EventDuration"},
{default = "change_me", editor_friendly = "CommandName"},
{default = 0.1, editor_friendly = "EventDuration"},
{default = false, group = "event wheel", editor_friendly = "HideInEventWheel"}
},
nice = function(self, ent, find, time)

View File

@ -185,9 +185,9 @@ function PART:PlaySound(osnd, ovol)
if #sounds > 1 then
if self.Sequential then
self.seq_index = self.seq_index or 1
snd = sounds[self.seq_index]
self.seq_index = self.seq_index + self.SequentialStep
self.seq_index = self.seq_index % (#sounds+1)
if self.seq_index == 0 then self.seq_index = 1 end
@ -212,7 +212,7 @@ function PART:PlaySound(osnd, ovol)
"(%[%d-,%d-%])",self.seq_index
)
self.seq_index = self.seq_index + self.SequentialStep
local span = minmaxpath(self.Sound,"max") - minmaxpath(self.Sound,"min") + 1
if self.seq_index > minmaxpath(self.Sound,"max") then
self.seq_index = self.seq_index - span

View File

@ -168,11 +168,11 @@ function PART:OnShow()
end
end
if not self.real_model then
self.real_model = ent:GetModel()
if not self.real_model then
self.real_model = ent:GetModel()
end
if not (self.old_model == self:GetModel()) or
if not (self.old_model == self:GetModel()) or
(pac.LocalHands:IsValid() and ent == pac.LocalHands
and not (self.real_model == pac.LocalHands:GetModel())) then
self.old_model = self:GetModel()

View File

@ -356,7 +356,7 @@ function PART:EmitParticles(pos, ang, real_ang)
end
end
self.NextShot = pac.RealTime + self.FireDelay
end
self.FirstShot = false

View File

@ -307,7 +307,7 @@ PART.Inputs.random_once = function(self, seed, min, max)
self.rand_id = self.rand_id or {}
if seed then
self.rand_id[seed] = self.rand_id[seed] or min + math.random()*(max-min)
else
else
self.rand = self.rand or min + math.random()*(max-min)
end

View File

@ -8,7 +8,7 @@ util.AddNetworkString("pac3_test_suite_backdoor")
net.Receive("pac3_test_suite_backdoor", function(len, ply)
-- needs to be enabled through lua first, eg lua_run pac.test_suite_backdoor_enabled = true
if not pac.test_suite_backdoor_enabled then return end
-- need to be at least super admin
if not ply:IsSuperAdmin() then return end

View File

@ -4,11 +4,11 @@ if game.SinglePlayer() then
util.AddNetworkString('pac_footstep')
util.AddNetworkString('pac_footstep_request_state_update')
util.AddNetworkString('pac_signal_mute_footstep')
hook.Add("PlayerFootstep", "footstep_fix", function(ply, pos, _, snd, vol)
net.Start("pac_footstep_request_state_update")
net.Send(ply)
net.Start("pac_footstep")
net.WriteEntity(ply)
net.WriteVector(pos)
@ -16,7 +16,7 @@ if game.SinglePlayer() then
net.WriteFloat(vol)
net.Broadcast()
end)
net.Receive("pac_signal_mute_footstep", function(len,ply)
local b = net.ReadBool()
ply.pac_mute_footsteps = b
@ -26,8 +26,8 @@ if game.SinglePlayer() then
end)
else hook.Remove("PlayerFootstep", "pac_footstep_silence") end
end)
end
if CLIENT then

View File

@ -2555,7 +2555,7 @@ pace.example_outfits["southpark"] = {
["Duplicate"] = false,
["ClassName"] = "group",
},
},
},
}

View File

@ -746,7 +746,7 @@ do -- event is_touching
mins = mins,
filter = ent
} )
if self.udata then
render.DrawWireframeBox( startpos, Angle( 0, 0, 0 ), mins, maxs, tr.Hit and Color(255,0,0) or Color(255,255,255), true )
end