Skip to content
Permalink
Browse files

Codespell changes

  • Loading branch information
tobylane committed Feb 5, 2020
1 parent 12c221b commit d192f47bc4b8212f7a981d540a220c35c196a252
Showing with 130 additions and 130 deletions.
  1. +2 −2 AnimView/frmMain.cpp
  2. +2 −2 CorsixTH/CorsixTH.lua
  3. +1 −1 CorsixTH/Levels/finisham.level
  4. +1 −1 CorsixTH/Levels/st.peter's.level
  5. +1 −1 CorsixTH/Lua/api_version.lua
  6. +2 −2 CorsixTH/Lua/app.lua
  7. +1 −1 CorsixTH/Lua/audio.lua
  8. +1 −1 CorsixTH/Lua/base_config.lua
  9. +2 −2 CorsixTH/Lua/config_finder.lua
  10. +2 −2 CorsixTH/Lua/dialogs/edit_room.lua
  11. +1 −1 CorsixTH/Lua/dialogs/fullscreen/progress_report.lua
  12. +1 −1 CorsixTH/Lua/dialogs/menu.lua
  13. +1 −1 CorsixTH/Lua/dialogs/resizables/cheats.lua
  14. +2 −2 CorsixTH/Lua/dialogs/resizables/hotkey_assign.lua
  15. +1 −1 CorsixTH/Lua/dialogs/tree_ctrl.lua
  16. +7 −7 CorsixTH/Lua/entities/humanoid.lua
  17. +1 −1 CorsixTH/Lua/entities/humanoids/patient.lua
  18. +1 −1 CorsixTH/Lua/entities/humanoids/staff.lua
  19. +2 −2 CorsixTH/Lua/entities/object.lua
  20. +6 −6 CorsixTH/Lua/entity.lua
  21. +5 −5 CorsixTH/Lua/game_ui.lua
  22. +3 −3 CorsixTH/Lua/hospital.lua
  23. +1 −1 CorsixTH/Lua/humanoid_actions/seek_room.lua
  24. +3 −3 CorsixTH/Lua/map.lua
  25. +1 −1 CorsixTH/Lua/objects/pool_table.lua
  26. +1 −1 CorsixTH/Lua/objects/reception_desk.lua
  27. +1 −1 CorsixTH/Lua/queue.lua
  28. +1 −1 CorsixTH/Lua/room.lua
  29. +1 −1 CorsixTH/Lua/strict.lua
  30. +5 −5 CorsixTH/Lua/strings.lua
  31. +4 −4 CorsixTH/Lua/ui.lua
  32. +5 −5 CorsixTH/Lua/utility.lua
  33. +20 −20 CorsixTH/Lua/window.lua
  34. +1 −1 CorsixTH/Lua/world.lua
  35. +1 −1 CorsixTH/Luatest/spec/date_spec.lua
  36. +3 −3 CorsixTH/Luatest/spec/utility_spec.lua
  37. +1 −1 CorsixTH/Src/iso_fs.cpp
  38. +1 −1 CorsixTH/Src/iso_fs.h
  39. +1 −1 CorsixTH/Src/main.cpp
  40. +2 −2 CorsixTH/Src/persist_lua.cpp
  41. +1 −1 CorsixTH/Src/persist_lua.h
  42. +1 −1 CorsixTH/Src/th_gfx.h
  43. +1 −1 CorsixTH/Src/th_lua_anims.cpp
  44. +1 −1 CorsixTH/Src/th_lua_internal.h
  45. +6 −6 CorsixTH/Src/th_lua_map.cpp
  46. +3 −3 CorsixTH/Src/th_map.cpp
  47. +12 −12 CorsixTH/Src/th_map.h
  48. +1 −1 CorsixTH/Src/th_pathfind.h
  49. +1 −1 CorsixTH/Src/th_sound.h
  50. +1 −1 LDocGen/c_tokenise.lua
  51. +2 −2 LDocGen/lua_tokenise.lua
  52. +1 −1 WindowsInstaller/StrRep.nsh
