all vars are properties, removed comments

This commit is contained in:
Chanumask
2023-10-22 12:05:38 +02:00
parent b1fe698d52
commit e87bd3aaa0
19 changed files with 66 additions and 193 deletions

View File

@@ -54,7 +54,7 @@ class DirtSmearOnMove(Rule):
if is_move(entity.state.identifier) and entity.state.validity == c.VALID:
if old_pos_dirt := state[d.DIRT].by_pos(entity.last_pos):
if smeared_dirt := round(old_pos_dirt.amount * self.smear_amount, 2):
if state[d.DIRT].spawn(entity.pos, amount=smeared_dirt): # pos statt tile
if state[d.DIRT].spawn(entity.pos, amount=smeared_dirt):
results.append(TickResult(identifier=self.name, entity=entity,
reward=0, validity=c.VALID))
return results