Merge branch 'resource' into develop
commit
411f85e329
@ -1 +1 @@
|
||||
Subproject commit e07a544f43258f6ca20819fe598739a6366d9548
|
||||
Subproject commit 778f7fcd82cb1bf70c3cce6962bedf77418506ec
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,133 @@
|
||||
// Patches applying art changes to the asteroid claw
|
||||
// Contents:
|
||||
// - Advanced Grabbing Unit (GrapplingDevice)
|
||||
|
||||
// Advanced Grabbing Unit
|
||||
@PART[GrapplingDevice]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Coupling/restock-claw-125
|
||||
}
|
||||
|
||||
%rescaleFactor = 1
|
||||
%node_stack_top = 0.0, -0.14082675, 0.00, 0.0, -1.0, 0.0, 1
|
||||
|
||||
@MODULE[ModuleGrappleNode]
|
||||
{
|
||||
nodeTransformName = Pivot
|
||||
}
|
||||
|
||||
@MODULE[ModuleAnimateGeneric]
|
||||
{
|
||||
animationName = Deploy
|
||||
}
|
||||
|
||||
@MODULE[FlagDecal]
|
||||
{
|
||||
textureQuadName = flagTransform
|
||||
}
|
||||
|
||||
!MODULE[FXModuleLookAtConstraint]
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = FXModuleLookAtConstraint
|
||||
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.001
|
||||
targetName = act_cylL.001
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.001
|
||||
targetName = act_cylU.001
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.002
|
||||
targetName = act_cylL.002
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.002
|
||||
targetName = act_cylU.002
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.003
|
||||
targetName = act_cylL.003
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.003
|
||||
targetName = act_cylU.003
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.004
|
||||
targetName = act_cylL.004
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.004
|
||||
targetName = act_cylU.004
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.005
|
||||
targetName = act_cylL.005
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.005
|
||||
targetName = act_cylU.005
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.006
|
||||
targetName = act_cylL.006
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.006
|
||||
targetName = act_cylU.006
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.007
|
||||
targetName = act_cylL.007
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.007
|
||||
targetName = act_cylU.007
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylU.008
|
||||
targetName = act_cylL.008
|
||||
}
|
||||
CONSTRAINLOOKFX
|
||||
{
|
||||
rotatorsName = act_cylL.008
|
||||
targetName = act_cylU.008
|
||||
}
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleLight
|
||||
lightName = Lamp
|
||||
useAnimationDim = true
|
||||
lightBrightenSpeed = 2.5
|
||||
lightDimSpeed = 2.5
|
||||
resourceAmount = 0.02
|
||||
useResources = true
|
||||
animationName = RestockClawLamp_On
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
// Patches applying art changes to fuel cells
|
||||
// Contents:
|
||||
// - Fuel Cell (FuelCell)
|
||||
// - Fuel Cell Array (FuelCellArray)
|
||||
|
||||
// Fuel Cell
|
||||
@PART[FuelCell]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!MODEL {}
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Electrical/restock-fuelcell-radial-1
|
||||
}
|
||||
}
|
||||
|
||||
// Fuel Cell Array
|
||||
@PART[FuelCellArray]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!MODEL {}
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Electrical/restock-fuelcell-radial-2
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,113 @@
|
||||
// Patches applying art changes to ore drills
|
||||
// Contents:
|
||||
// - Drill-O-Matic' Mining Excavator (RadialDrill)
|
||||
// - Drill-O-Matic Junior' Mining Excavator (MiniDrill)
|
||||
|
||||
// Drill-O-Matic' Mining Excavator
|
||||
@PART[RadialDrill]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-drill-radial-2
|
||||
}
|
||||
|
||||
@MODULE[ModuleAnimationGroup]
|
||||
{
|
||||
@deployAnimationName = Deploy
|
||||
@activeAnimationName = Drill
|
||||
deployEffectName = Deploy
|
||||
activeEffectName = Active
|
||||
retractEffectName = Retract
|
||||
stopActiveAnimIfDisabled = true
|
||||
}
|
||||
|
||||
EFFECTS
|
||||
{
|
||||
drill
|
||||
{
|
||||
MODEL_MULTI_PARTICLE
|
||||
{
|
||||
name = dust
|
||||
modelName = ReStock/FX/restock-fx-drill-dust
|
||||
transformName = fxTransformDust
|
||||
emission = 1.0 1.1
|
||||
speed = 1.0 1.0
|
||||
}
|
||||
MODEL_MULTI_PARTICLE
|
||||
{
|
||||
name = rocks
|
||||
modelName = ReStock/FX/restock-fx-drill-rocks
|
||||
transformName = fxTransformRocks
|
||||
emission = 1.0 1.0
|
||||
speed = 1.0 1.0
|
||||
}
|
||||
}
|
||||
Deploy {
|
||||
AUDIO
|
||||
{
|
||||
channel = Ship
|
||||
clip = ReStock/Sounds/drill-start
|
||||
}
|
||||
}
|
||||
Active {
|
||||
AUDIO
|
||||
{
|
||||
channel = Ship
|
||||
clip = ReStock/Sounds/drill-loop
|
||||
volume = 0.0 0.0
|
||||
volume = 1.0 1.0
|
||||
}
|
||||
}
|
||||
Retract {
|
||||
AUDIO
|
||||
{
|
||||
channel = Ship
|
||||
clip = ReStock/Sounds/drill-end
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Drill-O-Matic Junior' Mining Excavator
|
||||
@PART[MiniDrill]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-drill-radial-1
|
||||
}
|
||||
|
||||
@MODULE[ModuleAnimationGroup]
|
||||
{
|
||||
@deployAnimationName = Deploy
|
||||
@activeAnimationName = Drill
|
||||
}
|
||||
|
||||
EFFECTS
|
||||
{
|
||||
drill
|
||||
{
|
||||
MODEL_MULTI_PARTICLE
|
||||
{
|
||||
name = dust
|
||||
modelName = ReStock/FX/restock-fx-minidrill-dust
|
||||
transformName = fxTransformDust
|
||||
emission = 1.0 1.1
|
||||
speed = 1.0 1.0
|
||||
}
|
||||
MODEL_MULTI_PARTICLE
|
||||
{
|
||||
name = rocks
|
||||
modelName = ReStock/FX/restock-fx-minidrill-rocks
|
||||
transformName = fxTransformRocks
|
||||
emission = 1.0 1.0
|
||||
speed = 1.0 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
// Patches applying art changes to ISRUs
|
||||
// Contents:
|
||||
// - Convert-O-Tron 125 (MiniISRU)
|
||||
// - Convert-O-Tron 250 (ISRU)
|
||||
|
||||
// Convert-O-Tron 125
|
||||
@PART[MiniISRU]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!MODEL {}
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-isru-125-1
|
||||
scale = 1.0, 1.0, 1.0
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockISRUAnimation
|
||||
deployAnimationName = heater
|
||||
needsEC = true
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockHeatEffects
|
||||
enableHeatEmissive = true
|
||||
useCoreTemp = true
|
||||
shaderProperty = _EmissiveColor
|
||||
excludedRenderer = ISRU-125_heater
|
||||
lerpMax = 2700
|
||||
redCurve
|
||||
{
|
||||
key = 0 0 2 2
|
||||
key = 1 1 0 0
|
||||
}
|
||||
greenCurve
|
||||
{
|
||||
key = 0 0 1 1
|
||||
key = 1 1 1 1
|
||||
}
|
||||
blueCurve
|
||||
{
|
||||
key = 0 0 1 1
|
||||
key = 1 1 1 1
|
||||
}
|
||||
alphaCurve
|
||||
{
|
||||
key = 0 1 0 0
|
||||
key = 1 1 0 0
|
||||
}
|
||||
disableBlackbody = true
|
||||
}
|
||||
}
|
||||
|
||||
// Convert-O-Tron 250
|
||||
@PART[ISRU]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!MODEL {}
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-isru-25-1
|
||||
scale = 1.0, 1.0, 1.0
|
||||
}
|
||||
|
||||
!MODULE[ModuleAnimationGroup] {}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockISRUAnimation
|
||||
deployAnimationName = Deploy
|
||||
activeAnimationName = Run
|
||||
retractAnimationName = Retract
|
||||
needsEC = true
|
||||
waitForComplete = true
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleRestockHeatEffects
|
||||
enableHeatEmissive = true
|
||||
useCoreTemp = true
|
||||
shaderProperty = _EmissiveColor
|
||||
excludedRenderer = ISRU-25_heater
|
||||
lerpMax = 2700
|
||||
redCurve
|
||||
{
|
||||
key = 0 0 2 2
|
||||
key = 1 1 0 0
|
||||
}
|
||||
greenCurve
|
||||
{
|
||||
key = 0 0 1 1
|
||||
key = 1 1 1 1
|
||||
}
|
||||
blueCurve
|
||||
{
|
||||
key = 0 0 1 1
|
||||
key = 1 1 1 1
|
||||
}
|
||||
alphaCurve
|
||||
{
|
||||
key = 0 1 0 0
|
||||
key = 1 1 0 0
|
||||
}
|
||||
disableBlackbody = true
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
// Patches applying art changes to ore tanks
|
||||
// Contents:
|
||||
// - Radial Holding Tank (RadialOreTank)
|
||||
// - Small Holding Tank (SmallTank)
|
||||
// - Large Holding Tank (LargeTank)
|
||||
|
||||
// Radial Holding Tank
|
||||
@PART[RadialOreTank]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-oretank-radial-1
|
||||
}
|
||||
}
|
||||
|
||||
// Small Holding Tank
|
||||
@PART[SmallTank]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-oretank-125-1
|
||||
}
|
||||
}
|
||||
|
||||
// Large Holding Tank
|
||||
@PART[LargeTank]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-oretank-25-1
|
||||
}
|
||||
}
|
@ -0,0 +1,182 @@
|
||||
// Patches applying art changes to ore scanners
|
||||
// Contents:
|
||||
// - Surface Scanning Module (SurfaceScanner)
|
||||
// - M700 Survey Scanner (SurveyScanner)
|
||||
// - M4435 Narrow-Band Scanner (OrbitalScanner)
|
||||
|
||||
// Surface Scanning Module
|
||||
@PART[SurfaceScanner]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-surfacescanner-1
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleAnimateGeneric
|
||||
animationName = screenon
|
||||
startEventGUIName = #LOC_Restock_scanner_screen_on // Screen On
|
||||
endEventGUIName = #LOC_Restock_scanner_screen_off // Screen Off
|
||||
actionGUIName = #LOC_Restock_scanner_screen_toggle // Screen Toggle
|
||||
evaDistance = 1.5
|
||||
}
|
||||
}
|
||||
|
||||
// M700 Survey Scanner
|
||||
@PART[SurveyScanner]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!MODEL {}
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-surveyscanner-1
|
||||
scale = 1.0, 1.0, 1.0
|
||||
}
|
||||
|
||||
@MODULE[ModuleAnimationGroup]
|
||||
{
|
||||
@deployAnimationName = Deploy
|
||||
deployEffectName = Deploy
|
||||
retractEffectName = Retract
|
||||
}
|
||||
|
||||
EFFECTS
|
||||
{
|
||||
Deploy {
|
||||
AUDIO
|
||||
{
|
||||
channel = Ship
|
||||
clip = ReStock/Sounds/scanner-open
|
||||
volume = 0.3
|
||||
}
|
||||
}
|
||||
Retract {
|
||||
AUDIO
|
||||
{
|
||||
channel = Ship
|
||||
clip = ReStock/Sounds/scanner-close
|
||||
volume = 0.3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModulePartVariants
|
||||
baseVariant = Size0
|
||||
|
||||
VARIANT
|
||||
{
|
||||
name = Size0
|
||||
displayName = #LOC_Restock_variant-antenna_size0
|
||||
themeName = White
|
||||
primaryColor = #C8C8C8
|
||||
secondaryColor = #707070
|
||||
GAMEOBJECTS
|
||||
{
|
||||
Body_Rad = false
|
||||
Body_625 = true
|
||||
Body_125 = false
|
||||
}
|
||||
}
|
||||
|
||||
VARIANT
|
||||
{
|
||||
name = Size1
|
||||
displayName = #LOC_Restock_variant-antenna_size1
|
||||
themeName = White
|
||||
primaryColor = #C8C8C8
|
||||
secondaryColor = #707070
|
||||
GAMEOBJECTS
|
||||
{
|
||||
Body_Rad = false
|
||||
Body_625 = false
|
||||
Body_125 = true
|
||||
}
|
||||
}
|
||||
|
||||
VARIANT
|
||||
{
|
||||
name = Compact
|
||||
displayName = #LOC_Restock_variant-antenna_compact
|
||||
themeName = White
|
||||
primaryColor = #C8C8C8
|
||||
secondaryColor = #999999
|
||||
GAMEOBJECTS
|
||||
{
|
||||
Body_Rad = true
|
||||
Body_625 = false
|
||||
Body_125 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// M4435 Narrow-Band Scanner
|
||||
@PART[OrbitalScanner]
|
||||
{
|
||||
@author = Andrew Cassidy
|
||||
|
||||
!mesh = DELETE
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Resource/restock-orbitalscanner-1
|
||||
}
|
||||
|
||||
@MODULE[ModuleAnimationGroup]
|
||||
{
|
||||
@activeAnimationName = Spin
|
||||
activeEffectName = Active
|
||||
}
|
||||
|
||||
EFFECTS
|
||||
{
|
||||
Active {
|
||||
AUDIO
|
||||
{
|
||||
channel = Ship
|
||||
clip = ReStock/Sounds/scanner-spin
|
||||
volume = 0.1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModulePartVariants
|
||||
baseVariant = Size0
|
||||
|
||||
VARIANT
|
||||
{
|
||||
name = Size0
|
||||
displayName = #LOC_Restock_variant-antenna_size0
|
||||
themeName = White
|
||||
primaryColor = #AC6F54
|
||||
secondaryColor = #707070
|
||||
GAMEOBJECTS
|
||||
{
|
||||
Base_Compact = false
|
||||
Base_625 = true
|
||||
}
|
||||
}
|
||||
|
||||
VARIANT
|
||||
{
|
||||
name = Compact
|
||||
displayName = #LOC_Restock_variant-antenna_compact
|
||||
themeName = White
|
||||
primaryColor = #AC6F54
|
||||
secondaryColor = #545454
|
||||
GAMEOBJECTS
|
||||
{
|
||||
Base_Compact = true
|
||||
Base_625 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,75 @@
|
||||
// ReStock+ 0.1.0
|
||||
// size 0 claw
|
||||
PART
|
||||
{
|
||||
name = restock-claw-625-1
|
||||
module = Part
|
||||
author = Andrew Cassidy
|
||||
|
||||
MODEL
|
||||
{
|
||||
model = ReStockPlus/Assets/Coupling/restock-claw-625
|
||||
scale = 1.0, 1.0, 1.0
|
||||
}
|
||||
rescaleFactor = 1.0
|
||||
|
||||
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
|
||||
attachRules = 1,1,0,0,0
|
||||
node_attach = 0.0, -0.01, 0.0, 0.0, 1.0, 0.0, 0
|
||||
node_stack_bottom = 0.0, -0.06, 0.0, 0.0, -1.0, 0.0, 0
|
||||
|
||||
TechRequired = actuators
|
||||
entryCost = 4000
|
||||
cost = 350
|
||||
mass = 0.03
|
||||
category = Coupling
|
||||
subcatagory = 0
|
||||
|
||||
title = #LOC_RestockPlus_restock-claw-625-1_title //Advanced Grabbing Unit Junior
|
||||
manufacturer = #autoLOC_501631 //#autoLOC_501631 = STEADLER Engineering Corps
|
||||
description = #LOC_RestockPlus_restock-claw-625-1_description
|
||||
// A smaller claw for grappling smaller things. Unfortunately, it does not pivot.
|
||||
|
||||
|
||||
dragModelType = default
|
||||
maximum_drag = 0.2
|
||||
minimum_drag = 0.2
|
||||
angularDrag = 2
|
||||
crashTolerance = 8
|
||||
maxTemp = 2000
|
||||
bulkheadProfiles = size0, srf
|
||||
tags = #LOC_RestockPlus_restock-claw-625-1_tags // restock a.r.m arm asteroid capture clam claw connect dock fasten grab join klaw nasa 625
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleGrappleNode
|
||||
nodeTransformName = Pivot
|
||||
deployAnimationController = 1
|
||||
nodetype = size0
|
||||
captureRange = 0.06
|
||||
captureMinFwdDot = 0.733
|
||||
captureMaxRvel = 1
|
||||
pivotRange = 0
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleAnimateGeneric
|
||||
animationName = Deploy
|
||||
startEventGUIName = #autoLOC_502073 //#autoLOC_502073 = Arm
|
||||
endEventGUIName = #autoLOC_502074 //#autoLOC_502074 = Disarm
|
||||
actionGUIName = #autoLOC_502075 //#autoLOC_502075 = Toggle Arming
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleLight
|
||||
lightName = Spotlight
|
||||
useAnimationDim = true
|
||||
lightBrightenSpeed = 5
|
||||
lightDimSpeed = 3
|
||||
resourceAmount = 0.01
|
||||
useResources = true
|
||||
animationName = RestockMiniClawLamp_On
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
// ReStock+ 0.2.0
|
||||
// monopropellant APU/"Fuel Cell"
|
||||
PART
|
||||
{
|
||||
// --- general parameters ---
|
||||
name = restock-apu-radial-1
|
||||
module = Part
|
||||
author = Andrew Cassidy
|
||||
// --- asset parameters ---
|
||||
MODEL
|
||||
{
|
||||
model = ReStock/Assets/Electrical/restock-apu-radial-1
|
||||
}
|
||||
scale = 1.0
|
||||
rescaleFactor = 1
|
||||
// --- node definitions ---
|
||||
node_attach = 0, 0, 0, 1, 0, 0, 0
|
||||
// --- editor parameters ---
|
||||
TechRequired = specializedElectrics
|
||||
entryCost = 2000
|
||||
cost = 700
|
||||
category = Electrical
|
||||
subcategory = 0
|
||||
title = #LOC_RestockPlus_restock-apu-radial-1_title //NH-24 Monopropellant APU
|
||||
manufacturer = #autoLOC_501636 //#autoLOC_501636 = Zaltonic Electronics
|
||||
description = #LOC_RestockPlus_restock-apu-radial-1_description
|
||||
// After playing with a children's pinwheel toy and asking themselves "how could this become more awesome", one engineer tried pointing a small rocket engine at it. The engineering team immediately got to work using it to generate electricity, and the Monopropellant APU was born
|
||||
|
||||
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
|
||||
attachRules = 0,1,0,0,0
|
||||
bulkheadProfiles = surf
|
||||
// --- standard part parameters ---
|
||||
mass = 0.075
|
||||
dragModelType = default
|
||||
maximum_drag = 0.2
|
||||
minimum_drag = 0.2
|
||||
angularDrag = 2
|
||||
crashTolerance = 7
|
||||
maxTemp = 2000
|
||||
breakingForce = 5000
|
||||
breakingTorque = 5000
|
||||
tags = #LOC_RestockPlus_restock-apu-radial-1_tags //APU backup turbine array bank charge convert e/c elect energ pack power volt watt
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleResourceConverter
|
||||
ConverterName = #LOC_RestockPlus_restock-apu_name //APU turbine
|
||||
StartActionName = #LOC_RestockPlus_restock-apu_start //Start turbine
|
||||
StopActionName = #LOC_RestockPlus_restock-apu_stop //Stop turbine
|
||||
ToggleActionName = #LOC_RestockPlus_restock-apu_toggle //Toggle turbine
|
||||
|
||||
FillAmount = 0.95
|
||||
AutoShutdown = false
|
||||
GeneratesHeat = false
|
||||
UseSpecialistBonus = false
|
||||
|
||||
INPUT_RESOURCE
|
||||
{
|
||||
ResourceName = MonoPropellant
|
||||
Ratio = 0.006
|
||||
FlowMode = STAGE_PRIORITY_FLOW
|
||||
}
|
||||
OUTPUT_RESOURCE
|
||||
{
|
||||
ResourceName = ElectricCharge
|
||||
Ratio = 1.5
|
||||
DumpExcess = false
|
||||
}
|
||||
}
|
||||
|
||||
RESOURCE
|
||||
{
|
||||
name = ElectricCharge
|
||||
amount = 40
|
||||
maxAmount = 40
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
// ReStock+ 0.2.0
|
||||
// 1.875m Ore Tank
|
||||
PART
|
||||
{
|
||||
// --- general parameters ---
|
||||
name = restock-oretank-1875-1
|
||||
module = Part
|
||||
author = Andrew Cassidy
|
||||
// --- asset parameters ---
|
||||
MODEL
|
||||
{
|
||||
model = ReStockPlus/Assets/Resource/restock-oretank-1875-1
|
||||
}
|
||||
scale = 1.0
|
||||
rescaleFactor = 1
|
||||
// --- node definitions ---
|
||||
node_attach = 0,0,0.9,0,0,-1,2
|
||||
node_stack_top = 0.0, 0.9, 0.0, 0.0, 1.0, 0.0, 2
|
||||
node_stack_bottom = 0.0, -0.9, 0.0, 0.0, -1.0, 0.0, 2
|
||||
// --- editor parameters ---
|
||||
TechRequired = experimentalScience
|
||||
entryCost = 6000
|
||||
cost = 2000
|
||||
category = FuelTank // y tho
|
||||
subcategory = 0
|
||||
title = #LOC_RestockPlus_restock-oretank-1875-1_title //Medium Holding Tank
|
||||
manufacturer = #autoLOC_501627 //#autoLOC_501627 = Jebediah Kerman's Junkyard and Spacecraft Parts Co
|
||||
description = #LOC_RestockPlus_restock-oretank-1875-1_description //A medium tank that can be used for storing raw materials. Warranty void if used to store snacks.
|
||||
|
||||
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
|
||||
attachRules = 1,1,1,1,0
|
||||
bulkheadProfiles = size1p5
|
||||
// --- standard part parameters ---
|
||||
mass = 1.2
|
||||
dragModelType = default
|
||||
maximum_drag = 0.2
|
||||
minimum_drag = 0.2
|
||||
angularDrag = 2
|
||||
crashTolerance = 7
|
||||
maxTemp = 2000
|
||||
breakingForce = 5000
|
||||
breakingTorque = 5000
|
||||
tags = #LOC_RestockPlus_restock-oretank-1875-1_tags //black isru mine )mining (ore resource store restock
|
||||
|
||||
RESOURCE
|
||||
{
|
||||
name = Ore
|
||||
amount = 0
|
||||
maxAmount = 800
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleFuelJettison
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
// ReStock+ 0.2.0
|
||||
// 3.75m Ore Tank
|
||||
PART
|
||||
{
|
||||
// --- general parameters ---
|
||||
name = restock-oretank-375-1
|
||||
module = Part
|
||||
author = Andrew Cassidy
|
||||
// --- asset parameters ---
|
||||
MODEL
|
||||
{
|
||||
model = ReStockPlus/Assets/Resource/restock-oretank-375-1
|
||||
}
|
||||
scale = 1.0
|
||||
rescaleFactor = 1
|
||||
// --- node definitions ---
|
||||
node_attach = 0,0,1.85,0,0,-1,3
|
||||
node_stack_top = 0.0, 0.9, 0.0, 0.0, 1.0, 0.0, 3
|
||||
node_stack_bottom = 0.0, -0.9, 0.0, 0.0, -1.0, 0.0, 3
|
||||
// --- editor parameters ---
|
||||
TechRequired = experimentalScience
|
||||
entryCost = 12000
|
||||
cost = 4000
|
||||
category = FuelTank // y tho
|
||||
subcategory = 0
|
||||
title = #LOC_RestockPlus_restock-oretank-375-1_title //Jumbo Holding Tank
|
||||
manufacturer = #autoLOC_501627 //#autoLOC_501627 = Jebediah Kerman's Junkyard and Spacecraft Parts Co
|
||||
description = #LOC_RestockPlus_restock-oretank-375-1_description //A very large tank that can be used for storing raw materials. The manufacturer denies any claims that it has been re-purposed from a local farm
|
||||
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
|
||||
attachRules = 1,1,1,1,0
|
||||
bulkheadProfiles = size3
|
||||
// --- standard part parameters ---
|
||||
mass = 4.3
|
||||
dragModelType = default
|
||||
maximum_drag = 0.2
|
||||
minimum_drag = 0.2
|
||||
angularDrag = 2
|
||||
crashTolerance = 7
|
||||
maxTemp = 2000
|
||||
breakingForce = 5000
|
||||
breakingTorque = 5000
|
||||
tags = #LOC_RestockPlus_restock-oretank-375-1_tags //black isru mine )mining (ore resource store restock
|
||||
|
||||
RESOURCE
|
||||
{
|
||||
name = Ore
|
||||
amount = 0
|
||||
maxAmount = 3500
|
||||
}
|
||||
|
||||
MODULE
|
||||
{
|
||||
name = ModuleFuelJettison
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Restock
|
||||
{
|
||||
public class ModuleRestockHeatEffects : PartModule
|
||||
{
|
||||
// enable the heat glow emissive
|
||||
[KSPField] public bool enableHeatEmissive = false;
|
||||
|
||||
// what shader property to modify. must be a color.
|
||||
[KSPField] public string shaderProperty = "_EmissiveColor";
|
||||
|
||||
// animation curve for the red channel
|
||||
[KSPField] public FloatCurve redCurve= new FloatCurve();
|
||||
|
||||
// animation curve for the green channel
|
||||
[KSPField] public FloatCurve greenCurve = new FloatCurve();
|
||||
|
||||
// animation curve for the blue channel
|
||||
[KSPField] public FloatCurve blueCurve = new FloatCurve();
|
||||
|
||||
// animation curve for the alpha channel
|
||||
[KSPField] public FloatCurve alphaCurve = new FloatCurve();
|
||||
|
||||
// draper point, the temperature in Kelvin where materials start glowing
|
||||
[KSPField] public double draperPoint = 798.0;
|
||||
|
||||
// temperature where the animation is at its maximum
|
||||
[KSPField] public double lerpMax = double.NaN;
|
||||
|
||||
// temperature where the animation is at its minimum, added with draperPoint
|
||||
[KSPField] public double lerpMin = 0.0;
|
||||
|
||||
// use the part's core temperature? (overrides useSkinTemp)
|
||||
[KSPField] public bool useCoreTemp = false;
|
||||
|
||||
// use the part's skin temperature?
|
||||
[KSPField] public bool useSkinTemp = false;
|
||||
|
||||
// should the module disable the stock blackbody glow effect on the included renderers?
|
||||
[KSPField] public bool disableBlackbody = false;
|
||||
|
||||
[KSPField] public List<Renderer> renderers = new List<Renderer>();
|
||||
|
||||
private readonly string _shaderBlackbody = "_TemperatureColor";
|
||||
|
||||
private ModuleCoreHeat _coreHeatModule = null;
|
||||
|
||||
private int _shaderPropertyID;
|
||||
|
||||
private int _shaderBlackbodyID;
|
||||
|
||||
private double _lerpRange;
|
||||
|
||||
private Color _emissiveColor = new Color();
|
||||
private MaterialPropertyBlock _propertyBlock = new MaterialPropertyBlock();
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (base.vessel == null) return;
|
||||
|
||||
if (enableHeatEmissive)
|
||||
{
|
||||
if (useCoreTemp)
|
||||
{
|
||||
_coreHeatModule = base.part.FindModuleImplementing<ModuleCoreHeat>();
|
||||
if (_coreHeatModule == null)
|
||||
{
|
||||
this.LogError("Part has no Core Heat module, skipping");
|
||||
useCoreTemp = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (double.IsNaN(lerpMax))
|
||||
{
|
||||
if (useCoreTemp)
|
||||
{
|
||||
lerpMax = _coreHeatModule.CoreShutdownTemp;
|
||||
}
|
||||
else
|
||||
{
|
||||
lerpMax = useSkinTemp ? part.skinMaxTemp : part.maxTemp;
|
||||
}
|
||||
}
|
||||
|
||||
_lerpRange = lerpMax - lerpMin - draperPoint;
|
||||
|
||||
_shaderPropertyID = Shader.PropertyToID(shaderProperty);
|
||||
}
|
||||
|
||||
if (disableBlackbody)
|
||||
{
|
||||
_shaderBlackbodyID = Shader.PropertyToID(_shaderBlackbody);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLoad(ConfigNode node)
|
||||
{
|
||||
if (HighLogic.LoadedSceneIsEditor || HighLogic.LoadedSceneIsFlight) return;
|
||||
|
||||
renderers = base.part.FindModelComponents<Renderer>();
|
||||
|
||||
if (node.HasValue("excludedRenderer"))
|
||||
{
|
||||
var excludedRenderers = new List<string>();
|
||||
|
||||
excludedRenderers.AddRange(node.GetValues("excludedRenderer"));
|
||||
|
||||
for (int i = renderers.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (renderers[i] == null || excludedRenderers.Contains(renderers[i].name))
|
||||
{
|
||||
renderers.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void LateUpdate()
|
||||
{
|
||||
if (!HighLogic.LoadedSceneIsFlight) return;
|
||||
|
||||
if (enableHeatEmissive)
|
||||
{
|
||||
var temp = 0.0;
|
||||
if (useCoreTemp)
|
||||
{
|
||||
temp = _coreHeatModule.CoreTemperature;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = useSkinTemp ? base.part.skinTemperature : base.part.temperature;
|
||||
}
|
||||
|
||||
var temp2 = (float) ((temp - draperPoint) / _lerpRange);
|
||||
temp2 = Mathf.Clamp01(temp2);
|
||||
|
||||
_emissiveColor.r = redCurve.Evaluate(temp2);
|
||||
_emissiveColor.g = greenCurve.Evaluate(temp2);
|
||||
_emissiveColor.b = blueCurve.Evaluate(temp2);
|
||||
_emissiveColor.a = alphaCurve.Evaluate(temp2);
|
||||
|
||||
_propertyBlock.SetColor(_shaderPropertyID, _emissiveColor);
|
||||
}
|
||||
|
||||
if (disableBlackbody)
|
||||
{
|
||||
_propertyBlock.SetColor(_shaderBlackbodyID, Color.black);
|
||||
|
||||
}
|
||||
|
||||
foreach (var r in renderers)
|
||||
{
|
||||
r.SetPropertyBlock(_propertyBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,351 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Restock
|
||||
{
|
||||
public class ModuleRestockISRUAnimation : PartModule
|
||||
{
|
||||
// name of the deploy animation to use
|
||||
[KSPField] public string deployAnimationName = "";
|
||||
|
||||
// name of the retract animation to use
|
||||
// will default to using the deploy animation in reverse
|
||||
[KSPField] public string retractAnimationName = "";
|
||||
|
||||
// name of the active animation to use
|
||||
[KSPField] public string activeAnimationName = "";
|
||||
|
||||
// name of the inactive animation to use
|
||||
[KSPField] public string inactiveAnimationName = "";
|
||||
|
||||
// speed to run the animation when deploying
|
||||
[KSPField] public float deploySpeed = 1.0f;
|
||||
|
||||
// speed to run the animation when retracting
|
||||
[KSPField] public float retractSpeed = 1.0f;
|
||||
|
||||
// does this module need electric charge to be enabled?
|
||||
[KSPField] public bool needsEC = false;
|
||||
|
||||
// should the module wait until a current looping animation completes before changing state?
|
||||
[KSPField] public bool waitForComplete = false;
|
||||
|
||||
public bool IsDeployed => (CurrentState == State.InactiveWaiting ||
|
||||
CurrentState == State.Active ||
|
||||
CurrentState == State.Deploying);
|
||||
|
||||
private enum State
|
||||
{
|
||||
Inactive,
|
||||
InactiveWaiting,
|
||||
Deploying,
|
||||
Active,
|
||||
ActiveWaiting,
|
||||
Retracting
|
||||
}
|
||||
|
||||
private Animation DeployAnimation { get; set; }
|
||||
private Animation RetractAnimation { get; set; }
|
||||
private Animation ActiveAnimation { get; set; }
|
||||
private Animation InactiveAnimation { get; set; }
|
||||
|
||||
private State CurrentState { get; set; }
|
||||
|
||||
private bool _deployAnimationPresent = false;
|
||||
private bool _retractAnimationPresent = false;
|
||||
private bool _activeAnimationPresent = false;
|
||||
private bool _inactiveAnimationPresent = false;
|
||||
|
||||
private List<BaseConverter> _modules;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
_modules = base.part.FindModulesImplementing<BaseConverter>();
|
||||
|
||||
_deployAnimationPresent = (deployAnimationName != string.Empty);
|
||||
_retractAnimationPresent = (retractAnimationName != string.Empty);
|
||||
_activeAnimationPresent = (activeAnimationName != string.Empty);
|
||||
_inactiveAnimationPresent = (inactiveAnimationName != string.Empty);
|
||||
|
||||
DeployAnimation = ((_deployAnimationPresent) ?
|
||||
base.part.FindModelAnimators(deployAnimationName)[0] : null);
|
||||
RetractAnimation = ((_retractAnimationPresent) ?
|
||||
base.part.FindModelAnimators(retractAnimationName)[0] : null);
|
||||
ActiveAnimation = ((_activeAnimationPresent) ?
|
||||
base.part.FindModelAnimators(activeAnimationName)[0] : null);
|
||||
InactiveAnimation = ((_inactiveAnimationPresent)?
|
||||
base.part.FindModelAnimators(inactiveAnimationName)[0] : null);
|
||||
|
||||
foreach (var a in base.part.FindModelAnimators()) a.Stop();
|
||||
|
||||
if (!HighLogic.LoadedSceneIsFlight) return;
|
||||
|
||||
if (ConvertersEnabled())
|
||||
{
|
||||
DeployStart(1000f);
|
||||
}
|
||||
else
|
||||
{
|
||||
RetractStart(1000f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnLoad(ConfigNode node)
|
||||
{
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (!HighLogic.LoadedSceneIsFlight) return;
|
||||
|
||||
try
|
||||
{
|
||||
switch (CurrentState)
|
||||
{
|
||||
// System is inactive, and playing the inactive animation if present
|
||||
case State.Inactive:
|
||||
if (ConvertersEnabled())
|
||||
{
|
||||
if (waitForComplete)
|
||||
{
|
||||
DeployWait();
|
||||
}
|
||||
else
|
||||
{
|
||||
DeployStart();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// System is inactive, but waiting for the animation to end before deploying
|
||||
case State.InactiveWaiting:
|
||||
if (!waitForComplete || !_inactiveAnimationPresent)
|
||||
{
|
||||
this.LogError(
|
||||
"Invalid state! waitForComplete not enabled or inactive animation not present.");
|
||||
CurrentState = State.Inactive;
|
||||
}
|
||||
else if (!ConvertersEnabled())
|
||||
{
|
||||
RetractEnd();
|
||||
}
|
||||
else if (!InactiveAnimation.IsPlaying(inactiveAnimationName))
|
||||
{
|
||||
DeployStart();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// System is deploying
|
||||
case State.Deploying:
|
||||
if (!_deployAnimationPresent)
|
||||
{
|
||||
this.LogError("Invalid state! Deploying without an animation present.");
|
||||
CurrentState = State.Active;
|
||||
}
|
||||
else if (!ConvertersEnabled())
|
||||
{
|
||||
RetractStart();
|
||||
}
|
||||
else if (!DeployAnimation.IsPlaying(deployAnimationName))
|
||||
{
|
||||
DeployEnd();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// System is active, and playing the active animation if present
|
||||
case State.Active:
|
||||
if (!ConvertersEnabled())
|
||||
{
|
||||
if (waitForComplete)
|
||||
{
|
||||
RetractWait();
|
||||
}
|
||||
else
|
||||
{
|
||||
RetractStart();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// System is active, but waiting for the animation to finish before retracting
|
||||
case State.ActiveWaiting:
|
||||
if (!waitForComplete || !_activeAnimationPresent)
|
||||
{
|
||||
this.LogError("Invalid state! waitForComplete not enabled or active animation not present.");
|
||||
CurrentState = State.Active;
|
||||
}
|
||||
else if (ConvertersEnabled())
|
||||
{
|
||||
DeployEnd();
|
||||
}
|
||||
else if (!ActiveAnimation.IsPlaying(activeAnimationName))
|
||||
{
|
||||
RetractStart();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// System is retracting
|
||||
case State.Retracting:
|
||||
if (!_retractAnimationPresent && !_deployAnimationPresent)
|
||||
{
|
||||
this.LogError("Invalid state! Retracting without an animation present.");
|
||||
CurrentState = State.Inactive;
|
||||
}
|
||||
else if (ConvertersEnabled())
|
||||
{
|
||||
DeployStart();
|
||||
}
|
||||
else if (!RetractAnimation.IsPlaying(retractAnimationName))
|
||||
{
|
||||
RetractEnd();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
this.LogException("Failed to update animation module", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void DeployWait()
|
||||
{
|
||||
if (_inactiveAnimationPresent){
|
||||
CurrentState = State.InactiveWaiting;
|
||||
PlayAnimation(InactiveAnimation, inactiveAnimationName, loop: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
DeployStart();
|
||||
}
|
||||
}
|
||||
|
||||
private void DeployStart(float speed = 1f)
|
||||
{
|
||||
if (_deployAnimationPresent)
|
||||
{
|
||||
if (_retractAnimationPresent && RetractAnimation.IsPlaying(retractAnimationName))
|
||||
{
|
||||
RetractAnimation.Stop(retractAnimationName);
|
||||
}
|
||||
CurrentState = State.Deploying;
|
||||
PlayAnimation(DeployAnimation, deployAnimationName, speed * deploySpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
DeployEnd();
|
||||
}
|
||||
}
|
||||
|
||||
private void DeployEnd()
|
||||
{
|
||||
CurrentState = State.Active;
|
||||
|
||||
if (_activeAnimationPresent)
|
||||
{
|
||||
PlayAnimation(ActiveAnimation, activeAnimationName, loop: true);
|
||||
}
|
||||
}
|
||||
|
||||
private void RetractWait()
|
||||
{
|
||||
if (_activeAnimationPresent)
|
||||
{
|
||||
CurrentState = State.ActiveWaiting;
|
||||
PlayAnimation(ActiveAnimation, activeAnimationName, loop: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
RetractStart();
|
||||
}
|
||||
}
|
||||
|
||||
private void RetractStart(float speed = 1f)
|
||||
{
|
||||
if (_retractAnimationPresent)
|
||||
{
|
||||
if (_deployAnimationPresent && DeployAnimation.IsPlaying(deployAnimationName))
|
||||
{
|
||||
DeployAnimation.Stop(deployAnimationName);
|
||||
}
|
||||
CurrentState = State.Retracting;
|
||||
PlayAnimation(RetractAnimation, retractAnimationName, speed * retractSpeed);
|
||||
}
|
||||
else if (_deployAnimationPresent)
|
||||
{
|
||||
CurrentState = State.Retracting;
|
||||
PlayAnimation(DeployAnimation, deployAnimationName, speed * retractSpeed * -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
RetractEnd();
|
||||
}
|
||||
}
|
||||
|
||||
private void RetractEnd()
|
||||
{
|
||||
CurrentState = State.Inactive;
|
||||
|
||||
if (_inactiveAnimationPresent)
|
||||
{
|
||||
PlayAnimation(InactiveAnimation, inactiveAnimationName, loop: true);
|
||||
}
|
||||
}
|
||||
|
||||
private bool ConvertersEnabled()
|
||||
{
|
||||
if (needsEC && !CheatOptions.InfiniteElectricity)
|
||||
{
|
||||
var ecHash = PartResourceLibrary.ElectricityHashcode;
|
||||
base.vessel.GetConnectedResourceTotals(ecHash, out var ecAmount, out _, true);
|
||||
if (ecAmount < 0.1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var m in _modules)
|
||||
{
|
||||
if (m.ModuleIsActive())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void PlayAnimation(Animation anim, string name, float speed = 1f, bool loop = false)
|
||||
{
|
||||
var animState = anim[name];
|
||||
|
||||
if (animState.wrapMode != WrapMode.Loop)
|
||||
{
|
||||
if (speed < 0 && animState.time < Mathf.Epsilon)
|
||||
{
|
||||
animState.time = animState.length;
|
||||
}
|
||||
else if (speed > 0 && animState.time > animState.length - Mathf.Epsilon)
|
||||
{
|
||||
animState.time = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
animState.speed = speed;
|
||||
animState.wrapMode = loop ? WrapMode.Loop : WrapMode.Once;
|
||||
|
||||
//if (!anim.IsPlaying(name))
|
||||
anim.Play(name);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue