Removed deprecated methods

This commit is contained in:
Maruno17
2024-06-27 21:37:00 +01:00
parent 509a414f37
commit 6cc07d1c7a
12 changed files with 1 additions and 866 deletions

View File

@@ -558,149 +558,3 @@ EventHandlers.add(:on_frame_update, :phone_call_counter,
Phone::Call.make_incoming
}
)
#===============================================================================
# Deprecated.
#===============================================================================
# Called by events. Make your event look like this instead:
#
# @>Conditional Branch: Phone.can_add?(trainer_type, name, start_version)
# @>Text: Let me register you.
# @>Show Choices: Yes, No
# : When [Yes]
# @>Conditional Branch: Phone.add(get_self, trainer_type, name, start_version, versions_count)
# @>Text: Thanks! (optional)
# @>
# : Branch End
# : When [No]
# @>Text: Oh, okay then. (optional)
# @>
# : Branch End
# : Branch End
# @>
#
# @deprecated This method is slated to be removed in v22.
def pbPhoneRegisterBattle(message, event, trainer_type, name, versions_count)
Deprecation.warn_method("pbPhoneRegisterBattle", "v22", "several scripts and event commands; see def pbPhoneRegisterBattle")
return false if !Phone.can_add?(trainer_type, name, 0)
message = _INTL("Let me register you.") if !message
return false if !pbConfirmMessage(message)
return Phone.add(event, trainer_type, name, 0, versions_count)
end
# @deprecated This method is slated to be removed in v22.
def pbPhoneRegister(event, trainer_type, name)
Deprecation.warn_method("pbPhoneRegister", "v22", "Phone.add_silent(event, trainer_type, name)")
Phone.add_silent(event, trainer_type, name)
end
# Called by events.
# @deprecated This method is slated to be removed in v22.
def pbPhoneRegisterNPC(common_event_id, name, map_id, show_message = true)
Deprecation.warn_method("pbPhoneRegisterNPC", "v22", "Phone.add(map_id, name, common_event_id) or Phone.add_silent(map_id, name, common_event_id)")
if show_message
Phone.add(map_id, name, common_event_id)
else
Phone.add_silent(map_id, name, common_event_id)
end
end
# @deprecated This method is slated to be removed in v22.
def pbPhoneDeleteContact(index)
Deprecation.warn_method("pbPhoneDeleteContact", "v22", "$PokemonGlobal.phone.contacts[index].visible = false")
$PokemonGlobal.phone.contacts[index].visible = false
end
# @deprecated This method is slated to be removed in v22.
def pbFindPhoneTrainer(trainer_type, name)
Deprecation.warn_method("pbFindPhoneTrainer", "v22", "Phone.get(trainer_type, name)")
return Phone.get(trainer_type, name)
end
# @deprecated This method is slated to be removed in v22.
def pbHasPhoneTrainer?(trainer_type, name)
Deprecation.warn_method("pbHasPhoneTrainer", "v22", "Phone.get(trainer_type, name) != nil")
return Phone.get(trainer_type, name) != nil
end
# @deprecated This method is slated to be removed in v22.
def pbPhoneReadyToBattle?(trainer_type, name)
Deprecation.warn_method("pbPhoneReadyToBattle", "v22", "Phone.get(trainer_type, name).can_rematch?")
contact = Phone.get(trainer_type, name)
return contact && contact.can_rematch?
end
# @deprecated This method is slated to be removed in v22.
def pbPhoneReset(tr_type, tr_name)
Deprecation.warn_method("pbPhoneReadyToBattle", "v22", "Phone.get(trainer_type, name) and other things")
contact = Phone.get(trainer_type, name)
return false if !contact
contact.time_to_ready = 0
contact.rematch_flag = 0
$game_self_switches[[contact.map_id, contact.event_id, "A"]] = true
$game_map.need_refresh = true
return true
end
# Called by events.
# @deprecated This method is slated to be removed in v22.
def pbPhoneBattleCount(trainer_type, name)
Deprecation.warn_method("pbPhoneBattleCount", "v22", "Phone.variant(trainer_type, name)")
return Phone.variant(trainer_type, name)
end
# Called by events.
# @deprecated This method is slated to be removed in v22.
def pbPhoneIncrement(trainer_type, name, versions_count)
Deprecation.warn_method("pbPhoneIncrement", "v22", "Phone.increment_version(trainer_type, name, start_version)")
Phone.increment_version(trainer_type, name, 0)
end
# Used in phone calls that say they're ready for a rematch, used in Debug function.
# @deprecated This method is slated to be removed in v22.
def pbSetReadyToBattle(contact)
Deprecation.warn_method("pbSetReadyToBattle", "v22", "contact.set_trainer_event_ready_for_rematch")
contact.set_trainer_event_ready_for_rematch
end
# @deprecated This method is slated to be removed in v22.
def pbRandomPhoneTrainer
Deprecation.warn_method("pbRandomPhoneTrainer", "v22", "Phone::Call.get_random_trainer_for_incoming_call")
return Phone::Call.get_random_trainer_for_incoming_call
end
# @deprecated This method is slated to be removed in v22.
def pbCallTrainer(trainer_type, name)
Deprecation.warn_method("pbCallTrainer", "v22", "Phone::Call.make_outgoing(trainer_type, name)")
Phone::Call.make_outgoing(trainer_type, name)
end
# @deprecated This method is slated to be removed in v22.
def pbPhoneGenerateCall(contact)
Deprecation.warn_method("pbPhoneGenerateCall", "v22", "Phone::Call.generate_trainer_dialogue(contact)")
return Phone::Call.generate_trainer_dialogue(contact)
end
# @deprecated This method is slated to be removed in v22.
def pbPhoneCall(dialogue, contact)
Deprecation.warn_method("pbPhoneCall", "v22", "Phone::Call.play(dialogue, contact)")
Phone::Call.play(dialogue, contact)
end
# @deprecated This method is slated to be removed in v22.
def pbEncounterSpecies(contact)
Deprecation.warn_method("pbEncounterSpecies", "v22", "Phone::Call.get_random_encounter_species(contact)")
return Phone::Call.get_random_encounter_species(contact)
end
# @deprecated This method is slated to be removed in v22.
def pbTrainerSpecies(contact)
Deprecation.warn_method("pbTrainerSpecies", "v22", "Phone::Call.get_random_contact_pokemon_species(contact)")
return Phone::Call.get_random_contact_pokemon_species(contact)
end
# @deprecated This method is slated to be removed in v22.
def pbTrainerMapName(contact)
Deprecation.warn_method("pbTrainerMapName", "v22", "Phone::Call.get_map_name(contact)")
return Phone::Call.get_map_name(contact)
end