mirror of
https://github.com/kirirururu/screepsxx.git
synced 2026-06-14 17:30:42 +00:00
19 lines
332 B
C++
19 lines
332 B
C++
#include "OwnedStructure.hpp"
|
|
|
|
namespace Screeps {
|
|
|
|
OwnedStructure::OwnedStructure(JS::Value value) : Structure(std::move(value))
|
|
{
|
|
}
|
|
|
|
bool OwnedStructure::my() const
|
|
{
|
|
return value()["my"].as<bool>();
|
|
}
|
|
|
|
std::string OwnedStructure::owner() const
|
|
{
|
|
return value()["owner"]["username"].as<std::string>();
|
|
}
|
|
|
|
} // namespace Screeps
|