diff options
| author | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-03 10:02:05 -0400 |
|---|---|---|
| committer | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-03 10:02:05 -0400 |
| commit | 24bf3c07b9374857525ada12c2f6beb3d6a06ce3 (patch) | |
| tree | f7b5e61cd352a7e756481b5522edbc0abf505a0e | |
| parent | cc29e774fee67fda00bf004dc2eeecb997713150 (diff) | |
| download | zones-24bf3c07b9374857525ada12c2f6beb3d6a06ce3.tar.gz zones-24bf3c07b9374857525ada12c2f6beb3d6a06ce3.tar.bz2 zones-24bf3c07b9374857525ada12c2f6beb3d6a06ce3.zip | |
Class changes call OnZoneCreated
| -rw-r--r-- | lua/zones.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lua/zones.lua b/lua/zones.lua index ac0c9dd..bf380ca 100644 --- a/lua/zones.lua +++ b/lua/zones.lua @@ -1,5 +1,5 @@ -local version = 1.11 -- Older versions will not run if a newer version is used in another script. +local version = 1.12 -- Older versions will not run if a newer version is used in another script. --[[ ZONES - by Bobbleheadbob WARNING: If you edit any of these files, make them use a different namespace. Multiple scripts may depend on this library so modifying it can break other scripts. @@ -327,7 +327,16 @@ if SERVER then v:SetZoneClass(class) end end - zones.List[id].class = class + + local zone,new = zones.List[id],{} + new.points = zone.points + new.height = zone.height + new.bounds = zone.bounds + new.class = class + + zones.List[id] = new + + hook.Run("OnZoneCreated",new,class,id) zones.Sync() end) |
