Removed unnecessary gamemode item properties
This commit is contained in:
parent
f5d2f66c75
commit
c007d0d6f4
Binary file not shown.
|
@ -30,15 +30,14 @@ Public Class GameModeItem
|
|||
Public gmCureStatusEffects As List(Of String)
|
||||
|
||||
'Evolution Item
|
||||
Public gmIsEvolutionItem As Boolean = False
|
||||
Public gmEvolutionPokemon As List(Of Integer)
|
||||
|
||||
'TechMachine Item
|
||||
Public gmIsTM As Boolean = False
|
||||
'Machine Item
|
||||
Public gmIsHM As Boolean = False
|
||||
Public gmTeachMove As BattleSystem.Attack
|
||||
Public gmCanTeachAlways As Boolean = False
|
||||
Public gmCanTeachWhenFullyEvolved As Boolean = False
|
||||
Public gmCanTeachWhenGender As Boolean = False
|
||||
Public gmCanTeachWhenGendered As Boolean = False
|
||||
|
||||
'Mega Stone Item
|
||||
Public gmMegaPokemonNumber As Integer
|
||||
|
@ -250,7 +249,7 @@ Public Class GameModeItem
|
|||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MailSystemScreen(Core.CurrentScreen, Me.gmID), Color.Black, False))
|
||||
End If
|
||||
|
||||
If gmIsTM = True And gmTeachMove IsNot Nothing Then
|
||||
If gmTeachMove IsNot Nothing Then
|
||||
SoundManager.PlaySound("PC\LogOn", False)
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
|
||||
|
@ -272,7 +271,7 @@ Public Class GameModeItem
|
|||
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
|
||||
|
||||
Core.SetScreen(selScreen)
|
||||
ElseIf gmIsEvolutionItem = True AndAlso gmEvolutionPokemon IsNot Nothing AndAlso gmEvolutionPokemon.Count > 0 Then
|
||||
ElseIf gmEvolutionPokemon IsNot Nothing AndAlso gmEvolutionPokemon.Count > 0 Then
|
||||
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
|
||||
|
||||
|
@ -305,7 +304,7 @@ Public Class GameModeItem
|
|||
|
||||
Dim p As Pokemon = Core.Player.Pokemons(PokeIndex)
|
||||
|
||||
If gmIsTM = True AndAlso gmTeachMove IsNot Nothing Then
|
||||
If gmTeachMove IsNot Nothing Then
|
||||
|
||||
Dim a As BattleSystem.Attack = gmTeachMove
|
||||
Dim t As String = CanTeach(p)
|
||||
|
@ -316,8 +315,10 @@ Public Class GameModeItem
|
|||
|
||||
Return True
|
||||
Else
|
||||
If CBool(GameModeManager.GetGameRuleValue("SingleUseTM", "0")) = True Then
|
||||
Core.Player.Inventory.RemoveItem(gmID.ToString, 1)
|
||||
If gmIsHM = False Then
|
||||
If CBool(GameModeManager.GetGameRuleValue("SingleUseTM", "0")) = True Then
|
||||
Core.Player.Inventory.RemoveItem(gmID.ToString, 1)
|
||||
End If
|
||||
End If
|
||||
p.Attacks.Add(BattleSystem.Attack.GetAttackByID(a.ID))
|
||||
|
||||
|
@ -524,7 +525,7 @@ Public Class GameModeItem
|
|||
End If
|
||||
End If
|
||||
End If
|
||||
If gmIsEvolutionItem = True AndAlso gmEvolutionPokemon IsNot Nothing AndAlso gmEvolutionPokemon.Count > 0 Then
|
||||
If gmEvolutionPokemon IsNot Nothing AndAlso gmEvolutionPokemon.Count > 0 Then
|
||||
Return Me.UseEvolutionItem(PokeIndex)
|
||||
End If
|
||||
|
||||
|
@ -564,7 +565,7 @@ Public Class GameModeItem
|
|||
End If
|
||||
End If
|
||||
|
||||
If gmCanTeachWhenGender = True Then
|
||||
If gmCanTeachWhenGendered = True Then
|
||||
If p.Gender <> Pokemon.Genders.Genderless And p.Machines.Count > 0 Then
|
||||
Return ""
|
||||
End If
|
||||
|
|
|
@ -138,8 +138,6 @@ Public Class GameModeItemLoader
|
|||
Else
|
||||
item.gmCureStatusEffects.AddRange(StatusEffectList)
|
||||
End If
|
||||
Case "isevolutionitem"
|
||||
item.gmIsEvolutionItem = CBool(value)
|
||||
Case "evolutionpokemon"
|
||||
Dim PokemonList As New List(Of Integer)
|
||||
Dim valueSplit As String() = value.Split(CChar(","))
|
||||
|
@ -155,10 +153,16 @@ Public Class GameModeItemLoader
|
|||
End If
|
||||
Case "script"
|
||||
item.gmScriptPath = value
|
||||
Case "istm"
|
||||
item.gmIsTM = CBool(value)
|
||||
Case "ishm"
|
||||
item.gmIsHM = CBool(value)
|
||||
Case "teachmove"
|
||||
item.gmTeachMove = BattleSystem.Attack.GetAttackByID(CInt(value))
|
||||
Case "canteachalways"
|
||||
item.gmCanTeachAlways = CBool(value)
|
||||
Case "canteachwhenfullyevolved"
|
||||
item.gmCanTeachWhenFullyEvolved = CBool(value)
|
||||
Case "canteachwhengendered"
|
||||
item.gmCanTeachWhenGendered = CBool(value)
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
|
@ -177,7 +181,7 @@ Public Class GameModeItemLoader
|
|||
item.gmCanBeUsed = False
|
||||
item.gmCanBeUsedInBattle = False
|
||||
End If
|
||||
If item.gmIsTM = True AndAlso item.gmTeachMove IsNot Nothing AndAlso item.gmDescription = "" Then
|
||||
If item.gmTeachMove IsNot Nothing AndAlso item.gmDescription = "" Then
|
||||
Dim AttackName As String = item.gmTeachMove.Name
|
||||
item.gmDescription = "Teaches """ & AttackName & """ to a Pokémon."
|
||||
item.gmItemType = ItemTypes.Machines
|
||||
|
|
|
@ -509,8 +509,8 @@ Public Class NewInventoryScreen
|
|||
If cItem.IsGameModeItem = True Then
|
||||
itemTitle = CType(cItem, GameModeItem).gmTeachMove.Name
|
||||
|
||||
If CType(cItem, GameModeItem).gmIsTM Then
|
||||
If CType(cItem, GameModeItem).OriginalName.StartsWith("HM") Then
|
||||
If CType(cItem, GameModeItem).gmTeachMove IsNot Nothing Then
|
||||
If CType(cItem, GameModeItem).gmIsHM = True Then
|
||||
'JSON stuff
|
||||
'itemSubTitle = _translation.HIDDEN_MACHINE_TITLE(cItem.ItemType.ToString())
|
||||
itemSubTitle = "Hidden Machine"
|
||||
|
|
|
@ -267,7 +267,7 @@
|
|||
Dim TechMachine As Item = Item.GetItemByID(Me.MachineItemID)
|
||||
If TechMachine.ItemType = Items.ItemTypes.Machines Then
|
||||
If TechMachine.IsGameModeItem = True Then
|
||||
If CType(TechMachine, GameModeItem).gmIsTM = True Then
|
||||
If CType(TechMachine, GameModeItem).gmIsHM = False Then
|
||||
Core.Player.Inventory.RemoveItem(Me.MachineItemID, 1)
|
||||
End If
|
||||
Else
|
||||
|
|
Loading…
Reference in New Issue