null, "ownerid" => null, "currentlife" => 0, "maxlife" => 0, "artifacts" => [] ]; if ($database->has("locations", ["osmid" => $VARS["id"]])) { $gameprops = $database->get("locations", ["teamid", "ownerid", "currentlife", "maxlife"], ["osmid" => $VARS["id"]]); foreach ($gameprops as $key => $value) { $data[$key] = $value; } $artifacts = $database->select("artifacts", ["[>]locations" => "locationid"], ["currentlife", "maxlife", "itemid"]); $data["artifacts"] = $artifacts; } exitWithJson(["status" => "OK", "place" => $data]);