Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/eric/leaderboards'
Browse files Browse the repository at this point in the history
  • Loading branch information
chosencharacters committed Dec 3, 2024
2 parents a40bac7 + e95d533 commit 36e9482
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 13 deletions.
41 changes: 41 additions & 0 deletions assets/data/entries/sticker-sheets.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,47 @@
"name": "pico-sticker-swag"
}
]
},
{
"graphic": "emotes-back-blue",
"items": [
{
"name": "common-tamago"
},
{
"name": "toasty-warm"
},
{
"name": "edd-sticker"
},
{
"name": "mustard"
},
{
"name": "pink-kight-mondo"
},
{
"name": "tappy-sticker"
},
{
"name": "son-christmas"
},
{
"name": "sick-skull"
},
{
"name": "slashe-wave"
},
{
"name": "gimme-five"
},
{
"name": "john-sticker"
},
{
"name": "pico-sticker-swag"
}
]
}
]
}
Binary file added assets/images/bonfire/golden-marshmallow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions source/activities/bonfire/Marshmallow.hx
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,18 @@ class Marshmallow extends FlxSprite
set_level(current_level + 1);
}

public static function on_cooked_perfect():Void
{
// Earn a medal, if applicable.
public static function on_cooked_perfect():Void {
trace('Cooked a perfect marshmallow!');
#if newgrounds
trace('Awarding "Golden Marshmallow" medal...');

trace("YA DID IT MAN! YA DID IT!");
// Earn a medal, if applicable.
Main.ng_api.medal_popup(Main.ng_api.medals.get("golden-marshmallow"));

final GOLDEN_MARSHMALLOWS_SCOREBOARD:Int = 14324;

Main.ng_api.post_score(1, GOLDEN_MARSHMALLOWS_SCOREBOARD);
#end
}

override function update(elapsed:Float)
Expand Down Expand Up @@ -171,4 +173,4 @@ class Marshmallow extends FlxSprite
destroy();
}
}
}
}
12 changes: 6 additions & 6 deletions source/data/SaveManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class SaveManager
{
if (FlxG.save.data.saved_costume_collection == null)
{
trace("Error loading saved costumes");
trace("Error loading saved costumes (might be empty)");
save_costume_collection(true);
}
saved_costume_collection = FlxG.save.data.costume_collection;
Expand All @@ -143,7 +143,7 @@ class SaveManager
{
if (FlxG.save.data.saved_sticker_collection == null)
{
trace("Error loading saved stickers");
trace("Error loading saved stickers (might be empty)");
save_sticker_collection(true);
}
saved_sticker_collection = FlxG.save.data.sticker_collection;
Expand All @@ -153,7 +153,7 @@ class SaveManager
{
if (FlxG.save.data.savedPresents == null)
{
trace("Error loading saved presents");
trace("Error loading saved presents (might be empty)");
save_presents(true);
}
savedPresents = FlxG.save.data.savedPresents;
Expand All @@ -163,7 +163,7 @@ class SaveManager
{
if (FlxG.save.data.savedCostumes == null)
{
trace("Error loading saved costumes");
trace("Error loading saved costumes (might be empty)");
save_costumes(true);
}
savedCostumes = FlxG.save.data.savedCostumes;
Expand All @@ -178,7 +178,7 @@ class SaveManager
{
if (FlxG.save.data.savedEmotes == null)
{
trace("Error loading saved emotes");
trace("Error loading saved emotes (might be empty)");
save_emotes(true);
}
savedEmotes = FlxG.save.data.savedEmotes;
Expand All @@ -191,7 +191,7 @@ class SaveManager
{
if (FlxG.save.data.savedRoom == null)
{
trace("Error loading saved room");
trace("Error loading saved room (might be empty)");
save_room(true);
}
savedRoom = FlxG.save.data.savedRoom;
Expand Down
3 changes: 1 addition & 2 deletions source/ng/NewgroundsHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ class NewgroundsHandler
trace('logged in! user:${NG_USERNAME} session: ${NG_SESSION_ID}');

load_api_medals_part_1();
// NG.core.scoreBoards.loadList();
// trace(NG.core.scoreBoards == null ? null : NG.core.scoreBoards.keys());
NG.core.scoreBoards.loadList();
NG.core.medals.loadList();

login_callback != null ? login_callback() : false;
Expand Down

0 comments on commit 36e9482

Please sign in to comment.