diff --git a/.gitattributes b/.gitattributes index c791cfad..9528f82c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,6 @@ * text=auto !eol AnimView/AnimView.ico -text -AnimView/AnimView.rc -text CorsixTH/Bitmap/aux_ui.dat -text svneol=unset#unset -CorsixTH/Bitmap/aux_ui.spec -text CorsixTH/Bitmap/aux_ui.tab -text CorsixTH/Bitmap/bootstrap_font.bmp -text CorsixTH/Bitmap/bootstrap_font.dat -text svneol=unset#application/octet-stream @@ -42,64 +40,27 @@ CorsixTH/Bitmap/transparent_walls32.png -text CorsixTH/Bitmap/tree_collapsed.bmp -text CorsixTH/Bitmap/tree_ctrl.dat -text CorsixTH/Bitmap/tree_ctrl.pal -text -CorsixTH/Bitmap/tree_ctrl.spec -text CorsixTH/Bitmap/tree_ctrl.tab -text CorsixTH/Bitmap/tree_expanded.bmp -text CorsixTH/Bitmap/tree_leaf.bmp -text CorsixTH/Bitmap/tree_level.bmp -text CorsixTH/CorsixTH.aps -text -CorsixTH/CorsixTH.deproj -text CorsixTH/CorsixTH.ico -text -CorsixTH/CorsixTH.rc -text CorsixTH/Icon.icns -text CorsixTH/Levels/Example.map -text -CorsixTH/Levels/avatar.level -text CorsixTH/Levels/avatar.map -text -CorsixTH/Levels/demo.level -text -CorsixTH/Levels/example.level -text -CorsixTH/Levels/original05.level -text -CorsixTH/Levels/original07.level -text -CorsixTH/Levels/original11.level -text -CorsixTH/Levels/original12.level -text -CorsixTH/Original_Logo.svg -text -CorsixTH/Original_Logo_Text.svg -text CorsixTH/__MACOSX/SDLMain/._SDLMain.m -text -DebianPackage/control -text -DebianPackage/debian-binary -text -DebianPackage/postinst -text -DebianPackage/prerm -text DebianPackage/usr/games/CorsixTH -text -DebianPackage/usr/share/applications/CorsixTH.desktop -text -DebianPackage/usr/share/applications/MapEdit.desktop -text -DebianPackage/usr/share/doc/corsix-th/copyright -text LDocGen/output/corner_right.gif -text LDocGen/output/logo.png -text -LDocGen/output/main.css -text -LDocGen/templates/class.htlua -text -LDocGen/templates/class_inheritance.htlua -text -LDocGen/templates/lua_class_hierarchy.htlua -text -LDocGen/templates/lua_class_index.htlua -text -LDocGen/templates/lua_class_list.htlua -text -LDocGen/templates/lua_class_tree.htlua -text -LDocGen/templates/lua_file_hierarchy.htlua -text -LDocGen/templates/lua_file_tree.htlua -text -LDocGen/templates/page.htlua -text -LFS/lfs.def -text LPEG/lpeg-128.gif -text LPEG/lpeg.html -text MapEdit/MapEdit.ico -text -MapEdit/MapEdit.rc -text TestProcedure/Saves/issue[!!-~]1119.sav -text TestProcedure/Saves/test-save-beta8.sav -text -WindowsInstaller/LanguageStrings.nsh -text -WindowsInstaller/OptionsPage.ini -text -WindowsInstaller/ReplaceInFile.nsh -text -WindowsInstaller/StrRep.nsh -text -WindowsInstaller/Win32Script.nsi -text WindowsInstaller/welcome.bmp -text agg/authors -text agg/copying -text -agg/include/agg_vcgen_stroke.cpp -text agg/news -text agg/src/authors -text agg/src/copying -text diff --git a/AnimView/AnimView.rc b/AnimView/AnimView.rc index 92f5cb22..3c77db56 100644 --- a/AnimView/AnimView.rc +++ b/AnimView/AnimView.rc @@ -1,34 +1,34 @@ -// Microsoft Visual C++ generated resource script. -// - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_AnimView ICON "AnimView.ico" -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - +// Microsoft Visual C++ generated resource script. +// + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_AnimView ICON "AnimView.ico" +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + diff --git a/CorsixTH/Bitmap/aux_ui.spec b/CorsixTH/Bitmap/aux_ui.spec index 781729cc..cec4db4e 100644 --- a/CorsixTH/Bitmap/aux_ui.spec +++ b/CorsixTH/Bitmap/aux_ui.spec @@ -1,34 +1,34 @@ --- Bitmaps to create sprite sheet from -sprites = {} -sprites[ 1] = "build_room_dialog_close.bmp" -sprites[ 2] = "map_cell_outline.bmp" -sprites[ 3] = "flag_passable.bmp" -sprites[ 4] = "flag_travel_north.bmp" -sprites[ 5] = "flag_travel_east.bmp" -sprites[ 6] = "flag_travel_south.bmp" -sprites[ 7] = "flag_travel_west.bmp" -sprites[ 8] = "flag_hospital.bmp" -sprites[ 9] = "flag_buildable.bmp" -sprites[10] = "fullscreen_border_topleft.bmp" -sprites[11] = "fullscreen_border_top.bmp" -sprites[12] = "fullscreen_border_topright.bmp" -sprites[13] = "fullscreen_border_left.bmp" -sprites[14] = "fullscreen_border_right.bmp" -sprites[15] = "fullscreen_border_bottomleft.bmp" -sprites[16] = "fullscreen_border_bottom.bmp" -sprites[17] = "fullscreen_border_bottomright.bmp" -sprites[18] = "map_cell_outline_north.bmp" -sprites[19] = "map_cell_outline_east.bmp" -sprites[20] = "map_cell_outline_south.bmp" -sprites[21] = "map_cell_outline_west.bmp" - --- Palette options -palette = "from bitmap" - --- Compression options -complex = true -rnc = false - --- Output filenames -output_tab = "aux_ui.tab" -output_dat = "aux_ui.dat" +-- Bitmaps to create sprite sheet from +sprites = {} +sprites[ 1] = "build_room_dialog_close.bmp" +sprites[ 2] = "map_cell_outline.bmp" +sprites[ 3] = "flag_passable.bmp" +sprites[ 4] = "flag_travel_north.bmp" +sprites[ 5] = "flag_travel_east.bmp" +sprites[ 6] = "flag_travel_south.bmp" +sprites[ 7] = "flag_travel_west.bmp" +sprites[ 8] = "flag_hospital.bmp" +sprites[ 9] = "flag_buildable.bmp" +sprites[10] = "fullscreen_border_topleft.bmp" +sprites[11] = "fullscreen_border_top.bmp" +sprites[12] = "fullscreen_border_topright.bmp" +sprites[13] = "fullscreen_border_left.bmp" +sprites[14] = "fullscreen_border_right.bmp" +sprites[15] = "fullscreen_border_bottomleft.bmp" +sprites[16] = "fullscreen_border_bottom.bmp" +sprites[17] = "fullscreen_border_bottomright.bmp" +sprites[18] = "map_cell_outline_north.bmp" +sprites[19] = "map_cell_outline_east.bmp" +sprites[20] = "map_cell_outline_south.bmp" +sprites[21] = "map_cell_outline_west.bmp" + +-- Palette options +palette = "from bitmap" + +-- Compression options +complex = true +rnc = false + +-- Output filenames +output_tab = "aux_ui.tab" +output_dat = "aux_ui.dat" diff --git a/CorsixTH/Bitmap/tree_ctrl.spec b/CorsixTH/Bitmap/tree_ctrl.spec index e147091a..daf610c1 100644 --- a/CorsixTH/Bitmap/tree_ctrl.spec +++ b/CorsixTH/Bitmap/tree_ctrl.spec @@ -1,17 +1,17 @@ --- Bitmaps to create sprite sheet from -sprites = {} -sprites[ 1] = "tree_level.bmp" -sprites[ 2] = "tree_leaf.bmp" -sprites[ 3] = "tree_collapsed.bmp" -sprites[ 4] = "tree_expanded.bmp" - --- Palette options -palette = "from bitmap" - --- Compression options -complex = true -rnc = false - --- Output filenames -output_tab = "tree_ctrl.tab" -output_dat = "tree_ctrl.dat" +-- Bitmaps to create sprite sheet from +sprites = {} +sprites[ 1] = "tree_level.bmp" +sprites[ 2] = "tree_leaf.bmp" +sprites[ 3] = "tree_collapsed.bmp" +sprites[ 4] = "tree_expanded.bmp" + +-- Palette options +palette = "from bitmap" + +-- Compression options +complex = true +rnc = false + +-- Output filenames +output_tab = "tree_ctrl.tab" +output_dat = "tree_ctrl.dat" diff --git a/CorsixTH/CorsixTH.rc b/CorsixTH/CorsixTH.rc index 4d1cb2da..242d6949 100644 --- a/CorsixTH/CorsixTH.rc +++ b/CorsixTH/CorsixTH.rc @@ -1,72 +1,72 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_CORSIXTH ICON "CorsixTH.ico" -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_CORSIXTH ICON "CorsixTH.ico" +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/CorsixTH/Levels/avatar.level b/CorsixTH/Levels/avatar.level index e1f07867..cbc08b64 100644 --- a/CorsixTH/Levels/avatar.level +++ b/CorsixTH/Levels/avatar.level @@ -1,226 +1,226 @@ -Copyright (c) 2010 Manuel "Roujin" Wolf - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - -Only lines beginning with % or # as explained below will be considered by the game. - -Each line beginning with a %-sign are directives to use when loading the game, such as what -the level is called and where to find the map file. Available commands: -- Name: What the level should be called (within quotes) -- LevelFile: The name of the binary map file to load. First the Levels directory of the - original game will be searched, and then the Levels directory of CorsixTH. - -Lines that begin with # defines all parameters for the level. By default there are no diseases -and only some basic rooms are available. Note that if a player is using the demo files -on the contrary everything is available unless specified otherwise in the level file. - - ----------------------- General Information ------------------------- -%Name = "Avatar" -%LevelFile = "avatar.map" - -Note that the below introduction text at the moment must reside on a single line within this file! -%LevelBriefing = "In this town, there are no doctors available for hire, so you have decided to take the matter into your own hands. Luckily, you happen to be a fully skilled consultant. Try to earn 50.000 - and don't worry too much about killing off your patients, you're only in for the money." - -Town properties -InterestRate is defined as centiprocent to allow for two decimals precision, i.e. -300 means 3 % -#town.StartCash.InterestRate 20000 300 - --------------------- Disease Configuration ------------------------- - -When a drug is researched, what effectiveness does it have -#gbv.StartRating 100 - -The following table contains all diagnoses and treatments that shows up inte 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 -#expertise[2].Known.RschReqd 0 40000 BLOATY_HEAD -#expertise[3].Known.RschReqd 0 40000 HAIRYITUS -#expertise[4].Known.RschReqd 0 60000 ELVIS -#expertise[5].Known.RschReqd 0 60000 INVIS -#expertise[6].Known.RschReqd 0 60000 RADIATION -#expertise[7].Known.RschReqd 0 40000 SLACK_TONGUE -#expertise[8].Known.RschReqd 0 60000 ALIEN -#expertise[9].Known.RschReqd 0 20000 BROKEN_BONES -#expertise[10].Known.RschReqd 0 40000 BALDNESS -#expertise[11].Known.RschReqd 0 40000 DISCRETE_ITCHING -#expertise[12].Known.RschReqd 0 40000 JELLYITUS -#expertise[13].Known.RschReqd 0 40000 SLEEPING_ILLNESS -#expertise[14].Known.RschReqd 0 30000 PREGNANT -#expertise[15].Known.RschReqd 0 40000 TRANSPARENCY -#expertise[16].Known.RschReqd 0 20000 UNCOMMON_COLD -#expertise[17].Known.RschReqd 0 60000 BROKEN_WIND -#expertise[18].Known.RschReqd 0 20000 SPARE_RIBS -#expertise[19].Known.RschReqd 0 20000 KIDNEY_BEANS -#expertise[20].Known.RschReqd 0 20000 BROKEN_HEART -#expertise[21].Known.RschReqd 0 20000 RUPTURED_NODULES -#expertise[22].Known.RschReqd 0 40000 MULTIPLE_TV_PERSONALITIES -#expertise[23].Known.RschReqd 0 60000 INFECTIOUS_LAUGHTER -#expertise[24].Known.RschReqd 0 40000 CORRUGATED_ANKLES -#expertise[25].Known.RschReqd 0 40000 CHRONIC_NOSEHAIR -#expertise[26].Known.RschReqd 0 40000 3RD_DEGREE_SIDEBURNS -#expertise[27].Known.RschReqd 0 40000 FAKE_BLOOD -#expertise[28].Known.RschReqd 0 40000 GASTRIC_EJECTIONS -#expertise[29].Known.RschReqd 0 20000 THE_SQUITS -#expertise[30].Known.RschReqd 0 20000 IRON_LUNGS -#expertise[31].Known.RschReqd 0 40000 SWEATY_PALMS -#expertise[32].Known.RschReqd 0 20000 HEAPED_PILES -#expertise[33].Known.RschReqd 0 20000 GUT_ROT -#expertise[34].Known.RschReqd 0 20000 GOLF_STONES -#expertise[35].Known.RschReqd 0 20000 UNEXPECTED_SWELLING -#expertise[36].Known.RschReqd 1 40000 I_D_SCANNER DIAGNOSIS -#expertise[37].Known.RschReqd 1 50000 I_D_BLOOD_MACHINE DIAGNOSIS -#expertise[38].Known.RschReqd 1 20000 I_D_CARDIO DIAGNOSIS -#expertise[39].Known.RschReqd 1 30000 I_D_XRAY DIAGNOSIS -#expertise[40].Known.RschReqd 1 60000 I_D_ULTRASCAN DIAGNOSIS -#expertise[41].Known.RschReqd 1 20000 I_D_STANDARD DIAGNOSIS -#expertise[42].Known.RschReqd 1 20000 I_D_WARD DIAGNOSIS -#expertise[43].Known.RschReqd 1 20000 I_D_SHRINK DIAGNOSIS - -| Objects available | Available from the start | Strength | Available for this level | Comment -#objects[9].StartAvail.StartStrength.AvailableForLevel 1 8 1 Inflator Machine -#objects[13].StartAvail.StartStrength.AvailableForLevel 1 13 1 Cardiogram -#objects[14].StartAvail.StartStrength.AvailableForLevel 1 12 1 Scanner -#objects[22].StartAvail.StartStrength.AvailableForLevel 0 9 1 Ultrascan -#objects[23].StartAvail.StartStrength.AvailableForLevel 0 7 1 DNA Restorer -#objects[24].StartAvail.StartStrength.AvailableForLevel 1 11 1 Cast Remover -#objects[25].StartAvail.StartStrength.AvailableForLevel 0 8 1 Hair restorer -#objects[26].StartAvail.StartStrength.AvailableForLevel 1 10 1 Slicer for slack tongues -#objects[27].StartAvail.StartStrength.AvailableForLevel 0 12 1 X-Ray -#objects[30].StartAvail.StartStrength.AvailableForLevel 0 12 0 Operating Table -#objects[37].StartAvail.StartStrength.AvailableForLevel 0 0 0 Projector -#objects[42].StartAvail.StartStrength.AvailableForLevel 0 10 1 Blood Machine -#objects[46].StartAvail.StartStrength.AvailableForLevel 0 8 1 Electrolysis Machine -#objects[47].StartAvail.StartStrength.AvailableForLevel 0 7 1 Jellyitus Moulding Machine -#objects[54].StartAvail.StartStrength.AvailableForLevel 0 10 1 Decontamination Shower -#objects[55].StartAvail.StartStrength.AvailableForLevel 1 10 1 Autopsy Research Machine - -| Diseases available | Value property to be determined | Comment -#visuals[0] 1 I_BLOATY_HEAD -#visuals[1] 1 I_HAIRYITUS -#visuals[2] 1 I_ELVIS -#visuals[3] 1 I_INVIS -#visuals[4] 1 I_RADIATION -#visuals[5] 1 I_SLACK_TONGUE -#visuals[6] 1 I_ALIEN -#visuals[7] 1 I_BROKEN_BONES -#visuals[8] 1 I_BALDNESS -#visuals[9] 1 I_DISCRETE_ITCHING -#visuals[10] 1 I_JELLYITUS -#visuals[11] 1 I_SLEEPING_ILLNESS -#visuals[12] 1 I_PREGNANT -#visuals[13] 1 I_TRANSPARENCY -#non_visuals[0] 1 I_UNCOMMON_COLD -#non_visuals[1] 1 I_BROKEN_WIND -#non_visuals[2] 0 I_SPARE_RIBS -#non_visuals[3] 0 I_KIDNEY_BEANS -#non_visuals[4] 0 I_BROKEN_HEART -#non_visuals[5] 0 I_RUPTURED_NODULES -#non_visuals[6] 1 I_MULTIPLE_TV_PERSONALITIES -#non_visuals[7] 1 I_INFECTIOUS_LAUGHTER -#non_visuals[8] 1 I_CORRUGATED_ANKLES -#non_visuals[9] 1 I_CHRONIC_NOSEHAIR -#non_visuals[10] 1 I_3RD_DEGREE_SIDEBURNS -#non_visuals[11] 1 I_FAKE_BLOOD -#non_visuals[12] 1 I_GASTRIC_EJECTIONS -#non_visuals[13] 1 I_THE_SQUITS -#non_visuals[14] 0 I_IRON_LUNGS -#non_visuals[15] 1 I_SWEATY_PALMS -#non_visuals[16] 1 I_HEAPED_PILES -#non_visuals[17] 1 I_GUT_ROT -#non_visuals[18] 0 I_GOLF_STONES -#non_visuals[19] 0 I_UNEXPECTED_SWELLING - - ----------------------- Staff Configuration ------------------------- - -#start_staff[1].Doctor.Nurse.Handyman.Receptionist.Shrink.Surgeon.Researcher.Junior.Consultant.Skill 1 0 0 0 1 1 1 0 1 100 - -Each entry states how many staff members of each category are available -a given month. The number of entries is not fixed. -| A list | Month it gets active (start at 0) | Each group | -#staff_levels[0].Month.Nurses.Doctors.Handymen.Receptionists.ShrkRate.SurgRate.RschRate.ConsRate.JrRate 0 4 0 3 3 10 10 10 10 5 - -The minimum salary for each staff type -#staff[0].MinSalary 60 Nurse -#staff[1].MinSalary -100 Doctor -#staff[2].MinSalary 25 Handyman -#staff[3].MinSalary 20 Receptionist - -Salary modifiers for different doctor attributes -#gbv.SalaryAdd[3] 0 Junior -#gbv.SalaryAdd[4] 0 Doctor -#gbv.SalaryAdd[5] 0 Surgeon -#gbv.SalaryAdd[6] 0 Psychiatrist -#gbv.SalaryAdd[7] 0 Consultant -#gbv.SalaryAdd[8] 0 Researcher - -How much the skill of the doctor adds to the salary. skill * 1000 / divisor -#gbv.SalaryAbilityDivisor 10 - -#gbv.TrainingRate 40 -#gbv.AbilityThreshold[0] 75 Surgeon -#gbv.AbilityThreshold[1] 60 Psychiatrist -#gbv.AbilityThreshold[2] 45 Researcher -#gbv.TrainingValue[0] 10 Projector -#gbv.TrainingValue[1] 15 Skeleton -#gbv.TrainingValue[2] 20 Bookcase - ---------------------- Research Configuration ----------------------- - -Divides research input to get the amount of research points. must be > 0 -#gbv.ResearchPointsDivisor 1 - ----------------------- Awards and Trophies ------------------------- - -#awards_trophies.CansofCoke 200 -#awards_trophies.CansofCokeBonus 10000 -#awards_trophies.Reputation 850 -#awards_trophies.TrophyReputationBonus 20000 - ------------------- Winning and Losing Conditions ------------------- -1 Total reputation -2 Balance total -3 Percentage people your hospital has handled -4 Percentage people have been cured -5 Percentage people have been killed -6 Hospital value - -#win_criteria[0].Criteria.MaxMin.Value.Group.Bound 2 1 50000 1 0 -#win_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 - -#lose_criteria[0].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 - ---------------------- Competitor Information ----------------------- - -| Index in the away "computer" | Is that opponent playing? | 1 is yes, 0 no | Comment | -#computer[12].Playing 1 CORSIX -#computer[13].Playing 1 ROUJIN -#computer[14].Playing 1 EDVIN +Copyright (c) 2010 Manuel "Roujin" Wolf + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +Only lines beginning with % or # as explained below will be considered by the game. + +Each line beginning with a %-sign are directives to use when loading the game, such as what +the level is called and where to find the map file. Available commands: +- Name: What the level should be called (within quotes) +- LevelFile: The name of the binary map file to load. First the Levels directory of the + original game will be searched, and then the Levels directory of CorsixTH. + +Lines that begin with # defines all parameters for the level. By default there are no diseases +and only some basic rooms are available. Note that if a player is using the demo files +on the contrary everything is available unless specified otherwise in the level file. + + +---------------------- General Information ------------------------- +%Name = "Avatar" +%LevelFile = "avatar.map" + +Note that the below introduction text at the moment must reside on a single line within this file! +%LevelBriefing = "In this town, there are no doctors available for hire, so you have decided to take the matter into your own hands. Luckily, you happen to be a fully skilled consultant. Try to earn 50.000 - and don't worry too much about killing off your patients, you're only in for the money." + +Town properties +InterestRate is defined as centiprocent to allow for two decimals precision, i.e. +300 means 3 % +#town.StartCash.InterestRate 20000 300 + +-------------------- Disease Configuration ------------------------- + +When a drug is researched, what effectiveness does it have +#gbv.StartRating 100 + +The following table contains all diagnoses and treatments that shows up inte 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 +#expertise[2].Known.RschReqd 0 40000 BLOATY_HEAD +#expertise[3].Known.RschReqd 0 40000 HAIRYITUS +#expertise[4].Known.RschReqd 0 60000 ELVIS +#expertise[5].Known.RschReqd 0 60000 INVIS +#expertise[6].Known.RschReqd 0 60000 RADIATION +#expertise[7].Known.RschReqd 0 40000 SLACK_TONGUE +#expertise[8].Known.RschReqd 0 60000 ALIEN +#expertise[9].Known.RschReqd 0 20000 BROKEN_BONES +#expertise[10].Known.RschReqd 0 40000 BALDNESS +#expertise[11].Known.RschReqd 0 40000 DISCRETE_ITCHING +#expertise[12].Known.RschReqd 0 40000 JELLYITUS +#expertise[13].Known.RschReqd 0 40000 SLEEPING_ILLNESS +#expertise[14].Known.RschReqd 0 30000 PREGNANT +#expertise[15].Known.RschReqd 0 40000 TRANSPARENCY +#expertise[16].Known.RschReqd 0 20000 UNCOMMON_COLD +#expertise[17].Known.RschReqd 0 60000 BROKEN_WIND +#expertise[18].Known.RschReqd 0 20000 SPARE_RIBS +#expertise[19].Known.RschReqd 0 20000 KIDNEY_BEANS +#expertise[20].Known.RschReqd 0 20000 BROKEN_HEART +#expertise[21].Known.RschReqd 0 20000 RUPTURED_NODULES +#expertise[22].Known.RschReqd 0 40000 MULTIPLE_TV_PERSONALITIES +#expertise[23].Known.RschReqd 0 60000 INFECTIOUS_LAUGHTER +#expertise[24].Known.RschReqd 0 40000 CORRUGATED_ANKLES +#expertise[25].Known.RschReqd 0 40000 CHRONIC_NOSEHAIR +#expertise[26].Known.RschReqd 0 40000 3RD_DEGREE_SIDEBURNS +#expertise[27].Known.RschReqd 0 40000 FAKE_BLOOD +#expertise[28].Known.RschReqd 0 40000 GASTRIC_EJECTIONS +#expertise[29].Known.RschReqd 0 20000 THE_SQUITS +#expertise[30].Known.RschReqd 0 20000 IRON_LUNGS +#expertise[31].Known.RschReqd 0 40000 SWEATY_PALMS +#expertise[32].Known.RschReqd 0 20000 HEAPED_PILES +#expertise[33].Known.RschReqd 0 20000 GUT_ROT +#expertise[34].Known.RschReqd 0 20000 GOLF_STONES +#expertise[35].Known.RschReqd 0 20000 UNEXPECTED_SWELLING +#expertise[36].Known.RschReqd 1 40000 I_D_SCANNER DIAGNOSIS +#expertise[37].Known.RschReqd 1 50000 I_D_BLOOD_MACHINE DIAGNOSIS +#expertise[38].Known.RschReqd 1 20000 I_D_CARDIO DIAGNOSIS +#expertise[39].Known.RschReqd 1 30000 I_D_XRAY DIAGNOSIS +#expertise[40].Known.RschReqd 1 60000 I_D_ULTRASCAN DIAGNOSIS +#expertise[41].Known.RschReqd 1 20000 I_D_STANDARD DIAGNOSIS +#expertise[42].Known.RschReqd 1 20000 I_D_WARD DIAGNOSIS +#expertise[43].Known.RschReqd 1 20000 I_D_SHRINK DIAGNOSIS + +| Objects available | Available from the start | Strength | Available for this level | Comment +#objects[9].StartAvail.StartStrength.AvailableForLevel 1 8 1 Inflator Machine +#objects[13].StartAvail.StartStrength.AvailableForLevel 1 13 1 Cardiogram +#objects[14].StartAvail.StartStrength.AvailableForLevel 1 12 1 Scanner +#objects[22].StartAvail.StartStrength.AvailableForLevel 0 9 1 Ultrascan +#objects[23].StartAvail.StartStrength.AvailableForLevel 0 7 1 DNA Restorer +#objects[24].StartAvail.StartStrength.AvailableForLevel 1 11 1 Cast Remover +#objects[25].StartAvail.StartStrength.AvailableForLevel 0 8 1 Hair restorer +#objects[26].StartAvail.StartStrength.AvailableForLevel 1 10 1 Slicer for slack tongues +#objects[27].StartAvail.StartStrength.AvailableForLevel 0 12 1 X-Ray +#objects[30].StartAvail.StartStrength.AvailableForLevel 0 12 0 Operating Table +#objects[37].StartAvail.StartStrength.AvailableForLevel 0 0 0 Projector +#objects[42].StartAvail.StartStrength.AvailableForLevel 0 10 1 Blood Machine +#objects[46].StartAvail.StartStrength.AvailableForLevel 0 8 1 Electrolysis Machine +#objects[47].StartAvail.StartStrength.AvailableForLevel 0 7 1 Jellyitus Moulding Machine +#objects[54].StartAvail.StartStrength.AvailableForLevel 0 10 1 Decontamination Shower +#objects[55].StartAvail.StartStrength.AvailableForLevel 1 10 1 Autopsy Research Machine + +| Diseases available | Value property to be determined | Comment +#visuals[0] 1 I_BLOATY_HEAD +#visuals[1] 1 I_HAIRYITUS +#visuals[2] 1 I_ELVIS +#visuals[3] 1 I_INVIS +#visuals[4] 1 I_RADIATION +#visuals[5] 1 I_SLACK_TONGUE +#visuals[6] 1 I_ALIEN +#visuals[7] 1 I_BROKEN_BONES +#visuals[8] 1 I_BALDNESS +#visuals[9] 1 I_DISCRETE_ITCHING +#visuals[10] 1 I_JELLYITUS +#visuals[11] 1 I_SLEEPING_ILLNESS +#visuals[12] 1 I_PREGNANT +#visuals[13] 1 I_TRANSPARENCY +#non_visuals[0] 1 I_UNCOMMON_COLD +#non_visuals[1] 1 I_BROKEN_WIND +#non_visuals[2] 0 I_SPARE_RIBS +#non_visuals[3] 0 I_KIDNEY_BEANS +#non_visuals[4] 0 I_BROKEN_HEART +#non_visuals[5] 0 I_RUPTURED_NODULES +#non_visuals[6] 1 I_MULTIPLE_TV_PERSONALITIES +#non_visuals[7] 1 I_INFECTIOUS_LAUGHTER +#non_visuals[8] 1 I_CORRUGATED_ANKLES +#non_visuals[9] 1 I_CHRONIC_NOSEHAIR +#non_visuals[10] 1 I_3RD_DEGREE_SIDEBURNS +#non_visuals[11] 1 I_FAKE_BLOOD +#non_visuals[12] 1 I_GASTRIC_EJECTIONS +#non_visuals[13] 1 I_THE_SQUITS +#non_visuals[14] 0 I_IRON_LUNGS +#non_visuals[15] 1 I_SWEATY_PALMS +#non_visuals[16] 1 I_HEAPED_PILES +#non_visuals[17] 1 I_GUT_ROT +#non_visuals[18] 0 I_GOLF_STONES +#non_visuals[19] 0 I_UNEXPECTED_SWELLING + + +---------------------- Staff Configuration ------------------------- + +#start_staff[1].Doctor.Nurse.Handyman.Receptionist.Shrink.Surgeon.Researcher.Junior.Consultant.Skill 1 0 0 0 1 1 1 0 1 100 + +Each entry states how many staff members of each category are available +a given month. The number of entries is not fixed. +| A list | Month it gets active (start at 0) | Each group | +#staff_levels[0].Month.Nurses.Doctors.Handymen.Receptionists.ShrkRate.SurgRate.RschRate.ConsRate.JrRate 0 4 0 3 3 10 10 10 10 5 + +The minimum salary for each staff type +#staff[0].MinSalary 60 Nurse +#staff[1].MinSalary -100 Doctor +#staff[2].MinSalary 25 Handyman +#staff[3].MinSalary 20 Receptionist + +Salary modifiers for different doctor attributes +#gbv.SalaryAdd[3] 0 Junior +#gbv.SalaryAdd[4] 0 Doctor +#gbv.SalaryAdd[5] 0 Surgeon +#gbv.SalaryAdd[6] 0 Psychiatrist +#gbv.SalaryAdd[7] 0 Consultant +#gbv.SalaryAdd[8] 0 Researcher + +How much the skill of the doctor adds to the salary. skill * 1000 / divisor +#gbv.SalaryAbilityDivisor 10 + +#gbv.TrainingRate 40 +#gbv.AbilityThreshold[0] 75 Surgeon +#gbv.AbilityThreshold[1] 60 Psychiatrist +#gbv.AbilityThreshold[2] 45 Researcher +#gbv.TrainingValue[0] 10 Projector +#gbv.TrainingValue[1] 15 Skeleton +#gbv.TrainingValue[2] 20 Bookcase + +--------------------- Research Configuration ----------------------- + +Divides research input to get the amount of research points. must be > 0 +#gbv.ResearchPointsDivisor 1 + +---------------------- Awards and Trophies ------------------------- + +#awards_trophies.CansofCoke 200 +#awards_trophies.CansofCokeBonus 10000 +#awards_trophies.Reputation 850 +#awards_trophies.TrophyReputationBonus 20000 + +------------------ Winning and Losing Conditions ------------------- +1 Total reputation +2 Balance total +3 Percentage people your hospital has handled +4 Percentage people have been cured +5 Percentage people have been killed +6 Hospital value + +#win_criteria[0].Criteria.MaxMin.Value.Group.Bound 2 1 50000 1 0 +#win_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 + +#lose_criteria[0].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 + +--------------------- Competitor Information ----------------------- + +| Index in the away "computer" | Is that opponent playing? | 1 is yes, 0 no | Comment | +#computer[12].Playing 1 CORSIX +#computer[13].Playing 1 ROUJIN +#computer[14].Playing 1 EDVIN diff --git a/CorsixTH/Levels/demo.level b/CorsixTH/Levels/demo.level index 8d350551..d3e079e3 100644 --- a/CorsixTH/Levels/demo.level +++ b/CorsixTH/Levels/demo.level @@ -1,108 +1,108 @@ -Copyright (c) 2010 Edvin "Lego3" Linge - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - ----------------------- General Information ------------------------- -%Name = "Demo Town" -%LevelFile = "LEVEL.L1" - -#town.StartCash 60000 - --------------------- Disease Configuration ------------------------- - -When a drug is researched, what effectiveness does it have -#gbv.StartRating 100 - -#expertise[2].Known.RschReqd 1 40000 BLOATY_HEAD -#expertise[4].Known.RschReqd 1 60000 ELVIS -#expertise[5].Known.RschReqd 1 60000 INVIS -#expertise[7].Known.RschReqd 0 40000 SLACK_TONGUE -#expertise[10].Known.RschReqd 0 40000 BALDNESS -#expertise[11].Known.RschReqd 1 40000 DISCRETE_ITCHING -#expertise[13].Known.RschReqd 0 40000 SLEEPING_ILLNESS -#expertise[15].Known.RschReqd 0 40000 TRANSPARENCY -#expertise[16].Known.RschReqd 0 20000 UNCOMMON_COLD -#expertise[17].Known.RschReqd 0 60000 BROKEN_WIND -#expertise[18].Known.RschReqd 0 20000 SPARE_RIBS -#expertise[19].Known.RschReqd 0 20000 KIDNEY_BEANS -#expertise[20].Known.RschReqd 0 20000 BROKEN_HEART -#expertise[22].Known.RschReqd 1 40000 MULTIPLE_TV_PERSONALITIES -#expertise[23].Known.RschReqd 0 60000 INFECTIOUS_LAUGHTER -#expertise[24].Known.RschReqd 0 40000 CORRUGATED_ANKLES -#expertise[25].Known.RschReqd 0 40000 CHRONIC_NOSEHAIR -#expertise[28].Known.RschReqd 0 40000 GASTRIC_EJECTIONS -#expertise[29].Known.RschReqd 0 20000 THE_SQUITS -#expertise[31].Known.RschReqd 0 40000 SWEATY_PALMS -#expertise[32].Known.RschReqd 0 20000 HEAPED_PILES -#expertise[33].Known.RschReqd 0 20000 GUT_ROT -#expertise[34].Known.RschReqd 0 20000 GOLF_STONES -#expertise[35].Known.RschReqd 0 20000 UNEXPECTED_SWELLING -#expertise[36].Known.RschReqd 1 40000 I_D_SCANNER DIAGNOSIS -#expertise[38].Known.RschReqd 1 20000 I_D_CARDIO DIAGNOSIS -#expertise[39].Known.RschReqd 0 30000 I_D_XRAY DIAGNOSIS -#expertise[41].Known.RschReqd 1 20000 I_D_STANDARD DIAGNOSIS -#expertise[42].Known.RschReqd 1 20000 I_D_WARD DIAGNOSIS -#expertise[43].Known.RschReqd 1 20000 I_D_SHRINK DIAGNOSIS - -#objects[9].StartAvail.StartStrength.AvailableForLevel 1 8 1 Inflator Machine -#objects[13].StartAvail.StartStrength.AvailableForLevel 1 13 1 Cardiogram -#objects[14].StartAvail.StartStrength.AvailableForLevel 0 12 1 Scanner -#objects[25].StartAvail.StartStrength.AvailableForLevel 0 8 1 Hair restorer -#objects[26].StartAvail.StartStrength.AvailableForLevel 1 10 1 Slicer for slack tongues -#objects[27].StartAvail.StartStrength.AvailableForLevel 0 12 1 X-Ray -#objects[30].StartAvail.StartStrength.AvailableForLevel 0 12 1 Operating Table -#objects[55].StartAvail.StartStrength.AvailableForLevel 1 10 1 Autopsy Research Machine - -#visuals[0] 1 I_BLOATY_HEAD -#visuals[2] 1 I_ELVIS -#visuals[3] 1 I_INVIS -#visuals[5] 1 I_SLACK_TONGUE -#visuals[8] 1 I_BALDNESS -#visuals[9] 1 I_DISCRETE_ITCHING -#visuals[11] 1 I_SLEEPING_ILLNESS -#visuals[13] 1 I_TRANSPARENCY -#non_visuals[0] 1 I_UNCOMMON_COLD -#non_visuals[1] 1 I_BROKEN_WIND -#non_visuals[2] 1 I_SPARE_RIBS -#non_visuals[3] 1 I_KIDNEY_BEANS -#non_visuals[4] 1 I_BROKEN_HEART -#non_visuals[6] 1 I_MULTIPLE_TV_PERSONALITIES -#non_visuals[7] 1 I_INFECTIOUS_LAUGHTER -#non_visuals[8] 1 I_CORRUGATED_ANKLES -#non_visuals[9] 1 I_CHRONIC_NOSEHAIR -#non_visuals[12] 1 I_GASTRIC_EJECTIONS -#non_visuals[13] 1 I_THE_SQUITS -#non_visuals[15] 1 I_SWEATY_PALMS -#non_visuals[16] 1 I_HEAPED_PILES -#non_visuals[17] 1 I_GUT_ROT -#non_visuals[19] 1 I_UNEXPECTED_SWELLING - -#win_criteria[0].Criteria.MaxMin.Value.Group.Bound 1 1 700 1 0 -#win_criteria[1].Criteria.MaxMin.Value.Group.Bound 2 1 100000 1 0 -#win_criteria[2].Criteria.MaxMin.Value.Group.Bound 3 1 75 1 0 -#win_criteria[3].Criteria.MaxMin.Value.Group.Bound 6 1 70000 1 0 - -#lose_criteria[0].Criteria.MaxMin.Value.Group.Bound 1 0 300 1 350 -#lose_criteria[1].Criteria.MaxMin.Value.Group.Bound 5 1 40 2 0 - ---------------------- Competitor Information ----------------------- - -#computer[12].Playing 1 CORSIX -#computer[13].Playing 1 ROUJIN -#computer[14].Playing 1 EDVIN +Copyright (c) 2010 Edvin "Lego3" Linge + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +---------------------- General Information ------------------------- +%Name = "Demo Town" +%LevelFile = "LEVEL.L1" + +#town.StartCash 60000 + +-------------------- Disease Configuration ------------------------- + +When a drug is researched, what effectiveness does it have +#gbv.StartRating 100 + +#expertise[2].Known.RschReqd 1 40000 BLOATY_HEAD +#expertise[4].Known.RschReqd 1 60000 ELVIS +#expertise[5].Known.RschReqd 1 60000 INVIS +#expertise[7].Known.RschReqd 0 40000 SLACK_TONGUE +#expertise[10].Known.RschReqd 0 40000 BALDNESS +#expertise[11].Known.RschReqd 1 40000 DISCRETE_ITCHING +#expertise[13].Known.RschReqd 0 40000 SLEEPING_ILLNESS +#expertise[15].Known.RschReqd 0 40000 TRANSPARENCY +#expertise[16].Known.RschReqd 0 20000 UNCOMMON_COLD +#expertise[17].Known.RschReqd 0 60000 BROKEN_WIND +#expertise[18].Known.RschReqd 0 20000 SPARE_RIBS +#expertise[19].Known.RschReqd 0 20000 KIDNEY_BEANS +#expertise[20].Known.RschReqd 0 20000 BROKEN_HEART +#expertise[22].Known.RschReqd 1 40000 MULTIPLE_TV_PERSONALITIES +#expertise[23].Known.RschReqd 0 60000 INFECTIOUS_LAUGHTER +#expertise[24].Known.RschReqd 0 40000 CORRUGATED_ANKLES +#expertise[25].Known.RschReqd 0 40000 CHRONIC_NOSEHAIR +#expertise[28].Known.RschReqd 0 40000 GASTRIC_EJECTIONS +#expertise[29].Known.RschReqd 0 20000 THE_SQUITS +#expertise[31].Known.RschReqd 0 40000 SWEATY_PALMS +#expertise[32].Known.RschReqd 0 20000 HEAPED_PILES +#expertise[33].Known.RschReqd 0 20000 GUT_ROT +#expertise[34].Known.RschReqd 0 20000 GOLF_STONES +#expertise[35].Known.RschReqd 0 20000 UNEXPECTED_SWELLING +#expertise[36].Known.RschReqd 1 40000 I_D_SCANNER DIAGNOSIS +#expertise[38].Known.RschReqd 1 20000 I_D_CARDIO DIAGNOSIS +#expertise[39].Known.RschReqd 0 30000 I_D_XRAY DIAGNOSIS +#expertise[41].Known.RschReqd 1 20000 I_D_STANDARD DIAGNOSIS +#expertise[42].Known.RschReqd 1 20000 I_D_WARD DIAGNOSIS +#expertise[43].Known.RschReqd 1 20000 I_D_SHRINK DIAGNOSIS + +#objects[9].StartAvail.StartStrength.AvailableForLevel 1 8 1 Inflator Machine +#objects[13].StartAvail.StartStrength.AvailableForLevel 1 13 1 Cardiogram +#objects[14].StartAvail.StartStrength.AvailableForLevel 0 12 1 Scanner +#objects[25].StartAvail.StartStrength.AvailableForLevel 0 8 1 Hair restorer +#objects[26].StartAvail.StartStrength.AvailableForLevel 1 10 1 Slicer for slack tongues +#objects[27].StartAvail.StartStrength.AvailableForLevel 0 12 1 X-Ray +#objects[30].StartAvail.StartStrength.AvailableForLevel 0 12 1 Operating Table +#objects[55].StartAvail.StartStrength.AvailableForLevel 1 10 1 Autopsy Research Machine + +#visuals[0] 1 I_BLOATY_HEAD +#visuals[2] 1 I_ELVIS +#visuals[3] 1 I_INVIS +#visuals[5] 1 I_SLACK_TONGUE +#visuals[8] 1 I_BALDNESS +#visuals[9] 1 I_DISCRETE_ITCHING +#visuals[11] 1 I_SLEEPING_ILLNESS +#visuals[13] 1 I_TRANSPARENCY +#non_visuals[0] 1 I_UNCOMMON_COLD +#non_visuals[1] 1 I_BROKEN_WIND +#non_visuals[2] 1 I_SPARE_RIBS +#non_visuals[3] 1 I_KIDNEY_BEANS +#non_visuals[4] 1 I_BROKEN_HEART +#non_visuals[6] 1 I_MULTIPLE_TV_PERSONALITIES +#non_visuals[7] 1 I_INFECTIOUS_LAUGHTER +#non_visuals[8] 1 I_CORRUGATED_ANKLES +#non_visuals[9] 1 I_CHRONIC_NOSEHAIR +#non_visuals[12] 1 I_GASTRIC_EJECTIONS +#non_visuals[13] 1 I_THE_SQUITS +#non_visuals[15] 1 I_SWEATY_PALMS +#non_visuals[16] 1 I_HEAPED_PILES +#non_visuals[17] 1 I_GUT_ROT +#non_visuals[19] 1 I_UNEXPECTED_SWELLING + +#win_criteria[0].Criteria.MaxMin.Value.Group.Bound 1 1 700 1 0 +#win_criteria[1].Criteria.MaxMin.Value.Group.Bound 2 1 100000 1 0 +#win_criteria[2].Criteria.MaxMin.Value.Group.Bound 3 1 75 1 0 +#win_criteria[3].Criteria.MaxMin.Value.Group.Bound 6 1 70000 1 0 + +#lose_criteria[0].Criteria.MaxMin.Value.Group.Bound 1 0 300 1 350 +#lose_criteria[1].Criteria.MaxMin.Value.Group.Bound 5 1 40 2 0 + +--------------------- Competitor Information ----------------------- + +#computer[12].Playing 1 CORSIX +#computer[13].Playing 1 ROUJIN +#computer[14].Playing 1 EDVIN diff --git a/CorsixTH/Levels/example.level b/CorsixTH/Levels/example.level index 26f9029b..3de6df4d 100644 --- a/CorsixTH/Levels/example.level +++ b/CorsixTH/Levels/example.level @@ -1,231 +1,231 @@ -Copyright (c) 2010 Edvin "Lego3" Linge - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - -Only lines beginning with % or # as explained below will be considered by the game. - -Each line beginning with a %-sign are directives to use when loading the game, such as what -the level is called and where to find the map file. Available commands: -- Name: What the level should be called (within quotes) -- LevelFile: The name of the binary map file to load. First the Levels directory of the - original game will be searched, and then the Levels directory of CorsixTH. - -Lines that begin with # defines all parameters for the level. By default there are no diseases -and only some basic rooms are available. - - ----------------------- General Information ------------------------- -%Name = "Example Town" -%LevelFile = "Example.map" - -Note that the below introduction text at the moment must reside on a single line within this file! -%LevelBriefing = "This is an example map that shows aspiring map makers what can be done when making new fantastic creations!" - -Town properties -InterestRate is defined as centiprocent to allow for two decimals precision, i.e. -300 means 3 % -#town.StartCash.InterestRate 100000 300 - --------------------- Disease Configuration ------------------------- - -When a drug is researched, what effectiveness does it have -#gbv.StartRating 100 - -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, MaxDiagDiff is how hard it is to diagnose (don't apply to diag rooms). -#expertise[1].Known.RschReqd 1 0 GENERAL_PRACTICE -#expertise[2].Known.RschReqd.MaxDiagDiff 1 40000 500 BLOATY_HEAD -#expertise[3].Known.RschReqd.MaxDiagDiff 1 40000 150 HAIRYITUS -#expertise[4].Known.RschReqd.MaxDiagDiff 1 60000 150 ELVIS -#expertise[5].Known.RschReqd.MaxDiagDiff 1 60000 150 INVIS -#expertise[6].Known.RschReqd.MaxDiagDiff 1 60000 750 RADIATION -#expertise[7].Known.RschReqd.MaxDiagDiff 1 40000 150 SLACK_TONGUE -#expertise[8].Known.RschReqd.MaxDiagDiff 1 60000 350 ALIEN -#expertise[9].Known.RschReqd.MaxDiagDiff 1 20000 100 BROKEN_BONES -#expertise[10].Known.RschReqd.MaxDiagDiff 1 40000 150 BALDNESS -#expertise[11].Known.RschReqd.MaxDiagDiff 1 40000 500 DISCRETE_ITCHING -#expertise[12].Known.RschReqd.MaxDiagDiff 1 40000 450 JELLYITUS -#expertise[13].Known.RschReqd.MaxDiagDiff 1 40000 500 SLEEPING_ILLNESS -#expertise[14].Known.RschReqd.MaxDiagDiff 1 30000 300 PREGNANT -#expertise[15].Known.RschReqd.MaxDiagDiff 1 40000 250 TRANSPARENCY -#expertise[16].Known.RschReqd.MaxDiagDiff 1 20000 250 UNCOMMON_COLD -#expertise[17].Known.RschReqd.MaxDiagDiff 1 60000 750 BROKEN_WIND -#expertise[18].Known.RschReqd.MaxDiagDiff 1 20000 250 SPARE_RIBS -#expertise[19].Known.RschReqd.MaxDiagDiff 1 20000 500 KIDNEY_BEANS -#expertise[20].Known.RschReqd.MaxDiagDiff 1 20000 500 BROKEN_HEART -#expertise[21].Known.RschReqd.MaxDiagDiff 1 20000 600 RUPTURED_NODULES -#expertise[22].Known.RschReqd.MaxDiagDiff 1 40000 250 MULTIPLE_TV_PERSONALITIES -#expertise[23].Known.RschReqd.MaxDiagDiff 1 60000 250 INFECTIOUS_LAUGHTER -#expertise[24].Known.RschReqd.MaxDiagDiff 1 40000 500 CORRUGATED_ANKLES -#expertise[25].Known.RschReqd.MaxDiagDiff 1 40000 600 CHRONIC_NOSEHAIR -#expertise[26].Known.RschReqd.MaxDiagDiff 1 40000 300 3RD_DEGREE_SIDEBURNS -#expertise[27].Known.RschReqd.MaxDiagDiff 1 40000 300 FAKE_BLOOD -#expertise[28].Known.RschReqd.MaxDiagDiff 1 40000 500 GASTRIC_EJECTIONS -#expertise[29].Known.RschReqd.MaxDiagDiff 1 20000 750 THE_SQUITS -#expertise[30].Known.RschReqd.MaxDiagDiff 1 20000 700 IRON_LUNGS -#expertise[31].Known.RschReqd.MaxDiagDiff 1 40000 750 SWEATY_PALMS -#expertise[32].Known.RschReqd.MaxDiagDiff 1 20000 500 HEAPED_PILES -#expertise[33].Known.RschReqd.MaxDiagDiff 1 20000 750 GUT_ROT -#expertise[34].Known.RschReqd.MaxDiagDiff 1 20000 500 GOLF_STONES -#expertise[35].Known.RschReqd.MaxDiagDiff 1 20000 500 UNEXPECTED_SWELLING -#expertise[36].Known.RschReqd 1 40000 I_D_SCANNER DIAGNOSIS -#expertise[37].Known.RschReqd 1 50000 I_D_BLOOD_MACHINE DIAGNOSIS -#expertise[38].Known.RschReqd 1 20000 I_D_CARDIO DIAGNOSIS -#expertise[39].Known.RschReqd 1 30000 I_D_XRAY DIAGNOSIS -#expertise[40].Known.RschReqd 1 60000 I_D_ULTRASCAN DIAGNOSIS -#expertise[41].Known.RschReqd 1 20000 I_D_STANDARD DIAGNOSIS -#expertise[42].Known.RschReqd 1 20000 I_D_WARD DIAGNOSIS -#expertise[43].Known.RschReqd 1 20000 I_D_SHRINK DIAGNOSIS - -| Objects available | Available from the start | Strength | Available for this level | Comment -#objects[9].StartAvail.StartStrength.AvailableForLevel 1 8 1 Inflator Machine -#objects[13].StartAvail.StartStrength.AvailableForLevel 1 13 1 Cardiogram -#objects[14].StartAvail.StartStrength.AvailableForLevel 1 12 1 Scanner -#objects[22].StartAvail.StartStrength.AvailableForLevel 1 9 1 Ultrascan -#objects[23].StartAvail.StartStrength.AvailableForLevel 1 7 1 DNA Restorer -#objects[24].StartAvail.StartStrength.AvailableForLevel 1 11 1 Cast Remover -#objects[25].StartAvail.StartStrength.AvailableForLevel 1 8 1 Hair restorer -#objects[26].StartAvail.StartStrength.AvailableForLevel 1 10 1 Slicer for slack tongues -#objects[27].StartAvail.StartStrength.AvailableForLevel 1 12 1 X-Ray -#objects[30].StartAvail.StartStrength.AvailableForLevel 1 12 1 Operating Table -#objects[37].StartAvail.StartStrength.AvailableForLevel 1 0 1 Projector -#objects[42].StartAvail.StartStrength.AvailableForLevel 1 10 1 Blood Machine -#objects[46].StartAvail.StartStrength.AvailableForLevel 1 8 1 Electrolysis Machine -#objects[47].StartAvail.StartStrength.AvailableForLevel 1 7 1 Jellyitus Moulding Machine -#objects[54].StartAvail.StartStrength.AvailableForLevel 1 10 1 Decontamination Shower -#objects[55].StartAvail.StartStrength.AvailableForLevel 1 10 1 Autopsy Research Machine - -| Diseases available | Value property to be determined | Comment -#visuals[0] 1 I_BLOATY_HEAD -#visuals[1] 1 I_HAIRYITUS -#visuals[2] 1 I_ELVIS -#visuals[3] 1 I_INVIS -#visuals[4] 1 I_RADIATION -#visuals[5] 1 I_SLACK_TONGUE -#visuals[6] 1 I_ALIEN -#visuals[7] 1 I_BROKEN_BONES -#visuals[8] 1 I_BALDNESS -#visuals[9] 1 I_DISCRETE_ITCHING -#visuals[10] 1 I_JELLYITUS -#visuals[11] 1 I_SLEEPING_ILLNESS -#visuals[12] 1 I_PREGNANT -#visuals[13] 1 I_TRANSPARENCY -#non_visuals[0] 1 I_UNCOMMON_COLD -#non_visuals[1] 1 I_BROKEN_WIND -#non_visuals[2] 1 I_SPARE_RIBS -#non_visuals[3] 1 I_KIDNEY_BEANS -#non_visuals[4] 1 I_BROKEN_HEART -#non_visuals[5] 1 I_RUPTURED_NODULES -#non_visuals[6] 1 I_MULTIPLE_TV_PERSONALITIES -#non_visuals[7] 1 I_INFECTIOUS_LAUGHTER -#non_visuals[8] 1 I_CORRUGATED_ANKLES -#non_visuals[9] 1 I_CHRONIC_NOSEHAIR -#non_visuals[10] 1 I_3RD_DEGREE_SIDEBURNS -#non_visuals[11] 1 I_FAKE_BLOOD -#non_visuals[12] 1 I_GASTRIC_EJECTIONS -#non_visuals[13] 1 I_THE_SQUITS -#non_visuals[14] 1 I_IRON_LUNGS -#non_visuals[15] 1 I_SWEATY_PALMS -#non_visuals[16] 1 I_HEAPED_PILES -#non_visuals[17] 1 I_GUT_ROT -#non_visuals[18] 1 I_GOLF_STONES -#non_visuals[19] 1 I_UNEXPECTED_SWELLING - - ----------------------- Staff Configuration ------------------------- - -Each entry states how many staff members of each category are available -a given month. The number of entries is not fixed. -| A list | Month it gets active (start at 0) | Each group | -#staff_levels[0].Month.Nurses.Doctors.Handymen.Receptionists.ShrkRate.SurgRate.RschRate.ConsRate.JrRate 0 8 8 3 2 10 10 10 10 5 -#staff_levels[1].Month.Nurses.Doctors.Handymen.Receptionists 3 7 5 5 3 -#staff_levels[2].Month.Nurses.Doctors.Handymen.Receptionists 5 5 8 7 4 - -The minimum salary for each staff type -#staff[0].MinSalary 60 Nurse -#staff[1].MinSalary 75 Doctor -#staff[2].MinSalary 25 Handyman -#staff[3].MinSalary 20 Receptionist - -Salary modifiers for different doctor attributes -#gbv.SalaryAdd[3] -30 Junior -#gbv.SalaryAdd[4] 30 Doctor -#gbv.SalaryAdd[5] 40 Surgeon -#gbv.SalaryAdd[6] 30 Psychiatrist -#gbv.SalaryAdd[7] 100 Consultant -#gbv.SalaryAdd[8] 20 Researcher - -How much the skill of the doctor adds to the salary. skill * 1000 / divisor -#gbv.SalaryAbilityDivisor 10 - -#gbv.TrainingRate 40 -#gbv.AbilityThreshold[0] 75 Surgeon -#gbv.AbilityThreshold[1] 60 Psychiatrist -#gbv.AbilityThreshold[2] 45 Researcher -#gbv.TrainingValue[0] 10 Projector -#gbv.TrainingValue[1] 15 Skeleton -#gbv.TrainingValue[2] 20 Bookcase - ---------------------- Research Configuration ----------------------- - -Divides research input to get the amount of research points. must be > 0 -#gbv.ResearchPointsDivisor 5 - ----------------------- Awards and Trophies ------------------------- - -#awards_trophies.CansofCoke 200 -#awards_trophies.CansofCokeBonus 10000 -#awards_trophies.Reputation 850 -#awards_trophies.TrophyReputationBonus 20000 - ------------------- Winning and Losing Conditions ------------------- -But we don't want any such conditions on the example level! -1 Total reputation -2 Balance total -3 Percentage people your hospital has handled -4 Percentage people have been cured -5 Percentage people have been killed -6 Hospital value - -#win_criteria[0].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#win_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 - -#lose_criteria[0].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 -#lose_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 - ---------------------- Competitor Information ----------------------- - -| Index in the away "computer" | Is that opponent playing? | 1 is yes, 0 no | Comment | -#computer[12].Playing 1 CORSIX -#computer[13].Playing 1 ROUJIN -#computer[14].Playing 1 EDVIN - ------------------------ Emergency Control -------------------------- - -#emergency_control[0].StartMonth.EndMonth.Min.Max.Illness.PercWin.Bonus 4 5 4 6 16 75 400 -#emergency_control[1].StartMonth.EndMonth.Min.Max.Illness.PercWin.Bonus 8 10 3 5 32 75 500 +Copyright (c) 2010 Edvin "Lego3" Linge + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +Only lines beginning with % or # as explained below will be considered by the game. + +Each line beginning with a %-sign are directives to use when loading the game, such as what +the level is called and where to find the map file. Available commands: +- Name: What the level should be called (within quotes) +- LevelFile: The name of the binary map file to load. First the Levels directory of the + original game will be searched, and then the Levels directory of CorsixTH. + +Lines that begin with # defines all parameters for the level. By default there are no diseases +and only some basic rooms are available. + + +---------------------- General Information ------------------------- +%Name = "Example Town" +%LevelFile = "Example.map" + +Note that the below introduction text at the moment must reside on a single line within this file! +%LevelBriefing = "This is an example map that shows aspiring map makers what can be done when making new fantastic creations!" + +Town properties +InterestRate is defined as centiprocent to allow for two decimals precision, i.e. +300 means 3 % +#town.StartCash.InterestRate 100000 300 + +-------------------- Disease Configuration ------------------------- + +When a drug is researched, what effectiveness does it have +#gbv.StartRating 100 + +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, MaxDiagDiff is how hard it is to diagnose (don't apply to diag rooms). +#expertise[1].Known.RschReqd 1 0 GENERAL_PRACTICE +#expertise[2].Known.RschReqd.MaxDiagDiff 1 40000 500 BLOATY_HEAD +#expertise[3].Known.RschReqd.MaxDiagDiff 1 40000 150 HAIRYITUS +#expertise[4].Known.RschReqd.MaxDiagDiff 1 60000 150 ELVIS +#expertise[5].Known.RschReqd.MaxDiagDiff 1 60000 150 INVIS +#expertise[6].Known.RschReqd.MaxDiagDiff 1 60000 750 RADIATION +#expertise[7].Known.RschReqd.MaxDiagDiff 1 40000 150 SLACK_TONGUE +#expertise[8].Known.RschReqd.MaxDiagDiff 1 60000 350 ALIEN +#expertise[9].Known.RschReqd.MaxDiagDiff 1 20000 100 BROKEN_BONES +#expertise[10].Known.RschReqd.MaxDiagDiff 1 40000 150 BALDNESS +#expertise[11].Known.RschReqd.MaxDiagDiff 1 40000 500 DISCRETE_ITCHING +#expertise[12].Known.RschReqd.MaxDiagDiff 1 40000 450 JELLYITUS +#expertise[13].Known.RschReqd.MaxDiagDiff 1 40000 500 SLEEPING_ILLNESS +#expertise[14].Known.RschReqd.MaxDiagDiff 1 30000 300 PREGNANT +#expertise[15].Known.RschReqd.MaxDiagDiff 1 40000 250 TRANSPARENCY +#expertise[16].Known.RschReqd.MaxDiagDiff 1 20000 250 UNCOMMON_COLD +#expertise[17].Known.RschReqd.MaxDiagDiff 1 60000 750 BROKEN_WIND +#expertise[18].Known.RschReqd.MaxDiagDiff 1 20000 250 SPARE_RIBS +#expertise[19].Known.RschReqd.MaxDiagDiff 1 20000 500 KIDNEY_BEANS +#expertise[20].Known.RschReqd.MaxDiagDiff 1 20000 500 BROKEN_HEART +#expertise[21].Known.RschReqd.MaxDiagDiff 1 20000 600 RUPTURED_NODULES +#expertise[22].Known.RschReqd.MaxDiagDiff 1 40000 250 MULTIPLE_TV_PERSONALITIES +#expertise[23].Known.RschReqd.MaxDiagDiff 1 60000 250 INFECTIOUS_LAUGHTER +#expertise[24].Known.RschReqd.MaxDiagDiff 1 40000 500 CORRUGATED_ANKLES +#expertise[25].Known.RschReqd.MaxDiagDiff 1 40000 600 CHRONIC_NOSEHAIR +#expertise[26].Known.RschReqd.MaxDiagDiff 1 40000 300 3RD_DEGREE_SIDEBURNS +#expertise[27].Known.RschReqd.MaxDiagDiff 1 40000 300 FAKE_BLOOD +#expertise[28].Known.RschReqd.MaxDiagDiff 1 40000 500 GASTRIC_EJECTIONS +#expertise[29].Known.RschReqd.MaxDiagDiff 1 20000 750 THE_SQUITS +#expertise[30].Known.RschReqd.MaxDiagDiff 1 20000 700 IRON_LUNGS +#expertise[31].Known.RschReqd.MaxDiagDiff 1 40000 750 SWEATY_PALMS +#expertise[32].Known.RschReqd.MaxDiagDiff 1 20000 500 HEAPED_PILES +#expertise[33].Known.RschReqd.MaxDiagDiff 1 20000 750 GUT_ROT +#expertise[34].Known.RschReqd.MaxDiagDiff 1 20000 500 GOLF_STONES +#expertise[35].Known.RschReqd.MaxDiagDiff 1 20000 500 UNEXPECTED_SWELLING +#expertise[36].Known.RschReqd 1 40000 I_D_SCANNER DIAGNOSIS +#expertise[37].Known.RschReqd 1 50000 I_D_BLOOD_MACHINE DIAGNOSIS +#expertise[38].Known.RschReqd 1 20000 I_D_CARDIO DIAGNOSIS +#expertise[39].Known.RschReqd 1 30000 I_D_XRAY DIAGNOSIS +#expertise[40].Known.RschReqd 1 60000 I_D_ULTRASCAN DIAGNOSIS +#expertise[41].Known.RschReqd 1 20000 I_D_STANDARD DIAGNOSIS +#expertise[42].Known.RschReqd 1 20000 I_D_WARD DIAGNOSIS +#expertise[43].Known.RschReqd 1 20000 I_D_SHRINK DIAGNOSIS + +| Objects available | Available from the start | Strength | Available for this level | Comment +#objects[9].StartAvail.StartStrength.AvailableForLevel 1 8 1 Inflator Machine +#objects[13].StartAvail.StartStrength.AvailableForLevel 1 13 1 Cardiogram +#objects[14].StartAvail.StartStrength.AvailableForLevel 1 12 1 Scanner +#objects[22].StartAvail.StartStrength.AvailableForLevel 1 9 1 Ultrascan +#objects[23].StartAvail.StartStrength.AvailableForLevel 1 7 1 DNA Restorer +#objects[24].StartAvail.StartStrength.AvailableForLevel 1 11 1 Cast Remover +#objects[25].StartAvail.StartStrength.AvailableForLevel 1 8 1 Hair restorer +#objects[26].StartAvail.StartStrength.AvailableForLevel 1 10 1 Slicer for slack tongues +#objects[27].StartAvail.StartStrength.AvailableForLevel 1 12 1 X-Ray +#objects[30].StartAvail.StartStrength.AvailableForLevel 1 12 1 Operating Table +#objects[37].StartAvail.StartStrength.AvailableForLevel 1 0 1 Projector +#objects[42].StartAvail.StartStrength.AvailableForLevel 1 10 1 Blood Machine +#objects[46].StartAvail.StartStrength.AvailableForLevel 1 8 1 Electrolysis Machine +#objects[47].StartAvail.StartStrength.AvailableForLevel 1 7 1 Jellyitus Moulding Machine +#objects[54].StartAvail.StartStrength.AvailableForLevel 1 10 1 Decontamination Shower +#objects[55].StartAvail.StartStrength.AvailableForLevel 1 10 1 Autopsy Research Machine + +| Diseases available | Value property to be determined | Comment +#visuals[0] 1 I_BLOATY_HEAD +#visuals[1] 1 I_HAIRYITUS +#visuals[2] 1 I_ELVIS +#visuals[3] 1 I_INVIS +#visuals[4] 1 I_RADIATION +#visuals[5] 1 I_SLACK_TONGUE +#visuals[6] 1 I_ALIEN +#visuals[7] 1 I_BROKEN_BONES +#visuals[8] 1 I_BALDNESS +#visuals[9] 1 I_DISCRETE_ITCHING +#visuals[10] 1 I_JELLYITUS +#visuals[11] 1 I_SLEEPING_ILLNESS +#visuals[12] 1 I_PREGNANT +#visuals[13] 1 I_TRANSPARENCY +#non_visuals[0] 1 I_UNCOMMON_COLD +#non_visuals[1] 1 I_BROKEN_WIND +#non_visuals[2] 1 I_SPARE_RIBS +#non_visuals[3] 1 I_KIDNEY_BEANS +#non_visuals[4] 1 I_BROKEN_HEART +#non_visuals[5] 1 I_RUPTURED_NODULES +#non_visuals[6] 1 I_MULTIPLE_TV_PERSONALITIES +#non_visuals[7] 1 I_INFECTIOUS_LAUGHTER +#non_visuals[8] 1 I_CORRUGATED_ANKLES +#non_visuals[9] 1 I_CHRONIC_NOSEHAIR +#non_visuals[10] 1 I_3RD_DEGREE_SIDEBURNS +#non_visuals[11] 1 I_FAKE_BLOOD +#non_visuals[12] 1 I_GASTRIC_EJECTIONS +#non_visuals[13] 1 I_THE_SQUITS +#non_visuals[14] 1 I_IRON_LUNGS +#non_visuals[15] 1 I_SWEATY_PALMS +#non_visuals[16] 1 I_HEAPED_PILES +#non_visuals[17] 1 I_GUT_ROT +#non_visuals[18] 1 I_GOLF_STONES +#non_visuals[19] 1 I_UNEXPECTED_SWELLING + + +---------------------- Staff Configuration ------------------------- + +Each entry states how many staff members of each category are available +a given month. The number of entries is not fixed. +| A list | Month it gets active (start at 0) | Each group | +#staff_levels[0].Month.Nurses.Doctors.Handymen.Receptionists.ShrkRate.SurgRate.RschRate.ConsRate.JrRate 0 8 8 3 2 10 10 10 10 5 +#staff_levels[1].Month.Nurses.Doctors.Handymen.Receptionists 3 7 5 5 3 +#staff_levels[2].Month.Nurses.Doctors.Handymen.Receptionists 5 5 8 7 4 + +The minimum salary for each staff type +#staff[0].MinSalary 60 Nurse +#staff[1].MinSalary 75 Doctor +#staff[2].MinSalary 25 Handyman +#staff[3].MinSalary 20 Receptionist + +Salary modifiers for different doctor attributes +#gbv.SalaryAdd[3] -30 Junior +#gbv.SalaryAdd[4] 30 Doctor +#gbv.SalaryAdd[5] 40 Surgeon +#gbv.SalaryAdd[6] 30 Psychiatrist +#gbv.SalaryAdd[7] 100 Consultant +#gbv.SalaryAdd[8] 20 Researcher + +How much the skill of the doctor adds to the salary. skill * 1000 / divisor +#gbv.SalaryAbilityDivisor 10 + +#gbv.TrainingRate 40 +#gbv.AbilityThreshold[0] 75 Surgeon +#gbv.AbilityThreshold[1] 60 Psychiatrist +#gbv.AbilityThreshold[2] 45 Researcher +#gbv.TrainingValue[0] 10 Projector +#gbv.TrainingValue[1] 15 Skeleton +#gbv.TrainingValue[2] 20 Bookcase + +--------------------- Research Configuration ----------------------- + +Divides research input to get the amount of research points. must be > 0 +#gbv.ResearchPointsDivisor 5 + +---------------------- Awards and Trophies ------------------------- + +#awards_trophies.CansofCoke 200 +#awards_trophies.CansofCokeBonus 10000 +#awards_trophies.Reputation 850 +#awards_trophies.TrophyReputationBonus 20000 + +------------------ Winning and Losing Conditions ------------------- +But we don't want any such conditions on the example level! +1 Total reputation +2 Balance total +3 Percentage people your hospital has handled +4 Percentage people have been cured +5 Percentage people have been killed +6 Hospital value + +#win_criteria[0].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#win_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 + +#lose_criteria[0].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[1].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[2].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[3].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[4].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 +#lose_criteria[5].Criteria.MaxMin.Value.Group.Bound 0 0 0 0 0 + +--------------------- Competitor Information ----------------------- + +| Index in the away "computer" | Is that opponent playing? | 1 is yes, 0 no | Comment | +#computer[12].Playing 1 CORSIX +#computer[13].Playing 1 ROUJIN +#computer[14].Playing 1 EDVIN + +----------------------- Emergency Control -------------------------- + +#emergency_control[0].StartMonth.EndMonth.Min.Max.Illness.PercWin.Bonus 4 5 4 6 16 75 400 +#emergency_control[1].StartMonth.EndMonth.Min.Max.Illness.PercWin.Bonus 8 10 3 5 32 75 500 diff --git a/CorsixTH/Levels/original05.level b/CorsixTH/Levels/original05.level index 29a21503..af234a34 100644 --- a/CorsixTH/Levels/original05.level +++ b/CorsixTH/Levels/original05.level @@ -1,32 +1,32 @@ -Copyright (c) 2010 Edwin "Dutchy" Smulders - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - --- This is an extra configuration file loaded at Level 5 from the original game. --- It needs some starting doctors, and to also make it possible for others to do --- this in the future some new variables are added, as seen below. - --- Skill is skill * 100 (to work in integers) -#start_staff[1].Doctor.Shrink.Consultant.Skill 1 1 1 100 -#start_staff[2].Doctor.Surgeon.Consultant.Skill 1 1 1 100 -#start_staff[3].Doctor.Researcher.Consultant.Skill 1 1 1 100 -These lines equal something like this: -Doctor.Nurse.Handyman.Receptionist.Shrink.Surgeon.Researcher.Junior.Consultant.Skill 1 0 0 0 1 0 0 0 1 100 - - +Copyright (c) 2010 Edwin "Dutchy" Smulders + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +-- This is an extra configuration file loaded at Level 5 from the original game. +-- It needs some starting doctors, and to also make it possible for others to do +-- this in the future some new variables are added, as seen below. + +-- Skill is skill * 100 (to work in integers) +#start_staff[1].Doctor.Shrink.Consultant.Skill 1 1 1 100 +#start_staff[2].Doctor.Surgeon.Consultant.Skill 1 1 1 100 +#start_staff[3].Doctor.Researcher.Consultant.Skill 1 1 1 100 +These lines equal something like this: +Doctor.Nurse.Handyman.Receptionist.Shrink.Surgeon.Researcher.Junior.Consultant.Skill 1 0 0 0 1 0 0 0 1 100 + + diff --git a/CorsixTH/Levels/original07.level b/CorsixTH/Levels/original07.level index f861f56b..711bb095 100644 --- a/CorsixTH/Levels/original07.level +++ b/CorsixTH/Levels/original07.level @@ -1,26 +1,26 @@ -Copyright (c) 2010 Edvin "Lego3" Linge - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - --- This is an extra configuration file loaded at level 7 from the original game. --- The second to last emergency (number 9) does in error create Hairyitis patients. --- That disease is not available until level 8. - --- Change the disease to Elvis Syndrome instead. (Illnes previously 3, now 4) +Copyright (c) 2010 Edvin "Lego3" Linge + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +-- This is an extra configuration file loaded at level 7 from the original game. +-- The second to last emergency (number 9) does in error create Hairyitis patients. +-- That disease is not available until level 8. + +-- Change the disease to Elvis Syndrome instead. (Illnes previously 3, now 4) #emergency_control[9].StartMonth.EndMonth.Min.Max.Illness.PercWin.Bonus 60 70 5 8 4 75 1000 \ No newline at end of file diff --git a/CorsixTH/Levels/original11.level b/CorsixTH/Levels/original11.level index b8b101cc..2bc85f68 100644 --- a/CorsixTH/Levels/original11.level +++ b/CorsixTH/Levels/original11.level @@ -1,26 +1,26 @@ -Copyright (c) 2012 Edvin "Lego3" Linge - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - --- This is an extra configuration file loaded at level 11 from the original game. --- For some reason Alien DNA is set to be unavailable at this level even though --- it evidently should be. - --- Make it available after 12 months. +Copyright (c) 2012 Edvin "Lego3" Linge + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +-- This is an extra configuration file loaded at level 11 from the original game. +-- For some reason Alien DNA is set to be unavailable at this level even though +-- it evidently should be. + +-- Make it available after 12 months. #visuals[6] 10 I_ALIEN \ No newline at end of file diff --git a/CorsixTH/Levels/original12.level b/CorsixTH/Levels/original12.level index 322af113..db151f69 100644 --- a/CorsixTH/Levels/original12.level +++ b/CorsixTH/Levels/original12.level @@ -1,26 +1,26 @@ -Copyright (c) 2012 Edvin "Lego3" Linge - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -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. - --- This is an extra configuration file loaded at level 12 from the original game. --- For some reason Alien DNA is set to be unavailable at this level even though --- it evidently should be. - --- Make it available after 12 months. +Copyright (c) 2012 Edvin "Lego3" Linge + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +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. + +-- This is an extra configuration file loaded at level 12 from the original game. +-- For some reason Alien DNA is set to be unavailable at this level even though +-- it evidently should be. + +-- Make it available after 12 months. #visuals[6] 10 I_ALIEN \ No newline at end of file diff --git a/LDocGen/output/main.css b/LDocGen/output/main.css index 9e18e7be..1a105710 100644 --- a/LDocGen/output/main.css +++ b/LDocGen/output/main.css @@ -1,342 +1,342 @@ -/* Global and common content */ - -body { - background: #fff; - margin: 5px 8px; - font-family: arial, sans-serif; - font-size: 83%; -} - -a { - color: #00f; -} - -a:visited { - color: #22a; -} - -div.content { - padding: 0; - margin: 0; - padding-top: 3px; -} - -div.content a:hover { - text-decoration: none; -} - -/* Header */ - -h1 { - height: 48px; - background: url("logo.png") no-repeat left center; - padding-left: 52px; - font-size: 30px; - padding-top: 9px; - margin: 0; - margin-bottom: 2px; -} - -/* Navigation */ - -ul.tabs, ul.sections { - width: 100%; - list-style-type: none; - margin: 0; - padding: 0; - padding-bottom: 3px; - background-color: #fff; - display: block; -} - -ul.tabs li { - display: inline; - margin: 0; - margin-right: 8px; - padding: 0; - font-weight: bold; -} - -ul.tabs a { - background: #E5ECF9 url("corner_right.gif") no-repeat right top; - padding: 3px 12px; - color: #000; - text-decoration: none; -} - -ul.tabs li.active a { - background-color: #C3D9FF; -} - -ul.sections { - padding-top: 2px; - padding-bottom: 2px; - background: #C3D9FF url("corner_right.gif") no-repeat right top; -} - -ul.sections li { - margin: 0; - padding: 0; - padding-left: 8px; - padding-right: 9px; - display: inline; - border-right: 1px #000 solid; -} - -ul.sections a, ul.sections a:visited { - color: #00f; - text-decoration: underline; -} - -ul.sections li.active a { - font-weight: bold; - color: #000; - text-decoration: none; -} - -ul.sections li.last { - border-right: none; -} - -/* Content - hierarchy lists */ - -ul.class_hierarchy, ul.subclass_hierarchy, ul.file_hierarchy { - list-style-type: none; - padding: 0; - margin: 0; - margin-left: 1.6em; -} - -ul.class_hierarchy, ul.file_hierarchy.toplevel { - margin-left: 2px; -} - -ul.class_hierarchy li, ul.subclass_hierarchy li, ul.file_hierarchy li { - border-left: 1px #aaa solid; -} - -ul.class_hierarchy li span, ul.subclass_hierarchy li span, ul.file_hierarchy li span { - border: 1px #aaa solid; - border-left: none; - background-color: #E5ECF9; - margin-bottom: 2px; - display: block; - padding: 2px; - padding-left: 8px; -} - -ul.file_hierarchy li.dir span { - background-color: #C3D9FF; -} - -ul.file_hierarchy li.file span { - background-color: #E5ECF9; -} - -/* Content - linear lists */ - -table.class_list { - width: 100%; -} - -table.class_list td { - border: 1px #aaa solid; - background-color: #E5ECF9; - padding: 2px; - margin: 0; - padding-left: 8px; -} - -/* Content - indicies */ - -ul.index_letters { - display: block; - border: 1px #aaa solid; - background-color: #E5ECF9; - padding: 2px; - margin: 3px 0; - list-style-type: none; -} - -ul.index_letters li { - display: inline; - margin: 0; - padding: 0; -} - -ul.index_letters li a { - text-decoration: none; - border-right: 1px #aaa solid; - margin: 0; - padding-left: 3px; - padding-right: 6px; -} - -ul.index_letters li a:hover, ul.class_index a:hover { - text-decoration: underline; -} - -ul.index_letters li.last a { - border-right: none; -} - -ul.class_index, ul.class_index ul { - margin: 0; - padding: 0; - list-style-type: none; -} - -ul.class_index { - float: left; - padding-right: 18px; -} - -ul.class_index a:target { - background-color: #C3D9FF; - border: 1px #aaa solid; - display: block; - text-align: center; -} - -ul.class_index a:target span { - display: inline; - border: none; - background-color: #C3D9FF; -} - -ul.class_index a { - text-decoration: none; -} - -ul.class_index span { - border: 1px #aaa solid; - background-color: #E5ECF9; - color: #000; - display: block; - width: 2em; - text-align: center; - font-weight: bold; -} - -ul.class_index li { - padding: 2px 0; -} - -/* Content - class pages */ - -h2.class { - margin: 0; - padding: 0; - padding-top: 0.5em; -} - -h3.class { - margin: 0; - padding: 0; - font-size: 100%; -} - -div.class_info { - margin: 0; - padding: 0.5em 0; -} - -div.method_list, div.member_list { - float: left; - border: 1px #aaa solid; - background-color: #E5ECF9; - padding: 0; - margin: 0; - margin-bottom: 1em; -} - -div.method_list a, div.member_list a { - text-decoration: none; -} - -div.method_list a:hover, div.member_list a:hover { - text-decoration: underline; -} - -div.method_list { - margin-right: 1em; -} - -div.method_list h4, div.member_list h4 { - margin: 0; - padding: 3px; - display: block; - border-bottom: 1px #aaa solid; - background-color: #C3D9FF; -} - -div.method_list ul, div.member_list ul { - margin: 0; - padding: 3px; - list-style-type: none; -} - -div.method_list ul li.self { - font-weight: bold; -} - -div.method_list span.p, div.member_list span.p, div.methods table.params td.n { - font-family: monospace; - font-weight: normal; -} - -div.methods { - clear: both; -} - -div.methods div.method { - border: 1px #aaa solid; - background-color: #E5ECF9; - padding: 0; - margin: 0; - margin-bottom: 0.5em; -} - -div.methods h5 { - background-color: #C3D9FF; - padding: 3px; - margin: 0; - border-bottom: 1px #aaa solid; -} - -div.methods p { - padding: 3px; - margin: 0; -} - -div.methods h5 a { - color: #000; - font-size: 120%; -} - -div.methods h5 a:target { - color: #040; - font-size: 130%; -} - -div.methods table.params th, div.methods table.params td { - text-align: left; - padding: 0; - margin: 0; - padding-left: 4px; -} - -div.methods table.params .n { - padding-left: 20px; -} - -/* Footer */ - -span.footer { - text-align: center; - font-size: 80%; - margin: 1em 0; - display: block; - text-align: center; - clear: both; -} +/* Global and common content */ + +body { + background: #fff; + margin: 5px 8px; + font-family: arial, sans-serif; + font-size: 83%; +} + +a { + color: #00f; +} + +a:visited { + color: #22a; +} + +div.content { + padding: 0; + margin: 0; + padding-top: 3px; +} + +div.content a:hover { + text-decoration: none; +} + +/* Header */ + +h1 { + height: 48px; + background: url("logo.png") no-repeat left center; + padding-left: 52px; + font-size: 30px; + padding-top: 9px; + margin: 0; + margin-bottom: 2px; +} + +/* Navigation */ + +ul.tabs, ul.sections { + width: 100%; + list-style-type: none; + margin: 0; + padding: 0; + padding-bottom: 3px; + background-color: #fff; + display: block; +} + +ul.tabs li { + display: inline; + margin: 0; + margin-right: 8px; + padding: 0; + font-weight: bold; +} + +ul.tabs a { + background: #E5ECF9 url("corner_right.gif") no-repeat right top; + padding: 3px 12px; + color: #000; + text-decoration: none; +} + +ul.tabs li.active a { + background-color: #C3D9FF; +} + +ul.sections { + padding-top: 2px; + padding-bottom: 2px; + background: #C3D9FF url("corner_right.gif") no-repeat right top; +} + +ul.sections li { + margin: 0; + padding: 0; + padding-left: 8px; + padding-right: 9px; + display: inline; + border-right: 1px #000 solid; +} + +ul.sections a, ul.sections a:visited { + color: #00f; + text-decoration: underline; +} + +ul.sections li.active a { + font-weight: bold; + color: #000; + text-decoration: none; +} + +ul.sections li.last { + border-right: none; +} + +/* Content - hierarchy lists */ + +ul.class_hierarchy, ul.subclass_hierarchy, ul.file_hierarchy { + list-style-type: none; + padding: 0; + margin: 0; + margin-left: 1.6em; +} + +ul.class_hierarchy, ul.file_hierarchy.toplevel { + margin-left: 2px; +} + +ul.class_hierarchy li, ul.subclass_hierarchy li, ul.file_hierarchy li { + border-left: 1px #aaa solid; +} + +ul.class_hierarchy li span, ul.subclass_hierarchy li span, ul.file_hierarchy li span { + border: 1px #aaa solid; + border-left: none; + background-color: #E5ECF9; + margin-bottom: 2px; + display: block; + padding: 2px; + padding-left: 8px; +} + +ul.file_hierarchy li.dir span { + background-color: #C3D9FF; +} + +ul.file_hierarchy li.file span { + background-color: #E5ECF9; +} + +/* Content - linear lists */ + +table.class_list { + width: 100%; +} + +table.class_list td { + border: 1px #aaa solid; + background-color: #E5ECF9; + padding: 2px; + margin: 0; + padding-left: 8px; +} + +/* Content - indicies */ + +ul.index_letters { + display: block; + border: 1px #aaa solid; + background-color: #E5ECF9; + padding: 2px; + margin: 3px 0; + list-style-type: none; +} + +ul.index_letters li { + display: inline; + margin: 0; + padding: 0; +} + +ul.index_letters li a { + text-decoration: none; + border-right: 1px #aaa solid; + margin: 0; + padding-left: 3px; + padding-right: 6px; +} + +ul.index_letters li a:hover, ul.class_index a:hover { + text-decoration: underline; +} + +ul.index_letters li.last a { + border-right: none; +} + +ul.class_index, ul.class_index ul { + margin: 0; + padding: 0; + list-style-type: none; +} + +ul.class_index { + float: left; + padding-right: 18px; +} + +ul.class_index a:target { + background-color: #C3D9FF; + border: 1px #aaa solid; + display: block; + text-align: center; +} + +ul.class_index a:target span { + display: inline; + border: none; + background-color: #C3D9FF; +} + +ul.class_index a { + text-decoration: none; +} + +ul.class_index span { + border: 1px #aaa solid; + background-color: #E5ECF9; + color: #000; + display: block; + width: 2em; + text-align: center; + font-weight: bold; +} + +ul.class_index li { + padding: 2px 0; +} + +/* Content - class pages */ + +h2.class { + margin: 0; + padding: 0; + padding-top: 0.5em; +} + +h3.class { + margin: 0; + padding: 0; + font-size: 100%; +} + +div.class_info { + margin: 0; + padding: 0.5em 0; +} + +div.method_list, div.member_list { + float: left; + border: 1px #aaa solid; + background-color: #E5ECF9; + padding: 0; + margin: 0; + margin-bottom: 1em; +} + +div.method_list a, div.member_list a { + text-decoration: none; +} + +div.method_list a:hover, div.member_list a:hover { + text-decoration: underline; +} + +div.method_list { + margin-right: 1em; +} + +div.method_list h4, div.member_list h4 { + margin: 0; + padding: 3px; + display: block; + border-bottom: 1px #aaa solid; + background-color: #C3D9FF; +} + +div.method_list ul, div.member_list ul { + margin: 0; + padding: 3px; + list-style-type: none; +} + +div.method_list ul li.self { + font-weight: bold; +} + +div.method_list span.p, div.member_list span.p, div.methods table.params td.n { + font-family: monospace; + font-weight: normal; +} + +div.methods { + clear: both; +} + +div.methods div.method { + border: 1px #aaa solid; + background-color: #E5ECF9; + padding: 0; + margin: 0; + margin-bottom: 0.5em; +} + +div.methods h5 { + background-color: #C3D9FF; + padding: 3px; + margin: 0; + border-bottom: 1px #aaa solid; +} + +div.methods p { + padding: 3px; + margin: 0; +} + +div.methods h5 a { + color: #000; + font-size: 120%; +} + +div.methods h5 a:target { + color: #040; + font-size: 130%; +} + +div.methods table.params th, div.methods table.params td { + text-align: left; + padding: 0; + margin: 0; + padding-left: 4px; +} + +div.methods table.params .n { + padding-left: 20px; +} + +/* Footer */ + +span.footer { + text-align: center; + font-size: 80%; + margin: 1em 0; + display: block; + text-align: center; + clear: both; +} diff --git a/LDocGen/templates/lua_class_index.htlua b/LDocGen/templates/lua_class_index.htlua index 6d6855bf..2b87dbfb 100644 --- a/LDocGen/templates/lua_class_index.htlua +++ b/LDocGen/templates/lua_class_index.htlua @@ -1,67 +1,67 @@ - target then - if math.abs(target - oldsum) <= math.abs(sum - target) then - return i - else - return i + 1 - end - end - end - return #letters + 1 - end - local function extract_range(t, i, j) - local r = {} - for x = math.max(1, i), math.min(#t, j) do - r[#r + 1] = t[x] - end - return r - end - local columns = {} - local n_cols = 5 - for i = 1, n_cols do - columns[i] = extract_range(letters, percentile((i - 1) / n_cols), percentile(i / n_cols) - 1) - end -!> - - - - + target then + if math.abs(target - oldsum) <= math.abs(sum - target) then + return i + else + return i + 1 + end + end + end + return #letters + 1 + end + local function extract_range(t, i, j) + local r = {} + for x = math.max(1, i), math.min(#t, j) do + r[#r + 1] = t[x] + end + return r + end + local columns = {} + local n_cols = 5 + for i = 1, n_cols do + columns[i] = extract_range(letters, percentile((i - 1) / n_cols), percentile(i / n_cols) - 1) + end +!> + + + + diff --git a/LDocGen/templates/page.htlua b/LDocGen/templates/page.htlua index fd6ed35b..61a67a6d 100644 --- a/LDocGen/templates/page.htlua +++ b/LDocGen/templates/page.htlua @@ -1,35 +1,35 @@ -DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - - - - - <!= title !> - CorsixTH Lua Documentation - - - -

