diff --git a/game/engines/default/engine/Actor.lua b/game/engines/default/engine/Actor.lua index 3bfcb50039f944f5ebcb4fab6a3e66b897b1a0d4..9ba8d3f6a326a2359a699c71f1e62223e3d277d4 100644 --- a/game/engines/default/engine/Actor.lua +++ b/game/engines/default/engine/Actor.lua @@ -98,12 +98,12 @@ function _M:setEmote(e) end --- Moves an actor on the map --- *WARNING*: changing x and y properties manualy is *WRONG* and will blow up in your face. Use this method. Always. +-- *WARNING*: changing x and y properties manually is *WRONG* and will blow up in your face. Use this method. Always. -- @param map the map to move onto -- @param x coord of the destination -- @param y coord of the destination -- @param force if true do not check for the presence of an other entity. *Use wisely* --- @return true if a move was *ATTEMPTED*. This means the actor will proably want to use energy +-- @return true if a move was *ATTEMPTED*. This means the actor will probably want to use energy function _M:move(x, y, force) if self.dead then return true end local map = game.level.map @@ -188,10 +188,10 @@ function _M:getPathString() end --- Teleports randomly to a passable grid --- @param x the coord of the teleporatation --- @param y the coord of the teleporatation +-- @param x the coord of the teleportation +-- @param y the coord of the teleportation -- @param dist the radius of the random effect, if set to 0 it is a precise teleport --- @param min_dist the minimun radius of of the effect, will never teleport closer. Defaults to 0 if not set +-- @param min_dist the minimum radius of of the effect, will never teleport closer. Defaults to 0 if not set -- @return true if the teleport worked function _M:teleportRandom(x, y, dist, min_dist) local poss = {} @@ -424,8 +424,8 @@ function _M:attr(prop, v, fix) end --- Are we within a certain distance of the target --- @param x the spot we test for near-ness --- @param y the spot we test for near-ness +-- @param x the spot we test for nearness +-- @param y the spot we test for nearness -- @param radius how close we should be (defaults to 1) function _M:isNear(x, y, radius) radius = radius or 1 diff --git a/game/engines/default/engine/Astar.lua b/game/engines/default/engine/Astar.lua index 271cac16ae41064839b8ddb81168783787aba8d3..869d1a86e4edcbe4484d9cb3e7d764c0628c6ed2 100644 --- a/game/engines/default/engine/Astar.lua +++ b/game/engines/default/engine/Astar.lua @@ -93,7 +93,7 @@ function _M:calc(sx, sy, tx, ty, use_has_seen, heuristic) checkPos = function(node, nx, ny) local nnode = self:toSingle(nx, ny) if not closed[nnode] and self.map:isBound(nx, ny) and ((use_has_seen and not self.map.has_seens(nx, ny)) or not cache:get(nx, ny)) then - local tent_g_score = g_score[node] + 1 -- we can adjust hre for difficult passable terrain + local tent_g_score = g_score[node] + 1 -- we can adjust here for difficult passable terrain local tent_is_better = false if not open[nnode] then open[nnode] = true; tent_is_better = true elseif tent_g_score < g_score[nnode] then tent_is_better = true @@ -115,7 +115,7 @@ function _M:calc(sx, sy, tx, ty, use_has_seen, heuristic) checkPos = function(node, nx, ny) local nnode = self:toSingle(nx, ny) if not closed[nnode] and self.map:isBound(nx, ny) and ((use_has_seen and not self.map.has_seens(nx, ny)) or not self.map:checkEntity(nx, ny, Map.TERRAIN, "block_move", self.actor, nil, true)) then - local tent_g_score = g_score[node] + 1 -- we can adjust hre for difficult passable terrain + local tent_g_score = g_score[node] + 1 -- we can adjust here for difficult passable terrain local tent_is_better = false if not open[nnode] then open[nnode] = true; tent_is_better = true elseif tent_g_score < g_score[nnode] then tent_is_better = true diff --git a/game/engines/default/engine/Autolevel.lua b/game/engines/default/engine/Autolevel.lua index fcb197e1259abd6c7d9d94ee241684c937755441..9ed4b3a022f7fc4011809c9ff345731d67262130 100644 --- a/game/engines/default/engine/Autolevel.lua +++ b/game/engines/default/engine/Autolevel.lua @@ -20,7 +20,7 @@ require "engine.class" --- Handles autoleveling schemes --- Proably used mainly for NPCS, although it could also be used for player allies +-- Probably used mainly for NPCS, although it could also be used for player allies -- or players themselves for lazy players/modules module(..., package.seeall, class.make) diff --git a/game/engines/default/engine/BSP.lua b/game/engines/default/engine/BSP.lua index 0fbfd520d855d4f8e4feaf66e5049c4e470427b3..9733c0cd9d4885a5ec4f3f51edd9ac14ae125953 100644 --- a/game/engines/default/engine/BSP.lua +++ b/game/engines/default/engine/BSP.lua @@ -19,7 +19,7 @@ require "engine.class" ---- Abstract binary space partionning +--- Abstract binary space partitioning -- Can be used to generator levels and so on module(..., package.seeall, class.make) diff --git a/game/engines/default/engine/Birther.lua b/game/engines/default/engine/Birther.lua index 92512ca573a6966e263e33c5f58ab1479c4de00a..76fdd538687143197251ccedd32d284835808a30 100644 --- a/game/engines/default/engine/Birther.lua +++ b/game/engines/default/engine/Birther.lua @@ -154,10 +154,10 @@ end function _M:quickBirth() if not self.do_quickbirth then return end - -- Aborth quickbirth if stage not found + -- Abort quickbirth if stage not found if not self.quickbirth[self.current_type] then self.do_quickbirth = false end - -- Find the corect descriptor + -- Find the correct descriptor for i, d in ipairs(self.list) do if self.quickbirth[self.current_type] == d.name then print("[QUICK BIRTH] using", d.name, "for", self.current_type) @@ -167,7 +167,7 @@ function _M:quickBirth() end end - -- Abord if not found + -- Abort if not found self.do_quickbirth = false end diff --git a/game/engines/default/engine/Chat.lua b/game/engines/default/engine/Chat.lua index 841b8cffa172ea783c7b70bb7a1d1f2907966c14..3fce8e6d74a2aeed1b5baf8a1af6291d639bed9a 100644 --- a/game/engines/default/engine/Chat.lua +++ b/game/engines/default/engine/Chat.lua @@ -54,7 +54,7 @@ function _M:addChat(c) self.chats[c.id] = c print("[CHAT] loaded", c.id, c) - -- Parse answsers looking for quick replies + -- Parse answers looking for quick replies for i, a in ipairs(c.answers) do if a.quick_reply then a.jump = "quick_reply"..self.quick_replies diff --git a/game/engines/default/engine/DebugConsole.lua b/game/engines/default/engine/DebugConsole.lua index 33b6ac0b9f32aec4cd3af6f5c84e98ae8a473d9a..e461ff1ee06a745bd3fdb359b3b02d22535849c0 100644 --- a/game/engines/default/engine/DebugConsole.lua +++ b/game/engines/default/engine/DebugConsole.lua @@ -101,7 +101,7 @@ function _M:drawDialog(s, w, h) -- Draw the current command s:drawStringBlended(self.font, self.line, 0, dh, 255, 255, 255) dh = dh - self.font:lineSkip() - -- Now draw the history with any ofset + -- Now draw the history with any offset while dh > buffer do if not self.history[i] then break end s:drawStringBlended(self.font, self.history[i], 0, dh, 255, 255, 255) diff --git a/game/engines/default/engine/Entity.lua b/game/engines/default/engine/Entity.lua index e3f5317239f14729a536c01c910546f16051b5a8..be0d479d699748a30a8577f5dff9d234f6a2efc2 100644 --- a/game/engines/default/engine/Entity.lua +++ b/game/engines/default/engine/Entity.lua @@ -20,7 +20,7 @@ --- A game entity -- An entity is anything that goes on a map, terrain features, objects, monsters, player, ... --- Usually there is no need to use it directly, and it is betetr to use specific engine.Grid, engine.Actor or engine.Object +-- Usually there is no need to use it directly, and it is better to use specific engine.Grid, engine.Actor or engine.Object -- classes. Most modules will want to subclass those anyway to add new comportments local Shader = require "engine.Shader" @@ -258,7 +258,7 @@ function _M:resetMoveAnim() end --- Get the entity image as an sdl surface and texture for the given tiles and size --- @param tiles a Tiles instance that will handle the tiles (usualy pass it the current Map.tiles) +-- @param tiles a Tiles instance that will handle the tiles (usually pass it the current Map.tiles) -- @param w the width -- @param h the height -- @return the sdl surface and the texture @@ -299,7 +299,7 @@ function _M:getDisplayString(tstr) end --- Displays an entity somewhere on screen, outside the map --- @param tiles a Tiles instance that will handle the tiles (usualy pass it the current Map.tiles, it will if this is null) +-- @param tiles a Tiles instance that will handle the tiles (usually pass it the current Map.tiles, it will if this is null) -- @param w the width -- @param h the height -- @return the sdl surface and the texture @@ -317,8 +317,8 @@ function _M:toScreen(tiles, x, y, w, h) end --- Resolves an entity --- This is called when generatingthe final clones of an entity for use in a level.<br/> --- This can be used to make random enchants on objects, random properties on actors, ...<br/> +-- This is called when generating the final clones of an entity for use in a level. +-- This can be used to make random enchants on objects, random properties on actors, ... -- by default this only looks for properties with a table value containing a __resolver field function _M:resolve(t, last, on_entity) t = t or self @@ -340,7 +340,7 @@ function _M:resolve(t, last, on_entity) self.unique = self.name end else - -- Handle ided if possible + -- Handle IDed if possible if self.resolveIdentify then self:resolveIdentify() end end end @@ -355,9 +355,9 @@ function _M:added() end end ---- Call when the entity is actually removed from existance +--- Call when the entity is actually removed from existence -- This helps ensuring uniqueness of uniques. --- This recursively remvoes inventories too, if you need anythign special, overload this +-- This recursively removes inventories too, if you need anything special, overload this function _M:removed() if self.inven then for _, inven in pairs(self.inven) do diff --git a/game/engines/default/engine/Game.lua b/game/engines/default/engine/Game.lua index ccece4884dfa0cb7b1bcb1085f5224bdf9eaad17..f8e5ce4317b149188c5eb636757657076dadbda0 100644 --- a/game/engines/default/engine/Game.lua +++ b/game/engines/default/engine/Game.lua @@ -385,7 +385,7 @@ function _M:cancelCoroutine(id) end --- Save a thread into the thread pool --- Threads will be auto join'ed when the module exits or when it can<br/> +-- Threads will be auto joined when the module exits or when it can -- ALL THREADS registered *MUST* return true when they exit function _M:registerThread(th, linda) print("[THREAD] registering", th, linda, #self.__threads+1) diff --git a/game/engines/default/engine/GameEnergyBased.lua b/game/engines/default/engine/GameEnergyBased.lua index 633255d062a50dc2669d724c717a4830b10812be..3ef21bbe4d121448a63c78ec70c3cefa32b44f27 100644 --- a/game/engines/default/engine/GameEnergyBased.lua +++ b/game/engines/default/engine/GameEnergyBased.lua @@ -28,7 +28,7 @@ module(..., package.seeall, class.inherit(engine.Game)) --- Setup the game -- @param keyhandler the default keyhandler for this game -- @energy_to_act how much energy does an entity need to act --- @energy_per_tick how much energy does an entity recieves per game tick. This is multiplied by the entity energy.mod property +-- @energy_per_tick how much energy does an entity receives per game tick. This is multiplied by the entity energy.mod property function _M:init(keyhandler, energy_to_act, energy_per_tick) self.energy_to_act, self.energy_per_tick = energy_to_act or 1000, energy_per_tick or 100 engine.Game.init(self, keyhandler) diff --git a/game/engines/default/engine/Heightmap.lua b/game/engines/default/engine/Heightmap.lua index 9bff0d1f1df955c3a5510fe497ad11789d89e608..c5f9bea6004e0ba10033569b441b3dd1f72ca6dc 100644 --- a/game/engines/default/engine/Heightmap.lua +++ b/game/engines/default/engine/Heightmap.lua @@ -96,7 +96,7 @@ end function _M:displayDebug(symbs) symbs = symbs or "abcdefghijklmnopqrstwxyzABCDEFGHIJKLMNOPQRSTWXYZ" - print("Dispalying heightmap", self.w, self.h) + print("Displaying heightmap", self.w, self.h) for j = 1, self.h do local str = "" for i = 1, self.w do diff --git a/game/engines/default/engine/Key.lua b/game/engines/default/engine/Key.lua index 09f6b21f33885ee50aea669cb2d4601900fb6a47..412e3365b91b558b314a109f3d8b4dfb388ab9ec 100644 --- a/game/engines/default/engine/Key.lua +++ b/game/engines/default/engine/Key.lua @@ -297,7 +297,7 @@ _SYSREQ = 317 _BREAK = 318 _MENU = 319 _POWER = 320 -- Power Macintosh power key -_EURO = 321 -- Some european keyboards +_EURO = 321 -- Some European keyboards _UNDO = 322 -- Atari keyboard has Undo __DEFAULT = -10000 diff --git a/game/engines/default/engine/KeyBind.lua b/game/engines/default/engine/KeyBind.lua index c49fb97903d1a3238aa548f2e37b0fe62bdbfbdb..fb66f1785bad35bb0292a41d7cd4fdfc2a294b07 100644 --- a/game/engines/default/engine/KeyBind.lua +++ b/game/engines/default/engine/KeyBind.lua @@ -220,7 +220,7 @@ function _M:triggerVirtual(virtual) self.virtuals[virtual]() end ---- Adds a key/command combinaison +--- Adds a key/command combination -- @param sym the key to handle -- @param mods a table with the mod keys needed, i.e: {"ctrl", "alt"} -- @param fct the function to call when the key is pressed @@ -228,7 +228,7 @@ function _M:addBind(virtual, fct) self.virtuals[virtual] = fct end ---- Adds a key/command combinaison +--- Adds a key/command combination -- @param sym the key to handle -- @param mods a table with the mod keys needed, i.e: {"ctrl", "alt"} -- @param fct the function to call when the key is pressed diff --git a/game/engines/default/engine/KeyCommand.lua b/game/engines/default/engine/KeyCommand.lua index f111277f42eba52f8d823204d0021c2c03a6bae4..abb380a00343257e544df75536f505eef08788b7 100644 --- a/game/engines/default/engine/KeyCommand.lua +++ b/game/engines/default/engine/KeyCommand.lua @@ -21,7 +21,7 @@ require "config" require "engine.class" require "engine.Key" ---- Receieves keypresses and acts upon them +--- Receives keypresses and acts upon them module(..., package.seeall, class.inherit(engine.Key)) function _M:init() @@ -34,7 +34,7 @@ function _M:init() self:addCommand(self._RETURN, {"alt"}, function() core.display.fullscreen() end) end ---- Adds the profiler keybind (ctrl, alt, chift, p) +--- Adds the profiler keybind (ctrl, alt, shift, p) function _M:setupProfiler() -- Profiler self:addCommand(self._p, {"ctrl","alt","shift"}, function() @@ -90,7 +90,7 @@ function _M:reset() self.on_input = false end ---- Adds a key/command combinaison +--- Adds a key/command combination -- @param sym the key to handle -- @param mods a table with the mod keys needed, i.e: {"ctrl", "alt"} -- @param fct the function to call when the key is pressed @@ -145,7 +145,7 @@ function _M:addCommands(t) end end ---- Receieves any unbound keys as UTF8 characters (if possible) +--- Receives any unbound keys as UTF8 characters (if possible) -- @param fct the function to call for each key, get a single parameter to pass the UTF8 string function _M:setTextInput(fct) self.on_input = fct @@ -153,7 +153,7 @@ end --- Loads a locale converter -- WARNING: This only converts the "sym" key, *NOT* the unicode key --- @param file the locale convertion file to load +-- @param file the locale conversion file to load function _M:loadLocaleConvertion(file) local f, err = loadfile(file) if not f and err then error(err) end diff --git a/game/engines/default/engine/Level.lua b/game/engines/default/engine/Level.lua index 156d75dbfe515f32d0c9b3546a9545248ec89fd7..5b30862d35c6883b5a4ec7059a245b094dfbc021 100644 --- a/game/engines/default/engine/Level.lua +++ b/game/engines/default/engine/Level.lua @@ -33,7 +33,7 @@ function _M:init(level, map) end --- Adds an entity to the level --- Only entities that need to act need to be added. Terrain features do not need this usualy +-- Only entities that need to act need to be added. Terrain features do not need this usually function _M:addEntity(e, after) if self.entities[e.uid] then error("Entity "..e.uid.."("..e.name..") already present on the level") end self.entities[e.uid] = e @@ -88,7 +88,7 @@ function _M:loaded() self.entities = nes end ---- Setup an entity list for the level, this allwos the Zone to pick objects/actors/... +--- Setup an entity list for the level, this allows the Zone to pick objects/actors/... function _M:setEntitiesList(type, list) self.entities_list[type] = list print("Stored entities list", type, list) diff --git a/game/engines/default/engine/LogDisplay.lua b/game/engines/default/engine/LogDisplay.lua index 5e025ff0736765b13697490fc72fcdbbb44012fc..75b3ea7b9bf9e25254f49b373e978f8ad559bbaf 100644 --- a/game/engines/default/engine/LogDisplay.lua +++ b/game/engines/default/engine/LogDisplay.lua @@ -20,7 +20,7 @@ require "engine.class" require "engine.ui.Base" ---- Module that handles message history ina mouse wheel scrollable zone +--- Module that handles message history in a mouse wheel scrollable zone module(..., package.seeall, class.inherit(engine.ui.Base)) --- Creates the log zone diff --git a/game/engines/default/engine/Map.lua b/game/engines/default/engine/Map.lua index 5c20025ce3a607c6e44a131d822914aa63ff6452..fc9287390a082805a15b21377c6f871796ec40f0 100644 --- a/game/engines/default/engine/Map.lua +++ b/game/engines/default/engine/Map.lua @@ -115,8 +115,8 @@ mm_blocks = { --- Sets the viewport size -- Static --- @param x screen coordonate where the map will be displayed (this has no impact on the real display). This is used to compute mouse clicks --- @param y screen coordonate where the map will be displayed (this has no impact on the real display). This is used to compute mouse clicks +-- @param x screen coordinate where the map will be displayed (this has no impact on the real display). This is used to compute mouse clicks +-- @param y screen coordinate where the map will be displayed (this has no impact on the real display). This is used to compute mouse clicks -- @param w width -- @param h height -- @param tile_w width of a single tile @@ -135,7 +135,7 @@ function _M:setViewPort(x, y, w, h, tile_w, tile_h, fontname, fontsize, multidis end --- Sets zoom level --- @param zoom nil to reset to default, ortherwise a number to increment the zoom with +-- @param zoom nil to reset to default, otherwise a number to increment the zoom with -- @param tmx make sure this coords are visible after zoom (can be nil) -- @param tmy make sure this coords are visible after zoom (can be nil) function _M:setZoom(zoom, tmx, tmy) @@ -162,7 +162,7 @@ end -- By default it is 0.6, 0.6, 0.6, 1 function _M:setObscure(r, g, b, a) self.color_obscure = {r, g, b, a} - -- If we are used on a real map, set it localy + -- If we are used on a real map, set it locally if self._map then self._map:setObscure(unpack(self.color_obscure)) end end @@ -170,7 +170,7 @@ end -- By default it is 1, 1, 1, 1 function _M:setShown(r, g, b, a) self.color_shown= {r, g, b, a} - -- If we are used on a real map, set it localy + -- If we are used on a real map, set it locally if self._map then self._map:setShown(unpack(self.color_shown)) end end @@ -183,7 +183,7 @@ function _M:resetTiles() end --- Defines the faction of the person seeing the map --- Usualy this will be the player's faction. If you do not want to use tactical display, dont use it +-- Usually this will be the player's faction. If you do not want to use tactical display, dont use it function _M:setViewerFaction(faction, friend, neutral, enemy) self.view_faction = faction self.faction_friend = "tactical_friend.png" @@ -192,7 +192,7 @@ function _M:setViewerFaction(faction, friend, neutral, enemy) end --- Defines the actor that sees the map --- Usualy this will be the player. This is used to determine invisibility/... +-- Usually this will be the player. This is used to determine invisibility/... function _M:setViewerActor(player) self.actor_player = player end @@ -259,7 +259,7 @@ end --- Adds a "path string" to the map -- "Path strings" are strings defining what terrain an actor can cross. Their format is left to the module to decide (by overloading Actor:getPathString() )<br/> --- They are totally optional as they re only used to compute A* paths adn the likes and even then the algorithms still work without them, only slower<br/> +-- They are totally optional as they re only used to compute A* paths and the likes and even then the algorithms still work without them, only slower<br/> -- If you use them the block_move function of your Grid class must be able to handle either an actor or a "path string" as their third argument function _M:addPathString(ps) for i, eps in ipairs(self.path_strings) do @@ -551,7 +551,7 @@ function _M:display(x, y, nb_keyframe) self.clean_fov = true end ---- Sets checks if a grid lets sigth pass through +--- Sets checks if a grid lets sight pass through -- Used by FOV code function _M:opaque(x, y) if x < 0 or x >= self.w or y < 0 or y >= self.h then return false end @@ -619,7 +619,7 @@ function _M:checkAllEntities(x, y, what, ...) end --- Check all entities of the grid for a property, discarding the results --- This will iterate over all entities without stoping. +-- This will iterate over all entities without stopping. -- No guaranty is given about the iteration order -- @param x position -- @param y position @@ -958,7 +958,7 @@ function _M:removeParticleEmitter(e) return true end ---- Display the particle emiters, called by self:display() +--- Display the particle emitters, called by self:display() function _M:displayParticles(nb_keyframes) nb_keyframes = nb_keyframes or 1 local adx, ady @@ -968,7 +968,7 @@ function _M:displayParticles(nb_keyframes) if e._mo then adx, ady = e._mo:getMoveAnim(e.x, e.y) else adx, ady = 0, 0 end -- Make sure we display on the real screen coords: handle current move anim position if nb_keyframes == 0 and e.x and e.y then - -- Just display it, not updating, no emiting + -- Just display it, not updating, no emitting if e.x + e.radius >= self.mx and e.x - e.radius < self.mx + self.viewport.mwidth and e.y + e.radius >= self.my and e.y - e.radius < self.my + self.viewport.mheight then alive = e.ps:toScreen(self.display_x + (adx + e.x - self.mx + 0.5) * self.tile_w * self.zoom, self.display_y + (ady + e.y - self.my + 0.5) * self.tile_h * self.zoom, self.seens(e.x, e.y), e.zoom * self.zoom) end diff --git a/game/engines/default/engine/Object.lua b/game/engines/default/engine/Object.lua index 858798a2d815ccab751d4ff01228e78a33ac2dbf..e1d5e8fd57ae8616f919acaea88ca8611bd5302b 100644 --- a/game/engines/default/engine/Object.lua +++ b/game/engines/default/engine/Object.lua @@ -53,7 +53,7 @@ function _M:resolve(t, last, on_entity) end --- Can this object act at all --- Most object will want to anwser false, only recharging and stuff needs them +-- Most object will want to answer false, only recharging and stuff needs them function _M:canAct() return false end diff --git a/game/engines/default/engine/Particles.lua b/game/engines/default/engine/Particles.lua index 05e562b131b4c1b20db1145f79ba6df341ada5d9..39b4af23620d60dac654d8e52b775e95869a1288 100644 --- a/game/engines/default/engine/Particles.lua +++ b/game/engines/default/engine/Particles.lua @@ -27,7 +27,7 @@ _M.particles_def = {} _M.__particles_gl = { particle = core.display.loadImage("/data/gfx/particle.png"):glTexture() } ---- Make a particle emiter +--- Make a particle emitter function _M:init(def, radius, args) self.args = args self.def = def diff --git a/game/engines/default/engine/Projectile.lua b/game/engines/default/engine/Projectile.lua index 041159678d81a4a947c00f2880c7ca56f23b061d..3ee1f020b867f703737791ea2431680fc0b8e805 100644 --- a/game/engines/default/engine/Projectile.lua +++ b/game/engines/default/engine/Projectile.lua @@ -59,12 +59,12 @@ function _M:removeParticles(ps) end --- Moves a projectile on the map --- *WARNING*: changing x and y properties manualy is *WRONG* and will blow up in your face. Use this method. Always. +-- *WARNING*: changing x and y properties manually is *WRONG* and will blow up in your face. Use this method. Always. -- @param map the map to move onto -- @param x coord of the destination -- @param y coord of the destination -- @param force if true do not check for the presence of an other entity. *Use wisely* --- @return true if a move was *ATTEMPTED*. This means the actor will proably want to use energy +-- @return true if a move was *ATTEMPTED*. This means the actor will probably want to use energy function _M:move(x, y, force) if self.dead then return true end local map = game.level.map @@ -167,7 +167,7 @@ function _M:moveDirection(x, y) local list = coords[dir] local l = {} - -- Find posiblities + -- Find possibilities for i = 1, #list do local dx, dy = self.x + dir_to_coord[list[i]][1], self.y + dir_to_coord[list[i]][2] if not game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move") then diff --git a/game/engines/default/engine/Savefile.lua b/game/engines/default/engine/Savefile.lua index 5172eafde33bcf777d9aa2e48a13402008c4d8d0..bf05065559c74d0694b5d5a614b465296c17bfe4 100644 --- a/game/engines/default/engine/Savefile.lua +++ b/game/engines/default/engine/Savefile.lua @@ -34,7 +34,7 @@ _M.current_save = false --- Init a savefile -- @param savefile the name of the savefile, usually the player's name. It will be sanitized so dont bother doing it --- @param coroutine if true the saveing will yield sometimes to let other code run +-- @param coroutine if true the saving will yield sometimes to let other code run function _M:init(savefile, coroutine) self.short_name = savefile:gsub("[^a-zA-Z0-9_-.]", "_") self.save_dir = "/save/"..self.short_name.."/" @@ -223,7 +223,7 @@ function _M:saveGame(game, no_dialog) if not no_dialog then game:unregisterDialog(popup) end - -- A buit hacky, save hotkeys, this will do untilI can make it better for multiplayer stuff + -- A bit hacky, save hotkeys, this will do until I can make it better for multiplayer stuff local f = fs.open(self.hotkeys_file, "w") if game:getPlayer().hotkey then f:write("quickhotkeys = {}\n") diff --git a/game/engines/default/engine/Store.lua b/game/engines/default/engine/Store.lua index 9119c408fdd4f35e4a8d757622f00a921e0f3567..b18490f2295e0bdff4167453fbc216e044e13723 100644 --- a/game/engines/default/engine/Store.lua +++ b/game/engines/default/engine/Store.lua @@ -38,7 +38,7 @@ function _M:init(t, no_default) end --- Fill the store with goods --- @param level the level to generate for (inctance of type engine.Level) +-- @param level the level to generate for (instance of type engine.Level) -- @param zone the zone to generate for function _M:loadup(level, zone) local s = self.store @@ -88,7 +88,7 @@ function _M:loadup(level, zone) end --- Actor interacts with the store --- @param who the actor who interracts +-- @param who the actor who interacts function _M:interact(who) local store, inven = self:getInven("INVEN"), who:getInven("INVEN") local d; d = ShowStore.new("Store: "..self.name, store, inven, nil, nil, function(what, o, item) diff --git a/game/engines/default/engine/Target.lua b/game/engines/default/engine/Target.lua index 7bbf01d97d904a7efcda6d9b4d92d331fdd96a8f..9d068087a2bbf2d8f82c6d941ae7d7a917812dac 100644 --- a/game/engines/default/engine/Target.lua +++ b/game/engines/default/engine/Target.lua @@ -117,7 +117,7 @@ end -- Hit: simple project in LOS<br/> -- Beam: hits everything in LOS<br/> -- Bolt: hits first thing in path<br/> --- Ball: hits everything in a ball aounrd the target<br/> +-- Ball: hits everything in a ball around the target<br/> -- Cone: hits everything in a cone in the direction<br/> -- @param t.radius The radius of the ball/cone AoE -- @param t.cone_angle The angle for the cone AoE (default 55°) diff --git a/game/engines/default/engine/Trap.lua b/game/engines/default/engine/Trap.lua index 0f2e78ae7e548ee2f161c1859afa9fad6cd0dd88..962904d4045d9b63c9b9f7c53abd81deaba0dda5 100644 --- a/game/engines/default/engine/Trap.lua +++ b/game/engines/default/engine/Trap.lua @@ -48,7 +48,7 @@ end function _M:loaded() Entity.loaded(self) - -- known_by table is a weak table on keys, so taht it does not prevent garbage collection of actors + -- known_by table is a weak table on keys, so that it does not prevent garbage collection of actors setmetatable(self.known_by, {__mode="k"}) end diff --git a/game/engines/default/engine/Zone.lua b/game/engines/default/engine/Zone.lua index 2493d8c27003bdb889cf0a482175f1459c861bb9..7270e13e9269d0f18d7f3731726792256dcd6dd0 100644 --- a/game/engines/default/engine/Zone.lua +++ b/game/engines/default/engine/Zone.lua @@ -24,7 +24,7 @@ local Map = require "engine.Map" local Astar = require "engine.Astar" local print = function() end ---- Defines a zone: a set of levels, with depth, nps, objects, level generator, ... +--- Defines a zone: a set of levels, with depth, npcs, objects, level generator, ... module(..., package.seeall, class.make) --- Setup classes to use for level generation @@ -208,7 +208,7 @@ function _M:getEgosList(level, type, group, class) local list = level:getEntitiesList(type.."/"..group) if list then return list end - -- otehrwise loads it and store it + -- otherwise loads it and store it list = require(class):loadList(group, true) level:setEntitiesList(type.."/"..group, list) @@ -381,7 +381,7 @@ end --- Do the various stuff needed to setup an entity on the level -- Grids do not really need that, this is mostly done for traps, objects and actors<br/> --- This will do all the corect initializations and setup required +-- This will do all the correct initializations and setup required -- @param level the level on which to add the entity -- @param e the entity to add -- @param typ the type of entity, one of "actor", "object", "trap" or "terrain" diff --git a/game/engines/default/engine/ai/simple.lua b/game/engines/default/engine/ai/simple.lua index 58b2957c08db3db662e2a4592bb5dde0470d01bf..33dfaf1fbc70db5a00913218bfafa1acacb286b5 100644 --- a/game/engines/default/engine/ai/simple.lua +++ b/game/engines/default/engine/ai/simple.lua @@ -84,14 +84,14 @@ end) newAI("target_simple", function(self) if self.ai_target.actor and not self.ai_target.actor.dead and rng.percent(90) then return true end - -- Find closer ennemy and target it + -- Find closer enemy and target it -- Get list of actors ordered by distance local arr = self.fov.actors_dist local act for i = 1, #arr do act = self.fov.actors_dist[i] -- print("AI looking for target", self.uid, self.name, "::", act.uid, act.name, self.fov.actors[act].sqdist) - -- find the closest ennemy + -- find the closest enemy if act and self:reactionToward(act) < 0 and not act.dead then self.ai_target.actor = act self:check("on_acquire_target", act) diff --git a/game/engines/default/engine/ai/special_movements.lua b/game/engines/default/engine/ai/special_movements.lua index db7365a5edf46d8ee4587d1e524a11e961ca0b30..ee2833a77eca17b82fb3d99b0eedc92cf5ddb289 100644 --- a/game/engines/default/engine/ai/special_movements.lua +++ b/game/engines/default/engine/ai/special_movements.lua @@ -42,7 +42,7 @@ newAI("move_snake", function(self) else local rd = rng.range(1, 3) if rd == 1 then - -- nothing, we move in the coerct direction + -- nothing, we move in the correct direction elseif rd == 2 then -- move to the left local dir = util.getDir(tx, ty, self.x, self.y) diff --git a/game/engines/default/engine/generator/map/Roomer.lua b/game/engines/default/engine/generator/map/Roomer.lua index 75cb2fe919487d378f7ec3d2b7c70bfaa54d2d4d..8be399cddf10749627f030f1af2730d8253cddfd 100644 --- a/game/engines/default/engine/generator/map/Roomer.lua +++ b/game/engines/default/engine/generator/map/Roomer.lua @@ -117,7 +117,7 @@ function _M:tunnel(x1, y1, x2, y2, id) print(feat, "tunnel crossing can_open", nx,ny) for i = -1, 1 do for j = -1, 1 do if self.map:isBound(nx + i, ny + j) and self.map.room_map[nx + i][ny + j].can_open then self.map.room_map[nx + i][ny + j].can_open = false - print(feat, "forbiding crossing at ", nx+i,ny+j) + print(feat, "forbidding crossing at ", nx+i,ny+j) end end end tun[#tun+1] = {nx,ny,true} x1, y1 = nx, ny @@ -291,7 +291,7 @@ function _M:generate(lev, old_lev) end end - -- Find out "interresting" spots + -- Find out "interesting" spots for i, r in ipairs(rooms) do spots[#spots+1] = {x=rooms[i].cx, y=rooms[i].cy, type="room", subtype=rooms[i].room.name} end diff --git a/game/engines/default/engine/generator/map/Rooms.lua b/game/engines/default/engine/generator/map/Rooms.lua index c8b4c7c754bf5885dd29958a7b8658289c35ac97..4586da0fb88b8492e6b0a7946acd2bc1469448b4 100644 --- a/game/engines/default/engine/generator/map/Rooms.lua +++ b/game/engines/default/engine/generator/map/Rooms.lua @@ -55,7 +55,7 @@ function _M:doRooms(room, no, tab) end self.map(room.x + sx, room.y + sy, Map.TERRAIN, self.door) else - -- Final room, select an interresting "spot" + -- Final room, select an interesting "spot" local spotx, spoty = rng.range(room.x, room.x + room.w - 1), rng.range(room.y, room.y + room.h - 1) table.insert(self.spots, {x=spotx, y=spoty}) end diff --git a/game/engines/default/engine/generator/map/TileSet.lua b/game/engines/default/engine/generator/map/TileSet.lua index 9b928bc58e83847852409730e4122b955954b073..d87a7fb172e24803a6488013cdeb61b1fc9705cf 100644 --- a/game/engines/default/engine/generator/map/TileSet.lua +++ b/game/engines/default/engine/generator/map/TileSet.lua @@ -22,7 +22,7 @@ local Map = require "engine.Map" require "engine.Generator" module(..., package.seeall, class.inherit(engine.Generator)) --- Deactaivte too many prints +-- Deactivate too many prints local print = function() end function _M:init(zone, map, level, data) @@ -83,7 +83,7 @@ function _M:loadTiles(tileset) if not ts.no_random then tiles[#tiles+1] = t end if ts.define_as then tiles[ts.define_as] = t end - -- X symetric tile definition + -- X symmetric tile definition if ts.base and ts.symetric and ts.symetric == "x" then local ts = tiles[ts.base] local mx, my = #ts, #ts[1] @@ -95,7 +95,7 @@ function _M:loadTiles(tileset) end end t.sizew, t.sizeh = mx / d.base.w, my / d.base.h - -- Y symetric tile definition + -- Y symmetric tile definition elseif ts.base and ts.symetric and ts.symetric == "y" then local ts = tiles[ts.base] local mx, my = #ts, #ts[1] @@ -207,7 +207,7 @@ function _M:findMatchingTiles(st, dir, type) -- Examine all the size of the tile, and only the sides (for >1 base size tiles) -- This is extremely convoluted but the idea is simplistic: - -- check each combinaison of position of tiles and find matching ones + -- check each combination of position of tiles and find matching ones for stw = 1, st.sizew do for sth = 1, st.sizeh do if stw == 1 or stw == st.sizew or sth == 1 or sth == st.sizeh then local stwr, sthr = (stw-1) * self.block.w, (sth-1) * self.block.h diff --git a/game/engines/default/engine/interface/ActorAI.lua b/game/engines/default/engine/interface/ActorAI.lua index 1fbb80a62dcf71c80d38888d347b6643f28b9b1a..f15d94dec1ddffc4694cf3318c1d701fb1287a7f 100644 --- a/game/engines/default/engine/interface/ActorAI.lua +++ b/game/engines/default/engine/interface/ActorAI.lua @@ -26,7 +26,7 @@ module(..., package.seeall, class.make) _M.ai_def = {} ---- Deinfe AI +--- Define AI function _M:newAI(name, fct) _M.ai_def[name] = fct end @@ -74,7 +74,7 @@ function _M:aiCanPass(x, y) -- Nothing blocks, just go on if not game.level.map:checkAllEntities(x, y, "block_move", self, true) then return true end - -- If there is an otehr actor, check hostility, if hostile, we move to attack + -- If there is an other actor, check hostility, if hostile, we move to attack local target = game.level.map(x, y, Map.ACTOR) if target and self:reactionToward(target) < 0 then return true end @@ -100,7 +100,7 @@ function _M:moveDirection(x, y) local list = coords[dir] local l = {} - -- Find posiblities + -- Find possibilities for i = 1, #list do local dx, dy = self.x + dir_to_coord[list[i]][1], self.y + dir_to_coord[list[i]][2] if self:aiCanPass(dx, dy) then @@ -147,7 +147,7 @@ function _M:setTarget(target) end --- Returns the seen coords of the target --- This will usualy return the exact coords, but if the target is only partialy visible (or not at all) +-- This will usually return the exact coords, but if the target is only partially visible (or not at all) -- it will return estimates, to throw the AI a bit off -- @param target the target we are tracking -- @return x, y coords to move/cast to diff --git a/game/engines/default/engine/interface/ActorInventory.lua b/game/engines/default/engine/interface/ActorInventory.lua index 3a84a73d98539f178c54efe4bcf525393f338d18..8187888ef8eaf4f926007c5d4f9e75f896619a21 100644 --- a/game/engines/default/engine/interface/ActorInventory.lua +++ b/game/engines/default/engine/interface/ActorInventory.lua @@ -106,7 +106,7 @@ function _M:addObject(inven_id, o) return true, #inven end ---- Rerturns the position of an item in the given inventory, or nil +--- Returns the position of an item in the given inventory, or nil function _M:itemPosition(inven, o) inven = self:getInven(inven) for i, p in ipairs(inven) do @@ -162,7 +162,7 @@ function _M:removeObject(inven, item, no_unstack) table.remove(inven, item) end - -- Do whatever is needed when takingoff this object + -- Do whatever is needed when taking off this object if inven.worn then self:onTakeoff(o) o:check("on_takeoff", self) @@ -393,7 +393,7 @@ function _M:sortInven(inven) -- Stack objects first, from bottom for i = #inven, 1, -1 do - -- If it is stackable, look for obejcts before it that it could stack into + -- If it is stackable, look for objects before it that it could stack into if inven[i]:stackable() then for j = i - 1, 1, -1 do if inven[j]:stack(inven[i]) then diff --git a/game/engines/default/engine/interface/ActorLevel.lua b/game/engines/default/engine/interface/ActorLevel.lua index 7278d96a93a9a79edaf664be79021d5797c3643e..93ca695e4b72dc132bce876f3cae98fb1d0b3c6a 100644 --- a/game/engines/default/engine/interface/ActorLevel.lua +++ b/game/engines/default/engine/interface/ActorLevel.lua @@ -20,7 +20,7 @@ require "engine.class" --- Interface to add leveling capabilities to actors --- Defines the exp property, which is the current experience, level which is the current level and exp_worth which is a multiplicator +-- Defines the exp property, which is the current experience, level which is the current level and exp_worth which is a multiplier -- to the monster level default exp module(..., package.seeall, class.make) @@ -65,7 +65,7 @@ function _M:defineExperienceChart(chart) end --- Defines the max level attainable --- @param max the maximun level. Can be nil to not have a limit +-- @param max the maximum level. Can be nil to not have a limit -- Static! function _M:defineMaxLevel(max) _M.actors_max_level = max @@ -83,7 +83,7 @@ function _M:getExpChart(level) end --- Gains some experience --- If a levelup happens it calls self:levelup(), modules are encourraged to rewrite it to do whatever is needed. +-- If a levelup happens it calls self:levelup(), modules are encouraged to rewrite it to do whatever is needed. function _M:gainExp(value) self.changed = true self.exp = math.max(0, self.exp + value) @@ -105,7 +105,7 @@ function _M:worthExp(target) return self.level * self.exp_worth end ---- Method called when leveing up, module author rewrite it to do as you please +--- Method called when leveling up, module author rewrite it to do as you please function _M:levelup() end diff --git a/game/engines/default/engine/interface/ActorProject.lua b/game/engines/default/engine/interface/ActorProject.lua index b23eedf1fdf305446d757b16314942d3000b611a..1ca3ba6c9965b15de88cad7c78bcb3b0c0b9cc43 100644 --- a/game/engines/default/engine/interface/ActorProject.lua +++ b/game/engines/default/engine/interface/ActorProject.lua @@ -67,7 +67,7 @@ function _M:project(t, x, y, damtype, dam, particles) if typ.block_path and typ:block_path(lx, ly) then break end stop_radius_x, stop_radius_y = lx, ly - -- Deam damage: beam + -- Deal damage: beam if typ.line then addGrid(lx, ly) end lx, ly = l() @@ -98,7 +98,7 @@ function _M:project(t, x, y, damtype, dam, particles) end, function()end, nil) addGrid(lx, ly) else - -- Deam damage: single + -- Deal damage: single addGrid(lx, ly) end @@ -209,7 +209,7 @@ function _M:projectDoMove(typ, tgtx, tgty, x, y, srcx, srcy) -- End of the map if lx < 0 or lx >= game.level.map.w or ly < 0 or ly >= game.level.map.h then return lx, ly, false, true end - -- Deam damage: beam + -- Deal damage: beam if typ.line and (lx ~= tgtx or ly ~= tgty) then return lx, ly, true, false end end -- Ok if we are at the end @@ -264,7 +264,7 @@ function _M:projectDoStop(typ, tg, damtype, dam, particles, lx, ly, tmp, rx, ry) end, function()end, nil) addGrid(rx, ry) else - -- Deam damage: single + -- Deal damage: single addGrid(lx, ly) end diff --git a/game/engines/default/engine/interface/ActorQuest.lua b/game/engines/default/engine/interface/ActorQuest.lua index bd1a7e70cc90ef14b99e3589743cc8305a27c26a..6da60ec81d624990dfd81b3b2aeabf258841ba35 100644 --- a/game/engines/default/engine/interface/ActorQuest.lua +++ b/game/engines/default/engine/interface/ActorQuest.lua @@ -80,7 +80,7 @@ function _M:isQuestStatus(quest, status, sub) return q:isStatus(status, sub) end ---- Removes the quest completly from the actor. +--- Removes the quest completely from the actor. -- USE WITH CAUTION function _M:removeQuest(id) if not self.quests then return false end diff --git a/game/engines/default/engine/interface/ActorStats.lua b/game/engines/default/engine/interface/ActorStats.lua index f06b31d6c105817dea9f94d4a8067b4c4e1abf1c..4ba493939ab5c64cece2adf1bc8a35b47297cd72 100644 --- a/game/engines/default/engine/interface/ActorStats.lua +++ b/game/engines/default/engine/interface/ActorStats.lua @@ -66,7 +66,7 @@ end --- Increases a stat -- @param stat the stat id to change --- @param val the increment to add/substract +-- @param val the increment to add/subtract function _M:incStat(stat, val) if type(stat) == "string" then stat = _M.stats_def[stat].id @@ -87,7 +87,7 @@ end --- Increases a stat additional value -- @param stat the stat id to change --- @param val the increment to add/substract +-- @param val the increment to add/subtract function _M:incIncStat(stat, val) if type(stat) == "string" then stat = _M.stats_def[stat].id diff --git a/game/engines/default/engine/interface/ActorTalents.lua b/game/engines/default/engine/interface/ActorTalents.lua index 64271933fc5b5dc7dc6bc31edac3a5fc00d8fb72..4170c78c0cfa919d83d988d2ed63c61bd3d57983 100644 --- a/game/engines/default/engine/interface/ActorTalents.lua +++ b/game/engines/default/engine/interface/ActorTalents.lua @@ -180,7 +180,7 @@ end --- Called before an talent is used -- Redefine as needed -- @param ab the talent (not the id, the table) --- @param silent no messages will be outputed +-- @param silent no messages will be outputted -- @param fake no actions are taken, only checks -- @return true to continue, false to stop function _M:preUseTalent(talent, silent, fake) diff --git a/game/engines/default/engine/interface/ObjectIdentify.lua b/game/engines/default/engine/interface/ObjectIdentify.lua index 805f4b00b805712bbc1003db1662ec1900ea959b..d35efde04eb223cba2b27f904c3908527b57b384 100644 --- a/game/engines/default/engine/interface/ObjectIdentify.lua +++ b/game/engines/default/engine/interface/ObjectIdentify.lua @@ -30,7 +30,7 @@ function _M:init(t) end end ---- Defines the default ided status +--- Defines the default IDed status function _M:resolveIdentify() if not self.unided_name then self.unided_name = self.name diff --git a/game/engines/default/engine/interface/PlayerHotkeys.lua b/game/engines/default/engine/interface/PlayerHotkeys.lua index a2502686035bfbfdfbf2d2c06d75b8733087c3dc..bdb46b228703357f6d2c83f239116a076120e24b 100644 --- a/game/engines/default/engine/interface/PlayerHotkeys.lua +++ b/game/engines/default/engine/interface/PlayerHotkeys.lua @@ -47,7 +47,7 @@ function _M:sortHotkeys() end end - -- Readd all the rest + -- Read all the rest for j = 1, 36 do if old[j] then for i = 1, 36 do if not self.hotkey[i] then @@ -101,7 +101,7 @@ function _M:setHotkeyPage(v) self.changed = true end --- Autoadd talents to hotkeys +-- Auto-add talents to hotkeys function _M:hotkeyAutoTalents() for tid, _ in pairs(self.talents) do local t = self:getTalentFromId(tid) diff --git a/game/engines/default/engine/interface/PlayerMouse.lua b/game/engines/default/engine/interface/PlayerMouse.lua index 03837607230e3d45381547e86f968783759b58da..1137e85922e4e288fd949adced274aa32905ce67 100644 --- a/game/engines/default/engine/interface/PlayerMouse.lua +++ b/game/engines/default/engine/interface/PlayerMouse.lua @@ -53,7 +53,7 @@ function _M:mouseMove(tmx, tmy, spotHostiles) local a = Astar.new(game.level.map, self) local path = a:calc(self.x, self.y, tmx, tmy, true) - -- No Astar path ? jsut be dumb and try direct line + -- No Astar path ? just be dumb and try direct line if not path then local d = DirectPath.new(game.level.map, self) path = d:calc(self.x, self.y, tmx, tmy, true) @@ -101,11 +101,11 @@ function _M:mouseScrollMap(map, xrel, yrel) end --- Handles global mouse event --- This will handle events like this:<ul> --- <li>Left click: player mouse movement</li> --- <li>Shift + left click: map scroll</li> --- <li>Any other click: pass on the click as a key event, to allow actiosnto be bound to the mouse</li> --- </ul> +-- This will handle events like this: +-- Left click: player mouse movement +-- Shift + left click: map scroll +-- Any other click: pass on the click as a key event, to allow actions to be bound to the mouse +-- -- @param key the Key object to which to pass the event if not treated, this should be your game default key handler probably -- @param allow_move true if this will allow player movement (you should use it to check that you are not in targetting mode) function _M:mouseHandleDefault(key, allow_move, button, mx, my, xrel, yrel, event) diff --git a/game/engines/default/engine/interface/PlayerRest.lua b/game/engines/default/engine/interface/PlayerRest.lua index eda0e5cd8f7049eb10a6acb268a65d01d3681a80..40b8d2ad14d80a217ce5431cb3a86cbd241ec325 100644 --- a/game/engines/default/engine/interface/PlayerRest.lua +++ b/game/engines/default/engine/interface/PlayerRest.lua @@ -63,7 +63,7 @@ function _M:restStep() end --- Can we continue resting ? --- Rewrite this method to check for mana, life, whatever. By default we alawys return false so resting will never work +-- Rewrite this method to check for mana, life, whatever. By default we always return false so resting will never work -- @return true if we can continue to rest, false otherwise function _M:restCheck() return false, "player:restCheck() method not defined" diff --git a/game/engines/default/engine/interface/PlayerRun.lua b/game/engines/default/engine/interface/PlayerRun.lua index 42e812c2c66138ee91bcdba939d2e055fee62f9a..dda8b87948f8cf32ce31347b0c526bd140cc910f 100644 --- a/game/engines/default/engine/interface/PlayerRun.lua +++ b/game/engines/default/engine/interface/PlayerRun.lua @@ -163,7 +163,7 @@ function _M:runStep() end --- Can we continue running ? --- Rewrite this method to hostiles, interresting terrain, whatever. +-- Rewrite this method to hostiles, interesting terrain, whatever. -- This method should be called by its submethod, it tries to detect changes in the terrain.<br/> -- It will also try to follow tunnels when they simply change direction. -- @return true if we can continue to run, false otherwise diff --git a/game/engines/default/engine/interface/WorldAchievements.lua b/game/engines/default/engine/interface/WorldAchievements.lua index ea66c12f9c549732c79e49ff69a2dad25ca72097..77ce3c666fd62e716eec68a9e68afc80041da934 100644 --- a/game/engines/default/engine/interface/WorldAchievements.lua +++ b/game/engines/default/engine/interface/WorldAchievements.lua @@ -20,7 +20,7 @@ require "engine.class" local Dialog = require "engine.ui.Dialog" ---- Handles archievements in a world +--- Handles achievements in a world module(..., package.seeall, class.make) _M.achiev_defs = {} @@ -39,10 +39,10 @@ function _M:loadDefinition(dir) end end ---- Make a new achivement with a name and desc +--- Make a new achievement with a name and desc function _M:newAchievement(t) - assert(t.name, "no achivement name") - assert(t.desc, "no achivement desc") + assert(t.name, "no achievement name") + assert(t.desc, "no achievement desc") t.mode = t.mode or "none" t.id = t.id or t.name @@ -75,7 +75,7 @@ end --- Gain Personal achievement for player only -- @param silent suppress the message to the player --- @param id the achivement to gain +-- @param id the achievement to gain -- @param src who did it function _M:gainPersonalAchievement(silent, id, src, ...) local a = self.achiev_defs[id] @@ -97,7 +97,7 @@ function _M:gainPersonalAchievement(silent, id, src, ...) end --- Gain an achievement --- @param id the achivement to gain +-- @param id the achievement to gain -- @param src who did it function _M:gainAchievement(id, src, ...) local a = self.achiev_defs[id] diff --git a/game/engines/default/engine/utils.lua b/game/engines/default/engine/utils.lua index 99500dc35c8e4131eedfabfe339454c9c75d1cb0..a0ec173ed316cd41e8c27cca7d60522ebd5f74b2 100644 --- a/game/engines/default/engine/utils.lua +++ b/game/engines/default/engine/utils.lua @@ -168,7 +168,7 @@ function string.bookCapitalize(str) for i = 1, #words do local word = words[i] - -- Don't capitalize certain words unless they are at the begining + -- Don't capitalize certain words unless they are at the beginning -- of the string. if i == 1 or (word ~= "of" and word ~= "the" and word ~= "and" and word ~= "a" and word ~= "an") then diff --git a/game/engines/default/modules/boot/class/Actor.lua b/game/engines/default/modules/boot/class/Actor.lua index 643ff412a8046bae8e6199f31a33a4d1c2a3f0cf..a2bf25f9b9a44deb579059c5424a48dfc6de7deb 100644 --- a/game/engines/default/modules/boot/class/Actor.lua +++ b/game/engines/default/modules/boot/class/Actor.lua @@ -119,7 +119,7 @@ end function _M:levelup() self.max_life = self.max_life + 2 - -- Healp up on new level + -- Heal upon new level self.life = self.max_life end diff --git a/game/engines/default/modules/boot/class/Game.lua b/game/engines/default/modules/boot/class/Game.lua index 6b1aac54151263eee1cae0d74993eb3b0c77f3ae..f862817ee65eb4e1470d41aaa7d26a69fd8a008c 100644 --- a/game/engines/default/modules/boot/class/Game.lua +++ b/game/engines/default/modules/boot/class/Game.lua @@ -216,7 +216,7 @@ function _M:tick() if self.stopped then engine.Game.tick(self) return false end if self.level then engine.GameEnergyBased.tick(self) - -- Fun stuff: this can make the game realtime, although callit it in display() will make it work better + -- Fun stuff: this can make the game realtime, although calling it in display() will make it work better -- (since display is on a set FPS while tick() ticks as much as possible -- engine.GameEnergyBased.tick(self) end @@ -237,7 +237,7 @@ function _M:display(nb_keyframes) -- If switching resolution, blank everything but the dialog if self.change_res_dialog then engine.GameEnergyBased.display(self, nb_keyframes) return end - -- If background anim is stopped, thigns are much simplied + -- If background anim is stopped, things are greatly simplified if self.stopped then if self.background then self.background:toScreenFull(0, 0, self.w, self.h, self.background_w, self.background_h) end self.tooltip:display() @@ -262,7 +262,7 @@ function _M:display(nb_keyframes) -- Draw it here, inside the FBO self.flyers:display(nb_keyframes) - -- Display using Framebuffer, sotaht we can use shaders and all + -- Display using Framebuffer, so that we can use shaders and all if self.fbo then self.fbo:use(false) _2DNoise:bind(1, false) @@ -314,7 +314,7 @@ function _M:commandLineArgs(args) end end ---- Ask if we realy want to close, if so, save the game first +--- Ask if we really want to close, if so, save the game first function _M:onQuit() if self.is_quitting then return end self.is_quitting = Dialog:yesnoPopup("Quit", "Really exit T-Engine/ToME?", function(ok) diff --git a/game/engines/default/modules/boot/dialogs/UpdateAll.lua b/game/engines/default/modules/boot/dialogs/UpdateAll.lua index 7cbf75140da4f1962a77ae472a1ba869c97a6de0..1f8f932bd73f2037d7e85b25a86022c2e04023f4 100644 --- a/game/engines/default/modules/boot/dialogs/UpdateAll.lua +++ b/game/engines/default/modules/boot/dialogs/UpdateAll.lua @@ -37,7 +37,7 @@ All those components will be updated: ]]} self.c_list = ListColumns.new{width=self.iw, height=self.ih - self.c_desc.h, scrollbar=true, columns={ - {name="Compoment", width=80, display_prop="name"}, + {name="Component", width=80, display_prop="name"}, {name="Version", width=20, display_prop="version_string"}, }, list=self.list or {}, fct=function(item) end, select=function(item, sel) end} diff --git a/game/modules/example/class/Actor.lua b/game/modules/example/class/Actor.lua index b19d11c69fe4a84c0a9887dbd2b7f464054d64cb..86c4c6308aa0f18b1d71fdbdd5ddaf08198d87a1 100644 --- a/game/modules/example/class/Actor.lua +++ b/game/modules/example/class/Actor.lua @@ -132,7 +132,7 @@ function _M:levelup() self:incMaxPower(3) - -- Healp up on new level + -- Heal upon new level self.life = self.max_life self.power = self.max_power end diff --git a/game/modules/example/class/Game.lua b/game/modules/example/class/Game.lua index 704a947e4be5eebe343c32e8871c5f403c37cd88..f1c4b0a13db673d32703e2a67bfbcef142b0157a 100644 --- a/game/modules/example/class/Game.lua +++ b/game/modules/example/class/Game.lua @@ -185,7 +185,7 @@ function _M:tick() self:targetOnTick() engine.GameTurnBased.tick(self) - -- Fun stuff: this can make the game realtime, although callit it in display() will make it work better + -- Fun stuff: this can make the game realtime, although calling it in display() will make it work better -- (since display is on a set FPS while tick() ticks as much as possible -- engine.GameEnergyBased.tick(self) end @@ -373,7 +373,7 @@ function _M:setupCommands() LOOK_AROUND = function() self.flash:empty(true) - self.flash(self.flash.GOOD, "Looking around... (direction keys to select interresting things, shift+direction keys to move freely)") + self.flash(self.flash.GOOD, "Looking around... (direction keys to select interesting things, shift+direction keys to move freely)") local co = coroutine.create(function() self.player:getTarget{type="hit", no_restrict=true, range=2000} end) local ok, err = coroutine.resume(co) if not ok and err then print(debug.traceback(co)) error(err) end @@ -403,7 +403,7 @@ function _M:setupMouse(reset) self.mouse:setCurrent() end ---- Ask if we realy want to close, if so, save the game first +--- Ask if we really want to close, if so, save the game first function _M:onQuit() self.player:restStop() diff --git a/game/modules/example/class/Player.lua b/game/modules/example/class/Player.lua index 7ec5bee734ef86f2095b7a5a1ba68f6acc649db4..f23226fd5618bae0db0ea93d34f8f2b582d4e060 100644 --- a/game/modules/example/class/Player.lua +++ b/game/modules/example/class/Player.lua @@ -166,22 +166,22 @@ end function _M:restCheck() if spotHostiles(self) then return false, "hostile spotted" end - -- Check ressources, make sure they CAN go up, otherwise we will never stop + -- Check resources, make sure they CAN go up, otherwise we will never stop if self:getPower() < self:getMaxPower() and self.power_regen > 0 then return true end if self.life < self.max_life and self.life_regen> 0 then return true end - return false, "all resources and life at maximun" + return false, "all resources and life at maximum" end --- Can we continue running? --- We can run if no hostiles are in sight, and if we no interresting terrains are next to us +-- We can run if no hostiles are in sight, and if we no interesting terrains are next to us function _M:runCheck() if spotHostiles(self) then return false, "hostile spotted" end - -- Notice any noticable terrain + -- Notice any noticeable terrain local noticed = false self:runScan(function(x, y) - -- Only notice interresting terrains + -- Only notice interesting terrains local grid = game.level.map(x, y, Map.TERRAIN) if grid and grid.notice then noticed = "interesting terrain" end end) diff --git a/game/modules/example/data/damage_types.lua b/game/modules/example/data/damage_types.lua index 9854ec9176e4c4e76d1e462edb6655b9911f3574..6f3df702d22335b082e95e194b8861e2fcc49178 100644 --- a/game/modules/example/data/damage_types.lua +++ b/game/modules/example/data/damage_types.lua @@ -47,7 +47,7 @@ newDamageType{ name = "physical", type = "PHYSICAL", } --- Acid detroys potions +-- Acid destroys potions newDamageType{ name = "acid", type = "ACID", text_color = "#GREEN#", } diff --git a/game/modules/example/data/zones/dungeon/zone.lua b/game/modules/example/data/zones/dungeon/zone.lua index d3b7a486ac662b17b140f6eba8b1422db88bcc90..ec08a4a8c4bc602ee00caa53ccbf2ed99d13c31b 100644 --- a/game/modules/example/data/zones/dungeon/zone.lua +++ b/game/modules/example/data/zones/dungeon/zone.lua @@ -39,7 +39,7 @@ return { actor = { class = "engine.generator.actor.Random", nb_npc = {20, 30}, --- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map +-- guardian = "SHADE_OF_ANGMAR", -- The guardian is set in the static map }, }, levels = diff --git a/game/modules/example/dialogs/DeathDialog.lua b/game/modules/example/dialogs/DeathDialog.lua index 26a6e1c6cea140704afe88b7ebe58b1075de5c53..6f04045da823c1287ed772fa751178ca519be395 100644 --- a/game/modules/example/dialogs/DeathDialog.lua +++ b/game/modules/example/dialogs/DeathDialog.lua @@ -80,7 +80,7 @@ function _M:cleanActor() end end ---- Restore ressources +--- Restore resources function _M:restoreRessources() self.actor.life = self.actor.max_life self.actor.power = self.actor.max_power @@ -88,7 +88,7 @@ function _M:restoreRessources() self.actor.energy.value = game.energy_to_act end ---- Basic resurection +--- Basic resurrection function _M:resurrectBasic() self.actor.dead = false self.actor.died = (self.actor.died or 0) + 1 diff --git a/game/modules/example/load.lua b/game/modules/example/load.lua index dcdd2a744fe41717c0cd6d2c1980b3f5f8e8a98e..0353c6c88d70ba856505810bef546ca5372b7f3a 100644 --- a/game/modules/example/load.lua +++ b/game/modules/example/load.lua @@ -28,7 +28,7 @@ local ActorLevel = require "engine.interface.ActorLevel" local ActorTemporaryEffects = require "engine.interface.ActorTemporaryEffects" local Birther = require "engine.Birther" --- Usefull keybinds +-- Useful keybinds KeyBind:load("move,hotkeys,inventory,actions,interface,debug") -- Damage types @@ -46,7 +46,7 @@ ActorResource:defineResource("Power", "power", nil, "power_regen", "Power repres -- Actor stats ActorStats:defineStat("Strength", "str", 10, 1, 100, "Strength defines your character's ability to apply physical force. It increases your melee damage, damage with heavy weapons, your chance to resist physical effects, and carrying capacity.") ActorStats:defineStat("Dexterity", "dex", 10, 1, 100, "Dexterity defines your character's ability to be agile and alert. It increases your chance to hit, your ability to avoid attacks and your damage with light weapons.") -ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximun life and physical resistance.") +ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximum life and physical resistance.") -- Actor AIs ActorAI:loadDefinition("/engine/ai/") diff --git a/game/modules/example_realtime/class/Actor.lua b/game/modules/example_realtime/class/Actor.lua index b19d11c69fe4a84c0a9887dbd2b7f464054d64cb..86c4c6308aa0f18b1d71fdbdd5ddaf08198d87a1 100644 --- a/game/modules/example_realtime/class/Actor.lua +++ b/game/modules/example_realtime/class/Actor.lua @@ -132,7 +132,7 @@ function _M:levelup() self:incMaxPower(3) - -- Healp up on new level + -- Heal upon new level self.life = self.max_life self.power = self.max_power end diff --git a/game/modules/example_realtime/class/Game.lua b/game/modules/example_realtime/class/Game.lua index fd6d2fde5e014d1d89f2c4138134d37bb9b04ff5..d6fb11730cff9b7e57bcd4f80e1aca81ef987bd8 100644 --- a/game/modules/example_realtime/class/Game.lua +++ b/game/modules/example_realtime/class/Game.lua @@ -185,7 +185,7 @@ function _M:tick() self:targetOnTick() engine.GameEnergyBased.tick(self) - -- Fun stuff: this can make the game realtime, although callit it in display() will make it work better + -- Fun stuff: this can make the game realtime, although calling it in display() will make it work better -- (since display is on a set FPS while tick() ticks as much as possible -- engine.GameEnergyBased.tick(self) end @@ -372,7 +372,7 @@ function _M:setupCommands() LOOK_AROUND = function() self.flash:empty(true) - self.flash(self.flash.GOOD, "Looking around... (direction keys to select interresting things, shift+direction keys to move freely)") + self.flash(self.flash.GOOD, "Looking around... (direction keys to select interesting things, shift+direction keys to move freely)") local co = coroutine.create(function() self.player:getTarget{type="hit", no_restrict=true, range=2000} end) local ok, err = coroutine.resume(co) if not ok and err then print(debug.traceback(co)) error(err) end @@ -402,7 +402,7 @@ function _M:setupMouse(reset) self.mouse:setCurrent() end ---- Ask if we realy want to close, if so, save the game first +--- Ask if we really want to close, if so, save the game first function _M:onQuit() self.player:restStop() diff --git a/game/modules/example_realtime/class/Player.lua b/game/modules/example_realtime/class/Player.lua index 68fcf3e1d27a4a1b6d7fc79fae06a8917882e8ea..7e8b04a3cc1f3059526250e0bd351d6e3c799d61 100644 --- a/game/modules/example_realtime/class/Player.lua +++ b/game/modules/example_realtime/class/Player.lua @@ -165,22 +165,22 @@ end function _M:restCheck() if spotHostiles(self) then return false, "hostile spotted" end - -- Check ressources, make sure they CAN go up, otherwise we will never stop + -- Check resources, make sure they CAN go up, otherwise we will never stop if self:getPower() < self:getMaxPower() and self.power_regen > 0 then return true end if self.life < self.max_life and self.life_regen> 0 then return true end - return false, "all resources and life at maximun" + return false, "all resources and life at maximum" end --- Can we continue running? --- We can run if no hostiles are in sight, and if we no interresting terrains are next to us +-- We can run if no hostiles are in sight, and if we no interesting terrains are next to us function _M:runCheck() if spotHostiles(self) then return false, "hostile spotted" end - -- Notice any noticable terrain + -- Notice any noticeable terrain local noticed = false self:runScan(function(x, y) - -- Only notice interresting terrains + -- Only notice interesting terrains local grid = game.level.map(x, y, Map.TERRAIN) if grid and grid.notice then noticed = "interesting terrain" end end) diff --git a/game/modules/example_realtime/data/damage_types.lua b/game/modules/example_realtime/data/damage_types.lua index 9854ec9176e4c4e76d1e462edb6655b9911f3574..6f3df702d22335b082e95e194b8861e2fcc49178 100644 --- a/game/modules/example_realtime/data/damage_types.lua +++ b/game/modules/example_realtime/data/damage_types.lua @@ -47,7 +47,7 @@ newDamageType{ name = "physical", type = "PHYSICAL", } --- Acid detroys potions +-- Acid destroys potions newDamageType{ name = "acid", type = "ACID", text_color = "#GREEN#", } diff --git a/game/modules/example_realtime/data/zones/dungeon/zone.lua b/game/modules/example_realtime/data/zones/dungeon/zone.lua index d3b7a486ac662b17b140f6eba8b1422db88bcc90..ec08a4a8c4bc602ee00caa53ccbf2ed99d13c31b 100644 --- a/game/modules/example_realtime/data/zones/dungeon/zone.lua +++ b/game/modules/example_realtime/data/zones/dungeon/zone.lua @@ -39,7 +39,7 @@ return { actor = { class = "engine.generator.actor.Random", nb_npc = {20, 30}, --- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map +-- guardian = "SHADE_OF_ANGMAR", -- The guardian is set in the static map }, }, levels = diff --git a/game/modules/example_realtime/dialogs/DeathDialog.lua b/game/modules/example_realtime/dialogs/DeathDialog.lua index 26a6e1c6cea140704afe88b7ebe58b1075de5c53..6f04045da823c1287ed772fa751178ca519be395 100644 --- a/game/modules/example_realtime/dialogs/DeathDialog.lua +++ b/game/modules/example_realtime/dialogs/DeathDialog.lua @@ -80,7 +80,7 @@ function _M:cleanActor() end end ---- Restore ressources +--- Restore resources function _M:restoreRessources() self.actor.life = self.actor.max_life self.actor.power = self.actor.max_power @@ -88,7 +88,7 @@ function _M:restoreRessources() self.actor.energy.value = game.energy_to_act end ---- Basic resurection +--- Basic resurrection function _M:resurrectBasic() self.actor.dead = false self.actor.died = (self.actor.died or 0) + 1 diff --git a/game/modules/example_realtime/load.lua b/game/modules/example_realtime/load.lua index 229cd6ae37b612b931e8a472036a6facaad5d114..9594af4cb6b64fa37babbafb85f4c727c8a9c551 100644 --- a/game/modules/example_realtime/load.lua +++ b/game/modules/example_realtime/load.lua @@ -28,7 +28,7 @@ local ActorLevel = require "engine.interface.ActorLevel" local ActorTemporaryEffects = require "engine.interface.ActorTemporaryEffects" local Birther = require "engine.Birther" --- Usefull keybinds +-- Useful keybinds KeyBind:load("move,hotkeys,inventory,actions,interface,debug") -- Damage types @@ -46,7 +46,7 @@ ActorResource:defineResource("Power", "power", nil, "power_regen", "Power repres -- Actor stats ActorStats:defineStat("Strength", "str", 10, 1, 100, "Strength defines your character's ability to apply physical force. It increases your melee damage, damage with heavy weapons, your chance to resist physical effects, and carrying capacity.") ActorStats:defineStat("Dexterity", "dex", 10, 1, 100, "Dexterity defines your character's ability to be agile and alert. It increases your chance to hit, your ability to avoid attacks and your damage with light weapons.") -ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximun life and physical resistance.") +ActorStats:defineStat("Constitution", "con", 10, 1, 100, "Constitution defines your character's ability to withstand and resist damage. It increases your maximum life and physical resistance.") -- Actor AIs ActorAI:loadDefinition("/engine/ai/")