mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
fixed fast travel
This commit is contained in:
parent
14a17b7355
commit
55789a0584
2 changed files with 19 additions and 19 deletions
|
|
@ -97,7 +97,7 @@ class FastTravel
|
||||||
|
|
||||||
#WME
|
#WME
|
||||||
def update_location_name_text
|
def update_location_name_text
|
||||||
if ZONES[$game_fasttravel.zone].locations == nil || ZONES[$game_fasttravel.zone].maps[@selected_location] == nil || Settings[:fasttravel_ui] == "Original"
|
if ZONES[$game_fasttravel.zone].locations == nil || ZONES[$game_fasttravel.zone].maps[@selected_location] == nil || (Settings[:fasttravel_ui] == 0)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@location_name_text.bitmap.clear
|
@location_name_text.bitmap.clear
|
||||||
|
|
@ -159,7 +159,7 @@ class FastTravel
|
||||||
self.opacity = 0
|
self.opacity = 0
|
||||||
|
|
||||||
#WME
|
#WME
|
||||||
if !Settings[:fasttravel_ui] == "Original"
|
if !(Settings[:fasttravel_ui] == 0)
|
||||||
@niko_icon.opacity = @location_name_text.opacity =
|
@niko_icon.opacity = @location_name_text.opacity =
|
||||||
@arrow_top.opacity = @arrow_bottom.opacity =
|
@arrow_top.opacity = @arrow_bottom.opacity =
|
||||||
@arrow_left.opacity = @arrow_right.opacity = 0
|
@arrow_left.opacity = @arrow_right.opacity = 0
|
||||||
|
|
@ -185,7 +185,7 @@ class FastTravel
|
||||||
|
|
||||||
# Create menu options
|
# Create menu options
|
||||||
@data.each_with_index do |item, i|
|
@data.each_with_index do |item, i|
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
#WME
|
#WME
|
||||||
spr = Sprite.new(@viewport)
|
spr = Sprite.new(@viewport)
|
||||||
spr.bitmap = RPG::Cache.load_bitmap("Graphics/Menus/Minimap/", "#{$game_fasttravel.zone}_#{item}")
|
spr.bitmap = RPG::Cache.load_bitmap("Graphics/Menus/Minimap/", "#{$game_fasttravel.zone}_#{item}")
|
||||||
|
|
@ -208,7 +208,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Settings[:fasttravel_ui] == "Original"
|
if (Settings[:fasttravel_ui] == 0)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -228,7 +228,7 @@ class FastTravel
|
||||||
def update
|
def update
|
||||||
zone = ZONES[$game_fasttravel.zone]
|
zone = ZONES[$game_fasttravel.zone]
|
||||||
zone = zone == nil ? Zone.new("", {}, {}) : zone
|
zone = zone == nil ? Zone.new("", {}, {}) : zone
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
@arrows_timer += 1
|
@arrows_timer += 1
|
||||||
if @arrows_timer >= 30
|
if @arrows_timer >= 30
|
||||||
@arrows_timer = 0
|
@arrows_timer = 0
|
||||||
|
|
@ -239,7 +239,7 @@ class FastTravel
|
||||||
if @fade_in
|
if @fade_in
|
||||||
self.opacity += 20
|
self.opacity += 20
|
||||||
|
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
#WME
|
#WME
|
||||||
@niko_icon.opacity += 20
|
@niko_icon.opacity += 20
|
||||||
@location_name_text.opacity += 20
|
@location_name_text.opacity += 20
|
||||||
|
|
@ -258,7 +258,7 @@ class FastTravel
|
||||||
active_spr = spr if !active_spr && spr.x < MARGIN * 2
|
active_spr = spr if !active_spr && spr.x < MARGIN * 2
|
||||||
end
|
end
|
||||||
#WME
|
#WME
|
||||||
if !Settings[:fasttravel_ui] == "Original"
|
if !(Settings[:fasttravel_ui] == 0)
|
||||||
@data_locations.each do |name, spr|
|
@data_locations.each do |name, spr|
|
||||||
spr.opacity += 20
|
spr.opacity += 20
|
||||||
spr.opacity = 255 if spr.opacity > 255
|
spr.opacity = 255 if spr.opacity > 255
|
||||||
|
|
@ -277,7 +277,7 @@ class FastTravel
|
||||||
if @fade_out
|
if @fade_out
|
||||||
self.opacity -= 20
|
self.opacity -= 20
|
||||||
|
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
#WME
|
#WME
|
||||||
@niko_icon.opacity -= 20
|
@niko_icon.opacity -= 20
|
||||||
@location_name_text.opacity -= 20
|
@location_name_text.opacity -= 20
|
||||||
|
|
@ -294,7 +294,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
|
|
||||||
#WME
|
#WME
|
||||||
if !Settings[:fasttravel_ui] == "Original"
|
if !(Settings[:fasttravel_ui] == 0)
|
||||||
@data_locations.each do |name, spr|
|
@data_locations.each do |name, spr|
|
||||||
spr.opacity -= 20
|
spr.opacity -= 20
|
||||||
end
|
end
|
||||||
|
|
@ -309,7 +309,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
|
|
||||||
#WME
|
#WME
|
||||||
if !Settings[:fasttravel_ui] == "Original"
|
if !(Settings[:fasttravel_ui] == 0)
|
||||||
@data_locations.each do |name, spr|
|
@data_locations.each do |name, spr|
|
||||||
spr.dispose
|
spr.dispose
|
||||||
end
|
end
|
||||||
|
|
@ -337,7 +337,7 @@ class FastTravel
|
||||||
return if !self.visible
|
return if !self.visible
|
||||||
|
|
||||||
#WME noik
|
#WME noik
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
@niko_target_pos_x = (zone.locations[@selected_location].x.to_f + zone.locations[@selected_location].niko_x.to_f)
|
@niko_target_pos_x = (zone.locations[@selected_location].x.to_f + zone.locations[@selected_location].niko_x.to_f)
|
||||||
@niko_target_pos_y = (zone.locations[@selected_location].y.to_f + zone.locations[@selected_location].niko_y.to_f)
|
@niko_target_pos_y = (zone.locations[@selected_location].y.to_f + zone.locations[@selected_location].niko_y.to_f)
|
||||||
|
|
||||||
|
|
@ -359,7 +359,7 @@ class FastTravel
|
||||||
@arrow_bottom.opacity += @data.include?(location.next_bottom) ? 40 : -40
|
@arrow_bottom.opacity += @data.include?(location.next_bottom) ? 40 : -40
|
||||||
@arrow_left.opacity += @data.include?(location.next_left) ? 40 : -40
|
@arrow_left.opacity += @data.include?(location.next_left) ? 40 : -40
|
||||||
@arrow_right.opacity += @data.include?(location.next_right) ? 40 : -40
|
@arrow_right.opacity += @data.include?(location.next_right) ? 40 : -40
|
||||||
elsif !Settings[:fasttravel_ui] == "Original"
|
elsif !(Settings[:fasttravel_ui] == 0)
|
||||||
@niko_icon.opacity =
|
@niko_icon.opacity =
|
||||||
@arrow_top.opacity = @arrow_bottom.opacity =
|
@arrow_top.opacity = @arrow_bottom.opacity =
|
||||||
@arrow_left.opacity = @arrow_right.opacity = 0
|
@arrow_left.opacity = @arrow_right.opacity = 0
|
||||||
|
|
@ -383,7 +383,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if !Settings[:fasttravel_ui] == "Original"
|
if !(Settings[:fasttravel_ui] == 0)
|
||||||
#WME
|
#WME
|
||||||
@data_locations.each do |name, spr|
|
@data_locations.each do |name, spr|
|
||||||
set_color(name)
|
set_color(name)
|
||||||
|
|
@ -391,7 +391,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
|
|
||||||
if Input.trigger?(Input::UP)
|
if Input.trigger?(Input::UP)
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
next_location = zone.locations[@selected_location].next_top
|
next_location = zone.locations[@selected_location].next_top
|
||||||
if @data_locations.has_key?(next_location)
|
if @data_locations.has_key?(next_location)
|
||||||
@selected_location = next_location
|
@selected_location = next_location
|
||||||
|
|
@ -404,7 +404,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::DOWN)
|
if Input.trigger?(Input::DOWN)
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
next_location = zone.locations[@selected_location].next_bottom
|
next_location = zone.locations[@selected_location].next_bottom
|
||||||
if @data_locations.has_key?(next_location)
|
if @data_locations.has_key?(next_location)
|
||||||
@selected_location = next_location
|
@selected_location = next_location
|
||||||
|
|
@ -418,7 +418,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
|
|
||||||
if Input.trigger?(Input::LEFT)
|
if Input.trigger?(Input::LEFT)
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
next_location = zone.locations[@selected_location].next_left
|
next_location = zone.locations[@selected_location].next_left
|
||||||
if @data_locations.has_key?(next_location)
|
if @data_locations.has_key?(next_location)
|
||||||
@selected_location = next_location
|
@selected_location = next_location
|
||||||
|
|
@ -428,7 +428,7 @@ class FastTravel
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::RIGHT)
|
if Input.trigger?(Input::RIGHT)
|
||||||
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
|
if zone.locations != nil && !(Settings[:fasttravel_ui] == 0)
|
||||||
next_location = zone.locations[@selected_location].next_right
|
next_location = zone.locations[@selected_location].next_right
|
||||||
if @data_locations.has_key?(next_location)
|
if @data_locations.has_key?(next_location)
|
||||||
@selected_location = next_location
|
@selected_location = next_location
|
||||||
|
|
@ -441,7 +441,7 @@ class FastTravel
|
||||||
if Input.trigger?(Input::ACTION)
|
if Input.trigger?(Input::ACTION)
|
||||||
$game_system.se_play($data_system.decision_se)
|
$game_system.se_play($data_system.decision_se)
|
||||||
choice = $game_fasttravel.unlocked_maps[@selected_location]
|
choice = $game_fasttravel.unlocked_maps[@selected_location]
|
||||||
if zone.locations == nil || Settings[:fasttravel_ui] == "Original"
|
if zone.locations == nil || (Settings[:fasttravel_ui] == 0)
|
||||||
choice = $game_fasttravel.unlocked_maps[@data[@index]]
|
choice = $game_fasttravel.unlocked_maps[@data[@index]]
|
||||||
end
|
end
|
||||||
if choice.id != $game_map.map_id
|
if choice.id != $game_map.map_id
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ class Window_Settings
|
||||||
# navigation
|
# navigation
|
||||||
if Input.wheel_y != 0
|
if Input.wheel_y != 0
|
||||||
if (Input::key_press?(Input::key_from_name("Left Shift")))
|
if (Input::key_press?(Input::key_from_name("Left Shift")))
|
||||||
for i in 0...Input.wheel_y.round.abs
|
for _ in 0...Input.wheel_y.round.abs
|
||||||
Input.wheel_y.round > 0 ? @content.parameter_right : @content.parameter_left
|
Input.wheel_y.round > 0 ? @content.parameter_right : @content.parameter_left
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue