# HG changeset patch
# User unc0rr
# Date 1449423381 -10800
# Node ID 42a9dd7b724caa6960af01781032394771040030
# Parent 2572afe532af5e7c4733d9fe2533785a44098199# Parent 6f119783a1adb69759c00dea16f39d2c3cefb0a8
Merge default
diff -r 2572afe532af -r 42a9dd7b724c .hgtags
--- a/.hgtags Sun Dec 06 20:35:58 2015 +0300
+++ b/.hgtags Sun Dec 06 20:36:21 2015 +0300
@@ -70,6 +70,7 @@
4c4f22cc3fa4e6c1e5cd6cce35350dd93478415f 0.9.22-release
4c4f22cc3fa4e6c1e5cd6cce35350dd93478415f 0.9.22-release
9621fdcad96589b3fd78713a0f31e72f26f068bb 0.9.22-release
+a0163b8302c592aac60d98134bb6730f390fcaad Hedgewars-iOS-2.0
7e55468ffe384a3065524c483eb5e3cdb1658fd5 fab746a3597e
0000000000000000000000000000000000000000 fab746a3597e
d9622394ec9c2974a84b9b4d9e6c0ac26c4060ff 0.9.22-RC
diff -r 2572afe532af -r 42a9dd7b724c .travis.yml
--- a/.travis.yml Sun Dec 06 20:35:58 2015 +0300
+++ b/.travis.yml Sun Dec 06 20:36:21 2015 +0300
@@ -1,7 +1,10 @@
language: c
+os:
+ - linux
+ - osx
branches:
- except:
- gh-pages
+ only:
+ master
compiler:
- gcc
- clang
@@ -11,15 +14,41 @@
- BUILD_ARGS="-DNOSERVER=1 -DBUILD_ENGINE_C=1"
- BUILD_ARGS="-DNOSERVER=1 -DNOVIDEOREC=1 -DNOPNG=1"
- BUILD_ARGS="-DNOSERVER=1 -DLUA_SYSTEM=0 -DPHYSFS_SYSTEM=0"
-matrix:
- allow_failures:
- # Failures we expect here
-before_install:
- - sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
- - sudo apt-get update -qq
- - sudo apt-get install debhelper cmake dpkg-dev libqt4-dev qt4-qmake libphysfs-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev bzip2 ghc libghc-mtl-dev libghc-parsec3-dev libghc-bytestring-show-dev libghc-vector-dev libghc-zlib-dev libghc-random-dev libghc-stm-dev libghc-network-dev libghc-dataenc-dev libghc-hslogger-dev libghc-utf8-string-dev libghc-sha-dev libghc-entropy-dev liblua5.1-0-dev imagemagick fpc fp-compiler fp-units-misc libpng-dev fp-units-gfx libavcodec-dev libavformat-dev libglew1.6-dev
-script:
- - mkdir build && cd build && cmake $BUILD_ARGS .. && make VERBOSE=1 && make test_verbose
+before_install: |
+ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+ sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
+ sudo apt-get update -qq
+ elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ brew update --all
+ fi
+install: |
+ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+ sudo apt-get install debhelper cmake dpkg-dev libqt4-dev qt4-qmake libphysfs-dev libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-net-dev bzip2 ghc libghc-mtl-dev libghc-parsec3-dev libghc-bytestring-show-dev libghc-vector-dev libghc-zlib-dev libghc-random-dev libghc-stm-dev libghc-network-dev libghc-dataenc-dev libghc-hslogger-dev libghc-utf8-string-dev libghc-sha-dev libghc-entropy-dev liblua5.1-0-dev imagemagick fpc fp-compiler fp-units-misc libpng-dev fp-units-gfx libavcodec-dev libavformat-dev libglew1.6-dev
+ elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ brew install fpc glew qt physfs lua51 sdl2 sdl2_image sdl2_net sdl2_ttf ffmpeg ghc cabal-install
+ brew install sdl2_mixer --with-vorbis
+ # use cabal install haskell deps, pas2c ones are covered by server
+ if [[ "$BUILD_ARGS" != *"NOSERVER"* ]]; then
+ cabal update
+ cabal install --only-dependencies gameServer/hedgewars-server.cabal
+ fi
+ if [[ "$BUILD_ARGS" == *"BUILD_ENGINE_C"* ]]; then
+ cabal update
+ cabal install --only-dependencies tools/pas2c/pas2c.cabal
+ fi
+ # avoid installing Sparkle, add default unit path
+ export BUILD_ARGS="$BUILD_ARGS -DNOAUTOUPDATE=1 -DCMAKE_Pascal_FLAGS=-Fu/usr/local/lib/fpc/$(fpc -iW)/units/x86_64-darwin/*/"
+ fi
+before_script:
+ - mkdir build && cd build && cmake $BUILD_ARGS ..
+script:
+ - make VERBOSE=1
+after_success: |
+ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+ make test_verbose
+ elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ make install
+ fi
notifications:
email: false
irc:
@@ -30,3 +59,4 @@
- "See details at %{build_url}"
on_success: change
on_failure: always
+ skip_join: true
diff -r 2572afe532af -r 42a9dd7b724c ChangeLog.txt
--- a/ChangeLog.txt Sun Dec 06 20:35:58 2015 +0300
+++ b/ChangeLog.txt Sun Dec 06 20:36:21 2015 +0300
@@ -30,8 +30,12 @@
Lua-API:
+ New map parameter: MapFeatureSize -- numeric representation of detail slider below map preview; use within onGameInit()/onPreviewInit()
- + New function: SetMaxBuildDistance([ distInPx ]) -- specify how many pixels away a hedgehog can still place girders/etc. set to 0 for no limit; call with no param to reset to default
+ + New functions: SetMaxBuildDistance([ distInPx ]) -- specify how many pixels away a hedgehog can still place girders/etc. set to 0 for no limit; call with no param to reset to default,
+ New hook: onSuddenDeath() -- called by engine when sudden death begins
+ + Parameters are now optional for the generic gear setters. i.e. - SetVisualGearValues(gear, x, y). nil values are skipped and not set.
+ + PlaceSprite can now set land type (bouncy, indestructible, ice etc), colour the sprite, flip the sprite, and place the sprite behind existing land.
+ + EraseSprite. Can flip and selectively erase based on land flags.
+ + More of the gear structure values are now accessible in the generic gear getter/setter.
* Previously missing gear states are now available (gstSubmersible, gstFrozen and gstNoGravity)
* Fixed OnHogAttack giving the incorrect AmmoType (amNothing) under certain conditions
diff -r 2572afe532af -r 42a9dd7b724c gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs Sun Dec 06 20:35:58 2015 +0300
+++ b/gameServer/HWProtoInRoomState.hs Sun Dec 06 20:36:21 2015 +0300
@@ -175,11 +175,11 @@
ModifyClient
(\c -> c{
teamsInGame = teamsInGame c - 1,
- clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan clNick team r
+ clientClan = if teamsInGame c == 1 then Nothing else anotherTeamClan clNick team r
})
]
where
- anotherTeamClan clNick team = teamcolor . fromMaybe (error "CHECKPOINT 011") . find (\t -> (teamowner t == clNick) && (t /= team)) . teams
+ anotherTeamClan clNick team = liftM teamcolor . find (\t -> (teamowner t == clNick) && (t /= team)) . teams
findTeam = find (\t -> tName == teamname t) . teams
diff -r 2572afe532af -r 42a9dd7b724c hedgewars/uStore.pas
--- a/hedgewars/uStore.pas Sun Dec 06 20:35:58 2015 +0300
+++ b/hedgewars/uStore.pas Sun Dec 06 20:36:21 2015 +0300
@@ -745,7 +745,7 @@
if SDLGLcontext = nil then
SDLGLcontext:= SDL_GL_CreateContext(SDLwindow);
SDLTry(SDLGLcontext <> nil, 'SDLGLcontext', true);
- SDLTry(SDL_GL_SetSwapInterval(1) = 0, 'SDL_GL_SetSwapInterval', true);
+ SDL_GL_SetSwapInterval(1);
RendererSetup();
diff -r 2572afe532af -r 42a9dd7b724c project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons/forwardjump.png
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons/forwardjump.png has changed
diff -r 2572afe532af -r 42a9dd7b724c project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons/forwardjump_old.png
Binary file project_files/Android-build/SDL-android-project/assets/Data/Graphics/Buttons/forwardjump_old.png has changed
diff -r 2572afe532af -r 42a9dd7b724c project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m
--- a/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Sun Dec 06 20:35:58 2015 +0300
+++ b/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Sun Dec 06 20:36:21 2015 +0300
@@ -267,7 +267,6 @@
-(void) didReceiveMemoryWarning
{
- self.previewImage = nil;
self.missionName = nil;
self.listOfMissionIDs = nil;
self.dictOfMissions = nil;
diff -r 2572afe532af -r 42a9dd7b724c project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sun Dec 06 20:35:58 2015 +0300
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sun Dec 06 20:36:21 2015 +0300
@@ -268,14 +268,14 @@
footer.backgroundColor = [UIColor clearColor];
footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*80/100, height)];
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*90/100, height)];
label.center = CGPointMake(aTableView.frame.size.width/2, height/2);
label.textAlignment = UITextAlignmentCenter;
label.font = [UIFont italicSystemFontOfSize:12];
label.textColor = [UIColor whiteColor];
label.numberOfLines = 2;
label.backgroundColor = [UIColor clearColor];
- label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
+ label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth;
label.text = NSLocalizedString(@"Setting a Style might force a particular Scheme or Weapon configuration.",@"");
diff -r 2572afe532af -r 42a9dd7b724c project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Dec 06 20:35:58 2015 +0300
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Sun Dec 06 20:36:21 2015 +0300
@@ -194,23 +194,23 @@
}
-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
- return IS_IPAD() ? 40 : 20;
+ return IS_IPAD() ? 40 : 30;
}
-(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger) section {
- NSInteger height = IS_IPAD() ? 40 : 20;
+ NSInteger height = IS_IPAD() ? 40 : 30;
UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width, height)];
footer.backgroundColor = [UIColor clearColor];
footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*80/100, height)];
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*90/100, height)];
label.center = CGPointMake(aTableView.frame.size.width/2, height/2);
label.textAlignment = UITextAlignmentCenter;
label.font = [UIFont italicSystemFontOfSize:12];
label.textColor = [UIColor whiteColor];
label.numberOfLines = 2;
label.backgroundColor = [UIColor clearColor];
- label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
+ label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth;
if (section == 0)
label.text = NSLocalizedString(@"Tap to add hogs or change color, touch and hold to remove a team.",@"");
diff -r 2572afe532af -r 42a9dd7b724c share/hedgewars/Data/Graphics/Missions/Training/Basic_Training_-_Flying_Saucer@2x.png
Binary file share/hedgewars/Data/Graphics/Missions/Training/Basic_Training_-_Flying_Saucer@2x.png has changed
diff -r 2572afe532af -r 42a9dd7b724c share/hedgewars/Data/Locale/hedgewars_zh_TW.ts
--- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Sun Dec 06 20:35:58 2015 +0300
+++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Sun Dec 06 20:36:21 2015 +0300
@@ -5,14 +5,14 @@
About
-
+ 未知的編譯器
AbstractPage
-
+ 退回
@@ -23,96 +23,96 @@
-
+ %1的拷貝
BanDialog
- IP
+ IP
-
+ 暱稱
-
+ IP/暱稱
-
+ 原因
-
+ 持續時間
-
+ 確定
- 取消
+ 取消
-
+ 你知道為什麼
-
+ 警告
-
+ 請指定%1
-
+ 暱稱
-
+ 永久
DataManager
-
+ 使用預設值
FeedbackDialog
-
+ 查看
- 取消
+ 取消
-
+ 發送反饋
-
+ 我們很樂意收到建議,想法,或是bug回報。
-
+ 給我們反饋!
-
+ 如果你發現了一個bug,可以先檢查它是否已經被回報過:
-
+ 如果希望我們回覆你, 請留下你的電子郵件地址。
@@ -132,244 +132,246 @@
GameCFGWidget
- 改變武器設置
+ 修改武器
- 修改遊戲設置
+ 修改方案
-
+ 遊戲方案將自動選擇武器
- 地圖
+ 地圖
-
+ 遊戲選項
GameUIConfig
-
+ 遊客
HWApplication
-
-
+
+ %1 分鐘
-
-
+
+ %1 小時
-
-
+
+ %1 小時
-
-
+
+ %1 天
-
-
+
+ %1 天
-
+ 不支持遊戲方案“%1”
- 無法創建路徑 %1
+ 不能建立目錄 %1
-
+ 無法打開數據目錄:%1
+請檢查你的安裝!
command-line
-
+ 用法
command-line
-
+ 選項
command-line
-
+ 連接字串
command-line
-
+ 選項
command-line
-
+ 顯示此幫助
command-line
-
+ 自定義路徑用於儲存配置和用戶數據
command-line
-
+ 自定義路徑相對於遊戲數據文件夾
command-line
-
+ 啟動刺蝟大作戰能使用%1(例如 "%2")來連線
command-line
-
+ 格式不正確的選項參數:%1
command-line
-
+ 未知的選項參數:%1
HWAskQuitDialog
-
+ 你真的要退出嗎?
HWChatWidget
-
+ %1已從你的忽略列表中刪除
-
+ %1已添加到你的忽略列表
-
+ %1已從你的好友列表中刪除
-
+ %1已添加到你的好友列表
-
+ 樣式表已從%1導入
-
+ 如果你未來想使用當前的樣式表,請輸入%1 ;重置,請輸入%2!
-
+ 無法讀取 %1
-
+ 樣式表被丟棄
-
+ 樣式表保存到%1
-
+ 無法保存樣式表%1
-
+ %1已經加入
-
+ %1已經離開
-
+ %1已經離開(%2)
HWForm
- 無法錄入檔 %1
+ 無法保存記錄到文件%1
-
+ 預設隊伍
File Types
-
+ 刺蝟大作戰演示檔
File Types
-
+ 刺蝟大作戰存檔
-
+ 演示名稱
-
+ 演示名稱:
-
+ 比賽中止
- 匿稱
+ 匿稱
-
+ 沒有暱稱供應。
-
+ 在伺服器上已經有人使用你的暱稱(%1)
+請選擇另一個暱稱:
-
+ %1的隊伍
-
+ 刺蝟大作戰 - 暱稱註冊
-
+ 這個暱稱被註冊,並且你還沒有指定密碼
+如果這個暱稱是不是你的,請上www.hedgewars.org註冊自己的暱稱
+密碼:
-
+ 你的暱稱未註冊。
+要防止其他人使用它,
+請上www.hedgewars.org進行註冊
-
+ 未保存任何你的密碼。
-
+ 刺蝟大作戰 - 空的暱稱
-
+ 刺蝟大作戰 - 密碼錯誤
-
+ 你輸入了錯誤的密碼。
-
+ 再試一次
-
+ 刺蝟大作戰 - 連接錯誤
-
+ 你太快重新連接了。
+請等待幾秒鐘,然後再試一次。
-
+ 此頁面需要連接網際網路。
-
+ 遊客
-
+ 房間密碼
-
+ 房間使用密碼保護
+請輸入密碼:
@@ -442,7 +450,7 @@
- DEMO %1 打不開
+ 無法打開 演示檔案 %1
-
+ 一個致命的錯誤! - 遊戲引擎不得不停止
+我們很抱歉給你帶來不便:(
+如果這一情況持續發生,請點擊主菜單中的“%1”按鈕
+上次兩款發動機的消息:
+%2
@@ -484,103 +496,103 @@
-
+ 小隧道
-
+ 中隧道
-
+ 種子
-
+ 地圖類型:
-
+ 圖片地圖
-
+ 任務地圖
-
+ 手繪
-
+ 隨機產生
-
+ 隨機迷宮
- 隨機
+ 隨機
-
+ 地圖預覽:
-
+ 加載地圖繪製
-
+ 編輯地圖繪製
-
+ 小島嶼
-
+ 中島嶼
-
+ 大島嶼
-
+ 地圖尺寸:
-
+ 迷宮的風格:
-
+ 任務:
-
+ 地圖:
-
+ 加載繪製的地圖
-
+ 繪製地圖
-
+ 所有文件
-
+ 大隧道
-
+ 主題:%1
@@ -588,7 +600,7 @@
-
+ 風格:
@@ -603,14 +615,14 @@
- 埠
+ 端口
HWNewNet
- 錯誤沒找到這個主機。請檢查主機名稱和埠設置。
+ 錯誤沒找到這個主機。請檢查主機名稱和端口設置。
@@ -646,74 +658,77 @@
-
+ 用戶退出
-
+ 遠程主機已關閉連接
-
+ 伺服器太舊。立即斷線。
-
+ 伺服器身份驗證錯誤
HWPasswordDialog
-
+ 登入
-
+ 要連接到伺服器,請登錄。
+
+如果你在www.hedgewars.org沒有一個的帳號,
+只需輸入你的暱稱。
-
+ 暱稱:
-
+ 密碼:
HWUploadVideoDialog
-
+ 上傳視頻
-
+ 上傳
HatButton
-
+ 改變帽子(%1)
HatPrompt
- 取消
+ 取消
-
+ 使用選定的帽子
-
+ 搜索一頂帽子:
@@ -727,7 +742,7 @@
KeyBinder
-
+ 分類
@@ -738,26 +753,26 @@
-
+ 未知
-
+ 持續時間:%1分 %2秒
-
+ 視頻:%1X%2
-
+ %1 FPS
MapModel
-
+ 沒有可用的描述。
@@ -768,27 +783,27 @@
-
+ 獲取數據
-
+ 對於最新版本的伺服器消息:
-
+ 以前版本的伺服器消息:
-
+ 最新版本協議號:
-
+ 今日消息預覽:
-
+ 設置數據
@@ -796,31 +811,31 @@
-
+ 封鎖
-
+ IP/暱稱
-
+ 期滿
-
+ 原因
-
+ 刷新
-
+ 增加
-
+ 刪除
@@ -834,145 +849,145 @@
PageDataDownload
-
+ 載入中,請稍候。
-
+ 此頁面需要連接網際網路。
-
+ 打開組件目錄
PageDrawMap
-
+ 復原
- 清除
+ 清除
- 讀取
+ 讀取
-
+ 保存
-
+ 讀取繪製的地圖
-
+ 保存繪製的地圖
-
+ 繪製地圖
-
+ 所有文件
-
+ 黑板擦
-
+ 折線
-
+ 矩形
-
+ 橢圓
-
+ 優化
PageEditTeam
- 常規
+ 常規
-
+ 點動作,來替隊伍選擇自定義的按鍵綁定
-
+ 使用我的預設值
-
+ 重置全部綁定
-
+ 自定義控制
- 帽子
+ 帽子
-
+ 名字
-
+ 這隻刺猬的名字
-
+ 隨機選擇這隻刺猬的名字
- 隨機隊伍分配
+ 隨機隊伍分配
PageGameStats
-
+ 細節
-
+ 生命圖
-
+ 排行
-
+ <b>%1%n</b>的<b>%2</b>傷害獲得最佳攻擊獎。
-
+ 最佳殺手為<b>%1</b>在一回合<b>%2</b>殺。
-
+ 這場總共<b>%1</b>隻刺蝟死亡。
@@ -984,28 +999,28 @@
-
+ <b>%1</b>認為攻擊自己的刺猬<b>%2</b>傷害是很好的。
-
+ <b>%1</b>殺了<b>%2</b>隻自己的刺蝟。
-
+ <b>%1</b>很慌張,跳過<b>%2</b>次。
-
+ 再玩一次
-
+ 存檔
@@ -1018,73 +1033,73 @@
PageInGame
-
+ 在遊戲中...
PageInfo
-
+ 打開快照文件夾
PageMain
-
+ 可下載的內容
-
+ 開始一個單機版遊戲
-
+ 開始一個網路對戰遊戲
-
+ 看看刺蝟大作戰背後的功臣們
-
+ 在這裡可以回報問題,提出建議,或是說說你多麼喜歡刺蝟大作戰
-
+ 從我們的網站訪問用戶創建的內容
-
+ 退出遊戲
-
+ 管理從遊戲中錄製的視頻
-
+ 編輯遊戲偏好設定
-
+ 跨內網玩遊戲
-
+ 在官方伺服器上玩遊戲
-
+ 信息反饋
-
+ 玩內網遊戲
-
+ 玩官網遊戲
@@ -1095,7 +1110,7 @@
-
+ 編輯遊戲偏好設定
@@ -1106,37 +1121,37 @@
-
+ 編輯遊戲偏好設定
- 開始
+ 開始
- 更新
+ 更新
-
+ 房間管理
PageNetServer
-
+ 點擊查看詳情
-
+ 在此處插入你的地址
PageOptions
- 新隊伍
+ 新增隊伍
@@ -1144,163 +1159,163 @@
-
+ 刪除隊伍
-
+ 你不能在隊伍選單中修改隊伍。回到主選單上,新增,編輯或刪除隊伍.
-
+ 新增方案
-
+ 修改方案
-
+ 刪除方案
-
+ 新增武器組合
-
+ 修改武器組合
-
+ 刪除武器組合
- 進階
+ 進階
-
+ 重置為預設顏色
-
+ 代理伺服器主機
-
+ 代理伺服器端口
-
+ 代理伺服器帳號
-
+ 代理伺服器密碼
-
+ 無代理
-
+ Socks5代理
-
+ HTTP代理
-
+ 系統代理設置
-
+ 點動作,來改變控制它的按鍵
-
+ 重置為預設值
-
+ 重置所有的綁定
-
+ 遊戲
-
+ 圖像
-
+ 聲音
-
+ 控制
-
+ 錄像
-
+ 網路
- 隊伍
+ 隊伍
-
+ 方案
- 武器
+ 武器
-
+ 前端
-
+ 自定義顏色
-
+ 遊戲音效
-
+ 前端音效
-
+ 帳戶
-
+ 代理伺服器設置
-
+ 雜項
-
+ 更新
-
+ 檢查更新
-
+ 視頻錄製選項
@@ -1339,35 +1354,35 @@
-
+ %1%n 玩家在線
-
+ 搜索房間:
-
+ 創建房間
-
+ 加入房間
-
+ 房間狀態
-
+ 打開伺服器管理頁面
PageScheme
- 新模式
+ 新增
@@ -1375,7 +1390,7 @@
- 傷害的80%變成自身力量
+ 傷害的80%成為自身生命
@@ -1395,7 +1410,7 @@
- 保衛你的城堡,破壞對手的,努力吧!
+ 保衛你的堡壘,破壞對手的,努力吧!
@@ -1427,86 +1442,86 @@
- 在開局前手動放置刺猬
+ 在開局前手動放置刺猬。
-
+ 同一個顏色的所有隊伍之間共享彈藥。
-
+ 生成隨機地圖時,禁用橋樑。
-
+ 生成隨機地圖時,禁用地面物體。
-
+ AI死亡後重生。
-
+ 所有(活的)刺猬在回合結束時完全恢復
-
+ 進攻後不會自動結束你的回合。
-
+ 每回合武器被重置為初始值。
-
+ 每個刺猬有它自己的彈藥。它不與隊伍分享。
-
+ 禁風,你將不用擔心風了。
-
+ 風將影響幾乎所有東西。
-
+ 複製
-
+ 同一顏色的每個隊伍採取連續輪流分享他們的回合時間。
- 添加不可毀壞地邊界
+ 在地型周圍添加一個堅不可摧的邊界
-
+ 沿著底部添加一個堅不可摧的邊界
-
+ 沒有(預設值)
-
+ 重疊(世界重疊)
-
+ 彈跳(邊緣反射)
-
+ 海水(邊緣連接到海)
PageSelectWeapon
- 默認
+ 預設值
@@ -1514,68 +1529,68 @@
- 新模式
+ 新增
-
+ 複製
PageSinglePlayer
-
+ 使用隨機設置與電腦快速開始遊戲
-
+ 與你的朋友或AI隊伍進行遊戲
-
+ 戰役模式
-
+ 透過一系列的培訓任務,練習你的技能
-
+ 觀看錄製的演示
-
+ 讀取以前保存的遊戲
PageTraining
-
+ 沒有可用的描述
-
+ 選擇一個任務!
-
+ 選擇要玩的任務或培訓
-
+ 開始戰鬥
PageVideos
-
+ 名稱
-
+ 大小
@@ -1585,23 +1600,23 @@
-
+ (處理中...)
-
+ 編碼
-
+ 上傳
-
+ 日期:%1
-
+ 大小:%1
@@ -1620,7 +1635,7 @@
- 限制團隊外掛程式
+ 限制隊伍外掛程式
@@ -1632,19 +1647,19 @@
-
+ 忽略
-
+ 加為好友
-
+ 不忽略
-
+ 刪除好友
@@ -1652,22 +1667,22 @@
-
+ 限制未註冊的玩家加入
-
+ 顯示遊戲大廳
-
+ 顯示正在進行的遊戲
QCheckBox
- 遊戲全螢幕
+ 全螢幕
@@ -1679,11 +1694,11 @@
- 記錄名稱中包含具體時間日期
+ 記錄檔名中包含具體時間日期
- 啟動時檢查程式升級
+ 啟動時檢查更新
@@ -1691,83 +1706,83 @@
-
+ 保存密碼
-
+ 保存帳戶名和密碼
-
+ 視頻是私人
-
+ 錄製音頻
-
+ 套用遊戲解析度
-
+ 視覺效果
-
+ 音效
-
+ 在遊戲中的聲音效果
-
+ 音樂
-
+ 在遊戲中的音樂
-
+ 前端音效
-
+ 前端的音樂
-
+ 隊伍
-
+ 預設顯示隊伍名標示
-
+ 刺蝟
-
+ 預設顯示刺猬名標示
-
+ 生命
-
+ 預設顯示生命值標示
-
+ 半透明
-
+ 預設啟用半透明顯示
@@ -1778,11 +1793,11 @@
- Lv 級別
+ AI等級
-
+ (系統預設值)
@@ -1790,31 +1805,31 @@
-
+ 關閉
-
+ 紅色/青色
-
+ 青色/紅
-
+ 紅/藍
-
+ 藍/紅
-
+ 紅/綠
-
+ 綠/紅
@@ -1826,42 +1841,42 @@
-
+ 紅/青色灰度
-
+ 青色/紅灰度
-
+ 紅/藍灰度
-
+ 藍/紅灰度
-
+ 紅/綠灰度
-
+ 綠/紅灰度
QGroupBox
- 成員
+ 隊伍成員
- 城堡模式
+ 堡壘
- 玩家隊伍
+ 玩家隊伍
@@ -1877,15 +1892,15 @@
-
+ 隊伍設置
-
+ 視頻
-
+ 描述
@@ -1900,11 +1915,11 @@
- 伺服器名:
+ 伺服器名稱:
- 伺服器埠:
+ 伺服器端口:
@@ -1912,7 +1927,7 @@
- 埠:
+ 端口:
@@ -1928,7 +1943,7 @@
- 傷害修改
+ 傷害修正
@@ -1940,11 +1955,11 @@
- 死亡模式倒計時
+ 意外死亡倒數
- 設置名稱:
+ 方案名稱:
@@ -1952,7 +1967,7 @@
- 佈雷時間
+ 地雷爆炸緩衝
@@ -1960,193 +1975,195 @@
-
+ 地雷啞彈率(%)
-
+ 名稱
-
+ 類型
-
+ 墳墓
-
+ 旗幟
-
+ 語音
-
+ 語言環境
-
+ 炸藥桶
-
+ 品質
-
+ 急救箱率(%)
-
+ 急救箱生命
-
+ 意外死亡水上升
-
+ 意外死亡生命減少
-
+ 繩長(%)
-
+ 立體渲染
-
+ 風格
-
+ 方案
-
+ 爆炸逃離緩衝(%)
-
+ 有視頻正在處理中
+現在離開將中止它
+你確定要離開嗎?
-
+ 請提供YouTube帳戶名稱或與Google帳戶關聯的電子郵件地址。
-
+ 賬戶名(或電子郵件):
-
+ 密碼:
-
+ 視頻標題:
-
+ 視頻說明:
-
+ 標籤(以逗號分隔):
-
+ 描寫
- 匿稱
+ 暱稱
-
+ 格式
-
+ 音頻編解碼器
-
+ 視頻編解碼器
-
+ 畫面刷新率
-
+ 位元速率 (Kbps)
-
+ 這個開發版本是“尚未完成的”,可能不與其他的版本兼容,同時一些功能可能被破壞或殘缺!
- 遊戲全螢幕
+ 全螢幕
-
+ 全螢幕解析度
-
+ 視窗解析度
-
+ 你的電子郵件
-
+ 摘要
-
+ 發送系統信息
-
+ 鍵入安全碼:
-
+ 版本
-
+ 此程序使用%1釋出
-
+ 該設置將在下次重啟時生效。
-
+ 提示:%1
-
+ 刺蝟頭上顯示的標籤和半透明的標籤
-
+ 世界邊緣
-
+ 腳本參數
@@ -2157,11 +2174,11 @@
-
+ 刺蝟 %1
-
+ 匿名
@@ -2183,53 +2200,53 @@
-
+ 檔案關聯失敗。
-
+ 在google.com認證時錯誤:
-
+ 登錄或密碼不正確
-
+ 傳送中繼資料給youtube.com時錯誤:
-
+ 隊伍 - 你確定嗎?
-
+ 你確定要刪除隊伍'%1'?
-
+ 不能刪除預設方案 "%1"!
-
+ 請從列表中選擇一個紀錄
-
+ 無法開啟伺服器
-
+ 刺蝟大作戰 - 錯誤
-
+ 刺蝟大作戰 - 成功
-
+ 所有檔案關聯已經被設定
@@ -2237,19 +2254,19 @@
- 無法開始服務端: %1.
+ 無法開啟伺服器: %1.
-
+ 視頻上錯 - 錯誤
-
+ 網路遊戲 - 錯誤
-
+ 請從列表中選擇一個伺服器
@@ -2257,23 +2274,23 @@
-
+ 記錄播放 - 錯誤
- 請從清單選擇記錄
+ 請從列表選擇記錄
-
+ 不能改名
-
+ 不能刪除檔案
-
+ 房間名 - 錯誤
@@ -2281,129 +2298,131 @@
-
+ 房間名 - 你確定嗎?
-
+ 你試著加入的遊戲已經開始了。
+你仍要加入這個房間嗎?
-
+ 方案 - 警告
-
+ 方案 - 你確定嗎?
-
+ 你真的確定要刪除遊戲方案 '%1'?
-
+ 視頻 - 你確定嗎?
-
+ 你確定要刪除視頻 '%1'嗎?
-
+ 你確定要移除檔案%1%n嗎?
-
+ 你確定要取消上傳%1嗎?
-
+ 檔案 - 錯誤
-
+ 不能開啟'%1'
-
+ 不能開啟'%1'
-
+ 不能使用武器 '%1'!
-
+ 武器 - 警告
-
+ 不能複寫預設武器設定'%1'!
-
+ 不能刪除預設武器設定'%1'!
-
+ 武器 - 你確定嗎?
-
+ 你確定要刪除武器設定'%1'嗎?
-
+ 刺蝟大作戰 - 暱稱已經被註冊
-
+ 系統資訊預覽
-
+ 產生驗證碼失敗
-
+ 下載驗證碼失敗
-
+ 請填寫所有欄位. 電子郵件地址是選填的.
-
+ 刺蝟大作戰 - 警告
-
+ 刺蝟大作戰 - 資訊
-
+ 並不是所有的玩家都準備就緒
-
+ 你確定要啟動這個遊戲嗎?
+並不是所有的玩家都準備就緒。
QObject
-
+ 沒有可用的描述
QPushButton
- 播放 demo
+ 播放演示
@@ -2419,7 +2438,7 @@
- 開始服務端
+ 啟動伺服器
@@ -2435,11 +2454,11 @@
- 默認
+ 預設值
- 重命名
+ 更名
@@ -2455,97 +2474,97 @@
-
+ 關聯副檔名
-
+ 更多信息
-
+ 回到預設值
-
+ 打開視頻目錄
-
+ 播放
-
+ 上傳到YouTube
-
+ 取消上傳
-
+ 恢復預設的編碼參數
-
+ 打開你系統上的視頻目錄
-
+ 播放此視頻
-
+ 刪除此視頻
-
+ 上傳視頻到你的YouTube帳戶
-
+ 重置
-
+ 設置為刺猬大作戰預設的伺服器端口
-
+ 只要1個點擊就可以邀請你的朋友到你的伺服器!
-
+ 點擊複製你獨特的伺服器URL到剪貼簿。將此鏈接發送給你的朋友,他們就可以加入你。
-
+ 啟動私人伺服器
RoomNamePrompt
-
+ 為你的房間輸入一個名稱。
- 取消
+ 取消
-
+ 創建房間
-
+ 設定密碼
RoomsListModel
-
+ 進行中
@@ -2581,15 +2600,15 @@
-
+ 隨機迷宮
-
+ 手繪
-
+ 腳本
@@ -2600,38 +2619,38 @@
SeedPrompt
-
+ 地圖種子是基礎由遊戲生成的所有隨機值。
- 取消
+ 取消
-
+ 給定種子
-
+ 關閉
SelWeaponWidget
- 武器設置
+ 武器組合
- 幾率
+ 機率
-
+ 箱中彈藥
-
+ 延遲
@@ -2639,19 +2658,20 @@
-
+ %1的拷貝
TCPBase
-
+ 無法在%1,啟動伺服器。
-
+ 無法在%1,運行引擎
+錯誤代碼:%2
-
+ 遊戲引擎意外死亡
+(退出代碼為%1)
+
+我們很抱歉給你帶來不便! :(
+
+如果這一情況持續發生,請點擊主菜單中的“%2”按鈕!
TeamSelWidget
-
+ 至少要有兩隻隊伍才能玩!
ThemePrompt
- 取消
+ 取消
-
+ 搜索主題:
-
+ 使用選定的主題
@@ -2717,35 +2742,35 @@
- slot 1
+ 第1類
- slot 2
+ 第2類
- slot 3
+ 第3類
- slot 4
+ 第4類
- slot 5
+ 第5類
- slot 6
+ 第6類
- slot 7
+ 第7類
- slot 8
+ 第8類
@@ -2769,7 +2794,7 @@
- 奪取
+ 抓取
@@ -2801,11 +2826,11 @@
- slot 9
+ 第9類
- 練習瞄準
+ 精細瞄準
@@ -2821,180 +2846,180 @@
- 放大
+ 放大
- 縮小
+ 縮小
- 重置
+ 重置
- 跳遠
+ 跳遠
- 跳高
+ 跳高
- slot 10
+ 第10類
-
+ 靜音
-
+ 錄像切換
-
+ 刺蝟資訊
-
+ 自動鏡頭/搜尋刺蝟
-
+ 加速播放
binds (categories)
-
+ 移動
- 武器
+ 武器
-
+ 鏡頭
-
+ 雜項
binds (descriptions)
- 越過障礙:
+ 藉由跳躍通過間隙與障礙:
- 開火、使用物品:
+ 開火或使用物品:
- 選取武器、目的地:
+ 選取游標下的武器或是目標位置:
- 切換刺蝟(如果可用):
+ 切換現在能動的刺蝟(如果可能):
- 選取武器、物品:
+ 挑武器或物品:
- 設置定時炸彈等武器時間:
+ 設置定時炸彈和限時武器的時間:
- 移動鏡頭到選中刺蝟:
+ 移動鏡頭到能動的刺蝟:
- 不用滑鼠移動遊標或鏡頭:
+ 不用滑鼠移動游標或鏡頭:
- 調整鏡頭放大倍數:
+ 調整鏡頭放大倍數:
- 同隊友或全部參與者對話:
+ 同隊友或全部參與者對話:
- 暫停、繼續或離開遊戲:
+ 暫停、繼續或離開遊戲:
- 調整遊戲時音量:
+ 調整遊戲時音量:
- 全屏模式:
+ 切換全屏模式:
- 截圖:
+ 截圖:
- 切換刺蝟標籤顯示方式:
+ 切換刺蝟頭上標籤的顯示方式:
-
+ 錄像:
-
+ 刺蝟移動
-
+ 切換自動鏡頭/重新關注能動的刺蝟:
-
+ 播放演示:
binds (keys)
- 軸
+ 軸
- 上
+ (上)
- 下
+ (下)
- 帽子
+ 帽子
- 左
+ (左)
- 右
+ (右)
- 按鍵
+ 按鈕
- 鍵盤
+ 鍵盤
@@ -3018,27 +3043,27 @@
- 倒退鍵
+
- 製錶鍵
+
- 清除
+
- 返回
+
- 暫停鍵
+ Pause/Break
- 逸出鍵
+ Esc
@@ -3046,7 +3071,7 @@
- 刪除鍵
+
@@ -3110,11 +3135,11 @@
- 回車鍵
+ Enter
- 等於
+
@@ -3134,23 +3159,23 @@
- 插入鍵
+
- Home鍵
+
- End鍵
+
- 向上翻頁鍵
+
- 向下翻頁鍵
+
@@ -3162,7 +3187,7 @@
- Scroll Lock鍵
+
@@ -3198,266 +3223,266 @@
-
+ A鈕
-
+ B鈕
-
+ X鈕
-
+ Y鈕
-
+ LB鈕
-
+ RB鈕
-
+ Back鈕
-
+ Start鈕
-
+ 左搖桿
-
+ 右搖桿
-
+ 左搖桿(右)
-
+ 左搖桿(左)
-
+ 左搖桿(下)
-
+ 左搖桿(上)
-
+ LT鈕
-
+ RT鈕
-
+ 右搖桿(下)
-
+ 右搖桿(上)
-
+ 右搖桿(右)
-
+ 右搖桿(左)
-
+ 十字键
server
-
+ 限制
-
+ 不是房間主人
-
+ 錯誤的刺蝟資訊
-
+ 太多隊伍
-
+ 太多隻刺蝟
-
+ 已經有一個同樣名稱的隊伍在列表中
-
+ 遊戲正在進行
-
+ 限制
-
+ 移除隊伍: 沒有這樣的隊伍
-
+ 不是隊伍的擁有者!
-
+ 少於兩個家族!
-
+ 不合法的房間名
-
+ 這樣名稱的房間已經存在
-
+ 暱稱已經選擇
-
+ 不合法的暱稱
-
+ 已知協議
-
+ 壞數字
-
+ 暱稱已經被使用
-
+ 沒有檢查權
-
+ 驗證失敗
-
+ 被踢出後60秒冷卻時間
-
+ 被踢出
-
+ Ping超時
-
+ 再見
-
+ 沒有這樣的房間
-
+ 房間版本不兼容你的刺猬大作戰版本
-
+ 加入限制
-
+ 僅已經註冊的使用者
-
+ 你被這個房間封鎖
-
+ 空的設定項目
-
+ 你已經投過票了
-
+ 投票已經關閉
-
+ 新的投票開始
-
+ 投票已經過期
-
+ 踢
-
+ 地圖
- 暫停
+ 暫停
-
+ 太快重新連線
-
+ 警告! 避免聊天氾濫的防護機制被啟動
-
+ 超額洪水
-
+ 已經偵測到遊戲訊息氾濫 - 1
-
+ 已經偵測到遊戲訊息氾濫 - 2
-
+ 警告! 避免加入氾濫的防護機制被啟動
-
+ 沒有正在進行的投票
diff -r 2572afe532af -r 42a9dd7b724c share/hedgewars/Data/Locale/missions_de.txt
--- a/share/hedgewars/Data/Locale/missions_de.txt Sun Dec 06 20:35:58 2015 +0300
+++ b/share/hedgewars/Data/Locale/missions_de.txt Sun Dec 06 20:36:21 2015 +0300
@@ -16,6 +16,9 @@
Basic_Training_-_Rope.name=Grundlagentraining: Seil
Basic_Training_-_Rope.desc="Raus da und schwing!"
+Basic_Training_-_Flying_Saucer.name=Grundlagentraining: Fliegende Untertasse
+Basic_Training_-_Flying_Saucer.desc="Du willst also ausgerechnet Astronaut werden, wie? Dann lern erstmal fliegen!"
+
User_Mission_-_Dangerous_Ducklings.name=Mission: Gefährliche Entchen
User_Mission_-_Dangerous_Ducklings.desc="Nun gut, Rekrut! Es ist Zeit, dass du das im Grundlagentraining Gelernte in die Tag umsetzt!"
diff -r 2572afe532af -r 42a9dd7b724c share/hedgewars/Data/Locale/missions_en.txt
--- a/share/hedgewars/Data/Locale/missions_en.txt Sun Dec 06 20:35:58 2015 +0300
+++ b/share/hedgewars/Data/Locale/missions_en.txt Sun Dec 06 20:36:21 2015 +0300
@@ -16,6 +16,9 @@
Basic_Training_-_Rope.name=Basic Rope Training
Basic_Training_-_Rope.desc="Get out there and swing!"
+Basic_Training_-_Flying_Saucer.name=Basic Flying Saucer Training
+Basic_Training_-_Flying_Saucer.desc="So you really want to become an astronaut, eh? You should learn how to fly first!"
+
User_Mission_-_Dangerous_Ducklings.name=Mission: Dangerous Ducklings
User_Mission_-_Dangerous_Ducklings.desc="Alright, rookie! Time to put what we learned in Basic Training into practice!"
@@ -80,4 +83,4 @@
Challenge_-_Speed_Shoppa_-_Ropes.desc="Take your rope and collect all crates on this medium-sized map."
Challenge_-_Speed_Shoppa_-_ShoppaKing.name=Challenge: The Customer is King
-Challenge_-_Speed_Shoppa_-_ShoppaKing.desc="Show you're worthy of a true king and collect all crates as fast as possible on this large map."
\ No newline at end of file
+Challenge_-_Speed_Shoppa_-_ShoppaKing.desc="Show you're worthy of a true king and collect all crates as fast as possible on this large map."
diff -r 2572afe532af -r 42a9dd7b724c share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua Sun Dec 06 20:36:21 2015 +0300
@@ -0,0 +1,558 @@
+--[[
+ Flying Saucer Training
+ This is a training mission which teaches many basic (and not-so-basic) moves
+ with the flying saucer.
+
+ Lesson plan:
+ - Taking off
+ - Basic flight
+ - Landing safely
+ - Managing fuel
+ - Changing saucers in mid-flight
+ - Diving
+ - Dropping weapons from flying saucer
+ - Firing from flying saucer with [Precise] + [Attack]
+ - Aiming in flying saucer with [Precise] + [Up]/[Down]
+ - Underwater attack
+ - Free flight with inf. fuel and some weapons at end of training
+
+ FIXME:
+ - Bad respawn animation ("explosion" just happens randomly because of the way the resurrection effect works)
+ - Hide fuel if infinite (probably needs engine support)
+]]
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+HedgewarsScriptLoad("/Scripts/Tracker.lua")
+
+local Player = nil -- Pointer to hog created in: onGameInit
+local Target = nil -- Pointer to target hog
+local Objective = false -- Get to the target
+
+local TargetNumber = 0 -- The current target number
+local GrenadeThrown = false -- Used for the Boom Target
+local BazookasLeft = 0 -- Used by the Launch Target and the Unterwater Attack Target
+
+local InfFuel = false -- If true, flying saucer has infinite fuel
+local SaucerGear = nil -- Store flying saucer gear here (if one exists)
+local TargetGears = {} -- List of remaining gears to collect or destroy in the current round
+local TargetsRemaining = 0
+local Barrels = {} -- Table contraining the explosive barrel gears
+
+local CheckTimer = 500 -- Time to wait at least before checking safe landing
+local Check = false -- The last target has recently been collected/destroyed and the CheckTimer is running
+local GrenadeTimer = 0 -- Time after a grenade has been thrown
+
+local TargetPos = {} -- Table of targets
+
+local StartPos = { X = 742, Y = 290 }
+
+--[[
+List of all targets (or "objectives"). The player has to complete them one-by-one and must always land safely afterwards.
+Some target numbers have names for easier reference.
+]]
+TargetPos[1] = {
+ Targets = {{ X = 1027, Y = 217 }},
+ Ammo = { },
+ Message = loc("Here you will learn how to fly the flying saucer|and get so learn some cool tricks.") .. "|" ..
+ loc("Collect the first crate to begin!"),
+ MessageIcon = -amJetpack, }
+TargetPos[2] = {
+ Targets = {{ X = 1369, Y = 265 }},
+ Ammo = { [amJetpack] = 100 },
+ InfFuel = true,
+ MessageTime = 10000,
+ Message = loc("Get to the crate using your flying saucer!") .. "|" ..
+ loc("Press [Attack] (space bar by default) to start,|repeadedly tap the up, left and right movement keys to accelerate.") .. "|" ..
+ loc("Try to land softly, as you can still take fall damage!"), }
+TargetPos[3] = {
+ Targets = {{ X = 689, Y = 58 }},
+ Ammo = { [amJetpack] = 100 },
+ MessageTime = 5000,
+ Message = loc("Now collect the next crate!") .. "|" .. loc("Be careful, your fuel is limited from now on!") .."|" ..
+ loc("Tip: If you get stuck in this training, use \"Skip turn\" to restart the current objective.") }
+
+-- The Double Target
+local DoubleTarget = 4
+TargetPos[4] = {
+ Targets = { { X = 84, Y = -20 }, { X = 1980 , Y = -20 } },
+ Ammo = { [amJetpack] = 2 },
+ MessageTime = 9000,
+ Message = loc("Now collect the 2 crates to the far left and right.") .. "|" ..
+ loc("You only have 2 flying saucers this time.") .. "|" ..
+ loc("Tip: You can change your flying saucer|in mid-flight by hitting the [Attack] key twice."), }
+TargetPos[5] = {
+ Targets = {{ X = 47, Y = 804 }},
+ Ammo = { [amJetpack] = 100 },
+ MessageTime = 5000,
+ Message = loc("Time for a more interesting stunt, but first just collect the next crate!"), }
+TargetPos[6] = {
+ Targets = {{ X = 604, Y = 871}},
+ MessageTime = 15000,
+ Message = loc("You can dive with your flying saucer!") .. "|" ..
+ loc("Try it now and dive here to collect the crate on the right girder.") .. "|" ..
+ loc("You only have one flying saucer this time.") .. "|" ..
+ loc("Beware, though, you will only be able to move slowly through the water.") .. "|" ..
+ loc("Warning: Never ever leave the flying saucer while in water!"),
+ Ammo = { [amJetpack] = 1 }, }
+
+TargetPos[7] = {
+ Targets = {{ X = 1884, Y = 704 }},
+ MessageTime = 6500,
+ Message = loc("Now dive just one more time and collect the next crate." .. "|" ..
+ loc("Tip: Don't remain for too long in the water, or you won't make it.")),
+ Ammo = { [amJetpack] = 1}, }
+
+-- The Boom Target
+local BoomTarget = 8
+TargetPos[8] = {
+ Modifier = true, Func = function()
+ Info(loc("Instructions"),
+ loc("Now let's try to drop weapons while flying!") .. "|" ..
+ loc("You have to destroy the target above by dropping a grenade on it from your flying saucer.") .. "|" ..
+ loc("It's not that easy, so listen carefully:") .. "|" ..
+ loc("Step 1: Activate your flying saucer but do NOT move yet!") .. "|" ..
+ loc("Step 2: Select your grenade.") .. "|" ..
+ loc("Step 3: Start flying and get yourself right above the target.") .. "|" ..
+ loc("Step 4: Drop your grenade by pressing the [Long jump] key.") .. "|" ..
+ loc("Step 5: Get away quickly and land safely anywhere." .. "| |" ..
+ loc("Note: We only give you grenades if you stay in your flying saucer.")), nil, 20000)
+
+ SpawnBoomTarget()
+
+ if SaucerGear ~= nil then
+ AddAmmo(Player, amGrenade, 1)
+ else
+ AddAmmo(Player, amGrenade, 0)
+ end
+ GrenadeThrown = false
+
+ end,
+ Ammo = { [amJetpack] = 100 },
+ Respawn = { X = 2000, Y = 742 }, }
+
+-- The Launch Target
+local LaunchTarget = 9
+TargetPos[9] = {
+ Targets = {{ X = 1700, Y = 640, Type = gtTarget }, { X = 1460, Y = 775, Type = gtTarget }},
+ MessageTime = 20000,
+ Message = loc("Only the best pilots can master the following stunts.") .. "|" ..
+ loc("As you've seen, the dropped grenade roughly fell into your flying direction.") .. "|" ..
+ loc("You have to destroy two targets, but the previous technique would be very difficult or dangerous to use.") .. "|" ..
+ loc("So you are able to launch projectiles into your aiming direction, always at full power.") .."|"..
+ loc("To launch a projectile in mid-flight, hold [Precise] and press [Long jump].") .. "|" ..
+ loc("You can even change your aiming direction in mid-flight if you first hold [Precice] and then press [Up] or [Down].") .. "|" ..
+ loc("Tip: Changing your aim while flying is very difficult, so adjust it before you take off."),
+ Ammo = { [amJetpack] = 1, },
+ Respawn = { X = 1764, Y = 916 },
+ ExtraFunc = function()
+ HogTurnLeft(Player, true)
+ if SaucerGear ~= nil then
+ AddAmmo(Player, amBazooka, 2)
+ else
+ AddAmmo(Player, amBazooka, 0)
+ end
+ BazookasLeft = 2
+
+ end }
+
+-- The Underwater Attack Target
+local UnderwaterAttackTarget = 10
+TargetPos[10] = {
+ MessageTime = 17000,
+ Message = loc("Now for the supreme discipline of saucer flying, the underwater attack.") .. "|" ..
+ loc("Basically this is a combination of diving and launching.") .. "|" ..
+ loc("Dropping a weapon while in water would just drown it, but launching one would work.") .."|" ..
+ loc("Based on what you've learned, destroy the target on the girder and as always, land safely!"),
+ Targets = {{ X = 1200, Y = 930, Type = gtTarget }},
+ Ammo = { [amJetpack] = 1, },
+ Respawn = { X = 1027, Y = 217 },
+ ExtraFunc = function()
+ if SaucerGear ~= nil then
+ AddAmmo(Player, amBazooka, 1)
+ else
+ AddAmmo(Player, amBazooka, 0)
+ end
+ BazookasLeft = 1
+ end }
+TargetPos[11] = {
+ Targets = {{ X = 742, Y = 290 }},
+ MessageTime = 5000,
+ Message = loc("This almost concludes our tutorial.") .. "|" ..
+ loc("You now have infinite fuel, grenades and bazookas for fun.") .. "|" ..
+ loc("Collect or destroy the final crate to finish the training."),
+ Ammo = { [amJetpack] = 100, [amGrenade] = 100, [amBazooka] = 100 },
+ InfFuel = true, }
+TargetPos[12] = { Modifier = true, Func = function()
+ Objective = true
+ AddCaption(loc("Training complete!"), 0xFFFFFFFF, capgrpGameState)
+ Info(loc("Training complete!"), loc("Good bye!"), 4, 5000)
+
+ if SaucerGear ~= nil then
+ DeleteGear(SaucerGear)
+ end
+ SetState(Player, band(GetState(Player), bnot(gstHHDriven)))
+ SetState(Player, bor(GetState(Player), gstWinner))
+ PlaySound(sndVictory, Player)
+
+ SendStat(siGameResult, loc("You have finished the Flying Saucer Training!"))
+ SendStat(siCustomAchievement, loc("Good job!"))
+ SendStat(siPlayerKills, "0", loc("Hogonauts"))
+
+ TurnTimeLeft = 0
+ EndGame()
+end,
+}
+
+-- Just a wrapper for ShowMission
+function Info(Title, Text, Icon, Time)
+ if Time == nil then Time = 0 end
+ if Icon == nil then Icon = 2 end
+ ShowMission(loc("Flying Saucer Training"), Title, Text, Icon, Time)
+end
+
+-- Spawn all the gears for the Boom Target
+function SpawnBoomTarget()
+ if TargetsRemaining < 1 then
+ TargetGears[1] = AddGear(1602, 507, gtTarget, 0, 0, 0, 0)
+ TargetsRemaining = TargetsRemaining + 1
+ end
+
+ if Barrels[1] == nil then
+ Barrels[1] = AddGear(1563, 532, gtExplosives, 0, 0, 0, 0)
+ end
+ if Barrels[2] == nil then
+ Barrels[2] = AddGear(1648, 463, gtExplosives, 0, 0, 0, 0)
+ end
+
+ for i=1,#Barrels do
+ SetHealth(Barrels[i], 1)
+ end
+end
+
+-- Generic target spawning for the current target
+function SpawnTargets()
+ for i=1,#TargetPos[TargetNumber].Targets do
+ if TargetGears[i] == nil then
+ SpawnTarget(TargetPos[TargetNumber].Targets[i].X, TargetPos[TargetNumber].Targets[i].Y,
+ TargetPos[TargetNumber].Targets[i].Type, i)
+ end
+ end
+end
+
+function SpawnTarget( PosX, PosY, Type, ID )
+ if Type ~= nil and Type ~= gtCase then
+ if Type == gtTarget then
+ TargetGears[ID] = AddGear(PosX, PosY, gtTarget, 0, 0, 0, 0)
+ end
+ else
+ TargetGears[ID] = SpawnFakeUtilityCrate(PosX, PosY, false, false)
+ end
+ TargetsRemaining = TargetsRemaining + 1
+end
+
+function AutoSpawn() -- Auto-spawn the next target after you've obtained the current target!
+ TargetNumber = TargetNumber + 1
+ TargetsRemaining = 0
+
+ if TargetPos[TargetNumber].Ammo then
+ for ammoType, count in pairs(TargetPos[TargetNumber].Ammo) do
+ AddAmmo(Player, ammoType, count)
+ end
+ if GetCurAmmoType() ~= amJetpack then
+ SetWeapon(amJetpack)
+ end
+ end
+ if TargetPos[TargetNumber].InfFuel then
+ InfFuel = true
+ else
+ InfFuel = false
+ end
+
+ -- Func (if present) will be run instead of the ordinary spawning handling
+ if TargetPos[TargetNumber].Modifier then -- If there is a modifier, run the function
+ TargetPos[TargetNumber].Func()
+ return true
+ end
+
+ -- ExtraFunc is for additional events for a target
+ if TargetPos[TargetNumber].ExtraFunc ~= nil then
+ TargetPos[TargetNumber].ExtraFunc()
+ end
+
+ local subcap
+ if TargetNumber == 1 then
+ subcap = loc("Training")
+ else
+ subcap = loc("Instructions")
+ end
+ Info(subcap, TargetPos[TargetNumber].Message, TargetPos[TargetNumber].MessageIcon, TargetPos[TargetNumber].MessageTime)
+
+ -- Spawn targets on the next position
+ SpawnTargets()
+
+ if TargetNumber > 1 then
+ AddCaption(loc("Next target is ready!"), 0xFFFFFFFF, capgrpMessage2)
+ end
+end
+
+-- Returns true if the hedgehog has safely "landed" (alive, no flying saucer gear and not moving)
+-- This is to ensure the training only continues when the player didn't screw up and to restart the current target
+function HasHedgehogLandedYet()
+ if band(GetState(Player), gstMoving) == 0 and SaucerGear == nil and GetHealth(Player) > 0 then
+ return true
+ else
+ return false
+ end
+end
+
+-- Clean up the gear mess left behind when the player failed to get a clean state after restarting
+function CleanUpGears()
+ -- (We track flames, grenades, bazooka shells)
+ runOnGears(DeleteGear)
+end
+
+-- Completely restarts the current target/objective; the hedgehog is spawned at the last "checkpoint"
+-- Called when hedgeghog is resurrected or skips turn
+function ResetCurrentTarget()
+ GrenadeThrown = false
+ GrenadeTimer = 0
+ if TargetNumber == LaunchTarget then
+ BazookasLeft = 2
+ elseif TargetNumber == UnderwaterAttackTarget then
+ BazookasLeft = 1
+ else
+ BazookasLeft = 0
+ end
+ Check = false
+
+ CleanUpGears()
+
+ local X, Y
+ if TargetNumber == 1 then
+ X, Y = StartPos.X, StartPos.Y
+ else
+ if TargetPos[TargetNumber-1].Modifier or TargetPos[TargetNumber-1].Respawn ~= nil then
+ X, Y = TargetPos[TargetNumber-1].Respawn.X, TargetPos[TargetNumber-1].Respawn.Y
+ else
+ X, Y = TargetPos[TargetNumber-1].Targets[1].X, TargetPos[TargetNumber-1].Targets[1].Y
+ end
+ end
+ if TargetNumber == BoomTarget then
+ SpawnBoomTarget()
+ end
+ if TargetPos[TargetNumber].Modifier ~= true then
+ SpawnTargets()
+ end
+ if TargetPos[TargetNumber].Ammo then
+ for ammoType, count in pairs(TargetPos[TargetNumber].Ammo) do
+ AddAmmo(Player, ammoType, count)
+ end
+ if GetCurAmmoType() ~= amJetpack then
+ SetWeapon(amJetpack)
+ end
+ end
+ if TargetPos[TargetNumber].InfFuel then
+ InfFuel = true
+ else
+ InfFuel = false
+ end
+
+ SetGearPosition(Player, X, Y)
+end
+
+function onGameInit()
+ Seed = 1
+ GameFlags = gfInfAttack + gfOneClanMode + gfSolidLand + gfDisableWind
+ TurnTime = 2000000 --[[ This rffectively hides the turn time; a turn time above 1000s is not displayed.
+ We will also ensure this timer always stays above 999s later ]]
+ CaseFreq = 0
+ MinesNum = 0
+ Explosives = 0
+ Map = "Eyes"
+ Theme = "EarthRise"
+ SuddenDeathTurns = 50
+ WaterRise = 0
+ HealthDecrease = 0
+
+ -- Team name is a pun on “hedgehog” and “astronauts”
+ AddTeam( loc( "Hogonauts" ), 0xDDDD00, "earth", "Earth", "Default", "cm_galaxy" )
+
+ -- Hedgehog name is a pun on “Neil Armstrong”
+ Player = AddHog( loc( "Neil Hogstrong" ), 0, 1, "NoHat" )
+ SetGearPosition( Player, StartPos.X, StartPos.Y)
+ SetEffect( Player, heResurrectable, 1 )
+end
+
+function onGameStart()
+ SendHealthStatsOff()
+
+ -- Girder near first crate
+ PlaceGirder(1257, 204, 6)
+
+ -- The upper girders
+ PlaceGirder(84, 16, 0)
+ PlaceGirder(1980, 16, 0)
+
+ -- The lower girder platform at the water pit
+ PlaceGirder(509, 896, 4)
+ PlaceGirder(668, 896, 4)
+ PlaceGirder(421, 896, 2)
+ PlaceGirder(758, 896, 2)
+
+ -- Girders for the Launch Target and the Underwater Attack Target
+ PlaceGirder(1191, 960, 4)
+ PlaceGirder(1311, 960, 0)
+ PlaceGirder(1460, 827, 3)
+ PlaceGirder(1509, 763, 2)
+ PlaceGirder(1605, 672, 4)
+ PlaceGirder(1764, 672, 4)
+ PlaceGirder(1803, 577, 6)
+
+ -- Spawn our 1st target using the wrapper function
+ AutoSpawn()
+end
+
+function onAmmoStoreInit()
+ SetAmmo(amJetpack, 0, 0, 0, 0)
+ SetAmmo(amGrenade, 0, 0, 0, 0)
+ SetAmmo(amBazooka, 0, 0, 0, 0)
+
+ -- Added for resetting current target/objective when player is stuck somehow
+ SetAmmo(amSkip, 9, 0, 0, 0)
+end
+
+function onGearAdd(Gear)
+ if GetGearType(Gear) == gtJetpack then
+ SaucerGear = Gear
+ if TargetNumber == BoomTarget and GrenadeThrown == false then
+ AddAmmo(Player, amGrenade, 1)
+ end
+ if (TargetNumber == LaunchTarget or TargetNumber == UnderwaterAttackTarget) and BazookasLeft > 0 then
+ AddAmmo(Player, amBazooka, BazookasLeft)
+ end
+ end
+ if GetGearType(Gear) == gtGrenade then
+ GrenadeThrown = true
+ GrenadeTimer = 0
+ end
+ if GetGearType(Gear) == gtShell then
+ BazookasLeft = BazookasLeft - 1
+ end
+ if GetGearType(Gear) == gtFlame or GetGearType(Gear) == gtGrenade or GetGearType(Gear) == gtShell then
+ trackGear(Gear)
+ end
+end
+
+function onGearDelete(Gear)
+ if GetGearType(Player) ~= nil and (GetGearType(Gear) == gtTarget or GetGearType(Gear) == gtCase) then
+ for i=1, #TargetGears do
+ if Gear == TargetGears[i] then
+ TargetGears[i] = nil
+ TargetsRemaining = TargetsRemaining - 1
+ end
+ end
+ if TargetsRemaining <= 0 then
+ if TargetNumber == BoomTarget or not HasHedgehogLandedYet() then
+ if SaucerGear then
+ AddCaption(loc("Objective completed! Now land safely."), 0xFFFFFFFF, capgrpMessage2)
+ end
+ Check = true
+ CheckTimer = 500
+ else
+ AutoSpawn()
+ end
+ end
+ end
+ if GetGearType(Gear) == gtGrenade then
+ GrenadeTimer = 0
+ GrenadeExploded = true
+ end
+ if GetGearType(Gear) == gtJetpack then
+ SaucerGear = nil
+ if TargetNumber == BoomTarget then
+ AddAmmo(Player, amGrenade, 0)
+ end
+ if TargetNumber == LaunchTarget or TargetNumber == UnderwaterAttackTarget then
+ AddAmmo(Player, amBazooka, 0)
+ end
+ end
+ if GetGearType(Gear) == gtCase and GetGearType(Player) ~= nil then
+ PlaySound(sndShotgunReload)
+ end
+ if Gear == Barrels[1] then
+ Barrels[1] = nil
+ end
+ if Gear == Barrels[2] then
+ Barrels[2] = nil
+ AddCaption(loc("Kaboom!"), 0xFFFFFFFF, capgrpMessage)
+ end
+end
+
+
+
+function onNewTurn()
+ SetWeapon(amJetpack)
+end
+
+function onGameTick20()
+ if (TurnTimeLeft < 1500000 and not Objective) then
+ TurnTimeLeft = TurnTime
+ end
+ if Check then
+ CheckTimer = CheckTimer - 20
+ if CheckTimer <= 0 then
+ if HasHedgehogLandedYet() then
+ AutoSpawn()
+ Check = false
+ GrenadeThrown = false
+ end
+ end
+ end
+ if GrenadeExploded and TargetNumber == BoomTarget then
+ GrenadeTimer = GrenadeTimer + 20
+ if GrenadeTimer > 1500 then
+ GrenadeTimer = 0
+ GrenadeThrown = false
+ GrenadeExploded = false
+ if SaucerGear and TargetNumber == BoomTarget and TargetsRemaining > 0 then
+ PlaySound(sndShotgunReload)
+ AddCaption(loc("+1 Grenade"), 0xDDDD00FF, capgrpAmmoinfo)
+ AddAmmo(Player, amGrenade, 1)
+ end
+ end
+ end
+ ResetFuel()
+end
+
+-- Used to ensure infinite fuel
+function ResetFuel()
+ if SaucerGear and InfFuel then
+ SetHealth(SaucerGear, 2000)
+ end
+end
+
+onUp = ResetFuel
+onLeft = ResetFuel
+onRight = ResetFuel
+
+function onGearDamage(Gear)
+ if Gear == Player then
+ CleanUpGears()
+ GrenadeThrown = false
+ Check = false
+ end
+end
+
+function onGearResurrect(Gear)
+ if Gear == Player then
+ AddCaption(loc("Oh no! You have died. Try again!"), 0xFFFFFFFF, capgrpMessage2)
+ ResetCurrentTarget()
+ end
+end
+
+function onHogAttack(ammoType)
+ if ammoType == amSkip then
+ AddCaption(loc("Try again!"), 0xFFFFFFFF, capgrpMessage2)
+ ResetCurrentTarget()
+ end
+end