From 885a05be06d0b42835652208c729e5fded451c26 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 8 Feb 2023 22:42:21 +0100 Subject: Updated 9 files, added 2 files and deleted pages/bitset.inc (automated) --- includes/bitset.inc | 142 +--------------------------------------------------- 1 file changed, 1 insertion(+), 141 deletions(-) (limited to 'includes/bitset.inc') diff --git a/includes/bitset.inc b/includes/bitset.inc index 5106d80..8e3f5b2 100644 --- a/includes/bitset.inc +++ b/includes/bitset.inc @@ -1,145 +1,5 @@ "earth", - "0010" => "unicorn", - "0011" => "pegasus", - "0100" => "alicorn", - "0101" => "batpony", - "0110" => "crystal", - "0111" => "changeling", - default => null, - }; - - $species2 = match ($species2) { - "0001" => "earth", - "0010" => "unicorn", - "0011" => "pegasus", - "0100" => "alicorn", - "0101" => "batpony", - "0110" => "crystal", - "0111" => "changeling", - default => null, - }; - - $alignment1 = match ($alignment1) { - "0000" => "aroace", - "0001" => "hetero", - "0010" => "homo", - "0011" => "bi", - "0100" => "pan", - default => null, - }; - - $alignment2 = match ($alignment2) { - "0000" => "aroace", - "0001" => "hetero", - "0010" => "homo", - "0011" => "bi", - "0100" => "pan", - default => null, - }; - - $little = 0; - - if (isset($birthData["age"]) && $birthData["age"] !== 0) { - $age = $birthData["age"]; - } else if (isset($birthData["year"]) && $birthData["year"] > 1900) { - $age = (int)date('Y') - $birthData["year"] + (strtotime(date('Y') . "-" . $birthData["date"]) <= time() ? 0 : -1); - } else { - $age = -2; - } - - if ($age <= 10 && $age > 0) { - $little = 2; - } - - if ($age < 16 && $age > 10) { - $little = 3; - } - - return [ - 'shared_memory' => $sharedMemory, - 'median' => false, - 'protector' => $protector, - 'fictive' => $fictive, - 'little' => $little, - 'not_talking' => false, - 'sexual_features' => $sexualFeatures, - 'host' => false, - 'robot' => $robot, - 'magic' => 0, - 'sensitivity' => 0, - 'food' => $food, - 'plush' => $plush, - 'nonverbal' => $nonverbal, - 'less_frequent' => $lessFrequent, - 'age_spells' => false, - 'age_regressor' => false, - 'leader' => $leader, - 'persecutor' => $persecutor, - 'sexually_active' => $sexuallyActive, - 'polyamorous' => [ - 'romantic' => $polyamorous1, - 'sexual' => $polyamorous2 - ], - 'alignment' => [ - 'romantic' => $alignment1, - 'sexual' => $alignment2 - ], - 'species' => array_filter([ - $species1, - $species2 - ], function ($i) { - return isset($i); - }) - ]; -} - function parseMetadata ($metadata) { - if (isset($metadata)) { - if ($metadata["bitset"]) { - $m = parseBitset($metadata["bitset"], $metadata["birth"] ?? []); - $m["sexfriends"] = $metadata["sexfriends"] ?? []; - $m["marefriends"] = $metadata["marefriends"] ?? []; - $m["bitset"] = $metadata["bitset"] ?? 0; - $m["sisters"] = $metadata["sisters"] ?? []; - $m["regression"] = $metadata["regression"] ?? null; - $m["caretakers"] = $metadata["caretakers"] ?? []; - $m["median"] = $metadata["median"] ?? null; - $m["birth"] = $metadata["birth"] ?? null; - $m["heat"] = $metadata["heat"] ?? null; - $m["code"] = $metadata["code"] ?? null; - $m["interest"] = $metadata["interest"] ?? null; - } else { - $m = $metadata; - } - - return $m; - } else { - return $metadata; - } + return $metadata; } \ No newline at end of file -- cgit