summaryrefslogtreecommitdiff
path: root/includes/bitset.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bitset.inc')
-rw-r--r--includes/bitset.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/bitset.inc b/includes/bitset.inc
index 1d026e5..0bd5c4d 100644
--- a/includes/bitset.inc
+++ b/includes/bitset.inc
@@ -11,6 +11,8 @@ function parseBitset ($bitset) {
$lessFrequent = substr($bin, 14, 1) !== "0";
$sexuallyActive = substr($bin, 13, 1) !== "0";
$ageRegressor = substr($bin, 12, 1) !== "0";
+ $leader = substr($bin, 11, 1) !== "0";
+ $persecutor = substr($bin, 10, 1) !== "0";
$magic = bindec(substr($bin, 18, 3));
$sensitivity = bindec(substr($bin, 21, 3));
$protector = substr($bin, 29, 1) !== "0";
@@ -76,6 +78,8 @@ function parseBitset ($bitset) {
'less_frequent' => $lessFrequent,
'age_spells' => $age,
'age_regressor' => $ageRegressor,
+ 'leader' => $leader,
+ 'persecutor' => $persecutor,
'sexually_active' => $sexuallyActive,
'species' => array_filter([
$species1,
@@ -92,7 +96,7 @@ function parseMetadata ($metadata) {
if ($metadata["bitset"]) {
$m = parseBitset($metadata["bitset"]);
$m["marefriends"] = $metadata["marefriends"] ?? [];
- $m["bitset"] = $metadata["bitset"] ?? [];
+ $m["bitset"] = $metadata["bitset"] ?? 0;
$m["sisters"] = $metadata["sisters"] ?? [];
$m["regression"] = $metadata["regression"] ?? null;
$m["caretakers"] = $metadata["caretakers"] ?? [];