From a811c39c95e339c43c176f610ff69f3dd9e13e50 Mon Sep 17 00:00:00 2001 From: Freakyy Date: Sat, 9 May 2015 15:04:11 +0200 Subject: [PATCH] Final commit for 1.1.0 --- build/GTALua/addons/_empty_addon/main.lua | 7 ++++--- .../GTALua/addons/_example_01_spawn_vehicle/main.lua | 2 -- build/GTALua/addons/_example_03_simple_menu/main.lua | 11 ++--------- build/GTALua/internal/extensions/Vector.lua | 5 +++++ build/GTALua/internal/game/Entity.lua | 2 -- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/build/GTALua/addons/_empty_addon/main.lua b/build/GTALua/addons/_empty_addon/main.lua index 81d1cb0..0ab1ca8 100644 --- a/build/GTALua/addons/_empty_addon/main.lua +++ b/build/GTALua/addons/_empty_addon/main.lua @@ -1,7 +1,8 @@ -- --- Remember: --- Your addon will only be loaded if you have an ASI file for it! --- Take the empty_addon.asi, rename it, and copy it to your main GTA directory! +-- Check out "Getting started" on the Wiki! +-- http://freeschi.com/w/index.php/Main_Page +-- http://freeschi.com/w/index.php/Getting_Started +-- http://freeschi.com/w/index.php/API -- -- Please rename empty_addon! diff --git a/build/GTALua/addons/_example_01_spawn_vehicle/main.lua b/build/GTALua/addons/_example_01_spawn_vehicle/main.lua index 0f0726b..40e6d1e 100644 --- a/build/GTALua/addons/_example_01_spawn_vehicle/main.lua +++ b/build/GTALua/addons/_example_01_spawn_vehicle/main.lua @@ -12,8 +12,6 @@ example_vehicle = ScriptThread("example_01_spawn_vehicle") -- Run function -- This is called once! It's your job to keep this alive! function example_vehicle:Run() - print("hi") - -- while-loop, do not use while true ! while self:IsRunning() do -- Key-Down-Check diff --git a/build/GTALua/addons/_example_03_simple_menu/main.lua b/build/GTALua/addons/_example_03_simple_menu/main.lua index 09e81c5..3fc0fae 100644 --- a/build/GTALua/addons/_example_03_simple_menu/main.lua +++ b/build/GTALua/addons/_example_03_simple_menu/main.lua @@ -4,23 +4,17 @@ -- http://freeschi.com/w/index.php/Getting_Started -- http://freeschi.com/w/index.php/API -- - -include("../../internal/extensions/CNativeReg.lua") -include("../../internal/game/gui.lua") - -- I recommend matching addon name & script thread name example_simple_menu = ScriptThread("example_simple_menu") -- Callback function example_simple_menu:MenuCallback_Test(menu, text) - print("Option toggled: ", text) + print("Given message: ", text) menu:Close() end -- Run function example_simple_menu:Run() - print("hlo ?") - -- Setup Menu local menu = gui.SimpleMenu(self, { Title = "Menu 123", -- title of the menu @@ -51,6 +45,5 @@ function example_simple_menu:Run() end end -print("hi") - +-- Register example_simple_menu:Register() \ No newline at end of file diff --git a/build/GTALua/internal/extensions/Vector.lua b/build/GTALua/internal/extensions/Vector.lua index 8a3b56a..d5016ff 100644 --- a/build/GTALua/internal/extensions/Vector.lua +++ b/build/GTALua/internal/extensions/Vector.lua @@ -9,6 +9,11 @@ function Vector.__sub(a, b) return Vector(a.x - b.x, a.y - b.y, a.z - b.z) end +-- Vector == Vector +function Vector.__eq(a, b) + return a.x == b.x and a.y == b.y and a.z == b.z +end + -- Unpack function Vector:Unpack() return self.x, self.y, self.z diff --git a/build/GTALua/internal/game/Entity.lua b/build/GTALua/internal/game/Entity.lua index 5cd05bd..f859c3b 100644 --- a/build/GTALua/internal/game/Entity.lua +++ b/build/GTALua/internal/game/Entity.lua @@ -3,8 +3,6 @@ class 'Entity'(Object) -- CTor function Entity:__init(id) - --Object.__init(self, id) - self._type = "Entity" self.ID = id end