-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
58 lines (51 loc) · 1.04 KB
/
Copy pathmodels.py
File metadata and controls
58 lines (51 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from __future__ import annotations
from dataclasses import dataclass, field
@dataclass
class WorldConfig:
name: str
size_label: str
region: str
@dataclass
class Building:
x: int
y: int
color: str
kind: str
active: bool = True
owner_id: int | None = None
@dataclass
class Human:
id: int
money: int
job_id: int | None = None
hungry: bool = False
energy: int = 100
health: int = 100
sick: bool = False
food: int = 40
status_items: int = 0
loan_balance: int = 0
loan_years_missed: int = 0
homeless_months: int = 0
home_kind: str = "Tält"
@dataclass
class Workplace:
id: int
kind: str
wage: int
capacity: int
employed: int = 0
strain: int = 1
owner_id: int | None = None
money: int = 0
blocks: list[tuple[int, int]] = field(default_factory=list)
loan_balance: int = 0
loan_years_missed: int = 0
idle_months: int = 0
@dataclass
class FoodStore:
id: int
kind: str
price: int
capacity: int
sold: int = 0