Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: calculate cycleTime for different types of modules #67

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 78 additions & 19 deletions patches/capacitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ attributes:
defaultValue: 2.5
highIsGood: true
stackable: true
- new:
name: cycleTime
published: true
defaultValue: 0
highIsGood: false
stackable: true
- new:
name: capacitorPeakLoad
published: true
Expand All @@ -24,7 +30,6 @@ attributes:
stackable: true
- new:
name: capacitorPeakDelta
id: -1
published: true
defaultValue: 0
highIsGood: true
Expand All @@ -40,7 +45,6 @@ attributes:
# calculated and set by the dogma-engine.
- new:
name: capacitorDepletesIn
id: -2
published: true
defaultValue: 0
highIsGood: true
Expand Down Expand Up @@ -74,7 +78,7 @@ effects:
operation: postMul

- new:
name: capacitorPeakLoadDuration
name: cycleTimeDuration
effectCategory: active
electronicChance: false
isAssistance: false
Expand All @@ -85,26 +89,56 @@ effects:
modifierInfo:
- domain: itemID
func: ItemModifier
modifiedAttribute: capacitorPeakLoad
modifyingAttribute: capacitorNeed
operation: preAssign
modifiedAttribute: cycleTime
modifyingAttribute: duration
operation: modAdd
- new:
name: cycleTimeDurationHighisGood
effectCategory: active
electronicChance: false
isAssistance: false
isOffensive: false
isWarpSafe: true
propulsionChance: false
rangeChance: false
modifierInfo:
- domain: itemID
func: ItemModifier
modifiedAttribute: capacitorPeakLoad
modifyingAttribute: duration
operation: postDiv
modifiedAttribute: cycleTime
modifyingAttribute: durationHighisGood
operation: modAdd
- new:
name: cycleTimeSpeed
effectCategory: active
electronicChance: false
isAssistance: false
isOffensive: false
isWarpSafe: true
propulsionChance: false
rangeChance: false
modifierInfo:
- domain: itemID
func: ItemModifier
modifiedAttribute: capacitorPeakLoad
modifyingAttribute: thousand
operation: postMul
- domain: shipID
modifiedAttribute: cycleTime
modifyingAttribute: speed
operation: modAdd
- new:
name: cycleTimeReactivationDelay
effectCategory: active
electronicChance: false
isAssistance: false
isOffensive: false
isWarpSafe: true
propulsionChance: false
rangeChance: false
modifierInfo:
- domain: itemID
func: ItemModifier
modifiedAttribute: capacitorPeakLoad
modifyingAttribute: capacitorPeakLoad
modifiedAttribute: cycleTime
modifyingAttribute: moduleReactivationDelay
operation: modAdd
- new:
name: capacitorPeakLoadSpeed
name: capacitorPeakLoad
effectCategory: active
electronicChance: false
isAssistance: false
Expand All @@ -121,7 +155,7 @@ effects:
- domain: itemID
func: ItemModifier
modifiedAttribute: capacitorPeakLoad
modifyingAttribute: speed
modifyingAttribute: cycleTime
operation: postDiv
- domain: itemID
func: ItemModifier
Expand Down Expand Up @@ -171,14 +205,30 @@ typeDogma:
dogmaEffects:
- effect: capacitorPeakRecharge
isDefault: false
- patch:
- category: Module
hasAllAttributes:
- name: capacitorNeed
dogmaEffects:
- effect: capacitorPeakLoad
isDefault: false
- patch:
- category: Module
hasAllAttributes:
- name: capacitorNeed
# Some modules use "duration" for their cycle time.
- name: duration
dogmaEffects:
- effect: capacitorPeakLoadDuration
- effect: cycleTimeDuration
isDefault: false
- patch:
- category: Module
hasAllAttributes:
- name: capacitorNeed
# Some modules use "durationHighisGood" for their cycle time.
- name: durationHighisGood
dogmaEffects:
- effect: cycleTimeDurationHighisGood
isDefault: false
- patch:
- category: Module
Expand All @@ -187,7 +237,16 @@ typeDogma:
# Other modules use "speed" for their cycle time.
- name: speed
dogmaEffects:
- effect: capacitorPeakLoadSpeed
- effect: cycleTimeSpeed
isDefault: false
- patch:
- category: Module
hasAllAttributes:
- name: capacitorNeed
# Other modules use "moduleReactivationDelay" for their cycle time.
- name: moduleReactivationDelay
dogmaEffects:
- effect: cycleTimeReactivationDelay
isDefault: false
- patch:
- category: Ship
Expand Down