Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Credits:
- #-TechSkylander1518
- #-Fiona Summers (because I used her code to figure out how to make mine plug-and-play)
- #-Luke S.J. for the method alias help in Fiona's original code
- #-Astralneko for the adjective and man/woman/person additions
- class Player
- attr_accessor :they
- attr_accessor :them
- attr_accessor :their
- attr_accessor :theirs
- attr_accessor :themself
- attr_accessor :is
- attr_accessor :conjugation
- attr_accessor :person
- end
- def useIs
- return $player.is
- end
- def pronounsHim
- $player.they = "he"
- $player.them = "him"
- $player.their = "his"
- $player.theirs = "his"
- $player.themself = "himself"
- $player.is = true
- $player.conjugation = "o"
- end
- def pronounsHer
- $player.they = "she"
- $player.them = "her"
- $player.their = "her"
- $player.theirs = "hers"
- $player.themself = "herself"
- $player.is = true
- $player.conjugation = "a"
- end
- def pronounsThey
- $player.they = "they"
- $player.them = "them"
- $player.their = "their"
- $player.theirs = "theirs"
- $player.themself = "themself"
- $player.is = false
- $player.conjugation = "o"
- end
- def pronounsIt
- $player.they = "it"
- $player.them = "it"
- $player.their = "its"
- $player.theirs = "its"
- $player.themself = "itself"
- $player.is = true
- $player.conjugation = "o"
- end
- def pronounsCustom
- pronoun = ""
- pronoun = pbMessageFreeText(_INTL("He/She/They"),"",false,8)
- $player.they = pronoun
- pronoun = pbMessageFreeText(_INTL("Him/Her/Them"),"",false,8)
- $player.them = pronoun
- pronoun = pbMessageFreeText(_INTL("His/Her/Their"),"",false,8)
- $player.their = pronoun
- pronoun = pbMessageFreeText(_INTL("His/Hers/Theirs"),"",false,8)
- $player.theirs = pronoun
- pronoun = pbMessageFreeText(_INTL("Himself/Herself/Theirself"),"",false,8)
- $player.themself = pronoun
- $player.conjugation = "o"
- #===============================##
- # Spanish translation needs proper adjective (and occasionally noun) endings too
- #===============================##
- if $PokemonSystem.language == 1 # Spanish
- pronoun = pbMessageFreeText(_INTL("¿Qué usa para terminar adjetivos, como el \"o\" en \"alto\"?"),
- "",false,2)
- $player.conjugation = pronoun
- end
- #===============================##
- command = 0
- loop do
- command = pbMessage(_INTL("{1} is or {1} are?",$player.they),[
- _INTL("{1} is",$player.they),
- _INTL("{1} are",$player.they)
- ],-1,nil,command)
- case command
- when 0;
- $player.is = true
- break
- when 1;
- $player.is = false
- break
- end
- end
- end
- def pronounsPerson(base)
- $player.person = base
- command = 0
- loop do
- command = pbMessage(_INTL("I am a..."),[
- _INTL("{1}",base),
- _INTL("person"),
- _INTL("(custom)"),
- ],-1,nil,command)
- case command
- when 0;
- $player.person = base
- break
- when 1;
- $player.person = "person"
- break
- when 2;
- $player.person = pbMessageFreeText(_INTL("I am a..."),"",false,8)
- break
- end
- end
- end
- def pbPronouns
- command = 0
- loop do
- command = pbMessage(_INTL("Update pronouns?"),[
- _INTL("He/Him"),
- _INTL("She/Her"),
- _INTL("They/Them"),
- _INTL("It/Its"),
- _INTL("Custom"),
- _INTL("Exit")
- ],-1,nil,command)
- case command
- when 0;
- pronounsHim
- pronounsPerson("man")
- pbMessage(_INTL("Updated to {1} / {2}.",$player.they,$player.them))
- break
- when 1;
- pronounsHer
- pronounsPerson("woman")
- pbMessage(_INTL("Updated to {1} / {2}.",$player.they,$player.them))
- break
- when 2;
- pronounsThey
- pronounsPerson("trainer")
- pbMessage(_INTL("Updated to {1} / {2}.",$player.they,$player.them))
- break
- when 3;
- pronounsIt
- pronounsPerson("trainer")
- pbMessage(_INTL("Updated to {1} / {2}.",$player.they,$player.them))
- break
- when 4;
- pronounsCustom
- pronounsPerson("trainer")
- pbMessage(_INTL("Updated to {1} / {2}.",$player.they,$player.them))
- break
- else; break
- end
- end
- end
- def pbTrainerPCMenu
- command = 0
- loop do
- command = pbMessage(_INTL("What do you want to do?"),
- [_INTL("Item Storage"),
- _INTL("Mailbox"),
- _INTL("Pronouns"),
- _INTL("Turn Off")], -1, nil, command)
- case command
- when 0 then pbPCItemStorage
- when 1 then pbPCMailbox
- when 2 then pbPronouns
- else break
- end
- end
- end
- unless Kernel.respond_to?(:pbMessageDisplay_Old)
- alias pbMessageDisplay_Old pbMessageDisplay
- def pbMessageDisplay(*args)
- if $player
- if $player.themself
- if $player.is==true
- args[1].gsub!(/\\hes/i,_INTL("{1}'s",$player.they.downcase))
- args[1].gsub!(/\\uheis/i,_INTL("{1} is",$player.they.capitalize))
- args[1].gsub!(/\\heis/i,_INTL("{1} is",$player.they.downcase))
- args[1].gsub!(/\\uhes/i,_INTL("{1}'s",$player.they.capitalize))
- end
- if $player.is==false
- args[1].gsub!(/\\hes/i,_INTL("{1}'re",$player.they.downcase))
- args[1].gsub!(/\\heis/i,_INTL("{1} are",$player.they.downcase))
- args[1].gsub!(/\\uhes/i,_INTL("{1}'re",$player.they.capitalize))
- args[1].gsub!(/\\uheis/i,_INTL("{1} are",$player.they.capitalize))
- end
- args[1].gsub!(/\\he/i,$player.they.downcase)
- args[1].gsub!(/\\uhe/i,$player.they.capitalize)
- args[1].gsub!(/\\him/i,$player.them.downcase)
- args[1].gsub!(/\\uhim/i,$player.them.capitalize)
- args[1].gsub!(/\\his/i,$player.their.downcase)
- args[1].gsub!(/\\uhis/i,$player.their.capitalize)
- args[1].gsub!(/\\hrs/i,$player.theirs.downcase)
- args[1].gsub!(/\\uhrs/i,$player.theirs.capitalize)
- args[1].gsub!(/\\slf/i,$player.themself.downcase)
- args[1].gsub!(/\\uslf/i,$player.themself.capitalize)
- args[1].gsub!(/\\oa/o,$player.conjugation.downcase)
- args[1].gsub!(/\\man/i,$player.person.downcase)
- args[1].gsub!(/\\uman/i,$player.person.capitalize)
- end
- end
- return pbMessageDisplay_Old(*args)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement