TooMuchBeansAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 3 1
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)