mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 04:13:01 +02:00
Revert "Adds parantheses and adds spaces around .. operator"
This reverts commit 53dff2cce4
.
This commit is contained in:
@@ -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))
|
||||
|
@@ -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.
|
||||
...
|
||||
|
@@ -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)
|
||||
|
@@ -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.
|
||||
|
@@ -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"
|
||||
|
||||
--! An `Object` which needs occasional repair (to prevent explosion).
|
||||
class "Machine" (Object)
|
||||
|
@@ -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"
|
||||
|
||||
--! An `Entity` which occupies at least a single map tile and does not move.
|
||||
class "Object" (Entity)
|
||||
|
@@ -24,7 +24,7 @@ class "Entity"
|
||||
---@type Entity
|
||||
local Entity = _G["Entity"]
|
||||
|
||||
local TH = require("TH")
|
||||
local TH = require "TH"
|
||||
|
||||
function Entity:Entity(animation)
|
||||
self.th = animation
|
||||
|
@@ -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("ui")
|
||||
require "ui"
|
||||
|
||||
--! Variant of UI for running games
|
||||
class "GameUI" (UI)
|
||||
@@ -26,7 +26,7 @@ class "GameUI" (UI)
|
||||
---@type GameUI
|
||||
local GameUI = _G["GameUI"]
|
||||
|
||||
local TH = require("TH")
|
||||
local TH = require "TH"
|
||||
|
||||
-- The maximum distance to shake the screen from the origin during an
|
||||
-- earthquake with full intensity.
|
||||
|
@@ -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 pathsep = package.config:sub(1, 1)
|
||||
local ourpath = debug.getinfo(1, "S").source:sub(2, -17)
|
||||
|
@@ -69,7 +69,7 @@ function MultiUseObjectAction:setLayer3(layer3)
|
||||
return self
|
||||
end
|
||||
|
||||
local TH = require("TH")
|
||||
local TH = require "TH"
|
||||
|
||||
local orient_mirror = {
|
||||
north = "west",
|
||||
|
@@ -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 "UseObjectAction" (HumanoidAction)
|
||||
|
@@ -20,7 +20,7 @@ SOFTWARE. --]]
|
||||
|
||||
--! Layer which handles the Lua-facing side of loading and playing video.
|
||||
|
||||
local TH = require("TH")
|
||||
local TH = require "TH"
|
||||
local pathsep = package.config:sub(1, 1)
|
||||
|
||||
class "MoviePlayer"
|
||||
|
@@ -30,7 +30,7 @@ object.idle_animations = {
|
||||
west = 106,
|
||||
}
|
||||
|
||||
require("queue")
|
||||
require "queue"
|
||||
|
||||
class "Door" (Object)
|
||||
|
||||
|
@@ -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 object = {}
|
||||
object.id = "litter"
|
||||
|
@@ -66,7 +66,7 @@ object.orientations = {
|
||||
},
|
||||
}
|
||||
|
||||
require("queue")
|
||||
require "queue"
|
||||
|
||||
class "ReceptionDesk" (Object)
|
||||
|
||||
|
@@ -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 TH = require("TH")
|
||||
local lpeg = require("lpeg")
|
||||
local TH = require "TH"
|
||||
local lpeg = require "lpeg"
|
||||
local _unwrap = TH.stringProxy._unwrap
|
||||
|
||||
function TH.stringProxy.gsub(str, patt, repl)
|
||||
|
@@ -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"
|
||||
|
||||
--! Layer which handles the loading of localised text.
|
||||
class "Strings"
|
||||
|
@@ -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("window")
|
||||
require "window"
|
||||
|
||||
--! Top-level container for all other user-interface components.
|
||||
class "UI" (Window)
|
||||
@@ -26,10 +26,10 @@ class "UI" (Window)
|
||||
---@type UI
|
||||
local UI = _G["UI"]
|
||||
|
||||
local TH = require("TH")
|
||||
local SDL = require("sdl")
|
||||
local TH = require "TH"
|
||||
local SDL = require "sdl"
|
||||
local WM = SDL.wm
|
||||
local lfs = require("lfs")
|
||||
local lfs = require "lfs"
|
||||
|
||||
local function invert(t)
|
||||
local r = {}
|
||||
|
@@ -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("persistance")
|
||||
require "persistance"
|
||||
|
||||
--! Base class for user-interface dialogs.
|
||||
class "Window"
|
||||
|
@@ -22,17 +22,17 @@ local TH = require"TH"
|
||||
local ipairs, _G, table_remove
|
||||
= ipairs, _G, table.remove
|
||||
|
||||
require("entities.patient")
|
||||
require("entities.staff")
|
||||
require("entities.vip")
|
||||
require("entities.grim_reaper")
|
||||
require("entities.inspector")
|
||||
require("staff_profile")
|
||||
require("hospital")
|
||||
require("epidemic")
|
||||
require("calls_dispatcher")
|
||||
require("research_department")
|
||||
require("entity_map")
|
||||
require "entities.patient"
|
||||
require "entities.staff"
|
||||
require "entities.vip"
|
||||
require "entities.grim_reaper"
|
||||
require "entities.inspector"
|
||||
require "staff_profile"
|
||||
require "hospital"
|
||||
require "epidemic"
|
||||
require "calls_dispatcher"
|
||||
require "research_department"
|
||||
require "entity_map"
|
||||
|
||||
--! Manages entities, rooms, and the date.
|
||||
class "World"
|
||||
|
@@ -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 lpeg = require("lpeg")
|
||||
local lpeg = require "lpeg"
|
||||
need_lpeg_version(0, 9)
|
||||
|
||||
local C, P, R, S, V = lpeg.C, lpeg.P, lpeg.R, lpeg.S, lpeg.V
|
||||
|
@@ -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 L = require("lpeg")
|
||||
local L = require "lpeg"
|
||||
need_lpeg_version(0, 9)
|
||||
|
||||
local C, P, R, S, V = L.C, L.P, L.R, L.S, L.V
|
||||
|
@@ -29,7 +29,7 @@ local lua_files = {
|
||||
"../CorsixTH/CorsixTH.lua"
|
||||
}
|
||||
|
||||
local lfs = require("lfs")
|
||||
local lfs = require "lfs"
|
||||
|
||||
local output_dir = lfs.currentdir() .. "/corsixth_lua/"
|
||||
lfs.mkdir(output_dir)
|
||||
@@ -43,12 +43,12 @@ dofile "../CorsixTH/Lua/strict.lua"
|
||||
dofile "../CorsixTH/Lua/class.lua"
|
||||
require = destrict(require)
|
||||
|
||||
require("helpers")
|
||||
require("c_tokenise")
|
||||
require("lua_tokenise")
|
||||
require("lua_code_model")
|
||||
require("lua_scan")
|
||||
require("template")
|
||||
require "helpers"
|
||||
require "c_tokenise"
|
||||
require "lua_tokenise"
|
||||
require "lua_code_model"
|
||||
require "lua_scan"
|
||||
require "template"
|
||||
|
||||
function string.trim(s, what)
|
||||
what = what or "%s"
|
||||
|
Reference in New Issue
Block a user