add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
58
gamedata/scripts/sim_squad_generic.script
Normal file
58
gamedata/scripts/sim_squad_generic.script
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
--'******************************************************
|
||||
--'* Áîåâîé îòðÿä ãðóïïèðîâêè.
|
||||
--'* Âûïîëíÿåìûå ôóíêöèè:
|
||||
--'* - Àòàêà ñìàðòà
|
||||
--'* - Çàùèòà ñìàðòà
|
||||
--'* - Ñáîð ðåñóðñà
|
||||
--'* - Ïåðåìåùåíèå ìåæäó ñìàðòàìè
|
||||
--'******************************************************
|
||||
--[[
|
||||
|
||||
--' Ñâîéñòâà îòðÿäà äëÿ âûâîäà íà ìàïñïîò.
|
||||
function sim_squad_generic:get_squad_props()
|
||||
if not _G.dev_debug then
|
||||
local current_action = self.current_action
|
||||
local str = self.player_id
|
||||
if str == "renegade" then
|
||||
str = "ui_st_name_bandit_2"
|
||||
elseif str == "bandit" then
|
||||
str = "ui_st_name_bandit"
|
||||
elseif str == "csky" then
|
||||
str = "ui_st_name_csky"
|
||||
elseif str == "dolg" then
|
||||
str = "ui_st_name_dolg"
|
||||
elseif str == "freedom" then
|
||||
str = "ui_st_name_freedom"
|
||||
elseif str == "stalker" then
|
||||
str = "ui_st_name_stalker"
|
||||
end
|
||||
if current_action and current_action.name == "attack_point" then
|
||||
if self.assigned_target_smart_id ~= nil then
|
||||
str = game.translate_string(str).."\\n"..game.translate_string("st_target")..": "..smart_names.get_smart_terrain_name(self.board.smarts[self.assigned_target_smart_id].smrt)
|
||||
end
|
||||
end
|
||||
return str
|
||||
end
|
||||
|
||||
local t = "["..tostring(self.squad_id).."] power: "..tostring(self.squad_power).."("..tostring(self.squad_attack_power)..")\\n"
|
||||
if self.smart_id ~= nil then
|
||||
t = t .. "smart: " .. self.board.smarts[self.smart_id].smrt:name().."\\n"
|
||||
end
|
||||
if self.assigned_target_smart_id ~= nil then
|
||||
t = t .. "target: " .. self.board.smarts[self.assigned_target_smart_id].smrt:name().."\\n"
|
||||
end
|
||||
local current_action = self.current_action
|
||||
if current_action ~= nil then
|
||||
local current_action_name = current_action.name
|
||||
t = t .. current_action_name
|
||||
if current_action_name == "attack_point" then
|
||||
if current_action.dest_smrt_id ~= nil then
|
||||
t = t .. ": " .. self.board.smarts[current_action.dest_smrt_id].smrt:name()
|
||||
else
|
||||
t = t .. ": nil"
|
||||
end
|
||||
end
|
||||
end
|
||||
return t
|
||||
end
|
||||
]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue