Permalink
Browse files

Revert "Adds parantheses and adds spaces around .. operator"

This reverts commit 53dff2c.
  • Loading branch information...
pschoffer committed Jan 25, 2018
1 parent 606fc1d commit 6a2cd7b1d72580aa91442430cfe862153ed352b4
Showing with 102 additions and 102 deletions.
  1. +2 −2 CorsixTH/Bitmap/mkfont.lua
  2. +1 −1 CorsixTH/Bitmap/mkraw.lua
  3. +2 −2 CorsixTH/Bitmap/mksheet.lua
  4. +7 −7 CorsixTH/CorsixTH.lua
  5. +28 −28 CorsixTH/Lua/app.lua
  6. +4 −4 CorsixTH/Lua/audio.lua
  7. +1 −1 CorsixTH/Lua/config_finder.lua
  8. +1 −1 CorsixTH/Lua/dialogs/adviser.lua
  9. +1 −1 CorsixTH/Lua/dialogs/build_room.lua
  10. +1 −1 CorsixTH/Lua/dialogs/edit_room.lua
  11. +1 −1 CorsixTH/Lua/dialogs/fullscreen/graphs.lua
  12. +1 −1 CorsixTH/Lua/dialogs/fullscreen/town_map.lua
  13. +1 −1 CorsixTH/Lua/dialogs/furnish_corridor.lua
  14. +2 −2 CorsixTH/Lua/dialogs/menu.lua
  15. +1 −1 CorsixTH/Lua/dialogs/patient.lua
  16. +1 −1 CorsixTH/Lua/dialogs/place_objects.lua
  17. +1 −1 CorsixTH/Lua/dialogs/place_staff.lua
  18. +1 −1 CorsixTH/Lua/dialogs/queue_dialog.lua
  19. +2 −2 CorsixTH/Lua/dialogs/resizables/directory_browser.lua
  20. +1 −1 CorsixTH/Lua/dialogs/resizables/file_browser.lua
  21. +1 −1 CorsixTH/Lua/dialogs/resizables/file_browsers/choose_font.lua
  22. +1 −1 CorsixTH/Lua/entities/machine.lua
  23. +1 −1 CorsixTH/Lua/entities/object.lua
  24. +1 −1 CorsixTH/Lua/entity.lua
  25. +2 −2 CorsixTH/Lua/game_ui.lua
  26. +1 −1 CorsixTH/Lua/graphics.lua
  27. +1 −1 CorsixTH/Lua/humanoid_actions/multi_use_object.lua
  28. +1 −1 CorsixTH/Lua/humanoid_actions/use_object.lua
  29. +1 −1 CorsixTH/Lua/movie_player.lua
  30. +1 −1 CorsixTH/Lua/objects/door.lua
  31. +1 −1 CorsixTH/Lua/objects/litter.lua
  32. +1 −1 CorsixTH/Lua/objects/reception_desk.lua
  33. +2 −2 CorsixTH/Lua/string_extensions.lua
  34. +2 −2 CorsixTH/Lua/strings.lua
  35. +4 −4 CorsixTH/Lua/ui.lua
  36. +1 −1 CorsixTH/Lua/window.lua
  37. +11 −11 CorsixTH/Lua/world.lua
  38. +1 −1 LDocGen/c_tokenise.lua
  39. +1 −1 LDocGen/lua_tokenise.lua
  40. +7 −7 LDocGen/main.lua
