From 1b8d6154c1024b8740fca1e62e97a106b66db85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=BC=E5=A4=9C=E7=8B=8E=E6=98=B5?= <1046295287@qq.com> Date: Fri, 3 Jan 2025 16:55:48 +0800 Subject: [PATCH] Add message when player enter/leave range area. --- Scripts/Localizations.lua | 4 ++++ Scripts/Range.lua | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Scripts/Localizations.lua b/Scripts/Localizations.lua index eaa9464..8ebdc97 100644 --- a/Scripts/Localizations.lua +++ b/Scripts/Localizations.lua @@ -43,6 +43,8 @@ Localizations = { ['Auto Respawn Targets: On'] = 'Auto Respawn Targets: On', ['Auto Respawn Targets: Off'] = 'Auto Respawn Targets: Off', --Message + ['You have entered range area, you can sapwn targets through radio F10 menu.'] = 'You have entered range area, you can sapwn targets through radio F10 menu.', + ['You have left rang area.'] = 'You have left rang area.', ['There is no range section of %s left.'] = 'There is no range section of %s left.', ['Spawn target at %s section area. targetType: %s state: %s'] = 'Spawn target at %s section area. targetType: %s state: %s', ['Spawn target at %s section area. targetType: %s AAType: %s state: %s'] = 'Spawn target at %s section area. targetType: %s AAType: %s state: %s', @@ -92,6 +94,8 @@ Localizations = { ['Auto Respawn Targets: On'] = '目标自动重生: 开', ['Auto Respawn Targets: Off'] = '目标自动重生: 关', --Message + ['You have entered range area, you can sapwn targets through radio F10 menu.'] = '你已经进入靶场区域, 可以通过无线电F10菜单选择生成目标.', + ['You have left rang area.'] = '你已经离开靶场区域.', ['There is no range section of %s left.'] = '没有 %s 类型靶场空闲了.', ['Spawn target at %s section area. targetType: %s state: %s'] = '在 %s 区域刷新目标. 目标类型: %s 状态: %s', ['Spawn target at %s section area. targetType: %s AAType: %s state: %s'] = '在 %s 区域 刷新目标. 目标类型: %s 防空类型: %s 状态: %s', diff --git a/Scripts/Range.lua b/Scripts/Range.lua index e7a2b3e..f06be26 100644 --- a/Scripts/Range.lua +++ b/Scripts/Range.lua @@ -56,6 +56,8 @@ do return end + local self = Utils.deepCopy(self) + self.name = zoneName self.points = points @@ -333,6 +335,9 @@ do menu = nil, } self:createMenu(playerGroup) + + local enterText = Localizations:translate('You have entered range area, you can sapwn targets through radio F10 menu.','cn') + trigger.action.outTextForGroup() end function Range:removePlayerProfile(playerName) @@ -344,6 +349,8 @@ do missionCommands.removeItemForGroup(self.playerList[playerName].groupID,self.playerList[playerName].menu) self.playerList[playerName] = nil + + local leaveText = Localizations:translate('You have left rang area.','cn') end function Range:activeTartgets(playerName,sectionType,targetType,AAType,Move) @@ -570,7 +577,6 @@ do self.playerList[PlayerName].activeTarget = nil self.playerList[PlayerName].assignedSection.active = false - end function Range:addTargetPreset(groupIdent,targetType,AAtype)