Renamed ore vein scripts to avoid overwriting by Skyrim mods

This commit is contained in:
Eddoursul 2024-01-10 18:34:07 +01:00
parent 2ec5f7da38
commit a600cd5022
15 changed files with 15 additions and 19 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
scripts/mineoreenderal.pex Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -17,3 +17,5 @@ _00E_BrawlControl Property BrawlControl Auto
_00E_SoundControl Property SoundControl Auto
_00E_SympathyControl Property SympathyControl Auto
_00E_MiningControl Property MiningControl Auto

View File

@ -1,14 +1,10 @@
Scriptname _00E_FS_ForgottenStories_Functions extends Quest
;=====================================================================================
; EVENTS
;=====================================================================================
Scriptname _00E_MiningControl extends Quest Hidden
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function TransmuteOre(Form akSource, MineOreScript oreREF, int iCurrentResources)
Function TransmuteOre(Form akSource, MineOreEnderal oreREF, int iCurrentResources)
if akSource == _05E_FS_SaldrinsTouch
@ -49,8 +45,6 @@ EndFunction
Actor Property PlayerREF Auto
Projectile Property AlterPosProjectile Auto
MiscObject Property Gold001 Auto
Sound Property _00E_FS_MAGSaldrinsTouchM Auto
@ -62,4 +56,4 @@ Message Property MiningDepletedMessage Auto
ImageSpaceModifier Property _00E_MAGEldritchCastIMOD Auto
GlobalVariable Property _00E_OreVeinsMined Auto
GlobalVariable Property _00E_OreVeinsMined Auto

View File

@ -60,6 +60,10 @@ _00E_BrawlControl function GetBrawlControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.BrawlControl
endfunction
_00E_MiningControl function GetMiningControl() Global
return (Game.GetForm(0x14) as _00E_PlayerFunctions).ControlRepository.MiningControl
endfunction
;=====================================================================================
; Stop/restart random headtracking

View File

@ -1,4 +1,4 @@
scriptName MineOreScript extends objectReference
scriptName MineOreEnderal extends objectReference
;
;This script handles the Ore Veins and handshakes with the mining furniture
;===================================================================
@ -130,7 +130,7 @@ Function TryPlayerActivate(ObjectReference myLinkedRef)
PlayerIsInFurniture = True
EndIf
(myLinkedRef as mineOreFurnitureScript).lastActivateRef = self
(myLinkedRef as MineOreFurnitureEnderal).lastActivateRef = self
myLinkedRef.activate(PlayerREF)
; Give some time for the animations to warm up/settle down before we can start reacting on OnActivate again.
@ -182,8 +182,7 @@ Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile,
ResourceCountCurrent = ResourceCountTotal
EndIf
_00E_FS_ForgottenStories_Functions _00E_FS_ControlQuest = Game.GetFormFromFile(0x01016E89, "Enderal - Forgotten Stories.esm") as _00E_FS_ForgottenStories_Functions
_00E_FS_ControlQuest.TransmuteOre(akSource, self as MineOreScript, ResourceCountCurrent)
_00E_PlayerFunctions.GetMiningControl().TransmuteOre(akSource, self as MineOreEnderal, ResourceCountCurrent)
; ADDED IN ENDERAL - FORGOTTEN STORIES
@ -296,7 +295,7 @@ function giveOre()
endif
elseif ResourceCountCurrent == 0
myLinkedRef.activate(self)
(myLinkedRef as MineOreFurnitureScript).goToDepletedState()
(myLinkedRef as MineOreFurnitureEnderal).goToDepletedState()
DepletedMessage.Show()
endif
@ -308,6 +307,3 @@ function depleteOreDueToFailure()
self.setDestroyed(true)
ResourceCountCurrent = 0
endFunction

View File

@ -1,4 +1,4 @@
Scriptname MineOreFurnitureScript extends ObjectReference Conditional
Scriptname MineOreFurnitureEnderal extends ObjectReference Conditional
{script for furniture which the player can use to get resources}
@ -209,7 +209,7 @@ function UnregisterForEvents(Bool bNotifyLastActivateRef = False)
UnRegisterForAnimationEvent(PlayerREF, "IdleFurnitureExit")
If bNotifyLastActivateRef && lastActivateRef
(lastActivateRef as MineOreScript).OnFurnitureExit()
(lastActivateRef as MineOreEnderal).OnFurnitureExit()
EndIf
; debug.Trace(self + " should be unregistered for anim events")
endif