Skip to content

Commit

Permalink
hoh boy
Browse files Browse the repository at this point in the history
a lot of changes n things
  • Loading branch information
SplatterDash committed Dec 2, 2024
1 parent 13283fe commit 36e8ea5
Show file tree
Hide file tree
Showing 16 changed files with 205 additions and 75 deletions.
8 changes: 8 additions & 0 deletions assets/data/config/ng/boards/boards.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"boards": [
{
"name": "marshmallow-roasting",
"id": 14324
}
]
}
2 changes: 1 addition & 1 deletion assets/data/config/ng/medals/medals.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"medals": [
{
"name":"test-medal",
"name":"checked-in",
"id": 81754
}, {
"name": "day-1",
Expand Down
57 changes: 26 additions & 31 deletions assets/data/entries/presentarts.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,33 @@
"file": "cymbourine",
"name": "sorry uhh i just now played madness project nexus LOL",
"artist": "Cymbourine",
"costumeUnlock": "pico"
},
{
"day": "1",
"file": "night-before",
"name": "The Night Before Tankmas",
"artist": "",
"comicProperties": {
"pages": 12,
"audio": "night-before-audio",
"cover": true,
"timing": [ 8.000
, 14.000
, 22.000
, 29.000
, 36.000
, 44.000
, 51.000
, 56.500
, 63.000
, 70.500
]
}
"costumeUnlock": "pico",
"link": "https://newgrounds.com/art/view/cymbourine/sorry-uhh-i-just-now-played-madness-project-nexus-lol"
}, {
"day": "1",
"file": "daintiest-knoblin",
"name": "The Daintiest Knoblin",
"artist": "",
"comicProperties": {
"pages": 16,
"cover": true
}
"day": "2",
"file": "sevi",
"name": "Elf on a shelf (branch)",
"artist": "Sevi"
}, {
"day": "3",
"file": "midgetsausage",
"name": "Yo! Merry Sexy Tankmas!!!!!",
"artist": "midgetsausage"
}, {
"day": "4",
"file": "sirlenward",
"name": "NG Wreath Goes Crazy",
"artist": "SirLenward"
}, {
"day": "5",
"file": "theextreamh",
"name": "All I want for Tankmas",
"artist": "TheExtreamH"
}, {
"day": "6",
"file": "bleak-creep",
"name": "Warming Up With Winter",
"artist": "Bleak-Creep"
}
]
}
7 changes: 3 additions & 4 deletions assets/data/levels/TankmasLand.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"doc": "https://ldtk.io/json",
"schema": "https://ldtk.io/files/JSON_SCHEMA.json",
"appAuthor": "Sebastien 'deepnight' Benard",
"appVersion": "1.5.4",
"appVersion": "1.5.3",
"url": "https://ldtk.io"
},
"iid": "95f97850-73f0-11ef-9983-5dc181ef5475",
"jsonVersion": "1.5.4",
"appBuildId": 479150,
"jsonVersion": "1.5.3",
"appBuildId": 473703,
"nextUid": 32,
"identifierStyle": "Free",
"toc": [],
Expand All @@ -27,7 +27,6 @@
"bgColor": "#40465B",
"defaultLevelBgColor": "#696A79",
"minifyJson": false,
"jsonStyle": "Compact",
"externalLevels": true,
"exportTiled": false,
"simplifiedExport": false,
Expand Down
25 changes: 24 additions & 1 deletion assets/data/levels/TankmasLand/hotel_courtyard_day1.ldtkl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"doc": "https://ldtk.io/json",
"schema": "https://ldtk.io/files/JSON_SCHEMA.json",
"appAuthor": "Sebastien 'deepnight' Benard",
"appVersion": "1.5.4",
"appVersion": "1.5.3",
"url": "https://ldtk.io"
},
"identifier": "hotel_courtyard_day1",
Expand Down Expand Up @@ -271,6 +271,7 @@
{ "px": [3264,800], "src": [32,0], "f": 0, "t": 1, "d": [2677], "a": 1 },
{ "px": [0,832], "src": [32,0], "f": 0, "t": 1, "d": [2678], "a": 1 },
{ "px": [640,832], "src": [32,0], "f": 0, "t": 1, "d": [2698], "a": 1 },
{ "px": [1632,832], "src": [0,0], "f": 0, "t": 0, "d": [2729], "a": 1 },
{ "px": [2432,832], "src": [32,0], "f": 0, "t": 1, "d": [2754], "a": 1 },
{ "px": [3264,832], "src": [32,0], "f": 0, "t": 1, "d": [2780], "a": 1 },
{ "px": [0,864], "src": [32,0], "f": 0, "t": 1, "d": [2781], "a": 1 },
Expand Down Expand Up @@ -956,6 +957,28 @@
}] }],
"__worldX": 1243,
"__worldY": 1354
},
{
"__identifier": "Present",
"__grid": [124,65],
"__pivot": [0,0],
"__tags": [],
"__tile": null,
"__smartColor": "#D74343",
"iid": "30568520-9b00-11ef-8069-418e8c9dd4dc",
"width": 128,
"height": 128,
"defUid": 2,
"px": [1984,1040],
"fieldInstances": [
{ "__identifier": "username", "__type": "String", "__value": "sevi", "__tile": null, "defUid": 5, "realEditorValues": [{
"id": "V_String",
"params": ["sevi"]
}] },
{ "__identifier": "day", "__type": "Int", "__value": 2, "__tile": null, "defUid": 6, "realEditorValues": [{ "id": "V_Int", "params": [2] }] }
],
"__worldX": 2016,
"__worldY": 1056
}
]
},
Expand Down
Binary file added assets/images/presents/present-sevi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
23 changes: 18 additions & 5 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Main extends Sprite

