liquid_feedback_frontend
view model/battle.lua @ 1329:1a55c68445d4
Allow empty selection for unit registration field
| author | bsw | 
|---|---|
| date | Fri Aug 03 17:07:06 2018 +0200 (2018-08-03) | 
| parents | 701a5cf6b067 | 
| children | 
 line source
     1 Battle = mondelefant.new_class()
     2 Battle.table = 'battle'
     4 function Battle:getByInitiativeIds(winning_id, losing_id)
     5   local selector = Battle:new_selector()
     6   selector:add_where { "winning_initiative_id = ?", winning_id }
     7   selector:add_where { "losing_initiative_id = ?", losing_id }
     8   selector:optional_object_mode()
     9   return selector:exec()
    10 end