@@ -29,8 +29,8 @@ end
package.path = (debug.getinfo(1, "S").source:match("@(.*[" .. package.config
:sub(1, 1) .. "])") or "") .. "lib_" .. package.config:sub(5, 5)
.. ".lua" .. package.config:sub(3, 3) .. package.path
require("bmp")
require("spritesheet")
require "bmp"
require "spritesheet"
local bitmap_name, cell_width, cell_height, space_width = ...
cell_width = assert(tonumber(cell_width), "cell width must be a number")
@@ -27,7 +27,7 @@ end
package.path = (debug.getinfo(1, "S").source:match("@(.*[" .. package.config
:sub(1, 1) .. "])") or "") .. "lib_" .. package.config:sub(5, 5)
.. ".lua" .. package.config:sub(3, 3) .. package.path
require("bmp")
require "bmp"
local filename = ...
if not filename:match("%.bmp$") then
@@ -27,8 +27,8 @@ end
package.path = (debug.getinfo(1, "S").source:match("@(.*[" .. package.config
:sub(1, 1) .. "])") or "") .. "lib_" .. package.config:sub(5, 5)
.. ".lua" .. package.config:sub(3, 3) .. package.path
require("bmp")
require("spritesheet")
require "bmp"
require "spritesheet"
local specfile = ...
specfile = assert(loadfile(specfile))
View
@@ -32,11 +32,11 @@ package.path = code_dir .. "?" .. pathsep .. "init.lua" .. ";" .. package.path
package.path = code_dir .. "?.lua" .. ";" .. package.path
-- Load standard library extensions
require("utility")
require "utility"
-- If requested run a Lua DBGp Debugger Client
if run_debugger then
require("run_debugger")
require "run_debugger"
end
-- Check Lua version
@@ -72,20 +72,20 @@ end
-- it to a running server, using this CorsixTH startup arg: -debugger
-- Enable strict mode
require("strict")
require "strict"
-- Load the class system (required for App)
require("class")
require "class"
-- Load the main App class
require("app")
require "app"
-- Create an instance of the App class and transfer control to it
strict_declare_global "TheApp"
TheApp = App()
TheApp:setCommandLine(
"--bitmap-dir=" .. base_dir .. "Bitmap",
"--config-file=" .. require("config_finder")["filename"],
"--bitmap-dir="..base_dir.."Bitmap",
"--config-file="..(require"config_finder")["filename"],
-- If a command line option is given twice, the later one is used, hence
-- if the user gave one of the above, that will be used instead.
...
View
@@ -20,11 +20,11 @@ SOFTWARE. --]]
local pathsep = package.config:sub(1, 1)
local reqiurenonstrict = destrict(require)
local rnc = reqiurenonstrict("rnc")
local lfs = reqiurenonstrict("lfs")
local SDL = reqiurenonstrict("sdl")
local TH = require("TH")
local runDebugger = require("run_debugger")
local rnc = reqiurenonstrict "rnc"
local lfs = reqiurenonstrict "lfs"
local SDL = reqiurenonstrict "sdl"
local TH = require "TH"
local runDebugger = require "run_debugger"
-- Increment each time a savegame break would occur
-- and add compatibility code in afterLoad functions
@@ -111,7 +111,7 @@ function App:init()
conf_chunk(self.config)
end
self:fixConfig()
require("filesystem")
require "filesystem"
local good_install_folder, error_message = self:checkInstallFolder()
self.good_install_folder = good_install_folder
-- self:checkLanguageFile()
@@ -125,7 +125,7 @@ function App:init()
return false, "Cannot initialise SDL"
end
local compile_opts = TH.GetCompileOptions()
local api_version = require("api_version")
local api_version = require "api_version"
if api_version ~= compile_opts.api_version then
api_version = api_version or 0
compile_opts.api_version = compile_opts.api_version or 0
@@ -169,8 +169,8 @@ function App:init()
self.video:setCaption(self.caption)
-- Prereq 2: Load and initialise the graphics subsystem
require("persistance")
require("graphics")
require "persistance"
require "graphics"
self.gfx = Graphics(self)
-- Put up the loading screen
@@ -213,20 +213,20 @@ function App:init()
return math.floor(input + 0.5)
end
-- Load audio
require("audio")
require "audio"
self.audio = Audio(self)
self.audio:init()
-- Load movie player
require("movie_player")
require "movie_player"
self.moviePlayer = MoviePlayer(self, self.audio, self.video)
if good_install_folder then
self.moviePlayer:init()
end
-- Load strings before UI and before additional Lua
require("strings")
require("string_extensions")
require "strings"
require "string_extensions"
self.strings = Strings(self)
self.strings:init()
local language_load_success = self:initLanguage()
@@ -237,17 +237,17 @@ function App:init()
end
-- Load map before world
require("map")
require "map"
-- Load additional Lua before world
if good_install_folder then
self.anims = self.gfx:loadAnimations("Data", "V")
self.animation_manager = AnimationManager(self.anims)
self.walls = self:loadLuaFolder("walls")
require("entity")
require("entities.humanoid")
require("entities.object")
require("entities.machine")
require "entity"
require "entities.humanoid"
require "entities.object"
require "entities.machine"
local objects = self:loadLuaFolder("objects")
self.objects = self:loadLuaFolder("objects/machines", nil, objects)
@@ -262,23 +262,23 @@ function App:init()
Object.processTypeDefinition(v)
end
require("room")
require "room"
self.rooms = self:loadLuaFolder("rooms")
require("humanoid_action")
require "humanoid_action"
self.humanoid_actions = self:loadLuaFolder("humanoid_actions")
local diseases = self:loadLuaFolder("diseases")
self.diseases = self:loadLuaFolder("diagnosis", nil, diseases)
-- Load world before UI
require("world")
require "world"
end
-- Load UI
require("ui")
require "ui"
if good_install_folder then
require("game_ui")
require "game_ui"
self.ui = UI(self, true)
else
self.ui = UI(self, true)
@@ -799,7 +799,7 @@ end
function App:fixConfig()
-- Fill in default values for things which don't exist
local config_finder = require("config_finder")
local config_finder = require "config_finder"
for k, v in pairs(config_finder["values"]) do
if self.config[k] == nil then
self.config[k] = v
@@ -1430,14 +1430,14 @@ function App:afterLoad()
self.world.savegame_version = new
if old < 87 then
local new_object = require("objects.gates_to_hell")
local new_object = require "objects.gates_to_hell"
Object.processTypeDefinition(new_object)
self.objects[new_object.id] = new_object
self.world:newObjectType(new_object)
end
if old < 114 then
local rathole_type = require("objects.rathole")
local rathole_type = require "objects.rathole"
Object.processTypeDefinition(rathole_type)
self.objects[rathole_type.id] = rathole_type
self.world:newObjectType(rathole_type)
@@ -1476,8 +1476,8 @@ function App:checkForUpdates()
else
self.lua_socket_available = true
end
local http = require("socket.http")
local url = require("socket.url")
local http = require "socket.http"
local url = require "socket.url"
print("Checking for CorsixTH updates...")
local update_body, status, _ = http.request(update_url)
View
@@ -19,10 +19,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local pathsep = package.config:sub(1, 1)
local rnc = require("rnc")
local lfs = require("lfs")
local SDL = require("sdl")
local TH = require("TH")
local rnc = require "rnc"
local lfs = require "lfs"
local SDL = require "sdl"
local TH = require "TH"
local ipairs
= ipairs
@@ -58,7 +58,7 @@ if fi then
end
-- Check / create config_path
local lfs = require("lfs")
local lfs = require "lfs"
local function check_dir_exists(path)
if path:sub(-1) == pathsep then
path = path:sub(1, -2)
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
--! The (ideally) helpful advisor who pops up from the bottom dialog during a game.
class "UIAdviser" (Window)
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
class "UIBuildRoom" (Window)
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
require("dialogs.place_objects")
require "dialogs.place_objects"
class "UIEditRoom" (UIPlaceObjects)
@@ -25,7 +25,7 @@ class "UIGraphs" (UIFullscreen)
---@type UIGraphs
local UIGraphs = _G["UIGraphs"]
local TH = require("TH")
local TH = require "TH"
-- These values are based on the background colours of the pen symbols
local colours = {
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
--! Town map fullscreen window (purchase land, set radiator levels, map overview).
class "UITownMap" (UIFullscreen)
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
local math_floor
= math.floor
@@ -20,7 +20,7 @@ SOFTWARE. --]]
local ipairs, math_floor, unpack, select, assert
= ipairs, math.floor, unpack, select, assert
local TH = require("TH")
local TH = require "TH"
--! The ingame menu bar which sits (nominally hidden) at the top of the screen.
class "UIMenuBar" (Window)
@@ -784,7 +784,7 @@ function UIMenuBar:makeGameMenu(app)
:appendCheckItem(_S.menu_debug_overlay.byte_7, false, overlay(35, 8, 7, 7, true), "")
:appendCheckItem(_S.menu_debug_overlay.parcel, false, overlay("parcel"), "")
)
:appendItem(_S.menu_debug.sprite_viewer, function() require("sprite_viewer") end)
:appendItem(_S.menu_debug.sprite_viewer, function() require "sprite_viewer" end)
)
end
end
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
-- Test for hit within the view circle
local --[[persistable:patient_window_is_in_view_circle]] function is_in_view_circle(x, y)
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
local ipairs, math_floor
= ipairs, math.floor
@@ -20,7 +20,7 @@ SOFTWARE. --]]
local math_floor
= math.floor
local TH = require("TH")
local TH = require "TH"
--! Invisible window which handles placing a `Staff` member in the world.
class "UIPlaceStaff" (Window)
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
--! Room / door / reception desk queue visualisation dialog.
class "UIQueue" (Window)
@@ -18,8 +18,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local lfs = require("lfs")
local TH = require("TH")
local lfs = require "lfs"
local TH = require "TH"
local lfsext = TH.lfsExt()
--! A tree node representing a directory in the physical file-system.
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local lfs = require("lfs")
local lfs = require "lfs"
--! A tree node representing a file (or directory) in the physical file-system
-- that meets a given file extension criterion.
@@ -18,7 +18,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
local TH = require("TH")
local TH = require "TH"
local lfsext = TH.lfsExt()
--! Window where the user can choose a font file.
Oops, something went wrong.

0 comments on commit 6a2cd7b

Please sign in to comment.