mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-20 13:59:57 +00:00
a
This commit is contained in:
parent
385dc3d27b
commit
1079ff1c4a
10 changed files with 48 additions and 30 deletions
|
|
@ -16,10 +16,13 @@ module Settings
|
|||
:frameskip => true,
|
||||
:twm_shader => true,
|
||||
:light => true,
|
||||
:fog => true,
|
||||
:scaling_mode => 0,
|
||||
:vsync => 0,
|
||||
:max_particle_count_firefly => 30,
|
||||
|
||||
:footprints => true,
|
||||
:footsplashes => true,
|
||||
|
||||
# UI
|
||||
:in_game_timer => false,
|
||||
:language => 0,
|
||||
|
|
@ -233,6 +236,12 @@ class Window_Settings
|
|||
:name => "World machine shader",
|
||||
:parameter => :twm_shader
|
||||
},
|
||||
{
|
||||
:type => :bool,
|
||||
:name => "Fog",
|
||||
:icon => [1, 1],
|
||||
:parameter => :fog
|
||||
},
|
||||
{ :type => :sep, :name => "Particles"},
|
||||
{
|
||||
:type => :slider,
|
||||
|
|
@ -242,6 +251,16 @@ class Window_Settings
|
|||
:min => 0,
|
||||
:max => 30
|
||||
},
|
||||
{
|
||||
:type => :bool,
|
||||
:name => "Footprints",
|
||||
:parameter => :footprints
|
||||
},
|
||||
{
|
||||
:type => :bool,
|
||||
:name => "Footsplashes",
|
||||
:parameter => :footsplashes
|
||||
},
|
||||
],
|
||||
"UI" => [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ module Script
|
|||
end
|
||||
|
||||
def self.lose_all_items
|
||||
for i in 1..99
|
||||
(1..99).each do |i|
|
||||
#skip debug testing items
|
||||
if i == 54 or i == 81 or i == 82
|
||||
next
|
||||
|
|
@ -144,7 +144,7 @@ module Script
|
|||
end
|
||||
|
||||
def self.eve_x(name)
|
||||
for event in $game_map.events.values
|
||||
$game_map.events.values.each do |event|
|
||||
if event.name == name
|
||||
return logpos(event.x, event.real_x, event.direction == 6)
|
||||
end
|
||||
|
|
@ -153,7 +153,7 @@ module Script
|
|||
end
|
||||
|
||||
def self.eve_y(name)
|
||||
for event in $game_map.events.values
|
||||
$game_map.events.values.each do |event|
|
||||
if event.name == name
|
||||
return logpos(event.y, event.real_y, event.direction == 2)
|
||||
end
|
||||
|
|
@ -269,7 +269,7 @@ module Script
|
|||
end
|
||||
|
||||
def self.niko_reflection_enc_update
|
||||
for event in $game_map.events.values
|
||||
$game_map.events.values.each do |event|
|
||||
if event.name == "niko reflection"
|
||||
event.real_y = 20*128 - ($game_player.real_y - 20*128)
|
||||
event.real_x = $game_player.real_x
|
||||
|
|
@ -308,7 +308,7 @@ module Script
|
|||
|
||||
|
||||
def self.niko_reflection_peng_update
|
||||
for event in $game_map.events.values
|
||||
$game_map.events.values.each do |event|
|
||||
if event.name == "niko reflection"
|
||||
event.real_y = 20*128 - ($game_player.real_y - 20*128)
|
||||
event.real_x = $game_player.real_x
|
||||
|
|
@ -618,10 +618,10 @@ def check_exit(min, max, x: -1, y: -1)
|
|||
end
|
||||
|
||||
def kill_perma_flags
|
||||
for i in 151..175
|
||||
(151..175).each do |i|
|
||||
$game_switches[i] = false
|
||||
end
|
||||
for i in 76..100
|
||||
end
|
||||
(76..100).each do |i|
|
||||
$game_variables[i] = 0
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -748,7 +748,7 @@ class Window_Settings
|
|||
end
|
||||
|
||||
@sprite.bitmap.draw_text(offset, 0, @sprite.bitmap.width - PARAMETER_KEY_WIDTH * 4 - offset, @sprite.bitmap.height, tr(@name))
|
||||
for i in 0..3
|
||||
(0..3).each do |i|
|
||||
offset = (@selected && i == @selection ? SELECTED_KEYS_MARGIN : 4)
|
||||
parameter_x = @sprite.bitmap.width - PARAMETER_KEY_WIDTH * (4 - i)
|
||||
key_bind = @key_binds[i]
|
||||
|
|
@ -965,4 +965,4 @@ class Window_Settings
|
|||
callback(:deselect) do super end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ class Sprite_Timer < Sprite
|
|||
self.x = 640 - self.bitmap.width
|
||||
self.y = 0
|
||||
self.z = 500
|
||||
RPG::Mod.exec_hooks("hooks/Sprite_Timer/init", binding)
|
||||
update
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
|
|
@ -44,10 +43,9 @@ class Sprite_Timer < Sprite
|
|||
# Make a string for displaying the timer
|
||||
min = @total_sec / 60
|
||||
sec = @total_sec % 60
|
||||
text = sprintf("%02d:%02d", min, sec)
|
||||
# Draw timer
|
||||
self.bitmap.font.color.set(255, 255, 255)
|
||||
self.bitmap.draw_text(self.bitmap.rect, text, 1)
|
||||
self.bitmap.draw_text(self.bitmap.rect, "#{min}:#{sec}", 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class Spriteset_Map
|
|||
@tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
|
||||
end
|
||||
end
|
||||
for i in 0..6
|
||||
(0..6).each do |i|
|
||||
autotile_name = $game_map.autotile_names[i]
|
||||
@tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
|
||||
end
|
||||
|
|
@ -78,7 +78,7 @@ class Spriteset_Map
|
|||
@fog.z = 3000
|
||||
# Make character sprites
|
||||
@character_sprites = []
|
||||
for i in $game_map.events.keys.sort
|
||||
$game_map.events.keys.sort.each do |i|
|
||||
sprite = Sprite_Character.new(@viewport, @viewport_lights, $game_map.events[i])
|
||||
@character_sprites.push(sprite)
|
||||
end
|
||||
|
|
@ -92,7 +92,7 @@ class Spriteset_Map
|
|||
@weather = RPG::Weather.new(@viewport)
|
||||
# Make picture sprites
|
||||
@picture_sprites = []
|
||||
for i in 1..50
|
||||
(1..50).each do |i|
|
||||
@picture_sprites.push(Sprite_Picture.new(@viewport_pics, $game_screen.pictures[i]))
|
||||
end
|
||||
# Make timer sprite
|
||||
|
|
@ -101,7 +101,6 @@ class Spriteset_Map
|
|||
@dynamic_light = DynamicLight.new(@viewport_lights)
|
||||
# Panorama animation timer
|
||||
@pan_animate_timer = 0
|
||||
RPG::Mod.exec_hooks("hooks/Spriteset_Map/init", binding)
|
||||
# Frame update
|
||||
update
|
||||
end
|
||||
|
|
@ -112,7 +111,7 @@ class Spriteset_Map
|
|||
@update_connection.disconnect
|
||||
# Dispose of tilemap
|
||||
@tilemap.tileset.dispose if @tilemap.tileset
|
||||
for i in 0..6
|
||||
(0..6).each do |i|
|
||||
@tilemap.autotiles[i].dispose
|
||||
end
|
||||
@tilemap.dispose
|
||||
|
|
@ -136,7 +135,7 @@ class Spriteset_Map
|
|||
# Dispose of weather
|
||||
@weather.dispose
|
||||
# Dispose of picture sprites
|
||||
for sprite in @picture_sprites
|
||||
@picture_sprites.each do |sprite|
|
||||
sprite.dispose
|
||||
end
|
||||
# Dispose of bg
|
||||
|
|
@ -363,7 +362,7 @@ class Spriteset_Map
|
|||
@weather.oy = $game_map.display_y / 4
|
||||
@weather.update
|
||||
# Update picture sprites
|
||||
for sprite in @picture_sprites
|
||||
@picture_sprites.each do |sprite|
|
||||
sprite.update
|
||||
end
|
||||
|
||||
|
|
@ -387,16 +386,20 @@ class Spriteset_Map
|
|||
# * Misc operations
|
||||
#--------------------------------------------------------------------------
|
||||
def new_footprint(direction, x, y, character_name)
|
||||
@footprint_sprites << Sprite_Footprint.new(@viewport, direction, x, y, character_name)
|
||||
if Settings[:footprints]
|
||||
@footprint_sprites << Sprite_Footprint.new(@viewport, direction, x, y, character_name)
|
||||
end
|
||||
end
|
||||
def new_maptext(text, x, y)
|
||||
@footprint_sprites << Sprite_MapText.new(@viewport, text, x, y)
|
||||
end
|
||||
def new_footsplash(direction, x, y)
|
||||
@footprint_sprites << Sprite_Footsplash.new(@viewport, direction, x, y)
|
||||
if Settings[:footsplashes]
|
||||
@footprint_sprites << Sprite_Footsplash.new(@viewport, direction, x, y)
|
||||
end
|
||||
end
|
||||
def fix_footsplashes(x, y)
|
||||
for footprint in @footprint_sprites
|
||||
@footprint_sprites.each do |footprint|
|
||||
footprint.correctX(x)
|
||||
footprint.correctY(y)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class Window_Base < Window
|
|||
brackets_width = self.contents.text_size("[]").width
|
||||
# Make text string for state names
|
||||
text = ""
|
||||
for i in battler.states
|
||||
battler.states.each do |i|
|
||||
if $data_states[i].rating >= 1
|
||||
if text == ""
|
||||
text = $data_states[i].name
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ class Window_DebugLeft < Window_Selectable
|
|||
@variable_max = ($data_system.variables.size - 1 + 9) / 10
|
||||
@item_max = @switch_max + @variable_max
|
||||
self.contents = Bitmap.new(width - 32, @item_max * 32)
|
||||
for i in 0...@switch_max
|
||||
(0...@switch_max).each do |i|
|
||||
text = sprintf("S [%04d-%04d]", i*10+1, i*10+10)
|
||||
self.contents.draw_text(4, i * 32, 152, 32, text)
|
||||
end
|
||||
for i in 0...@variable_max
|
||||
(0...@variable_max).each do |i|
|
||||
text = sprintf("V [%04d-%04d]", i*10+1, i*10+10)
|
||||
self.contents.draw_text(4, (@switch_max + i) * 32, 152, 32, text)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class Window_DebugRight < Window_Selectable
|
|||
#--------------------------------------------------------------------------
|
||||
def refresh
|
||||
self.contents.clear
|
||||
for i in 0..9
|
||||
(0..9).each do |i|
|
||||
if @mode == 0
|
||||
name = $data_system.switches[@top_id+i]
|
||||
status = $game_switches[@top_id+i] ? "[ON]" : "[OFF]"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ class Window_Selectable < Window_Base
|
|||
@index = -1
|
||||
|
||||
@content_pos = 0
|
||||
RPG::Mod.exec_hooks("hooks/Window_Selectable/init", binding)
|
||||
end
|
||||
#--------------------------------------------------------------------------
|
||||
# * Set Cursor Position
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ class Window_Settings
|
|||
@down_hold_timer = 0
|
||||
|
||||
@visible = self.visible = false
|
||||
RPG::Mod.exec_hooks("hooks/Window_Settings/init", binding)
|
||||
end
|
||||
|
||||
def init_content
|
||||
|
|
|
|||
Loading…
Reference in a new issue