Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SplatterDash committed Dec 1, 2024
2 parents 76aaaf1 + 4ee2484 commit 13283fe
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion assets/data/entries/costume-sheets.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"yOffset": -30
},
{
"name": "strawberry-clock",
"name": "shmoods",
"angle": -10
}
]
Expand Down
7 changes: 7 additions & 0 deletions assets/data/entries/costumes.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@
"desc": "B",
"unlock": "USERNAME",
"data": "coolboyman"
},
{
"name": "shmoods",
"display": "Mr. Shmoods",
"desc": "Shmoods loves Tankmas and White Castle. He has never done hard drugs, only soft drugs. Only the fluffiest drugs for shmoods. You can join him sometime. It's an open invitation.",
"unlock": "USERNAME",
"data": "MrShmoods"
}
]
}
8 changes: 4 additions & 4 deletions assets/data/levels/TankmasLand/hotel_courtyard_day1.ldtkl
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@
},
{
"__identifier": "Present",
"__grid": [65,94],
"__grid": [99,49],
"__pivot": [0,0],
"__tags": [],
"__tile": null,
Expand All @@ -889,16 +889,16 @@
"width": 128,
"height": 128,
"defUid": 2,
"px": [1040,1504],
"px": [1584,784],
"fieldInstances": [
{ "__identifier": "username", "__type": "String", "__value": "cymbourine", "__tile": null, "defUid": 5, "realEditorValues": [{
"id": "V_String",
"params": ["cymbourine"]
}] },
{ "__identifier": "day", "__type": "Int", "__value": 1, "__tile": null, "defUid": 6, "realEditorValues": [] }
],
"__worldX": 1072,
"__worldY": 1520
"__worldX": 1616,
"__worldY": 800
},
{
"__identifier": "NPC",
Expand Down
Binary file added assets/images/costumes/shmoods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion source/entities/NetUser.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package entities;

import data.JsonData;
import data.types.TankmasDefs.CostumeDef;
import entities.base.BaseUser;
import flixel.math.FlxVelocity;
Expand All @@ -25,6 +26,9 @@ class NetUser extends BaseUser
super(X, Y, username);
type = "net-user";

if (costume == null)
costume = JsonData.get_costume(Main.default_costume);

new_costume(costume);
move_to(X, Y, true);
trace("NEW USER " + username);
Expand Down Expand Up @@ -90,4 +94,4 @@ class NetUser extends BaseUser

move_update();
}
}
}
12 changes: 12 additions & 0 deletions source/net/tankmas/OnlineLoop.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.tankmas;

import data.JsonData;
import data.SaveManager;
import data.types.TankmasDefs.CostumeDef;
import entities.NetUser;
import entities.Player;
Expand Down Expand Up @@ -138,8 +139,15 @@ class OnlineLoop

for (username in usernames)
{
if (username.contains("temporary_random_username"))
continue;

var def:NetUserDef = Reflect.field(data.data, username);
var costume:CostumeDef = JsonData.get_costume(def.costume);

if (costume == null)
costume = JsonData.get_costume(Main.default_costume);

var user:BaseUser = BaseUser.get_user(username, function()
{
return new NetUser(def.x, def.y, username, costume);
Expand All @@ -150,6 +158,10 @@ class OnlineLoop
if (user.costume == null || user.costume.name != costume.name)
user.new_costume(costume);
}

PlayState.self.users.remove(PlayState.self.player, true);
PlayState.self.users.add(PlayState.self.player);

rooms_get_tick_rate = data.tick_rate * rooms_get_tick_rate_multiplier;
rooms_post_tick_rate = data.tick_rate * rooms_post_tick_rate_multiplier;

Expand Down
5 changes: 3 additions & 2 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class PlayState extends BaseState
add(touch = new TouchOverlay());

add(shadows);

add(misc_sprites);

add(minigames);
add(npcs);
add(presents);
Expand All @@ -113,8 +116,6 @@ class PlayState extends BaseState
add(sticker_fx);
add(dialogues);

add(misc_sprites);

add(doors);

add(ui_overlay);
Expand Down

0 comments on commit 13283fe

Please sign in to comment.