Release 0.0.1.8.8.7

This commit is contained in:
WorldBosse committed 2026-10-29 21:59:06 +04:00
1 parent 3c8a17aa78
commit c7beab414c
16283 files changed
+768761 -2

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
#==============================================================================
# ** Game_Variables
#------------------------------------------------------------------------------
# This class handles variables. It's a wrapper for the built-in class "Array."
# The instance of this class is referenced by $game_variables.
#==============================================================================
class Game_Variables
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@data = []
end
#--------------------------------------------------------------------------
# * Get Variable
#--------------------------------------------------------------------------
def [](variable_id)
@data[variable_id] || 0
end
#--------------------------------------------------------------------------
# * Set Variable
#--------------------------------------------------------------------------
def []=(variable_id, value)
@data[variable_id] = value
on_change
end
#--------------------------------------------------------------------------
# * Processing When Setting Variables
#--------------------------------------------------------------------------
def on_change
$game_map.need_refresh = true
end
end