Skip to content

Commit

Permalink
Fix printer, emoji stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
superpowers04 committed Oct 2, 2024
1 parent 348c23d commit a110806
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ public static void sendPingMessage(Avatar owner, String ping, int size, LuaValue
private static final Function<FiguraLuaRuntime, LuaValue> PRINT_FUNCTION = runtime -> new VarArgFunction() {
@Override
public Varargs invoke(Varargs args) {
if (!Configs.LOG_OTHERS.value && !FiguraMod.isLocal(runtime.owner.owner))
return NIL;
boolean local = FiguraMod.isLocal(runtime.owner.owner);
if (!local && (!Configs.LOG_OTHERS.value || runtime.owner.permissions.get(Permissions.PRINTING) < 1))
return NIL;

MutableComponent text = Component.empty();
for (int i = 0; i < args.narg(); i++)
Expand All @@ -181,8 +182,8 @@ public String tojstring() {
@Override
public Varargs invoke(Varargs args) {
boolean local = FiguraMod.isLocal(runtime.owner.owner);
if (!Configs.LOG_OTHERS.value && !local)
return NIL;
if (!local && (!Configs.LOG_OTHERS.value || runtime.owner.permissions.get(Permissions.PRINTING) < 1))
return NIL;

TextUtils.allowScriptEvents = true;

Expand Down
9 changes: 9 additions & 0 deletions common/src/main/resources/assets/figura/emojis/extura.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

{
"blacklist": "",
"emojis": {
"\uE001":["@super04", "@superpowers04", "@stephani"],
"\uE002":["c_", "hampter"],
"\uE003":["mario"]
}
}
16 changes: 16 additions & 0 deletions common/src/main/resources/assets/figura/font/emoji_extura.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"providers": [
{
"type": "bitmap",
"file": "figura:font/emojis/extura.png",
"ascent": 8,
"chars": [
"\uE001\uE002\uE003\uE004\uE005\u0000\u0000\u0000",
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
]
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a110806

Please sign in to comment.