[https://github.com/HabitRPG/habitrpg/pull/1969] move armor_base_0_* to
shirt_*, special handling under user.preferences.shirt. Removed stray pixels to bottom left.
|
|
@ -18,13 +18,15 @@ module.exports = function(grunt) {
|
|||
// `sprite` has `name`, `image` (full path), `x`, `y`
|
||||
// `width`, `height`, `total_width`, `total_height`
|
||||
// EXAMPLE: Prefix all sprite names with 'sprite-'
|
||||
if (sprite.name.match(/hair|skin|beard|mustach/) || sprite.name=='head_base_0') {
|
||||
if (sprite.name.match(/hair|skin|beard|mustach|shirt/) || sprite.name=='head_base_0') {
|
||||
sprite.name = 'customize-option.' + sprite.name;
|
||||
sprite.x = sprite.x + 25;
|
||||
sprite.y = sprite.y + 15;
|
||||
sprite.width = 60;
|
||||
sprite.height = 60;
|
||||
}
|
||||
if (~sprite.name.indexOf('shirt'))
|
||||
sprite.y = sprite.y+15; // even more for shirts
|
||||
},
|
||||
cssOpts: {
|
||||
'cssClass': function (item) {
|
||||
|
|
|
|||
1248
dist/customizer.css
vendored
2
dist/habitrpg-shared.css
vendored
7
dist/habitrpg-shared.js
vendored
|
|
@ -10798,11 +10798,8 @@ var process=require("__browserify_process");(function() {
|
|||
user.fns.dotSet("purchased." + path, true);
|
||||
}
|
||||
user.balance -= cost;
|
||||
if (user.markModified) {
|
||||
user._v++;
|
||||
if (typeof user.markModified === "function") {
|
||||
user.markModified("purchased");
|
||||
}
|
||||
if (typeof user.markModified === "function") {
|
||||
user.markModified('purchased');
|
||||
}
|
||||
return typeof cb === "function" ? cb(null, req) : void 0;
|
||||
},
|
||||
|
|
|
|||
2414
dist/spritesmith.css
vendored
BIN
dist/spritesmith.png
vendored
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 287 KiB |
|
Before Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 524 B |
|
Before Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 545 B |
|
Before Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 434 B |
|
Before Width: | Height: | Size: 430 B |
|
Before Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 453 B |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 531 B |
|
Before Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 452 B |
|
Before Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 532 B |
|
Before Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 623 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 446 B |
|
Before Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 478 B |
|
Before Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 530 B |
|
Before Width: | Height: | Size: 564 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_black.png
Normal file
|
After Width: | Height: | Size: 546 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_blue.png
Normal file
|
After Width: | Height: | Size: 565 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_convict.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_cross.png
Normal file
|
After Width: | Height: | Size: 487 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_fire.png
Normal file
|
After Width: | Height: | Size: 629 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_green.png
Normal file
|
After Width: | Height: | Size: 565 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_horizon.png
Normal file
|
After Width: | Height: | Size: 665 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_ocean.png
Normal file
|
After Width: | Height: | Size: 657 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_pink.png
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_purple.png
Normal file
|
After Width: | Height: | Size: 525 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_rainbow.png
Normal file
|
After Width: | Height: | Size: 596 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_redblue.png
Normal file
|
After Width: | Height: | Size: 543 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_thunder.png
Normal file
|
After Width: | Height: | Size: 537 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_tropical.png
Normal file
|
After Width: | Height: | Size: 654 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_white.png
Normal file
|
After Width: | Height: | Size: 557 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_yellow.png
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
img/sprites/spritesmith/shirts/broad_shirt_zombie.png
Normal file
|
After Width: | Height: | Size: 617 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_black.png
Normal file
|
After Width: | Height: | Size: 536 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_blue.png
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_convict.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_cross.png
Normal file
|
After Width: | Height: | Size: 481 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_fire.png
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_green.png
Normal file
|
After Width: | Height: | Size: 558 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_horizon.png
Normal file
|
After Width: | Height: | Size: 658 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_ocean.png
Normal file
|
After Width: | Height: | Size: 648 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_pink.png
Normal file
|
After Width: | Height: | Size: 553 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_purple.png
Normal file
|
After Width: | Height: | Size: 532 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_rainbow.png
Normal file
|
After Width: | Height: | Size: 573 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_redblue.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_thunder.png
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_tropical.png
Normal file
|
After Width: | Height: | Size: 637 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_white.png
Normal file
|
After Width: | Height: | Size: 549 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_yellow.png
Normal file
|
After Width: | Height: | Size: 555 B |
BIN
img/sprites/spritesmith/shirts/slim_shirt_zombie.png
Normal file
|
After Width: | Height: | Size: 594 B |
|
|
@ -479,7 +479,7 @@ api.wrap = (user) ->
|
|||
return cb?({code:401, err: "Not enough gems"}) if user.balance < cost
|
||||
if fullSet
|
||||
_.each path.split(","), (p) ->
|
||||
user.fns.dotSet("purchased." + p, true);true
|
||||
user.fns.dotSet("purchased.#{p}", true);true
|
||||
else
|
||||
if user.fns.dotGet("purchased." + path) is true
|
||||
split = path.split('.');v=split.pop();k=split.join('.')
|
||||
|
|
@ -487,9 +487,7 @@ api.wrap = (user) ->
|
|||
return cb? null, req
|
||||
user.fns.dotSet "purchased." + path, true
|
||||
user.balance -= cost
|
||||
if user.markModified
|
||||
user._v++
|
||||
user.markModified? "purchased"
|
||||
user.markModified? 'purchased'
|
||||
cb? null, req
|
||||
|
||||
changeClass: (req, cb) ->
|
||||
|
|
|
|||