diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-18 01:32:14 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-18 01:32:14 -0700 |
commit | c5175d4a06c993ff7f42c16178b6d4db49b7387e (patch) | |
tree | d8629d21c81c27fe2cb52b2e201285c3449d1e7c /includes | |
parent | aa2388203ebc2fad01b8280777e5a40de4fcc813 (diff) | |
download | pathery-c5175d4a06c993ff7f42c16178b6d4db49b7387e.tar.xz |
Wall orientation achievements - huge commit.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/chats.php | 3 | ||||
-rw-r--r-- | includes/constants.php | 2 | ||||
-rw-r--r-- | includes/datas.php | 18 | ||||
-rw-r--r-- | includes/header.php | 9 |
4 files changed, 24 insertions, 8 deletions
diff --git a/includes/chats.php b/includes/chats.php index 18d0810..6991a48 100644 --- a/includes/chats.php +++ b/includes/chats.php @@ -62,7 +62,8 @@ function getChat($startID = 0) { users.displayName,
users.displayColor,
users.wallColor,
- users.wallEmblem
+ users.wallEmblem,
+ users.wallOrientation
FROM `chat`
LEFT JOIN `users`
ON chat.userID = users.ID
diff --git a/includes/constants.php b/includes/constants.php index 7b32819..a1d4dbe 100644 --- a/includes/constants.php +++ b/includes/constants.php @@ -84,7 +84,7 @@ $tierChallengeRequirements = array(0, 5, 10, 15, 20, 25, 30); define('UNLOCK_WALL_COLOR', 1); define('UNLOCK_WALL_EMBLEM', 2); define('UNLOCK_DISPLAY_COLOR', 3); -define('UNLOCK_WALL_ROTATION', 4); +define('UNLOCK_WALL_ORIENTATION', 4); define('UNLOCK_EXTRAS', 8); // MISC SUBTYPES: diff --git a/includes/datas.php b/includes/datas.php index f599533..af10cd2 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -110,11 +110,19 @@ function displayUnlock($uType, $uValue, $uName) { case UNLOCK_DISPLAY_COLOR: $r .= "<br /><span style='color:$uValue;font-weight:bold;font-size:110%;background-color:#222;'>$uName Username color!</span>"; + break; + + case UNLOCK_WALL_ORIENTATION: + $r .= "Emblem Rotation $uName!"; break; case UNLOCK_EXTRAS: $r .= "Extras: $uName"; break; + + default: + $r .= "$uName"; + break; } return $r; } @@ -684,9 +692,13 @@ function getPerfectDayArray() { //($required, $unlockType, $unlockValue, $unlockName, $unlockSubtype) //$cp[0] = array(requiredpoints, type, 'value', 'name'); $r[1] = array(1, UNLOCK_EXTRAS, '5', 'Insane Speed', MISC_UNLOCK_INSANE_SPEED); + //Give 0* at the same time + $r[2] = array(5, UNLOCK_WALL_ORIENTATION, '1', '90*', 0); + $r[3] = array(50, UNLOCK_WALL_ORIENTATION, '2', '180*', 0); + $r[4] = array(100, UNLOCK_WALL_ORIENTATION, '3', '270*', 0); //These numbers temporarly unreasonable - $r[2] = array(9275, UNLOCK_WALL_EMBLEM, 'CircleSmall_W_I.png', 'Inverted Bright Small Circle', 0); - $r[3] = array(10000, UNLOCK_WALL_EMBLEM, 'DiamondLarge_W_I.png', 'Inverted Light Large Diamond', 0); + $r[5] = array(9275, UNLOCK_WALL_EMBLEM, 'CircleSmall_W_I.png', 'Inverted Bright Small Circle', 0); + $r[6] = array(10000, UNLOCK_WALL_EMBLEM, 'DiamondLarge_W_I.png', 'Inverted Light Large Diamond', 0); return $r; } @@ -748,6 +760,7 @@ function getMembers($pageNumber = 1, $pageDivide = 50, $order = 'DESC', $orderBy users.wallColor, users.displayColor, users.wallEmblem, + users.wallOrientation, users.datejoined as dateJoined, users.dateLogin as dateLogin FROM `users` @@ -844,6 +857,7 @@ function getScores($mapID, $pageNumber = 1, $pageDivide = 10) { users.displayColor, users.wallColor, users.wallEmblem, + users.wallOrientation, $requestSolutions solutions.dateModified as cdate, solutions.ID as solutionID diff --git a/includes/header.php b/includes/header.php index 3965357..71c2a5c 100644 --- a/includes/header.php +++ b/includes/header.php @@ -153,7 +153,7 @@ function htmlFooter() { }
function topbar($links) {
- global $accepted, $wallColor, $wallEmblem, $request;
+ global $accepted, $wallColor, $wallEmblem, $wallOrientation, $request;
@@ -191,7 +191,7 @@ function topbar($links) { echo " <a href='cp' title='change name'>Update your name</a> | ";
echo " <a href='logout'>Logout</a>";
echo " </div>";
- echo "<div id='topbarBadge' style='background-color: $wallColor; background-image: url(images/marks/$wallEmblem);'>
+ echo "<div id='topbarBadge' style='background-color: $wallColor; background-image: url(".linkEmblem($wallEmblem, $wallOrientation).");'>
<a href='achievements'><div></div></a>
</div>";
@@ -207,9 +207,9 @@ function topbar($links) { }
function userDataToJS() {
- global $wallColor, $wallEmblem, $accepted;
+ global $wallColor, $wallEmblem, $wallOrientation, $accepted;
if (!$accepted) {
- $r = 'var userObj = {"wallColor":false,"wallEmblem":false,';
+ $r = 'var userObj = {"wallColor":false,"wallEmblem":false,"wallOrientation":false,';
$r .= '"ID":"-1","accepted":false,"hasInsaneSpeed":false};';
} else {
$userID = $_SESSION['userID'];
@@ -220,6 +220,7 @@ function userDataToJS() { $json['ID'] = $userID;
$json['wallColor'] = $wallColor;
$json['wallEmblem'] = $wallEmblem;
+ $json['wallOrientation'] = $wallOrientation;
$json['hasInsaneSpeed'] = $hasInsaneSpeed;
$json['accepted'] = 'true';
|