Made get_user_name script function

In the barrens during the prophet bot scene, the game was comparing the
entered name to Oneshot::USER_NAME.  But this was incorrect, as the name
could be either the steam name or the pc username and the name has some
preprocessing done to it.  With this new script function, we can compare
the name correctly
This commit is contained in:
Michael Shirt 2016-10-13 18:27:06 -06:00
parent ad48a874df
commit f2368993d7

View file

@ -10,12 +10,7 @@ class Game_Oneshot
if $GDC
@player_name = ''
else
user_name = (Steam.enabled? ? Steam::USER_NAME : Oneshot::USER_NAME).split(/\s+/)
if user_name[0].casecmp('the') == 0 || user_name[0].casecmp('a') == 0
@player_name = user_name.join(' ')
else
@player_name = user_name[0]
end
@player_name = Game_Oneshot.get_user_name
end
@lights = {}
@plight_timer = nil
@ -33,4 +28,12 @@ module Wallpaper
$game_oneshot.wallpaper = nil
Wallpaper.reset
end
def self.get_user_name
user_name = (Steam.enabled? ? Steam::USER_NAME : Oneshot::USER_NAME).split(/\s+/)
if user_name[0].casecmp('the') == 0 || user_name[0].casecmp('a') == 0
return user_name.join(' ')
else
return user_name[0]
end
end
end