Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r--src/game/base/game.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 54c59b7..f41b9b2 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -2245,7 +2245,7 @@ bool Game::load_zone(core::Zone *zone)
zoneini.unknown_error("weapon type '" + strval + "' is not a turret");
} else {
patrol_npctype->set_turret(turret);
- }
+ }
} else {
zoneini.unknown_key();
}
@@ -2303,6 +2303,24 @@ bool Game::load_zone(core::Zone *zone)
} else {
shipmodel->apply(station);
}
+ } else if (zoneini.got_key_label("cannon", strval)) {
+ Weapon *cannon = Weapon::find(strval);
+ if (!cannon) {
+ zoneini.unknown_error("unknown weapon type '" + strval + "'");
+ } else if (cannon->subtype() != Weapon::Cannon) {
+ zoneini.unknown_error("weapon type '" + strval + "' is not a cannon");
+ } else {
+ station->set_cannon(cannon);
+ }
+ } else if (zoneini.got_key_label("turret", strval)) {
+ Weapon *turret = Weapon::find(strval);
+ if (!turret) {
+ zoneini.unknown_error("unknown weapon type '" + strval + "'");
+ } else if (turret->subtype() != Weapon::Turret) {
+ zoneini.unknown_error("weapon type '" + strval + "' is not a turret");
+ } else {
+ station->set_turret(turret);
+ }
} else {
zoneini.unknown_key();
}