Optional profanity filter

This commit is contained in:
Vortrex
2022-07-26 02:16:05 -05:00
parent c486c00a02
commit 13cf75262a
4 changed files with 16 additions and 3 deletions

View File

@@ -187,6 +187,10 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
screenPosition.y -= propertyLabelNameOffset;
text = name || " ";
if (profanityFilterEnabled) {
text = replaceProfanityInMessage(text);
}
size = propertyLabelNameFont.measure(text, game.width, 0.0, 0.0, propertyLabelNameFont.size, true, true);
propertyLabelNameFont.render(text, [screenPosition.x - size[0] / 2, screenPosition.y - size[1] / 2], game.width, 0.0, 0.0, propertyLabelNameFont.size, (isBusiness) ? toColour(0, 153, 255, 255) : toColour(17, 204, 17, 255), false, true, false, true);
}