ModernColdWar / RedStormRising

Red Storm Rising
2 stars 0 forks source link

Add base resupply on a timer #78

Closed Winston2108 closed 4 years ago

Winston2108 commented 4 years ago

Resupply bases every 8 hours?

Winston2108 commented 4 years ago

Logic something like:

at startup:
  for each airbase:
    if no resupply time:
      resupply_time(base) = now
      resupply(base)

every 5 minutes:
  for each airbase:
   if resupply time < 30 minutes away:
     print resupply warning to all
   elsif resupply_time < now:
     resupply(base)

on capture:
  resupply_time(base) = now + captureResupplyTime

function resupply(base):
  print resupply message to all
  find all dead/absent groups for owning side
  set resupply time to last resupply time + resupplyInterval
Winston2108 commented 4 years ago

Also need to persist the groups still alive so we restore them at restart and filter them out on resupply.