Crossfire Server, Trunk
dragon Namespace Reference

Functions

def dist_fare (start, end)
 
def fare (dest)
 
def handle_say ()
 
def search_destination (name)
 
def world_map_coord (path)
 

Variables

 activator = Crossfire.WhoIsActivator()
 
dictionary coord_override
 
dictionary dest_searchable = {}
 
dictionary destinations
 
 event = Crossfire.WhatIsEvent()
 
int max_fare = 150*50
 
int price_per_worldmap_tile = 5*50
 
 state = Crossfire.GetPrivateDictionary()
 
 whoami = Crossfire.WhoAmI()
 
string world_map_path_matcher = r"/world/world_(\d\d\d)_(\d\d\d)";
 

Detailed Description

dragon.py -- talking dragon that flies you places
Kevin Zheng 2024

This replaces the old dragon hangers, where every location that wanted a dragon
hanger needed to copy/paste a template map.

Usage: Put an event_say and event_apply handler that calls this script on a
dragon_exit.

Function Documentation

◆ dist_fare()

def dragon.dist_fare (   start,
  end 
)

Definition at line 78 of file dragon.py.

Referenced by fare().

+ Here is the caller graph for this function:

◆ fare()

def dragon.fare (   dest)

Definition at line 70 of file dragon.py.

References dist_fare(), and world_map_coord().

Referenced by handle_say().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle_say()

def dragon.handle_say ( )

Definition at line 86 of file dragon.py.

References fare(), and search_destination().

+ Here is the call graph for this function:

◆ search_destination()

def dragon.search_destination (   name)

Definition at line 52 of file dragon.py.

Referenced by handle_say().

+ Here is the caller graph for this function:

◆ world_map_coord()

def dragon.world_map_coord (   path)
Try to extract the coordinates from a world map path.

Definition at line 59 of file dragon.py.

References make_face_from_files.int.

Referenced by fare().

+ Here is the caller graph for this function:

Variable Documentation

◆ activator

dragon.activator = Crossfire.WhoIsActivator()

Definition at line 19 of file dragon.py.

◆ coord_override

dictionary dragon.coord_override
Initial value:
1 = {
2  '/pup_land/terminal': (94, 115), # 50 platinum from Scorn
3 }

Definition at line 48 of file dragon.py.

◆ dest_searchable

dictionary dragon.dest_searchable = {}

Definition at line 41 of file dragon.py.

◆ destinations

dictionary dragon.destinations
Initial value:
1 = {
2  'Port Joseph': ('/world/world_101_114', 16, 39),
3  'Red Town': ('/pup_land/terminal', 10, 12),
4  'Wolfsburg': ('/world/world_128_109', 35, 13),
5  'Brest': ('/world/world_107_123', 32, 30),
6  'Navar': ('/world/world_121_116', 37, 46),
7  'Darcap': ('/world/world_116_102', 29, 37),
8  'Stoneville': ('/world/world_103_127', 5, 15),
9  'Scorn': ('/world/world_105_115', 5, 37),
10  'Lake Country': ('/world/world_109_126', 16, 20),
11  'Santo Dominion': ('/world/world_102_108', 17, 12),
12 # 'Nurnberg': ('/pup_land/nurnberg/city', 25, 15), # needs a passport check
13 }

Definition at line 27 of file dragon.py.

◆ event

dragon.event = Crossfire.WhatIsEvent()

Definition at line 20 of file dragon.py.

◆ max_fare

int dragon.max_fare = 150*50

Definition at line 24 of file dragon.py.

◆ price_per_worldmap_tile

int dragon.price_per_worldmap_tile = 5*50

Definition at line 23 of file dragon.py.

◆ state

◆ whoami

dragon.whoami = Crossfire.WhoAmI()

Definition at line 21 of file dragon.py.

◆ world_map_path_matcher

string dragon.world_map_path_matcher = r"/world/world_(\d\d\d)_(\d\d\d)";

Definition at line 17 of file dragon.py.