summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-01-08 00:59:29 +0100
committerAki <please@ignore.pl>2023-01-08 00:59:29 +0100
commit85e4741a6b39e436befacaf9778619696c9c5a33 (patch)
tree02c2f2c4b4d49711daac92a2aa772d3e2daea25b /sim
parent30865a57fb3f52607c14b9d210a256b3be3ddcb8 (diff)
downloadkurator-85e4741a6b39e436befacaf9778619696c9c5a33.zip
kurator-85e4741a6b39e436befacaf9778619696c9c5a33.tar.gz
kurator-85e4741a6b39e436befacaf9778619696c9c5a33.tar.bz2
Renamed health to structure points where applicable
Diffstat (limited to 'sim')
-rw-r--r--sim/include/kurator/sim/HitPoints.h2
-rw-r--r--sim/src/Builder.cpp2
-rw-r--r--sim/src/HitPoints.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/sim/include/kurator/sim/HitPoints.h b/sim/include/kurator/sim/HitPoints.h
index 96b54b0..d63620d 100644
--- a/sim/include/kurator/sim/HitPoints.h
+++ b/sim/include/kurator/sim/HitPoints.h
@@ -9,7 +9,7 @@ namespace sim
struct HitPoints
{
- double health;
+ double structure;
void deal(double damage);
bool is_alive() const;
double total() const;
diff --git a/sim/src/Builder.cpp b/sim/src/Builder.cpp
index 053ae93..f1e4762 100644
--- a/sim/src/Builder.cpp
+++ b/sim/src/Builder.cpp
@@ -39,7 +39,7 @@ Builder::operator()(const universe::ShipType& ship_type, const int team) const
ship_type.max_speed * 2.0,
ship_type.max_speed * 3.0);
registry.emplace<AIState>(entity, 6000.0, Point{0.0, 0.0});
- registry.emplace<HitPoints>(entity, ship_type.base_health_points);
+ registry.emplace<HitPoints>(entity, ship_type.base_structure_points);
return entity;
}
diff --git a/sim/src/HitPoints.cpp b/sim/src/HitPoints.cpp
index 28cf7f7..bcb7e97 100644
--- a/sim/src/HitPoints.cpp
+++ b/sim/src/HitPoints.cpp
@@ -10,21 +10,21 @@ namespace sim
void
HitPoints::deal(double damage)
{
- health -= damage;
+ structure -= damage;
}
bool
HitPoints::is_alive() const
{
- return health > 0.0;
+ return structure > 0.0;
}
double
HitPoints::total() const
{
- return health;
+ return structure;
}