public static var daily_sticker_draw_amount:Int = 4;

public var error_text:String;

public static function main():Void
{
// We need to make the crash handler LITERALLY FIRST so nothing EVER gets past it.
Expand All @@ -51,14 +53,25 @@ class Main extends Sprite

function on_logged_in()
{
error_text = 'Welcome to Tankmas ADVENTure 2024!\n\nWe hope you enjoy your visit. If you want to earn medals, score on leaderboards, and save your costumes and progress, please login to Newgrounds on your next visit!';
#if newgrounds
username = ng_api.NG_USERNAME;
if (username == "")
{
if(ng_api.NG_LOGGED_IN) {
username = ng_api.NG_USERNAME;
if (username == "")
{
username = 'temporary_random_username_${Math.random()}';
}
addChild(new FlxGame(1920, 1080, PlayState, true));
} else {
if(ng_api.NG_LOGIN_ERROR != null) error_text = 'ERROR WHILE LOADING LOGIN: ${ng_api.NG_LOGIN_ERROR}\n\nPlease screenshot this and share with Tankmas ADVENTure 2024 developers. Login functions are deactivated.';
#end
username = 'temporary_random_username_${Math.random()}';
TextState.text_to_write = error_text;
addChild(new FlxGame(1920, 1080, TextState, true));
#if newgrounds
}
#end
addChild(new FlxGame(1920, 1080, PlayState, true));

}

public static function get_current_bg(day:Int):Int
Expand All @@ -73,7 +86,7 @@ class Main extends Sprite
{
Lists.init();
#if newgrounds
ng_api = new NewgroundsHandler(true, false, on_logged_in);
ng_api = new NewgroundsHandler(true, true, on_logged_in);
#else
on_logged_in();
#end
Expand Down
5 changes: 5 additions & 0 deletions source/activities/bonfire/BonfireStick.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class BonfireStick extends FlxSprite
{
if (marshmallow != null)
{
#if newgrounds
@:privateAccess
if(marshmallow.current_level == (marshmallow.heat_levels.length - 2))
Main.ng_api.get_score(Main.ng_api.boards.get("marshmallow-roasting").id, (s) -> Main.ng_api.post_score(s.value + 1, Main.ng_api.boards.get("marshmallow-roasting").id));
#end
marshmallow.discard();
}
marshmallow = null;
Expand Down
4 changes: 4 additions & 0 deletions source/data/SaveManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class SaveManager

// loads current room
load_room();

load_costume_collection();
load_sticker_collection();
}

public static function upload()
Expand Down Expand Up @@ -213,6 +216,7 @@ class SaveManager
case "matthewlopz":
return Main.ng_api.medal_popup(Main.ng_api.medals.get("little-candles"));
default:
Player.has_sticker_pack = true;
return Main.ng_api.medal_popup(Main.ng_api.medals.get('day-$day'));
}
#end
Expand Down
2 changes: 1 addition & 1 deletion source/entities/Player.hx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Player extends BaseUser

static var debug_costume_rotation:Array<CostumeDef>;

public static var has_sticker_pack:Bool = true;
public static var has_sticker_pack:Bool = false;

var auto_moving:Bool = false;
var auto_move_dest:FlxPoint;
Expand Down
2 changes: 2 additions & 0 deletions source/entities/Present.hx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class Present extends Interactable
}
comic = presentData.comicProperties != null ? true : false;
day = Std.parseInt(presentData.day);
if(Date.now().getMonth() == 11 && Date.now().getDate() < day)
return;

openable = true;

Expand Down
Loading

0 comments on commit 36e8ea5

Please sign in to comment.