Adds Death and Sickness systems
This commit is contained in:
1 parent
c22a173e52
commit
722bf6d55f
4 files changed
+46
-34
No files matched your search
@@ -3,14 +3,13 @@ from dataclasses import dataclass, field
|
||||
from components import (
|
||||
Health,
|
||||
Satiety,
|
||||
Location,
|
||||
LocationType,
|
||||
Name,
|
||||
Hydration,
|
||||
Hygiene,
|
||||
Tags,
|
||||
)
|
||||
from ecs import World
|
||||
|
||||
from libs.ecs import World
|
||||
|
||||
|
||||
def create_pet(world: World, name: str):
|
||||
@@ -22,12 +21,3 @@ def create_pet(world: World, name: str):
|
||||
Hygiene(80),
|
||||
Tags(),
|
||||
)
|
||||
|
||||
|
||||
def move_pet_to(world: World, pet_id, container_entity=None) -> bool:
|
||||
component_map = world.get_components(pet_id, pop=True)
|
||||
if component_map is None:
|
||||
return False
|
||||
component_map[Location].id = container_entity
|
||||
component_map[Location].type = LocationType.PADDOCK
|
||||
return True
|
||||
Reference in new issue
Block a user