diff options
author | Minteck <contact@minteck.org> | 2022-12-10 22:27:08 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-12-10 22:27:08 +0100 |
commit | 30303a3ad0d0f31d93c25f42bfd10d70e8277b72 (patch) | |
tree | 622964e7895c759232aff28230394aa5cc747be9 /includes/bitset.inc | |
parent | f850a8a53efd719fef6c8784c5af7b89dd9a6a2f (diff) | |
download | pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.tar.gz pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.tar.bz2 pluralconnect-30303a3ad0d0f31d93c25f42bfd10d70e8277b72.zip |
Update
Diffstat (limited to 'includes/bitset.inc')
-rw-r--r-- | includes/bitset.inc | 6 |
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"] ?? []; |