qmlfrontend/team.h
author Wuzzy <Wuzzy2@mail.ru>
Sat, 06 Jun 2020 15:40:51 +0200
changeset 15597 6e72bd61002e
parent 14291 f1a5b7baa87f
permissions -rw-r--r--
Disable gfMoreWind for land objects on turn end only after a fixed-time delay 15s sounds much, but it's the average amount for gfMineStrike mines to settle naturally. And it would be very confusing to see falling mines suddenly not caring about gfMoreWind for no apparent reason. Note this whole thing is a giant hack anyway, to prevent a turn being blocked by infinitely bouncing mines. The better solution would be to help gfMoreWind-affected land objects settle naturally more reliably even under extreme wind. But this commit is "good enough" for now. If you don't like the delay, you can always tweak the constant.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     1
#ifndef TEAM_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     2
#define TEAM_H
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     3
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     4
#include <QObject>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     5
#include <QVector>
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     6
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     7
struct Hedgehog {
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
     8
  Hedgehog();
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     9
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    10
  QByteArray name;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    11
  QByteArray hat;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    12
  quint32 hp;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    13
  int level;
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    14
};
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    15
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    16
class Team {
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    17
 public:
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    18
  explicit Team();
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    19
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    20
  void resize(int number);
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    21
  QVector<Hedgehog> hedgehogs() const;
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    22
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    23
  QByteArray name;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    24
  QByteArray color;
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    25
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    26
 private:
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    27
  QVector<Hedgehog> m_hedgehogs;
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    28
  int m_hedgehogsNumber;
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    29
};
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    30
14291
f1a5b7baa87f Format team.* code
unc0rr
parents: 14143
diff changeset
    31
#endif  // TEAM_H