feat: Add segment property to actions
This is used to track the number of segments in a skeleton, which is affected by a new bone.
This commit is contained in:
parent
57a2e9ce36
commit
aa6a294d55
@ -47,6 +47,9 @@ class Action:
|
||||
# Skeleton: Fins
|
||||
fins: int = 0
|
||||
|
||||
# Skeleton: Number of Segments
|
||||
segments: int = 0
|
||||
|
||||
# Skeleton: Tentacles
|
||||
tentacles: int = 0
|
||||
|
||||
|
@ -166,6 +166,10 @@ def Solve(shadowy_level, bone_market_fluctuations = None, zoological_mania = Non
|
||||
fins = model.NewIntVar('fins', lb = 0)
|
||||
model.Add(fins == cp_model.LinearExpr.WeightedSum(actions.values(), [action.value.fins for action in actions.keys()]))
|
||||
|
||||
# Segments calculation
|
||||
segments = model.NewIntVar('segments', lb = 0)
|
||||
model.Add(segments == cp_model.LinearExpr.WeightedSum(actions.values(), [action.value.segments for action in actions.keys()]))
|
||||
|
||||
# Tentacles calculation
|
||||
tentacles = model.NewIntVar('tentacles', lb = 0)
|
||||
model.Add(tentacles == cp_model.LinearExpr.WeightedSum(actions.values(), [action.value.tentacles for action in actions.keys()]))
|
||||
|
Loading…
Reference in New Issue
Block a user