Skip to content

Commit

Permalink
#34 framework for stable landing
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxyyyqqq12345 committed Jan 25, 2019
1 parent 731d16a commit 6da815b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions orbitx/PhysicEntity.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@


class PhysicsEntity(object):
habitat_hull_strength=50
spacestation_hull_strength=100
cannot_land=0 #reserved for small astroid, to be changed
def __init__(self, entity):
assert isinstance(entity, protos.Entity)
self.name = entity.name
Expand All @@ -15,9 +18,16 @@ def __init__(self, entity):
self.heading = entity.heading
self.fuel = entity.fuel
self.throttle = entity.throttle
self.attached_to = entity.attached_to
self.broken = entity.broken
self.artificial = entity.artificial
self.attached_to =""
if hasattr(entity,"attached_to"):
self.attached_to = entity.attached_to
self.broken=False
if hasattr(entity,"broken"):
self.broken = entity.broken
self.artificial=False
if hasattr(entity,"artificial"):
self.artificial = entity.artificial


def as_proto(self):
return protos.Entity(
Expand Down

0 comments on commit 6da815b

Please sign in to comment.