CorsixTH Lua Documentation

- - - - - - -
- -
- Page generated on by LDocGen. - - +DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + + + + <!= title !> - CorsixTH Lua Documentation + + + +

CorsixTH Lua Documentation

+ + + + + + +
+ +
+ Page generated on by LDocGen. + + diff --git a/LFS/lfs.def b/LFS/lfs.def index f79cd298..d14babd0 100644 --- a/LFS/lfs.def +++ b/LFS/lfs.def @@ -1,5 +1,5 @@ -LIBRARY lfs.dll -DESCRIPTION "LuaFileSystem" -VERSION 1.4.2 -EXPORTS -luaopen_lfs +LIBRARY lfs.dll +DESCRIPTION "LuaFileSystem" +VERSION 1.4.2 +EXPORTS +luaopen_lfs diff --git a/MapEdit/MapEdit.rc b/MapEdit/MapEdit.rc index 2f2dc9d6..cd917835 100644 --- a/MapEdit/MapEdit.rc +++ b/MapEdit/MapEdit.rc @@ -1,34 +1,34 @@ -// Microsoft Visual C++ generated resource script. -// - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_MAPEDIT ICON "MapEdit.ico" -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - +// Microsoft Visual C++ generated resource script. +// + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_MAPEDIT ICON "MapEdit.ico" +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + diff --git a/WindowsInstaller/OptionsPage.ini b/WindowsInstaller/OptionsPage.ini index 10933a15..83f7a584 100644 --- a/WindowsInstaller/OptionsPage.ini +++ b/WindowsInstaller/OptionsPage.ini @@ -1,55 +1,55 @@ -; Copyright (c) 2010 Edvin "Lego3" Linge - -; Permission is hereby granted, free of charge, to any person obtaining a copy of -; this software and associated documentation files (the "Software"), to deal in -; the Software without restriction, including without limitation the rights to -; use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -; of the Software, and to permit persons to whom the Software is furnished to do -; so, subject to the following conditions: - -; The above copyright notice and this permission notice shall be included in all -; copies or substantial portions of the Software. - -; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -; 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. - -[Settings] -NumFields=4 - -[Field 1] -Type=CheckBox -Left=12 -Top=100 -Right=300 -Bottom=110 -Text=Save game data and settings in %APPDATA% (Recommended) -State=1 - -[Field 2] -Type=DirRequest -Left=12 -Top=49 -Right=288 -Bottom=62 -State=C:\Program Files\Bullfrog\Hospital - -[Field 3] -Type=GroupBox -Left=0 -Top=35 -Right=300 -Bottom=72 -Text=In order to play the game an installation of the original game is required. Please specify that location here. - -[Field 4] -Type=Label -Left=0 -Top=0 -Right=300 -Bottom=30 -Text=Theme Hospital Folder +; Copyright (c) 2010 Edvin "Lego3" Linge + +; Permission is hereby granted, free of charge, to any person obtaining a copy of +; this software and associated documentation files (the "Software"), to deal in +; the Software without restriction, including without limitation the rights to +; use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +; of the Software, and to permit persons to whom the Software is furnished to do +; so, subject to the following conditions: + +; The above copyright notice and this permission notice shall be included in all +; copies or substantial portions of the Software. + +; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +; 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. + +[Settings] +NumFields=4 + +[Field 1] +Type=CheckBox +Left=12 +Top=100 +Right=300 +Bottom=110 +Text=Save game data and settings in %APPDATA% (Recommended) +State=1 + +[Field 2] +Type=DirRequest +Left=12 +Top=49 +Right=288 +Bottom=62 +State=C:\Program Files\Bullfrog\Hospital + +[Field 3] +Type=GroupBox +Left=0 +Top=35 +Right=300 +Bottom=72 +Text=In order to play the game an installation of the original game is required. Please specify that location here. + +[Field 4] +Type=Label +Left=0 +Top=0 +Right=300 +Bottom=30 +Text=Theme Hospital Folder diff --git a/WindowsInstaller/ReplaceInFile.nsh b/WindowsInstaller/ReplaceInFile.nsh index aaa550c6..f3860379 100644 --- a/WindowsInstaller/ReplaceInFile.nsh +++ b/WindowsInstaller/ReplaceInFile.nsh @@ -1,86 +1,86 @@ -; This software is provided 'as-is', without any express or implied warranty. -; In no event will the authors be held liable for any damages arising from the -; use of this software. - -; Permission is granted to anyone to use this software for any purpose, -; including commercial applications, and to alter it and redistribute it freely, -; subject to the following restrictions: - -; 1. The origin of this software must not be misrepresented; you must not claim -; that you wrote the original software. If you use this software in a product, -; an acknowledgment in the product documentation would be appreciated but is not -; required. -; 2. Altered source versions must be plainly marked as such, and must not be -; misrepresented as being the original software. -; 3. This notice may not be removed or altered from any source distribution. - -; Function to replace text in a file, Author: Datenbert - -!macro ReplaceInFile SOURCE_FILE SEARCH_TEXT REPLACEMENT - Push "${SOURCE_FILE}" - Push "${SEARCH_TEXT}" - Push "${REPLACEMENT}" - Call RIF -!macroend - -Function RIF - - ClearErrors ; want to be a newborn - - Exch $0 ; REPLACEMENT - Exch - Exch $1 ; SEARCH_TEXT - Exch 2 - Exch $2 ; SOURCE_FILE - - Push $R0 ; SOURCE_FILE file handle - Push $R1 ; temporary file handle - Push $R2 ; unique temporary file name - Push $R3 ; a line to sar/save - Push $R4 ; shift puffer - - IfFileExists $2 +1 RIF_error ; knock-knock - FileOpen $R0 $2 "r" ; open the door - - GetTempFileName $R2 ; who's new? - FileOpen $R1 $R2 "w" ; the escape, please! - - RIF_loop: ; round'n'round we go - FileRead $R0 $R3 ; read one line - IfErrors RIF_leaveloop ; enough is enough - RIF_sar: ; sar - search and replace - Push "$R3" ; (hair)stack - Push "$1" ; needle - Push "$0" ; blood - Call StrReplace ; do the bartwalk - StrCpy $R4 "$R3" ; remember previous state - Pop $R3 ; gimme s.th. back in return! - StrCmp "$R3" "$R4" +1 RIF_sar ; loop, might change again! - FileWrite $R1 "$R3" ; save the newbie - Goto RIF_loop ; gimme more - - RIF_leaveloop: ; over'n'out, Sir! - FileClose $R1 ; S'rry, Ma'am - clos'n now - FileClose $R0 ; me 2 - - Delete "$2.old" ; go away, Sire - Rename "$2" "$2.old" ; step aside, Ma'am - Rename "$R2" "$2" ; hi, baby! - - ClearErrors ; now i AM a newborn - Goto RIF_out ; out'n'away - - RIF_error: ; ups - s.th. went wrong... - SetErrors ; ...so cry, boy! - - RIF_out: ; your wardrobe? - Pop $R4 - Pop $R3 - Pop $R2 - Pop $R1 - Pop $R0 - Pop $2 - Pop $0 - Pop $1 - +; This software is provided 'as-is', without any express or implied warranty. +; In no event will the authors be held liable for any damages arising from the +; use of this software. + +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it freely, +; subject to the following restrictions: + +; 1. The origin of this software must not be misrepresented; you must not claim +; that you wrote the original software. If you use this software in a product, +; an acknowledgment in the product documentation would be appreciated but is not +; required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software. +; 3. This notice may not be removed or altered from any source distribution. + +; Function to replace text in a file, Author: Datenbert + +!macro ReplaceInFile SOURCE_FILE SEARCH_TEXT REPLACEMENT + Push "${SOURCE_FILE}" + Push "${SEARCH_TEXT}" + Push "${REPLACEMENT}" + Call RIF +!macroend + +Function RIF + + ClearErrors ; want to be a newborn + + Exch $0 ; REPLACEMENT + Exch + Exch $1 ; SEARCH_TEXT + Exch 2 + Exch $2 ; SOURCE_FILE + + Push $R0 ; SOURCE_FILE file handle + Push $R1 ; temporary file handle + Push $R2 ; unique temporary file name + Push $R3 ; a line to sar/save + Push $R4 ; shift puffer + + IfFileExists $2 +1 RIF_error ; knock-knock + FileOpen $R0 $2 "r" ; open the door + + GetTempFileName $R2 ; who's new? + FileOpen $R1 $R2 "w" ; the escape, please! + + RIF_loop: ; round'n'round we go + FileRead $R0 $R3 ; read one line + IfErrors RIF_leaveloop ; enough is enough + RIF_sar: ; sar - search and replace + Push "$R3" ; (hair)stack + Push "$1" ; needle + Push "$0" ; blood + Call StrReplace ; do the bartwalk + StrCpy $R4 "$R3" ; remember previous state + Pop $R3 ; gimme s.th. back in return! + StrCmp "$R3" "$R4" +1 RIF_sar ; loop, might change again! + FileWrite $R1 "$R3" ; save the newbie + Goto RIF_loop ; gimme more + + RIF_leaveloop: ; over'n'out, Sir! + FileClose $R1 ; S'rry, Ma'am - clos'n now + FileClose $R0 ; me 2 + + Delete "$2.old" ; go away, Sire + Rename "$2" "$2.old" ; step aside, Ma'am + Rename "$R2" "$2" ; hi, baby! + + ClearErrors ; now i AM a newborn + Goto RIF_out ; out'n'away + + RIF_error: ; ups - s.th. went wrong... + SetErrors ; ...so cry, boy! + + RIF_out: ; your wardrobe? + Pop $R4 + Pop $R3 + Pop $R2 + Pop $R1 + Pop $R0 + Pop $2 + Pop $0 + Pop $1 + FunctionEnd \ No newline at end of file diff --git a/WindowsInstaller/StrRep.nsh b/WindowsInstaller/StrRep.nsh index 7b91cdac..b4d7d2fb 100644 --- a/WindowsInstaller/StrRep.nsh +++ b/WindowsInstaller/StrRep.nsh @@ -1,66 +1,66 @@ -; This software is provided 'as-is', without any express or implied warranty. -; In no event will the authors be held liable for any damages arising from the -; use of this software. - -; Permission is granted to anyone to use this software for any purpose, -; including commercial applications, and to alter it and redistribute it freely, -; subject to the following restrictions: - -; 1. The origin of this software must not be misrepresented; you must not claim -; that you wrote the original software. If you use this software in a product, -; an acknowledgment in the product documentation would be appreciated but is not -; required. -; 2. Altered source versions must be plainly marked as such, and must not be -; misrepresented as being the original software. -; 3. This notice may not be removed or altered from any source distribution. - -; Replaces all ocurrences of a given needle within a haystack with another string -; Written by dandaman32 - -Var STR_REPLACE_VAR_0 -Var STR_REPLACE_VAR_1 -Var STR_REPLACE_VAR_2 -Var STR_REPLACE_VAR_3 -Var STR_REPLACE_VAR_4 -Var STR_REPLACE_VAR_5 -Var STR_REPLACE_VAR_6 -Var STR_REPLACE_VAR_7 -Var STR_REPLACE_VAR_8 - -Function StrReplace - Exch $STR_REPLACE_VAR_2 - Exch 1 - Exch $STR_REPLACE_VAR_1 - Exch 2 - Exch $STR_REPLACE_VAR_0 - StrCpy $STR_REPLACE_VAR_3 -1 - StrLen $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_1 - StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0 - loop: - IntOp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_3 + 1 - StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_3 - StrCmp $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_1 found - StrCmp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_6 done - Goto loop - found: - StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_3 - IntOp $STR_REPLACE_VAR_8 $STR_REPLACE_VAR_3 + $STR_REPLACE_VAR_4 - StrCpy $STR_REPLACE_VAR_7 $STR_REPLACE_VAR_0 "" $STR_REPLACE_VAR_8 - StrCpy $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_5$STR_REPLACE_VAR_2$STR_REPLACE_VAR_7 - StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0 - Goto loop - done: - Pop $STR_REPLACE_VAR_1 ; Prevent "invalid opcode" errors and keep the - Pop $STR_REPLACE_VAR_1 ; stack as it was before the function was called - Exch $STR_REPLACE_VAR_0 -FunctionEnd - -!macro _strReplaceConstructor OUT NEEDLE NEEDLE2 HAYSTACK - Push "${HAYSTACK}" - Push "${NEEDLE}" - Push "${NEEDLE2}" - Call StrReplace - Pop "${OUT}" -!macroend - +; This software is provided 'as-is', without any express or implied warranty. +; In no event will the authors be held liable for any damages arising from the +; use of this software. + +; Permission is granted to anyone to use this software for any purpose, +; including commercial applications, and to alter it and redistribute it freely, +; subject to the following restrictions: + +; 1. The origin of this software must not be misrepresented; you must not claim +; that you wrote the original software. If you use this software in a product, +; an acknowledgment in the product documentation would be appreciated but is not +; required. +; 2. Altered source versions must be plainly marked as such, and must not be +; misrepresented as being the original software. +; 3. This notice may not be removed or altered from any source distribution. + +; Replaces all ocurrences of a given needle within a haystack with another string +; Written by dandaman32 + +Var STR_REPLACE_VAR_0 +Var STR_REPLACE_VAR_1 +Var STR_REPLACE_VAR_2 +Var STR_REPLACE_VAR_3 +Var STR_REPLACE_VAR_4 +Var STR_REPLACE_VAR_5 +Var STR_REPLACE_VAR_6 +Var STR_REPLACE_VAR_7 +Var STR_REPLACE_VAR_8 + +Function StrReplace + Exch $STR_REPLACE_VAR_2 + Exch 1 + Exch $STR_REPLACE_VAR_1 + Exch 2 + Exch $STR_REPLACE_VAR_0 + StrCpy $STR_REPLACE_VAR_3 -1 + StrLen $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_1 + StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0 + loop: + IntOp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_3 + 1 + StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_4 $STR_REPLACE_VAR_3 + StrCmp $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_1 found + StrCmp $STR_REPLACE_VAR_3 $STR_REPLACE_VAR_6 done + Goto loop + found: + StrCpy $STR_REPLACE_VAR_5 $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_3 + IntOp $STR_REPLACE_VAR_8 $STR_REPLACE_VAR_3 + $STR_REPLACE_VAR_4 + StrCpy $STR_REPLACE_VAR_7 $STR_REPLACE_VAR_0 "" $STR_REPLACE_VAR_8 + StrCpy $STR_REPLACE_VAR_0 $STR_REPLACE_VAR_5$STR_REPLACE_VAR_2$STR_REPLACE_VAR_7 + StrLen $STR_REPLACE_VAR_6 $STR_REPLACE_VAR_0 + Goto loop + done: + Pop $STR_REPLACE_VAR_1 ; Prevent "invalid opcode" errors and keep the + Pop $STR_REPLACE_VAR_1 ; stack as it was before the function was called + Exch $STR_REPLACE_VAR_0 +FunctionEnd + +!macro _strReplaceConstructor OUT NEEDLE NEEDLE2 HAYSTACK + Push "${HAYSTACK}" + Push "${NEEDLE}" + Push "${NEEDLE2}" + Call StrReplace + Pop "${OUT}" +!macroend + !define StrReplace '!insertmacro "_strReplaceConstructor"' \ No newline at end of file diff --git a/WindowsInstaller/Win32Script.nsi b/WindowsInstaller/Win32Script.nsi index df453234..992c9791 100644 --- a/WindowsInstaller/Win32Script.nsi +++ b/WindowsInstaller/Win32Script.nsi @@ -1,321 +1,321 @@ -; Copyright (c) 2012 Edvin "Lego3" Linge - -; Permission is hereby granted, free of charge, to any person obtaining a copy of -; this software and associated documentation files (the "Software"), to deal in -; the Software without restriction, including without limitation the rights to -; use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -; of the Software, and to permit persons to whom the Software is furnished to do -; so, subject to the following conditions: - -; The above copyright notice and this permission notice shall be included in all -; copies or substantial portions of the Software. - -; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -; 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. - -; Base Script generated by the HM NIS Edit Script Wizard. - -;---------------------------------- Definitions for the game ----------------------------------- - -!define PRODUCT_NAME "CorsixTH" -!define PRODUCT_VERSION "Trunk" -!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" -!define PRODUCT_UNINST_ROOT_KEY "HKLM" -!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" - -Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -OutFile "CorsixTHInstaller.exe" -InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" - -; MUI 1.67 compatible ------ -!include "MUI.nsh" -; Compatible with x64 systems -!include "x64.nsh" - -; This is needed to be able to install into the program files directory -RequestExecutionLevel admin - - -; -------------------- Definitions and macros that create the graphical interface ----------------- - - -; MUI Settings -!define MUI_ABORTWARNING -!define MUI_CUSTOMFUNCTION_UNGUIINIT un.onGUIInit2 - -!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" -!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp" - -; Language Selection Dialog Settings -!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" -!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" -!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" - -; Welcome page -!insertmacro MUI_PAGE_WELCOME -; License page -!insertmacro MUI_PAGE_LICENSE "..\CorsixTH\LICENSE.txt" -; Directory page -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE ValidateDirectory -!insertmacro MUI_PAGE_DIRECTORY -; Another directory page to choose where the original game is -Var ORIGINALPATH -Var CONFIGAPPDATA -;!define MUI_DIRECTORYPAGE_TEXT_TOP $(original_text) -;!define MUI_DIRECTORYPAGE_VARIABLE $OriginalPath -;!define MUI_DIRECTORYPAGE_TEXT_DESTINATION $(original_folder) -;!insertmacro MUI_PAGE_DIRECTORY -Page Custom OptionsPage OptionsPageLeave -; Start menu page -var ICONS_GROUP -!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${PRODUCT_NAME}" -!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" -!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" -!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" -!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP -; Instfiles page -!insertmacro MUI_PAGE_INSTFILES -; Finish page -!define MUI_FINISHPAGE_RUN "$INSTDIR\CorsixTH_SDL.exe" -!define MUI_FINISHPAGE_RUN_NOTCHECKED -!insertmacro MUI_PAGE_FINISH - -; Uninstaller pages -!insertmacro MUI_UNPAGE_INSTFILES - -; Icons used by the installer and uninstaller -UninstallIcon "..\CorsixTH\corsixTH.ico" -Icon "..\CorsixTH\corsixTH.ico" - - -; ------------------------------- Languages supported by the installer --------------------------- - - -; Language files -!insertmacro MUI_LANGUAGE "Czech" -!insertmacro MUI_LANGUAGE "Danish" -!insertmacro MUI_LANGUAGE "Dutch" -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_LANGUAGE "Finnish" -!insertmacro MUI_LANGUAGE "French" -!insertmacro MUI_LANGUAGE "German" -!insertmacro MUI_LANGUAGE "Italian" -!insertmacro MUI_LANGUAGE "Norwegian" -!insertmacro MUI_LANGUAGE "Polish" -!insertmacro MUI_LANGUAGE "Portuguese" -!insertmacro MUI_LANGUAGE "Russian" -!insertmacro MUI_LANGUAGE "SimpChinese" -!insertmacro MUI_LANGUAGE "Spanish" -!insertmacro MUI_LANGUAGE "Swedish" -!insertmacro MUI_LANGUAGE "TradChinese" - -; MUI end ------ - -;Used to replace strings in the config.txt file -!include StrRep.nsh -!include ReplaceInFile.nsh - -Function .onInit - ; Set default Theme Hospital vanilla install directory. - ; TODO: try to find the correct one in the registry (or "AppData") from - ; previous install of CorsixTH - StrCpy $OriginalPath "$PROGRAMFILES\Bullfrog\Hospital\" - ${If} ${RunningX64} - StrCpy $INSTDIR $PROGRAMFILES64\${PRODUCT_NAME} - ${EndIf} - !insertmacro MUI_LANGDLL_DISPLAY -FunctionEnd - -!include LanguageStrings.nsh - -; A function called when the user wants to move on past the choose installation directory dialog. -Function ValidateDirectory - ; Check if we're trying to install over an existing installation - ${If} ${FileExists} "$INSTDIR\Lua" - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(overwrite_install)" IDYES overwriting - Abort - ${EndIf} - overwriting: -FunctionEnd - -; ----------------------------- Functions for the custom options page ---------------------------- - -Function OptionsPage - ${If} ${FileExists} "$APPDATA\CorsixTH\config.txt" - IntOp $CONFIGAPPDATA 1 * 1 - Abort - ${ElseIf} ${FileExists} "$INSTDIR\config.txt" - Abort - ${EndIf} - ReserveFile "OptionsPage.ini" - !insertmacro MUI_HEADER_TEXT $(options_title) $(options_subtitle) - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "OptionsPage.ini" - ; The ini file is actually static. Set strings so that they are localized. - WriteINIStr "$PLUGINSDIR\OptionsPage.ini" "Field 1" "Text" $(save_in_appdata) - WriteINIStr "$PLUGINSDIR\OptionsPage.ini" "Field 3" "Text" $(original_folder) - WriteINIStr "$PLUGINSDIR\OptionsPage.ini" "Field 4" "Text" $(original_text) - - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "OptionsPage.ini" -FunctionEnd - -Function OptionsPageLeave - ; Get install path and where to put configuration files and saved games. - !insertmacro MUI_INSTALLOPTIONS_READ $ORIGINALPATH "OptionsPage.ini" "Field 2" "State" - !insertmacro MUI_INSTALLOPTIONS_READ $CONFIGAPPDATA "OptionsPage.ini" "Field 1" "State" -FunctionEnd - - -; -------------------------- Define which files to include in the package ------------------------ - - -Section "MainSection" SEC01 - SetOutPath "$INSTDIR" - SetOverwrite ifnewer - ${If} ${RunningX64} - File /r /x .svn x64\*.* - Goto continued - ${EndIf} - File /r /x .svn x86\*.* - - continued: - ; Time to make the configuration file and Saves folder at the correct location - ${If} $CONFIGAPPDATA == 1 - SetOutPath "$APPDATA\CorsixTH" - IfFileExists "$APPDATA\CorsixTH\Saves" saves - ; Don't overwrite previous installations though! - CreateDirectory "$APPDATA\CorsixTH\Saves" - ${Else} - ; Tell the game that it should read the config file from the install dir - ; Don't overwrite previous installations here either! - IfFileExists "$INSTDIR\config.path.txt" saves - FileOpen $9 config.path.txt w - FileWrite $9 "$INSTDIR\$\r$\n" - FileClose $9 - - IfFileExists "$INSTDIR\Saves" saves - CreateDirectory "$INSTDIR\Saves" - ${EndIf} - File config_template.txt - - ; Change settings in the config file. - System::Call 'user32::GetSystemMetrics(i 0) i .r0' - System::Call 'user32::GetSystemMetrics(i 1) i .r1' - !insertmacro ReplaceInFile config_template.txt ORIGINAL_HOSPITAL_DIRECTORY $ORIGINALPATH - !insertmacro ReplaceInFile config_template.txt LANGUAGE_CHOSEN $(install_language) - !insertmacro ReplaceInFile config_template.txt SCREEN_SIZE_WIDTH "$0" - !insertmacro ReplaceInFile config_template.txt SCREEN_SIZE_HEIGHT "$1" - !insertmacro ReplaceInFile config_template.txt SCREEN_FULLSCREEN "true" - ; TODO: Let the user choose if new music files exist and where they are in that case. - Rename config_template.txt config.txt - Delete config_t* - ; Continue here if the saves folder and config file was already present - saves: - - ; The three other needed folders - ; The old Lua folder is deleted first, if any exists, so that the game can start properly. - ${If} ${FileExists} "$INSTDIR\Lua" - RMDir /r "$INSTDIR\Lua" - CreateDirectory "$INSTDIR\Lua" - ${EndIf} - SetOutPath "$INSTDIR\Lua" - File /r /x .svn ..\CorsixTH\Lua\*.* - - SetOutPath "$INSTDIR\Bitmap" - File /r /x .svn ..\CorsixTH\Bitmap\*.pal - File /r /x .svn ..\CorsixTH\Bitmap\*.dat - File /r /x .svn ..\CorsixTH\Bitmap\*.tab - File /r /x .svn ..\CorsixTH\Bitmap\*.png - - SetOutPath "$INSTDIR\Levels" - File /r /x .svn ..\CorsixTH\Levels\*.* - -; Shortcuts and final files - SetOutPath "$INSTDIR" - File ..\CorsixTH\*.lua - File ..\CorsixTH\changelog.txt - File ..\CorsixTH\LICENSE.txt - File ..\CorsixTH\README.txt - - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - !insertmacro MUI_STARTMENU_WRITE_END - -SectionEnd - - -; ----------------------- Start menu items and finalizing activities ------------------------- - - -Section -AdditionalIcons - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}_SDL.lnk" "$INSTDIR\CorsixTH_SDL.exe" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}_DirectX.lnk" "$INSTDIR\CorsixTH_DirectX.exe" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}_OpenGL.lnk" "$INSTDIR\CorsixTH_OpenGL.exe" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Map Editor.lnk" "$INSTDIR\MapEdit.exe" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" - CreateShortcut "$SMPROGRAMS\${PRODUCT_NAME}\CorsixTH AppData Folder.lnk" "$APPDATA\CorsixTH" - !insertmacro MUI_STARTMENU_WRITE_END -SectionEnd - -Section -Post - WriteUninstaller "$INSTDIR\Uninstall.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe" - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" - -SectionEnd - - -Function un.onUninstSuccess - HideWindow - MessageBox MB_ICONINFORMATION|MB_OK "$(successful_removal)" -FunctionEnd - -Function un.onInit - !insertmacro MUI_UNGETLANGUAGE -FunctionEnd - -; To be able to show localized strings -Function un.onGUIInit2 - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(confirm_removal)" IDYES +2 - Abort -FunctionEnd - - -; -------------------------- What to remove when uninstalling ------------------------------- -Section Uninstall - - RMDir /r "$INSTDIR\Lua" - RMDir /r "$INSTDIR\Bitmap" - RMDir /r "$INSTDIR\Levels" - - Delete "$INSTDIR\*.*" - - Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*" - - RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}" - - ; Maybe the user wants to keep saved games? - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(remove_saves)" IDYES afterSaves - ; Try to remove everything in AppData too. Nothing happens if it doesn't exist. - RMDir /r "$APPDATA\CorsixTH\Saves" - RMDir /r "$APPDATA\CorsixTH" - RMDir /r "$INSTDIR\Saves" - - afterSaves: - ${Unless} ${FileExists} "$INSTDIR\Saves" - RMDir "$INSTDIR" - ${EndUnless} - DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" - - IfErrors error noerror - error: - MessageBox MB_OK "$(files_left)" - noerror: - SetAutoClose true -SectionEnd +; Copyright (c) 2012 Edvin "Lego3" Linge + +; Permission is hereby granted, free of charge, to any person obtaining a copy of +; this software and associated documentation files (the "Software"), to deal in +; the Software without restriction, including without limitation the rights to +; use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +; of the Software, and to permit persons to whom the Software is furnished to do +; so, subject to the following conditions: + +; The above copyright notice and this permission notice shall be included in all +; copies or substantial portions of the Software. + +; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +; 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. + +; Base Script generated by the HM NIS Edit Script Wizard. + +;---------------------------------- Definitions for the game ----------------------------------- + +!define PRODUCT_NAME "CorsixTH" +!define PRODUCT_VERSION "Trunk" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" +!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "CorsixTHInstaller.exe" +InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" + +; MUI 1.67 compatible ------ +!include "MUI.nsh" +; Compatible with x64 systems +!include "x64.nsh" + +; This is needed to be able to install into the program files directory +RequestExecutionLevel admin + + +; -------------------- Definitions and macros that create the graphical interface ----------------- + + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_CUSTOMFUNCTION_UNGUIINIT un.onGUIInit2 + +!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp" +!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcome.bmp" + +; Language Selection Dialog Settings +!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +!insertmacro MUI_PAGE_LICENSE "..\CorsixTH\LICENSE.txt" +; Directory page +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE ValidateDirectory +!insertmacro MUI_PAGE_DIRECTORY +; Another directory page to choose where the original game is +Var ORIGINALPATH +Var CONFIGAPPDATA +;!define MUI_DIRECTORYPAGE_TEXT_TOP $(original_text) +;!define MUI_DIRECTORYPAGE_VARIABLE $OriginalPath +;!define MUI_DIRECTORYPAGE_TEXT_DESTINATION $(original_folder) +;!insertmacro MUI_PAGE_DIRECTORY +Page Custom OptionsPage OptionsPageLeave +; Start menu page +var ICONS_GROUP +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${PRODUCT_NAME}" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" +!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!define MUI_FINISHPAGE_RUN "$INSTDIR\CorsixTH_SDL.exe" +!define MUI_FINISHPAGE_RUN_NOTCHECKED +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Icons used by the installer and uninstaller +UninstallIcon "..\CorsixTH\corsixTH.ico" +Icon "..\CorsixTH\corsixTH.ico" + + +; ------------------------------- Languages supported by the installer --------------------------- + + +; Language files +!insertmacro MUI_LANGUAGE "Czech" +!insertmacro MUI_LANGUAGE "Danish" +!insertmacro MUI_LANGUAGE "Dutch" +!insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "Finnish" +!insertmacro MUI_LANGUAGE "French" +!insertmacro MUI_LANGUAGE "German" +!insertmacro MUI_LANGUAGE "Italian" +!insertmacro MUI_LANGUAGE "Norwegian" +!insertmacro MUI_LANGUAGE "Polish" +!insertmacro MUI_LANGUAGE "Portuguese" +!insertmacro MUI_LANGUAGE "Russian" +!insertmacro MUI_LANGUAGE "SimpChinese" +!insertmacro MUI_LANGUAGE "Spanish" +!insertmacro MUI_LANGUAGE "Swedish" +!insertmacro MUI_LANGUAGE "TradChinese" + +; MUI end ------ + +;Used to replace strings in the config.txt file +!include StrRep.nsh +!include ReplaceInFile.nsh + +Function .onInit + ; Set default Theme Hospital vanilla install directory. + ; TODO: try to find the correct one in the registry (or "AppData") from + ; previous install of CorsixTH + StrCpy $OriginalPath "$PROGRAMFILES\Bullfrog\Hospital\" + ${If} ${RunningX64} + StrCpy $INSTDIR $PROGRAMFILES64\${PRODUCT_NAME} + ${EndIf} + !insertmacro MUI_LANGDLL_DISPLAY +FunctionEnd + +!include LanguageStrings.nsh + +; A function called when the user wants to move on past the choose installation directory dialog. +Function ValidateDirectory + ; Check if we're trying to install over an existing installation + ${If} ${FileExists} "$INSTDIR\Lua" + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(overwrite_install)" IDYES overwriting + Abort + ${EndIf} + overwriting: +FunctionEnd + +; ----------------------------- Functions for the custom options page ---------------------------- + +Function OptionsPage + ${If} ${FileExists} "$APPDATA\CorsixTH\config.txt" + IntOp $CONFIGAPPDATA 1 * 1 + Abort + ${ElseIf} ${FileExists} "$INSTDIR\config.txt" + Abort + ${EndIf} + ReserveFile "OptionsPage.ini" + !insertmacro MUI_HEADER_TEXT $(options_title) $(options_subtitle) + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "OptionsPage.ini" + ; The ini file is actually static. Set strings so that they are localized. + WriteINIStr "$PLUGINSDIR\OptionsPage.ini" "Field 1" "Text" $(save_in_appdata) + WriteINIStr "$PLUGINSDIR\OptionsPage.ini" "Field 3" "Text" $(original_folder) + WriteINIStr "$PLUGINSDIR\OptionsPage.ini" "Field 4" "Text" $(original_text) + + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "OptionsPage.ini" +FunctionEnd + +Function OptionsPageLeave + ; Get install path and where to put configuration files and saved games. + !insertmacro MUI_INSTALLOPTIONS_READ $ORIGINALPATH "OptionsPage.ini" "Field 2" "State" + !insertmacro MUI_INSTALLOPTIONS_READ $CONFIGAPPDATA "OptionsPage.ini" "Field 1" "State" +FunctionEnd + + +; -------------------------- Define which files to include in the package ------------------------ + + +Section "MainSection" SEC01 + SetOutPath "$INSTDIR" + SetOverwrite ifnewer + ${If} ${RunningX64} + File /r /x .svn x64\*.* + Goto continued + ${EndIf} + File /r /x .svn x86\*.* + + continued: + ; Time to make the configuration file and Saves folder at the correct location + ${If} $CONFIGAPPDATA == 1 + SetOutPath "$APPDATA\CorsixTH" + IfFileExists "$APPDATA\CorsixTH\Saves" saves + ; Don't overwrite previous installations though! + CreateDirectory "$APPDATA\CorsixTH\Saves" + ${Else} + ; Tell the game that it should read the config file from the install dir + ; Don't overwrite previous installations here either! + IfFileExists "$INSTDIR\config.path.txt" saves + FileOpen $9 config.path.txt w + FileWrite $9 "$INSTDIR\$\r$\n" + FileClose $9 + + IfFileExists "$INSTDIR\Saves" saves + CreateDirectory "$INSTDIR\Saves" + ${EndIf} + File config_template.txt + + ; Change settings in the config file. + System::Call 'user32::GetSystemMetrics(i 0) i .r0' + System::Call 'user32::GetSystemMetrics(i 1) i .r1' + !insertmacro ReplaceInFile config_template.txt ORIGINAL_HOSPITAL_DIRECTORY $ORIGINALPATH + !insertmacro ReplaceInFile config_template.txt LANGUAGE_CHOSEN $(install_language) + !insertmacro ReplaceInFile config_template.txt SCREEN_SIZE_WIDTH "$0" + !insertmacro ReplaceInFile config_template.txt SCREEN_SIZE_HEIGHT "$1" + !insertmacro ReplaceInFile config_template.txt SCREEN_FULLSCREEN "true" + ; TODO: Let the user choose if new music files exist and where they are in that case. + Rename config_template.txt config.txt + Delete config_t* + ; Continue here if the saves folder and config file was already present + saves: + + ; The three other needed folders + ; The old Lua folder is deleted first, if any exists, so that the game can start properly. + ${If} ${FileExists} "$INSTDIR\Lua" + RMDir /r "$INSTDIR\Lua" + CreateDirectory "$INSTDIR\Lua" + ${EndIf} + SetOutPath "$INSTDIR\Lua" + File /r /x .svn ..\CorsixTH\Lua\*.* + + SetOutPath "$INSTDIR\Bitmap" + File /r /x .svn ..\CorsixTH\Bitmap\*.pal + File /r /x .svn ..\CorsixTH\Bitmap\*.dat + File /r /x .svn ..\CorsixTH\Bitmap\*.tab + File /r /x .svn ..\CorsixTH\Bitmap\*.png + + SetOutPath "$INSTDIR\Levels" + File /r /x .svn ..\CorsixTH\Levels\*.* + +; Shortcuts and final files + SetOutPath "$INSTDIR" + File ..\CorsixTH\*.lua + File ..\CorsixTH\changelog.txt + File ..\CorsixTH\LICENSE.txt + File ..\CorsixTH\README.txt + + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + +SectionEnd + + +; ----------------------- Start menu items and finalizing activities ------------------------- + + +Section -AdditionalIcons + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}_SDL.lnk" "$INSTDIR\CorsixTH_SDL.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}_DirectX.lnk" "$INSTDIR\CorsixTH_DirectX.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}_OpenGL.lnk" "$INSTDIR\CorsixTH_OpenGL.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Map Editor.lnk" "$INSTDIR\MapEdit.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + CreateShortcut "$SMPROGRAMS\${PRODUCT_NAME}\CorsixTH AppData Folder.lnk" "$APPDATA\CorsixTH" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\Uninstall.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + +SectionEnd + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(successful_removal)" +FunctionEnd + +Function un.onInit + !insertmacro MUI_UNGETLANGUAGE +FunctionEnd + +; To be able to show localized strings +Function un.onGUIInit2 + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(confirm_removal)" IDYES +2 + Abort +FunctionEnd + + +; -------------------------- What to remove when uninstalling ------------------------------- +Section Uninstall + + RMDir /r "$INSTDIR\Lua" + RMDir /r "$INSTDIR\Bitmap" + RMDir /r "$INSTDIR\Levels" + + Delete "$INSTDIR\*.*" + + Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*" + + RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}" + + ; Maybe the user wants to keep saved games? + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(remove_saves)" IDYES afterSaves + ; Try to remove everything in AppData too. Nothing happens if it doesn't exist. + RMDir /r "$APPDATA\CorsixTH\Saves" + RMDir /r "$APPDATA\CorsixTH" + RMDir /r "$INSTDIR\Saves" + + afterSaves: + ${Unless} ${FileExists} "$INSTDIR\Saves" + RMDir "$INSTDIR" + ${EndUnless} + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + + IfErrors error noerror + error: + MessageBox MB_OK "$(files_left)" + noerror: + SetAutoClose true +SectionEnd