Skip to content

Commit

Permalink
add non-engi explosives allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Nov 30, 2024
1 parent e193ebc commit 974752a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sim/core/consumes.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package core

import (
"slices"
"time"

"github.com/wowsims/sod/sim/core/proto"
Expand Down Expand Up @@ -970,7 +971,9 @@ func registerExplosivesCD(agent Agent, consumes *proto.Consumes) {
}

if hasFiller {
if consumes.FillerExplosive != proto.Explosive_ExplosiveEzThroRadiationBomb && !character.HasProfession(proto.Profession_Engineering) {
// Update this list with explosives that don't require engi
nonEngiExplosives := []proto.Explosive{proto.Explosive_ExplosiveEzThroRadiationBomb, proto.Explosive_ExplosiveObsidianBomb}
if !character.HasProfession(proto.Profession_Engineering) || !slices.Contains(nonEngiExplosives, consumes.FillerExplosive) {
return
}

Expand Down

0 comments on commit 974752a

Please sign in to comment.