TooMuchBeansAction.run()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
c 3
b 0
f 0
dl 0
loc 3
rs 10
1
from synergine.synergy.event.Action import Action
2
from tests.src.event.TooMuchBeansEvent import TooMuchBeansEvent
3
from tests.src.event.MakeBeansProfitAction import MakeBeansProfitAction
4
from tests.src.cst import BEANS
5
6
class TooMuchBeansAction(Action):
7
8
    _listen = TooMuchBeansEvent
9
    _depend = [MakeBeansProfitAction]
10
11
    def run(self, obj, context, synergy_manager):
12
        obj.beans = 0
13
        context.metas.value.set(BEANS, obj.get_id(), 0)