From 34f08e10c3c9a8aacf5e16f86cd9ad291226217d Mon Sep 17 00:00:00 2001 From: GIR GIR Date: Wed, 16 Nov 2022 02:35:25 -0800 Subject: [PATCH] Localized Niko Name Checks: -now the niko name check values are localized --- scripts/Script.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/Script.rb b/scripts/Script.rb index 119312a..653edb3 100644 --- a/scripts/Script.rb +++ b/scripts/Script.rb @@ -16,7 +16,8 @@ module Script def self.is_name_swear test_string = $game_oneshot.player_name.downcase - if ["fuck", "shit", "ass", "cock", "damn", "penis", "tiddy", "titty", "cunt", "fag", "whore"].any? { |swear| test_string.include? swear } + list_of_swears = tr("NAME_SWEARS").to_str.split(",") + if list_of_swears.any? { |swear| test_string.include? swear.downcase } return true end return false @@ -24,7 +25,8 @@ module Script def self.is_name_niko test_string = $game_oneshot.player_name.downcase - if test_string == "niko" + list_of_niko_names = tr("NAME_NIKOS").to_str.split(",") + if list_of_niko_names.any? { |niko_name| test_string == niko_name.downcase } return true end return false @@ -32,7 +34,8 @@ module Script def self.is_name_like_niko test_string = $game_oneshot.player_name.downcase - if ["nico", "nikko", "nicco", "nikoh", "nicoh"].any? { |name| test_string == name } + list_of_niko_like_names = tr("NAMES_LIKE_NIKO").to_str.split(",") + if list_of_niko_like_names.any? { |niko_like_name| test_string == niko_like_name.downcase } return true end return false @@ -40,7 +43,8 @@ module Script def self.is_name_like_mom_dad test_string = $game_oneshot.player_name.downcase - if ["mom", "dad", "mommy", "daddy", "mama", "papa"].any? { |name| test_string == name } + list_of_names_like_mom_dad = tr("NAMES_LIKE_MOMDAD").to_str.split(",") + if list_of_names_like_mom_dad.any? { |momdad_name| test_string == momdad_name.downcase } return true end return false @@ -48,7 +52,8 @@ module Script def self.is_name_gross test_string = $game_oneshot.player_name.downcase - if ["poo", "pee", "fart", "stinky", "piss", "shit", "slimy"].any? { |name| test_string == name } + list_of_gross_names = tr("NAMES_GROSS").to_str.split(",") + if list_of_gross_names.any? { |gross_name| test_string == gross_name.downcase } return true end return false