From b4ccb15c9307be40bb744a0f0ff8a1bc8fc114a6 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Sun, 11 Nov 2018 22:10:37 +0300 Subject: [PATCH] Add 4 custom location feature --- src/celengine/location.cpp | 4 ++++ src/celengine/location.h | 7 +++++++ src/celestia/celx.cpp | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/src/celengine/location.cpp b/src/celengine/location.cpp index 5e3647cfe..836322b4e 100644 --- a/src/celengine/location.cpp +++ b/src/celengine/location.cpp @@ -90,6 +90,10 @@ FeatureNameEntry FeatureNames[] = { "Observatory", Location::Observatory }, { "Landing Site", Location::LandingSite }, { "Crater", Location::Crater }, + { "Capital", Location::Capital}, + { "Cosmodrome", Location::Cosmodrome}, + { "Trench", Location::Trench}, + { "Historical", Location::Historical}, }; diff --git a/src/celengine/location.h b/src/celengine/location.h index 17e342ae1..11cc259a2 100644 --- a/src/celengine/location.h +++ b/src/celengine/location.h @@ -51,9 +51,11 @@ class Location enum FeatureType : uint64_t { + // Custom locations, part I City = 0x0000000000000001, Observatory = 0x0000000000000002, LandingSite = 0x0000000000000004, + // Standard locations Crater = 0x0000000000000008, Vallis = 0x0000000000000010, Mons = 0x0000000000000020, @@ -110,6 +112,11 @@ class Location Vastitas = 0x0100000000000000, Virga = 0x0200000000000000, Saxum = 0x0400000000000000, + // Custom locations, part II + Capital = 0x0800000000000000, + Cosmodrome = 0x1000000000000000, + Trench = 0x2000000000000000, // Tectonical trench + Historical = 0x4000000000000000, Other = 0x8000000000000000, }; diff --git a/src/celestia/celx.cpp b/src/celestia/celx.cpp index f6877df18..a5a57e7ec 100644 --- a/src/celestia/celx.cpp +++ b/src/celestia/celx.cpp @@ -234,6 +234,10 @@ void CelxLua::initLocationFlagMap() LocationFlagMap["virga"] = Location::Virga; LocationFlagMap["other"] = Location::Other; LocationFlagMap["saxum"] = Location::Saxum; + LocationFlagMap["capital"] = Location::Capital; + LocationFlagMap["cosmodrome"] = Location::Cosmodrome; + LocationFlagMap["trench"] = Location::Trench; + LocationFlagMap["historical"] = Location::Historical; } void CelxLua::initOverlayElementMap()