Skip to content

Commit

Permalink
Rooni bug fixing (#762)
Browse files Browse the repository at this point in the history
* Update tents message, fix for flair overriding

* Edit flair sizing, add 1 background and 3 fonts
  • Loading branch information
Hipperooni authored Mar 15, 2024
1 parent 0cf2a42 commit c59ed37
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 24 deletions.
2 changes: 1 addition & 1 deletion assets/data/tripsitCombos.json
Original file line number Diff line number Diff line change
Expand Up @@ -3134,7 +3134,7 @@
"status": "Dangerous"
},
"benzodiazepines": {
"note": "Central nervous system- and/or respiratory-depressant effects may be additively or synergistically present. Vomit aspiration a risk when passed out, lay down in recovery position if ingested.",
"note": "Central nervous system- and/or respiratory-depressant effects may be additively or synergistically present. Vomit aspiration is a risk when passed out, lay down in recovery position if ingested.",
"status": "Dangerous"
},
"caffeine": {
Expand Down
11 changes: 6 additions & 5 deletions src/discord/commands/guild/d.levels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,20 +497,21 @@ export const dLevels: SlashCommand = {
let usernameHeight = 76;
let fontSize = 50;
const maxLength = 508;
context.textBaseline = 'middle';

if (userFlair) {
usernameHeight = 62;
fontSize = 25;
usernameHeight = 78;
fontSize = 30;
context.textBaseline = 'top';
context.font = resizeText(canvasObj, userFlair, fontSize, userFont, maxLength);
context.fillText(`${userFlair}`, 146, 97);
context.font = resizeText(canvasObj, userFlair, fontSize, 'futura', maxLength);
context.fillText(`${userFlair}`, 146, 100);
context.textBaseline = 'bottom';
}

fontSize = 50;
context.textBaseline = 'middle';
context.font = resizeText(canvasObj, filteredDisplayName, fontSize, userFont, maxLength);
context.fillText(`${filteredDisplayName}`, 146, usernameHeight);
context.textBaseline = 'middle';

// Progress Bars Draw
context.fillStyle = barColor;
Expand Down
22 changes: 12 additions & 10 deletions src/discord/commands/guild/d.profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,20 +329,21 @@ export const dProfile: SlashCommand = {
let usernameHeight = 76;
let fontSize = 50;
const maxLength = 508;
context.textBaseline = 'middle';

if (userFlair) {
usernameHeight = 62;
fontSize = 25;
usernameHeight = 78;
fontSize = 30;
context.textBaseline = 'top';
context.font = resizeText(canvasObj, userFlair, fontSize, userFont, maxLength);
context.fillText(`${userFlair}`, 146, 97);
context.font = resizeText(canvasObj, userFlair, fontSize, 'futura', maxLength);
context.fillText(`${userFlair}`, 146, 100);
context.textBaseline = 'bottom';
}

fontSize = 50;
context.textBaseline = 'middle';
context.font = resizeText(canvasObj, filteredDisplayName, fontSize, userFont, maxLength);
context.fillText(`${filteredDisplayName}`, 146, usernameHeight);
context.textBaseline = 'middle';

// User Timezone
context.font = '25px futura';
Expand Down Expand Up @@ -618,20 +619,21 @@ export async function getProfilePreview(target: GuildMember, option: string, ima
let fontSize = 50;
const maxLength = 508;
const userFlair = 'Your Custom Flair Here';
context.textBaseline = 'middle';

if (option === 'userflair') {
usernameHeight = 62;
fontSize = 25;
usernameHeight = 78;
fontSize = 30;
context.textBaseline = 'top';
context.font = resizeText(canvasObj, userFlair, fontSize, userFont, maxLength);
context.fillText(`${userFlair}`, 146, 97);
context.font = resizeText(canvasObj, userFlair, fontSize, 'futura', maxLength);
context.fillText(`${userFlair}`, 146, 100);
context.textBaseline = 'bottom';
}

fontSize = 50;
context.textBaseline = 'middle';
context.font = resizeText(canvasObj, filteredDisplayName, fontSize, userFont, maxLength);
context.fillText(`${filteredDisplayName}`, 146, usernameHeight);
context.textBaseline = 'middle';

/* User Timezone
context.font = '25px futura';
Expand Down
54 changes: 53 additions & 1 deletion src/discord/commands/guild/d.rpg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,19 @@ const items = {
effect_value: 'IndieFlower',
emoji: 'itemFont',
},
Kablammo: {
label: 'Kablammo',
value: 'Kablammo',
description: 'Font',
quantity: 1,
weight: 0,
cost: 700,
equipped: false,
consumable: false,
effect: 'font',
effect_value: 'Kablammo',
emoji: 'itemFont',
},
KumarOne: {
label: 'Kumar One',
value: 'KumarOne',
Expand Down Expand Up @@ -286,6 +299,19 @@ const items = {
effect_value: 'PressStart2P',
emoji: 'itemFont',
},
ProtestRevolution: {
label: 'Protest Revolution',
value: 'ProtestRevolution',
description: 'Font',
quantity: 1,
weight: 0,
cost: 700,
equipped: false,
consumable: false,
effect: 'font',
effect_value: 'ProtestRevolution',
emoji: 'itemFont',
},
ReggaeOne: {
label: 'Reggae One',
value: 'ReggaeOne',
Expand Down Expand Up @@ -377,6 +403,19 @@ const items = {
effect_value: 'SpicyRice',
emoji: 'itemFont',
},
Workbench: {
label: 'Workbench',
value: 'Workbench',
description: 'Font',
quantity: 1,
weight: 0,
cost: 700,
equipped: false,
consumable: false,
effect: 'font',
effect_value: 'Workbench',
emoji: 'itemFont',
},
Barcode: {
label: 'Barcode',
value: 'Barcode',
Expand Down Expand Up @@ -691,6 +730,19 @@ const items = {
effect_value: 'Mindsets',
emoji: 'itemBackground',
},
Musical: {
label: 'Musical',
value: 'Musical',
description: 'Background',
quantity: 1,
weight: 0,
cost: 1000,
equipped: false,
consumable: false,
effect: 'background',
effect_value: 'Musical',
emoji: 'itemBackground',
},
Noise: {
label: 'Noise',
value: 'Noise',
Expand Down Expand Up @@ -2277,7 +2329,7 @@ export async function rpgFlair(interaction: ChatInputCommandInteraction) {
// First check if the flair contains a @mention
let newFlair = interaction.options.getString('flair') as string;
// log.debug(F, `newFlair: ${newFlair}`);
const mentionRegex = /<@!?\d{18}>/g;
const mentionRegex = /<@!?\d{18,}>/g;
const mentions = newFlair.match(mentionRegex);
log.debug(F, `mentions: ${mentions}`);
// If the flair contains a mention, check if the user has mod permissions
Expand Down
4 changes: 4 additions & 0 deletions src/discord/utils/getAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const assetDef = {
Equations: { filePath: `${assetsDirectory}/img/backgrounds/Equations.png`, url: 'https://i.gyazo.com/561e9cd1ca3b02608c7f9e5f1908d6d9.png' },
Flowers: { filePath: `${assetsDirectory}/img/backgrounds/Flowers.png`, url: 'https://i.gyazo.com/2e1d47f128305b2f12fe2c4bb7db75d2.png' },
Paws: { filePath: `${assetsDirectory}/img/backgrounds/Paws.png`, url: 'https://i.gyazo.com/83b9f275af87372edc610da449220a4c.png' },
Musical: { filePath: `${assetsDirectory}/img/backgrounds/Musical.png`, url: 'https://i.gyazo.com/0026091d93aad26a7be0abba713eb473.png' },
mushroomInfoA: { filePath: `${assetsDirectory}/img/mushroomInfoA.png`, url: 'https://i.gyazo.com/233df47085a0ac5493d8378111512b3d.png' },
mushroomInfoB: { filePath: `${assetsDirectory}/img/mushroomInfoB.png`, url: 'https://i.gyazo.com/2aae45e843da99867b82e9b1ad07d22b.png' },
Acme: { filePath: `${assetsDirectory}/font/Acme.woff2`, url: 'https://fonts.gstatic.com/s/acme/v25/RrQfboBx-C5_XxrBbg.woff2' },
Expand All @@ -128,6 +129,9 @@ const assetDef = {
SedwickAve: { filePath: `${assetsDirectory}/font/SedwickAve.woff2`, url: 'https://fonts.gstatic.com/s/sedgwickavedisplay/v21/xfuu0XPgU3jZPUoUo3ScvmPi-NapQ8OxM1c0fec.woff2' },
Mogra: { filePath: `${assetsDirectory}/font/Mogra.woff2`, url: 'https://fonts.gstatic.com/s/mogra/v19/f0X40eSs8c95TCo_BPM.woff2' },
Graduate: { filePath: `${assetsDirectory}/font/Graduate.woff2`, url: 'https://fonts.gstatic.com/s/graduate/v17/C8cg4cs3o2n15t_2YygW43w.woff2' },
Kablammo: { filePath: `${assetsDirectory}/font/Kablammo.woff2`, url: 'https://fonts.gstatic.com/s/kablammo/v1/bWtm7fHPcgrhC-J3lcXhcQTY5Ixs6Au9YgCTiBcQ.woff2' },
Workbench: { filePath: `${assetsDirectory}/font/Workbench.woff2`, url: 'https://fonts.gstatic.com/s/workbench/v1/FeV8S05Gp6Et7FcfbPFK1rynGd_MxtkvNFmoUDFhgF2VKTGQk6vapeOM2mM.woff2' },
ProtestRevolution: { filePath: `${assetsDirectory}/font/ProtestRevolution.woff2`, url: 'https://fonts.gstatic.com/s/protestrevolution/v2/11hcGofZ0kXBbxQXFB7MJsjtqnVw6Z2c9_gy.woff2' },
} as {
[key: string]: { filePath: string;
url: string;
Expand Down
10 changes: 3 additions & 7 deletions src/discord/utils/tents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,12 @@ export async function pitchTent(
await newChannel.fetch();
await newChannel.send(`## Welcome to your tent, <@${New.member?.id}>
- **Webcam Chat (WC) is available for level 10 and up!**
- The normal rules are still in effect:
- **Webcam use is available for level 10 and up!**
- Don't show off drugs, porn, gore, weapons or anything a reasonable person would consider offensive on camera.
- Consumption of mild psychoactive (nicotine, caffeine, alcohol, weed) substances is allowed.
- Consumption of mildly psychoactive (nicotine, caffeine, alcohol, weed) substances is allowed.
- **Looking for others to join?**
- Pick up the 'Voice Chatty' role in <id:customize>
- This icon indicates you're looking for joiners in chat
- You can (infrequently) mention the \`@Join VC\` role to see if anyone wants to join!
- You can pick up this role in <id:customize>
- \`/voice ping\` - Use this to ping those opted-in to VC ping invites
- **Modify your tent**
- \`/voice bitrate\` - Change the bitrate of your tent
Expand Down

0 comments on commit c59ed37

Please sign in to comment.