4
Fork 0

Optimized playerTransformStorage

development
Eddoursul 2 months ago
parent 9adcab8fa6
commit c0a7c2f880
  1. BIN
      scripts/_00e_theriantrophist_alchemycontrol.pex
  2. BIN
      scripts/playertransformstorage.pex
  3. 8
      source/scripts/_00e_theriantrophist_alchemycontrol.psc
  4. 62
      source/scripts/playertransformstorage.psc

@ -413,9 +413,11 @@ Function _InitAchemyControl()
EndIf
EndIf
; Re-register menu listener to stay resilient to co-save deletion or corruption
RegisterForMenu("Crafting Menu")
if SKSE.GetVersion()
; Re-register menu listener to stay resilient to co-save deletion or corruption
RegisterForMenu("Crafting Menu")
endif
EndFunction

@ -30,11 +30,11 @@ Int Property whatKindRight Auto
; Skipped compiler generated GotoState
Event OnInit()
originalRace = Game.GetPlayer().GetRace()
originalRace =(Game.GetForm(0x14) as Actor).GetRace()
EndEvent
Function checkForEquipedItems()
Actor PlayerRef = Game.GetPlayer()
Actor PlayerRef = Game.GetForm(0x14) as Actor
EquippedItemLeft = PlayerRef.GetEquippedObject(0)
EquippedItemRight = PlayerRef.GetEquippedObject(1)
If !EquippedItemLeft
@ -55,24 +55,24 @@ Function checkForEquipedItems()
Else
whatKindLeft = 1
EndIf
armor1 = Game.GetPlayer().GetWornForm(1) as Armor
armor2 = Game.GetPlayer().GetWornForm(2) as Armor
armor3 = Game.GetPlayer().GetWornForm(4) as Armor
armor4 = Game.GetPlayer().GetWornForm(8) as Armor
armor5 = Game.GetPlayer().GetWornForm(16) as Armor
armor6 = Game.GetPlayer().GetWornForm(32) as Armor
armor7 = Game.GetPlayer().GetWornForm(64) as Armor
armor8 = Game.GetPlayer().GetWornForm(128) as Armor
armor9 = Game.GetPlayer().GetWornForm(256) as Armor
armor10 = Game.GetPlayer().GetWornForm(512) as Armor
armor11 = Game.GetPlayer().GetWornForm(1024) as Armor
armor12 = Game.GetPlayer().GetWornForm(2048) as Armor
armor13 = Game.GetPlayer().GetWornForm(4096) as Armor
armor14 = Game.GetPlayer().GetWornForm(8192) as Armor
armor1 = PlayerRef.GetWornForm(1) as Armor
armor2 = PlayerRef.GetWornForm(2) as Armor
armor3 = PlayerRef.GetWornForm(4) as Armor
armor4 = PlayerRef.GetWornForm(8) as Armor
armor5 = PlayerRef.GetWornForm(16) as Armor
armor6 = PlayerRef.GetWornForm(32) as Armor
armor7 = PlayerRef.GetWornForm(64) as Armor
armor8 = PlayerRef.GetWornForm(128) as Armor
armor9 = PlayerRef.GetWornForm(256) as Armor
armor10 = PlayerRef.GetWornForm(512) as Armor
armor11 = PlayerRef.GetWornForm(1024) as Armor
armor12 = PlayerRef.GetWornForm(2048) as Armor
armor13 = PlayerRef.GetWornForm(4096) as Armor
armor14 = PlayerRef.GetWornForm(8192) as Armor
EndFunction
Function equipeItems()
Actor PlayerRef = Game.GetPlayer()
Actor PlayerRef = Game.GetForm(0x14) as Actor
If whatKindRight == 2
PlayerRef.EquipSpell(EquippedItemRight as Spell, 1)
Else
@ -92,45 +92,45 @@ Function equipeItems()
endif
EndIf
If armor1
Game.GetPlayer().EquipItem(armor1 as Form, False, True)
PlayerRef.EquipItem(armor1 as Form, False, True)
EndIf
If armor2
Game.GetPlayer().EquipItem(armor2 as Form, False, True)
PlayerRef.EquipItem(armor2 as Form, False, True)
EndIf
If armor3
Game.GetPlayer().EquipItem(armor3 as Form, False, True)
PlayerRef.EquipItem(armor3 as Form, False, True)
EndIf
If armor4
Game.GetPlayer().EquipItem(armor4 as Form, False, True)
PlayerRef.EquipItem(armor4 as Form, False, True)
EndIf
If armor5
Game.GetPlayer().EquipItem(armor5 as Form, False, True)
PlayerRef.EquipItem(armor5 as Form, False, True)
EndIf
If armor6
Game.GetPlayer().EquipItem(armor6 as Form, False, True)
PlayerRef.EquipItem(armor6 as Form, False, True)
EndIf
If armor7
Game.GetPlayer().EquipItem(armor7 as Form, False, True)
PlayerRef.EquipItem(armor7 as Form, False, True)
EndIf
If armor8
Game.GetPlayer().EquipItem(armor8 as Form, False, True)
PlayerRef.EquipItem(armor8 as Form, False, True)
EndIf
If armor9
Game.GetPlayer().EquipItem(armor9 as Form, False, True)
PlayerRef.EquipItem(armor9 as Form, False, True)
EndIf
If armor10
Game.GetPlayer().EquipItem(armor10 as Form, False, True)
PlayerRef.EquipItem(armor10 as Form, False, True)
EndIf
If armor11
Game.GetPlayer().EquipItem(armor11 as Form, False, True)
PlayerRef.EquipItem(armor11 as Form, False, True)
EndIf
If armor12
Game.GetPlayer().EquipItem(armor12 as Form, False, True)
PlayerRef.EquipItem(armor12 as Form, False, True)
EndIf
If armor13
Game.GetPlayer().EquipItem(armor13 as Form, False, True)
PlayerRef.EquipItem(armor13 as Form, False, True)
EndIf
If armor14
Game.GetPlayer().EquipItem(armor14 as Form, False, True)
PlayerRef.EquipItem(armor14 as Form, False, True)
EndIf
EndFunction

Loading…
Cancel
Save