Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t.precondition_restr = utils.parse_names(utils.cfg_get_string
- (self.setting_ini, section, "precondition_restr", self, false, "", ""))
- function faction_brain_human:get_sim_targets_advance(expansion)
- local restr_smrt = {}
- for k, v in pairs (expansion.precondition_restr) do
- restr_smrt[v] = true
- end
- for k,v in pairs(expansion.precondition_target) do
- local smart_obj = self.faction.board.smarts_by_names[v]
- if not restr_smrt[v] then
- self:register_target_point(smart_obj, true)
- end
- end
- for k,v in pairs(expansion.precondition_target_optional) do
- local smart_obj = self.faction.board.smarts_by_names[v]
- if not restr_smrt[v] then
- self:register_target_point(smart_obj, true)
- end
- end
- for k,v in pairs(expansion.precondition_target_eliminate) do
- local smart_obj = self.faction.board.smarts_by_names[v]
- local smart_owner = smart_obj.player_name
- if smart_owner ~= "none" and not restr_smrt[v] then
- if game_relations.is_factions_enemies(self.faction.player_name, smart_owner) then
- self:register_target_point(smart_obj, false, true)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement