annotate model/battle.lua @ 1828:caa6c71dd22a
Show units as tree in member administration
 | author | bsw | 
 | date | Thu Feb 03 12:16:11 2022 +0100 (2022-02-03) | 
 | parents | 701a5cf6b067 | 
 | children |  | 
 
 | rev | line source | 
| bsw@1045 | 1 Battle = mondelefant.new_class() | 
| bsw@1045 | 2 Battle.table = 'battle' | 
| bsw@1045 | 3 | 
| bsw@1045 | 4 function Battle:getByInitiativeIds(winning_id, losing_id) | 
| bsw@1045 | 5   local selector = Battle:new_selector() | 
| bsw@1045 | 6   selector:add_where { "winning_initiative_id = ?", winning_id } | 
| bsw@1045 | 7   selector:add_where { "losing_initiative_id = ?", losing_id } | 
| bsw@1045 | 8   selector:optional_object_mode() | 
| bsw@1045 | 9   return selector:exec() | 
| bsw@1045 | 10 end |