1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

resolve #319 remove UNDO in signaling tool (#343)

This commit is contained in:
Αλέξανδρος
2021-08-10 00:55:24 +03:00
committed by GitHub
parent 41f81c0ad5
commit 6bedb51ea8

View File

@@ -71,7 +71,7 @@ if CLIENT then
language.Add("Tool.signalling.name", "Signalling Tool") language.Add("Tool.signalling.name", "Signalling Tool")
language.Add("Tool.signalling.desc", "Adds and modifies signalling equipment (ARS/ALS) or signs") language.Add("Tool.signalling.desc", "Adds and modifies signalling equipment (ARS/ALS) or signs")
language.Add("Tool.signalling.0", "Primary: Spawn/update selected signalling entity (point at the inner side of rail)\nReload: Copy ARS/light settings\nSecondary: Remove") language.Add("Tool.signalling.0", "Primary: Spawn/update selected signalling entity (point at the inner side of rail)\nReload: Copy ARS/light settings\nSecondary: Remove")
language.Add("Undone_signalling", "Undone ARS/signalling equipment") --language.Add("Undone_signalling", "Undone ARS/signalling equipment")
end end
function TOOL:SpawnSignal(ply,trace,param) function TOOL:SpawnSignal(ply,trace,param)
@@ -128,10 +128,10 @@ function TOOL:SpawnSignal(ply,trace,param)
if not found then if not found then
ent:Spawn() ent:Spawn()
-- Add to undo -- Add to undo
undo.Create("signalling") --[[undo.Create("signalling")
undo.AddEntity(ent) undo.AddEntity(ent)
undo.SetPlayer(ply) undo.SetPlayer(ply)
undo.Finish() undo.Finish()]]
end end
ent.SignalType = self.Signal.Type-1 ent.SignalType = self.Signal.Type-1
ent.ARSOnly = self.Signal.ARSOnly ent.ARSOnly = self.Signal.ARSOnly
@@ -199,10 +199,10 @@ function TOOL:SpawnSign(ply,trace,param)
if not found then if not found then
ent:Spawn() ent:Spawn()
-- Add to undo -- Add to undo
undo.Create("signalling") --[[undo.Create("signalling")
undo.AddEntity(ent) undo.AddEntity(ent)
undo.SetPlayer(ply) undo.SetPlayer(ply)
undo.Finish() undo.Finish()]]
end end
ent.SignType = self.Sign.Type ent.SignType = self.Sign.Type
ent.YOffset = self.Sign.YOffset ent.YOffset = self.Sign.YOffset
@@ -420,10 +420,10 @@ function TOOL:SpawnAutoPlate(ply,trace,param)
if not found then if not found then
ent:Spawn() ent:Spawn()
-- Add to undo -- Add to undo
undo.Create("signalling") --[[undo.Create("signalling")
undo.AddEntity(ent) undo.AddEntity(ent)
undo.SetPlayer(ply) undo.SetPlayer(ply)
undo.Finish() undo.Finish()]]
end end
return ent return ent
end end