mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Made New/Copy/Delete buttons in animation selector screen work, split animations compiler into its own compiler
This commit is contained in:
@@ -159,6 +159,25 @@ module GameData
|
||||
DATA[(id_num >= 0) ? id_num : DATA.keys.length] = self.new(hash)
|
||||
end
|
||||
|
||||
def self.new_hash(anim_type = 0, move = nil)
|
||||
ret = {}
|
||||
ret[:type] = (anim_type == 0) ? :move : :common
|
||||
ret[:move] = (anim_type == 0) ? "STRUGGLE" : "Shiny"
|
||||
ret[:move] = move if !move.nil?
|
||||
ret[:version] = 0
|
||||
ret[:name] = _INTL("New animation")
|
||||
ret[:no_target] = false
|
||||
ret[:ignore] = false
|
||||
ret[:particles] = [
|
||||
{:name => "User", :focus => :user, :graphic => "USER"},
|
||||
{:name => "Target", :focus => :target, :graphic => "TARGET"},
|
||||
{:name => "SE"}
|
||||
]
|
||||
ret[:flags] = []
|
||||
ret[:pbs_path] = "New animation"
|
||||
return ret
|
||||
end
|
||||
|
||||
def initialize(hash)
|
||||
# NOTE: hash has an :id entry, but it's unused here.
|
||||
@type = hash[:type]
|
||||
@@ -180,6 +199,8 @@ module GameData
|
||||
ret[:move] = @move
|
||||
ret[:version] = @version
|
||||
ret[:name] = @name
|
||||
ret[:no_target] = @no_target
|
||||
ret[:ignore] = @ignore
|
||||
ret[:particles] = [] # Clone the @particles array, which is nested hashes and arrays
|
||||
@particles.each do |particle|
|
||||
new_p = {}
|
||||
|
||||
Reference in New Issue
Block a user