@@ -285,7 +285,7 @@ frmMain::frmMain()
1, wxEXPAND);
pMoodOverlay->Add(pMoodRow, 1, wxEXPAND | wxALL, 2);
pMoodOverlay->Add(
new wxCheckBox(this, ID_DRAW_COORDINATES, L"Draw tile coodinates"), 0,
new wxCheckBox(this, ID_DRAW_COORDINATES, L"Draw tile coordinates"), 0,
wxEXPAND | wxALL, 0);
pSidebarSizer->Add(pMoodOverlay, 0, wxEXPAND | wxALL, 0);
m_bDrawMood = false;
@@ -413,7 +413,7 @@ void frmMain::load() {
sPath += wxFileName::GetPathSeparator();
}
if (!wxFileName::DirExists(sPath)) {
::wxMessageBox(L"Theme Hospital path non-existant", L"Load Animations",
::wxMessageBox(L"Theme Hospital path non-existent", L"Load Animations",
wxOK | wxICON_ERROR, this);
return;
}
@@ -52,14 +52,14 @@ end
_G['corsixth'] = {}

--! Loads and runs a lua file.
-- Similar to the built in require function with three important differenes:
-- Similar to the built in require function with three important differences:
-- * This function searches for --[[persistance: comments and maps the
-- following function into the persistence table.
-- * This function only searches in the Lua code directory
-- * This function is only able to load lua source files (not C modules or
-- compiled lua.
--!param name (string)
-- The name of the lua source file to run. Use dots to seperate directories,
-- The name of the lua source file to run. Use dots to separate directories,
-- and do not include the .lua file extension.
--!return The return value of whatever source file is opened.
corsixth.require = function(name)
@@ -42,7 +42,7 @@ InterestRate is defined as centiprocent to allow for two decimals precision, i.e
When a drug is researched, what effectiveness does it have
#gbv.StartRating 80

The following table contains all diagnoses and treatments that shows up inthe drug casebook
The following table contains all diagnoses and treatments that shows up in the drug casebook
in the game. Known specifies whether it should show up from the beginning of the level and
RschReqd how much research is required to discover the treatment room for the disease.
#expertise[1].Known.RschReqd 1 0 GENERAL_PRACTICE
@@ -66,7 +66,7 @@ How many patients still infected and not-cured cause the hospital to be evacuate
When a drug is first researched, what effectiveness does it have
#gbv.StartRating 80

The following table contains all diagnoses and treatments that shows up inthe drug casebook
The following table contains all diagnoses and treatments that shows up in the drug casebook
in the game. ContRate is whether this is contagious (lower the number the greater the chances of it appearing, 0 means never) and
Known specifies whether it should show up from the beginning of the level and
RschReqd how much research is required to discover the treatment room for the disease.
@@ -20,7 +20,7 @@ SOFTWARE.
This file is used to ensure that the compiled binary being used by Lua is up
to date. Without this system, if the binary was not recent enough, then the
user would get a confusing error message along the lines of attemping to call
user would get a confusing error message along the lines of attempting to call
a nil value (as new API functions are nil in older binaries).
When a new API call is added to the C++ source, the version number in this
@@ -1397,7 +1397,7 @@ end
--! which save game version it is. This was added after the Beta 8
--! release, which is why the checks prior to that version aren't made.
--!param version An optional value if you want to find what game version
-- a specific savegame verion is from.
-- a specific savegame version is from.
function App:getVersion(version)
local ver = version or self.savegame_version
if ver > 134 then
@@ -1497,7 +1497,7 @@ function App:exit()
self.running = false
end

--! Exits the game completly without saving the config i.e. Alt+F4 for Quit Application
--! Exits the game completely without saving the config i.e. Alt+F4 for Quit Application
function App:abandon()
self.running = false
end
@@ -536,7 +536,7 @@ end
--! Does not affect the configuration setting play_music.
function Audio:stopBackgroundTrack()
if self.background_paused then
-- unpause first in order to clear the backupped volume
-- Resume first in order to clear the saved volume.
self:pauseBackgroundTrack()
end
SDL.audio.stopMusic()
@@ -211,7 +211,7 @@ local configuration = {
{StartCost = 2500, StartAvail = 0, WhenAvail = 0, StartStrength = 8, AvailableForLevel = 0}, -- 9 Inflator Machine
{StartCost = 150, StartAvail = 1, WhenAvail = 0, StartStrength = 10, AvailableForLevel = 1}, -- 10 Snooker Table
{StartCost = 150, StartAvail = 1, WhenAvail = 0, StartStrength = 10, AvailableForLevel = 1}, -- 11 New Receptionists Station
{StartCost = 5, StartAvail = 1, WhenAvail = 0, StartStrength = 10, AvailableForLevel = 1}, -- 12 Build Room Tressle Table
{StartCost = 5, StartAvail = 1, WhenAvail = 0, StartStrength = 10, AvailableForLevel = 1}, -- 12 Build Room Trestle Table
{StartCost = 1000, StartAvail = 0, WhenAvail = 0, StartStrength = 13, AvailableForLevel = 0}, -- 13 Cardiogram
{StartCost = 5000, StartAvail = 0, WhenAvail = 0, StartStrength = 12, AvailableForLevel = 0}, -- 14 Scanner
{StartCost = 3000, StartAvail = 1, WhenAvail = 0, StartStrength = 10, AvailableForLevel = 1}, -- 15 Scanner Console
@@ -609,7 +609,7 @@ for key, value in pairs(hotkeys_defaults) do
hotkeys_values[key] = serialize(value)
end

-- If the file opened succesfully...
-- If the file opened successfully...
if fi then
local file_contents = fi:read("*all")
fi:close()
@@ -634,7 +634,7 @@ end

--
if hotkeys_needs_rewrite then
-- The config file that will be written is divided into seperate strings, which are concatenated when they are written into the file.
-- The config file that will be written is divided into separate strings, which are concatenated when they are written into the file.
-- This is done to avoid a "Too many C levels" error.
local string_01 = [=[
--------------------------CorsixTH Hotkey Mappings File-------------------------
@@ -707,7 +707,7 @@ function UIEditRoom:screenToWall(x, y)
-- NB: Doors and windows cannot be placed on corner tiles, hence walls of corner tiles
-- are never returned, and the nearest non-corner wall is returned instead. If they
-- could be placed on corner tiles, then you would have to consider the interaction of
-- wall shadows with windows and doors, amonst other things.
-- wall shadows with windows and doors, amongst other things.
-- Swing doors are allowed to be adjacent everywhere except the top corner.
local modifier = 0
local swinging = false
@@ -1167,7 +1167,7 @@ end
--! param wall (string) original wall orientation
--! return x (int) updated x value
--! return y (int) updated y value
--! return x_mod (int) offest value to apply to tile count to determine relative position
--! return x_mod (int) offset value to apply to tile count to determine relative position
--! return y_mod (int) offset value to apply to tile count to determine relatitve position
--! return wall (string) wall orientation style (only 2 styles)
local function doorWallOffsetCalculations(x, y, wall)
@@ -154,7 +154,7 @@ function UIProgressReport:drawMarkers(canvas, x, y)
end

-- Possibly show warning that it's too cold, too hot, patients not happy
-- or if theres need to build drink machines as folks are thirsty. Only show one at a time though!
-- or if there's need to build drink machines as folks are thirsty. Only show one at a time though!
-- TODO the levels may need adjustment
local msg = self.ui.hospital.show_progress_screen_warnings
if warmth < 0.3 and msg == 1 then
@@ -48,7 +48,7 @@ function UIMenuBar:UIMenuBar(ui, map_editor)
-- This should be present in self.open_menus, else it won't be drawn
self.active_menu = false
-- The list of menus which should be displayed
-- This list satifies: open_menus[x] == nil or open_menus[x].level == x
-- This list satisfies: open_menus[x] == nil or open_menus[x].level == x
self.open_menus = {}

if map_editor then
@@ -171,7 +171,7 @@ end

--[[ Before an epidemic has been revealed toggle the infected icons
to easily distinguish the infected patients -- will toggle icons
for ALL future epidemics you cannot distingush between epidemics
for ALL future epidemics you cannot distinguish between epidemics
by disease ]]
function UICheats:cheatToggleInfected()
local hospital = self.ui.hospital
@@ -318,7 +318,7 @@ local function hotkey_input(hotkey, hotkey_buttons_table, app)
Left for future patch.
-- Disable the "global_exitApp" hotkey while assigning hotkeys?
Even when "global_exitApp" isn't added at startup Alt+F4 still abandons program. Why?
-- Modifier keys for other languages nessecary?
-- Modifier keys for other languages necessary?
-- Ex: STRG for german's "CTRL".
]]

@@ -349,7 +349,7 @@ local function hotkey_input(hotkey, hotkey_buttons_table, app)
hotkey == "ingame_scroll_down" or
hotkey == "ingame_scroll_left" or
hotkey == "ingame_scroll_right" then
-- Get rid of any modifers, as they won't work correctly, anyway.
-- Get rid of any modifiers, as they won't work correctly, anyway.
noted_keys = remove_modifiers(noted_keys)
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. --]]

--! Iterface for items within a UI tree control
--! Interface for items within a UI tree control
class "TreeNode"

---@type TreeNode
@@ -688,9 +688,9 @@ end
-- Helper function for the common case of instructing a `Humanoid` to walk to
-- a position on the map. Equivalent to calling `setNextAction` with a walk
-- action.
--!param tile_x (integer) The X-component of the Lua tile co-ordinates of the
--!param tile_x (integer) The X-component of the Lua tile coordinates of the
-- tile to walk to.
--!param tile_y (integer) The Y-component of the Lua tile co-ordinates of the
--!param tile_y (integer) The Y-component of the Lua tile coordinates of the
-- tile to walk to.
--!param must_happen (boolean, nil) If true, then the walk action will not be
-- interrupted.
@@ -777,8 +777,8 @@ function Humanoid:tickDay()

-- If it is too hot or too cold, start to decrease happiness and
-- show the corresponding icon. Otherwise we could get happier instead.
local min_comfort_temp = 0.22 -- 11 degrees Celcius.
local max_comfort_temp = 0.36 -- 18 degrees Celcius.
local min_comfort_temp = 0.22 -- 11 degrees Celsius.
local max_comfort_temp = 0.36 -- 18 degrees Celsius.
local decrease_factor = 0.10
local increase_happiness = 0.005

@@ -827,7 +827,7 @@ function Humanoid:unregisterRoomBuildCallback(callback)
if self.build_callbacks[callback] then
self.build_callbacks[callback] = nil
else
self.world:gameLog("Warning: Trying to remove nonexistant room build callback (" .. tostring(callback) .. ") from humanoid (" .. tostring(self) .. ").")
self.world:gameLog("Warning: Trying to remove nonexistent room build callback (" .. tostring(callback) .. ") from humanoid (" .. tostring(self) .. ").")
end
end

@@ -861,7 +861,7 @@ function Humanoid:unregisterRoomRemoveCallback(callback)
self.world:unregisterRoomRemoveCallback(callback)
self.remove_callbacks[callback] = nil
else
self.world:gameLog("Warning: Trying to remove nonexistant room remove callback (" .. tostring(callback) .. ") from humanoid (" .. tostring(self) .. ").")
self.world:gameLog("Warning: Trying to remove nonexistent room remove callback (" .. tostring(callback) .. ") from humanoid (" .. tostring(self) .. ").")
end
end

@@ -883,7 +883,7 @@ function Humanoid:unregisterStaffChangeCallback(callback)
if self.staff_change_callbacks and self.staff_change_callbacks[callback] then
self.staff_change_callbacks[callback] = nil
else
self.world:gameLog("Warning: Trying to remove nonexistant staff callback (" .. tostring(callback) .. ") from humanoid (" .. tostring(self) .. ").")
self.world:gameLog("Warning: Trying to remove nonexistent staff callback (" .. tostring(callback) .. ") from humanoid (" .. tostring(self) .. ").")
end
end

@@ -622,7 +622,7 @@ function Patient:tickDay()
end

-- Note: to avoid empty action queue error if the player spam clicks a patient at the same time as the day changes
-- there is now an inbetween "neutal" stage.
-- there is now an between "neutral" stage.
if self.has_fallen == 3 then
self.has_fallen = 1
elseif self.has_fallen == 2 then
@@ -528,7 +528,7 @@ function Staff:isIdle()
return false
end

-- Makes the staff member request a raise of 10%, or a wage exactly inbetween their current and a fair one, whichever is more.
-- Makes the staff member request a raise of 10%, or a wage exactly in the middle of their current and a fair one, whichever is more.
function Staff:requestRaise()
-- Is this the first time a member of staff is requesting a raise?
-- Only show the help if the player is playing the campaign though
@@ -244,9 +244,9 @@ end

--! Get the primary tile which the object is attached to for rendering
--[[! For objects which attach to a single tile for rendering, this method will
return the X and Y Lua world co-ordinates of that tile. For objects which split
return the X and Y Lua world coordinates of that tile. For objects which split
their rendering over multiple tiles, one of them is arbitrarily designated as
the primary tile, and its co-ordinates are returned.
the primary tile, and its coordinates are returned.
]]
function Object:getRenderAttachTile()
local x, y = self.tile_x, self.tile_y
@@ -63,7 +63,7 @@ The silences between these sounds can either have randomly generated lengths bet
they can all be a specified length by providing min and max tables with one value for the desired pause duration.
!param name_pattern (String) example: LAVA00*.WAV
!param min_silence_lengths (table) the desired mininum silences length for the different tick rates, [3] = Normal
!param min_silence_lengths (table) the desired minimum silences length for the different tick rates, [3] = Normal
!param max_silence_lengths (table) the desired maximum silences length for the different tick rates, [3] = Normal
!param num_silences (integer) how many different silence lengths should be used, this can be a nil parameter.
-]]
@@ -103,8 +103,8 @@ function Entity:setAnimation(animation, flags)
end

--[[ Set the map tile which the entity is on.
!param x (integer) The 1-based X co-ordinate of the tile.
!param y (integer) The 1-based Y co-ordinate of the tile.
!param x (integer) The 1-based X coordinate of the tile.
!param y (integer) The 1-based Y coordinate of the tile.
]]
function Entity:setTile(x, y)
if self.user_of then
@@ -160,8 +160,8 @@ function Entity:setSpeed(x, y)
end

--[[ Combined form of `setTile`, `setPosition`, and `setSpeed`
!param tx (integer) The 1-based X co-ordinate of the tile.
!param ty (integer) The 1-based Y co-ordinate of the tile.
!param tx (integer) The 1-based X coordinate of the tile.
!param ty (integer) The 1-based Y coordinate of the tile.
!param px (integer) The 0-based X pixel offset from the default position.
!param py (integer) The 0-based Y pixel offset from the default position.
!param sx (integer) The X component of the speed in pixels per tick.
@@ -359,7 +359,7 @@ function Entity:resetAnimation()
end

--[[
Returns the drawing layer for this particular entity. Should be overriden in derived classes. The drawing layer
Returns the drawing layer for this particular entity. Should be overridden in derived classes. The drawing layer
specifies the order in which object are drawn in a tile (the object with the smallest layer is drawn first).
Litter should have layer 0, side objects to the north layer 1, side objects to the west layer 2,
normal objects should have layers between 3 and 7, east side object should have layer 8 and south side
@@ -829,7 +829,7 @@ function GameUI.limitPointToDiamond(dx, dy, visible_diamond, do_limit)
if do_limit then
-- Determine the quadrant which the point lies in and accordingly set:
-- (vx, vy) : a unit vector perpendicular to the diamond edge in the quadrant
-- (p1x, p1y), (p2x, p2y) : the two diamond verticies in the quadrant
-- (p1x, p1y), (p2x, p2y) : the two diamond vertices in the quadrant
-- d : distance from the point to the line defined by the diamond edge (not the line segment itself)
local vx, vy, d
local p1x, p1y, p2x, p2y = 0, 0, 0, 0
@@ -1131,15 +1131,15 @@ function GameUI:startTutorial(chapter)
self:tutorialStep(chapter, 0, 1)
end

--! Converts centre of screen co-ordinates to world tile positions and stores the values for later recall
-- param index (integer) Postion in recallpositions table
--! Converts centre of screen coordinates to world tile positions and stores the values for later recall
-- param index (integer) Position in recallpositions table
function GameUI:setMapRecallPosition(index)
local cx, cy = self:ScreenToWorld(self.app.config.width / 2, self.app.config.height / 2)
self.recallpositions[index] = {x = cx, y = cy, z = self.zoom_factor}
end

--! Retrives stored recall position and attempts to scroll to that position - will be limited to the bounds of the camera when zoomed out
-- param index (integer) Postion in recallpositions table
--! Retrieves stored recall position and attempts to scroll to that position - will be limited to the bounds of the camera when zoomed out
-- param index (integer) Position in recallpositions table
function GameUI:recallMapPosition(index)
if self.recallpositions[index] ~= nil then
local sx, sy = self.app.map:WorldToScreen(self.recallpositions[index].x, self.recallpositions[index].y)
@@ -877,8 +877,8 @@ function Hospital:getHeliportSpawnPosition()
end

--[[ Test if a given map tile is part of this hospital.
!param x (integer) The 1-based X co-ordinate of the tile to test.
!param y (integer) The 1-based Y co-ordinate of the tile to test.
!param x (integer) The 1-based X coordinate of the tile to test.
!param y (integer) The 1-based Y coordinate of the tile to test.
]]
function Hospital:isInHospital(x, y)
local flags = self.world.map.th:getCellFlags(x, y)
@@ -1824,7 +1824,7 @@ function Hospital:changeReputation(reason, disease, valueChange)
if self.reputation_above_threshold then self:checkReputation() end
end

--! Check whether the reputation is still above the treshold.
--! Check whether the reputation is still above the threshold.
function Hospital:checkReputation()
local level_config = self.world.map.level_config
if level_config.awards_trophies then
@@ -70,7 +70,7 @@ local action_seek_room_find_room = permanent"action_seek_room_find_room"( functi
return room
else
tried_rooms = tried_rooms + 1
-- Remove the index of this room from the list of indeces available in available_diagnosis_rooms
-- Remove the index of this room from the list of indices available in available_diagnosis_rooms
table.remove(available_rooms, room_at_index)
-- If the room can be built, set the flag for it.
local diag = humanoid.world.available_rooms[room_type]
@@ -104,10 +104,10 @@ function Map:registerTemperatureDisplayMethod()
self.th:setTemperatureDisplay(self.temperature_display_method)
end

-- Convert between world co-ordinates and screen co-ordinates
-- World co-ordinates are (at least for standard maps) in the range [1, 128)
-- Convert between world coordinates and screen coordinates
-- World coordinates are (at least for standard maps) in the range [1, 128)
-- for both x and y, with the floor of the values giving the cell index.
-- Screen co-ordinates are pixels relative to the map origin - NOT relative to
-- Screen coordinates are pixels relative to the map origin - NOT relative to
-- the top-left corner of the screen (use UI:WorldToScreen and UI:ScreenToWorld
-- for this).

0 comments on commit d192f47

Please sign in to comment.
You can’t perform that action at this time.