@@ -14,20 +14,19 @@ def __init__(self, position):
14
14
self .capacityHuman = 0
15
15
self .tourConstruction = 0
16
16
self .tourConsructionMax = 24 # arbitraire
17
+
18
+ def construit (self ):
19
+ res = False
20
+ self .tourConstruction += 1
21
+ if (self .tourConstruction > tourConstructionMax ):
22
+ res = True
23
+ return res
17
24
18
- def construit (self ):
19
- res = False
20
- self .tourConstruction += 1
21
- if (self .tourConstruction > tourConstructionMax ):
22
- res = True
23
- return res
24
-
25
- def placer (self , sprite , scale ):
26
- interface .overviewWidgetGlobal .addItemToScene (sprite , self .position , scale )
27
- iamap .matrixglobal [self .position [0 ]][self .position [1 ]].set_have (self )
28
- iamap .matrixglobal [self .position [0 ]][self .position [1 ]].set_property (self .typeBatiment ())
29
- # je ne sais pas si ca marche correctment typeBatiment()
30
-
25
+ def placer (self , sprite , scale ):
26
+ interface .overviewWidgetGlobal .addItemToScene (sprite , self .position , scale )
27
+ iamap .matrixglobal [self .position [0 ]][self .position [1 ]].set_property (self .typeBatiment ())
28
+ # je ne sais pas si ca marche correctment typeBatiment()
29
+
31
30
def peutContenir (self , ressource ):
32
31
res = False
33
32
if (ressource == "food" ):
@@ -59,7 +58,7 @@ def sortirRessource(self, aSortir, nombre):
59
58
res = - 1
60
59
return res
61
60
62
- def rentrerRessource (self , aRentrer , nombre ):
61
+ def rentrerRessource (self , aRentrer , nombre ):
63
62
if (aRentrer == "food" ):
64
63
res = self .capacityFood - self .fillinFood
65
64
if (nombre > res ):
@@ -78,7 +77,7 @@ def rentrerRessource(self, aRentrer, nombre):
78
77
res = - 1
79
78
return res
80
79
81
- def sortir (self , human ):
80
+ def sortir (self , human ):
82
81
if (human .isIn == True ):
83
82
human .isOut = False
84
83
res = 1
@@ -128,7 +127,7 @@ def __init__(self, position):
128
127
self .capacityFood = 20 #arbitraire
129
128
self .capacityWood = 20 #arbitraire
130
129
self .capacityHuman = 10 #arbitraire
131
- self .placer ("resources/forum.jpg " ,0.5 ) #TODO
130
+ self .placer ("resources/forum.png " ,0.4 )
132
131
133
132
def typeBatiment (self ):
134
133
return 'forum'
0 commit comments