mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
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:
parent
ad48a874df
commit
f2368993d7
1 changed files with 9 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue