Пример #1
0
	def kill(self):
		c = item.corpse(self.name,self.loc,self.room_loc)
		self.get_room().add_object(c)
		
		var._c.log('You feel a life pass from this world.')
		self.get_room().guests.remove(self)
		var._c.people.remove(self)
Пример #2
0
def _cleanup(entity):
    if entity["_id"] in ONLINE_ENTITIES:
        ONLINE_ENTITIES.remove(entity["_id"])

    elif entity["_id"] in OFFLINE_ENTITIES:
        OFFLINE_ENTITIES.remove(entity["_id"])

    _x, _y = movement.get_position(entity)

    if flags.has_flag(entity, "fire_data"):
        _fire_data = flags.get_flag(entity, "fire_data")
        _node = entities.get_entity(zones.get_active_node_grid()[_fire_data["node"]])

        entities.trigger_event(_node, "set_flag", flag="owner", value=None)
        flags.delete_flag(entity, "fire_data")

    _item_id = items.corpse(_x, _y, entity["tile"]["char"], entity["_id"])["_id"]

    entities.trigger_event(entity, "handle_corpse", corpse_id=_item_id)
Пример #3
0
def _cleanup(entity):
    if entity['_id'] in ONLINE_ENTITIES:
        ONLINE_ENTITIES.remove(entity['_id'])

    elif entity['_id'] in OFFLINE_ENTITIES:
        OFFLINE_ENTITIES.remove(entity['_id'])

    _x, _y = movement.get_position(entity)

    if flags.has_flag(entity, 'fire_data'):
        _fire_data = flags.get_flag(entity, 'fire_data')
        _node = entities.get_entity(
            zones.get_active_node_grid()[_fire_data['node']])

        entities.trigger_event(_node, 'set_flag', flag='owner', value=None)
        flags.delete_flag(entity, 'fire_data')

    _item_id = items.corpse(_x, _y, entity['tile']['char'],
                            entity['_id'])['_id']

    entities.trigger_event(entity, 'handle_corpse', corpse_id=_item_id)