… | |
… | |
65 | attachable::do_destroy (); |
65 | attachable::do_destroy (); |
66 | |
66 | |
67 | refcnt_dec (); |
67 | refcnt_dec (); |
68 | } |
68 | } |
69 | |
69 | |
|
|
70 | //+GPL |
|
|
71 | |
70 | /* |
72 | /* |
71 | * returns 1 if the player is in the region reg, or a child region thereof |
73 | * returns 1 if the player is in the region reg, or a child region thereof |
72 | * otherwise returns 0 |
74 | * otherwise returns 0 |
73 | * if passed a NULL region returns -1 |
75 | * if passed a NULL region returns -1 |
74 | */ |
76 | */ |
… | |
… | |
123 | |
125 | |
124 | LOG (llevError, "No suitable jailmap for region %s was found.\n", ®->name); |
126 | LOG (llevError, "No suitable jailmap for region %s was found.\n", ®->name); |
125 | |
127 | |
126 | return 0; |
128 | return 0; |
127 | } |
129 | } |
|
|
130 | |
|
|
131 | //-GPL |
128 | |
132 | |
129 | region * |
133 | region * |
130 | region::read (object_thawer &f) |
134 | region::read (object_thawer &f) |
131 | { |
135 | { |
132 | assert (f.kw == KW_region); |
136 | assert (f.kw == KW_region); |
… | |
… | |
191 | |
195 | |
192 | f.next (); |
196 | f.next (); |
193 | } |
197 | } |
194 | } |
198 | } |
195 | |
199 | |
196 | /* |
|
|
197 | * First initialises the archtype hash-table (init_archetable()). |
|
|
198 | * Reads and parses the archetype file (with the first and second-pass |
|
|
199 | * functions). |
|
|
200 | */ |
|
|
201 | void |
|
|
202 | init_regions (void) |
|
|
203 | { |
|
|
204 | if (!regions.size ()) |
|
|
205 | { |
|
|
206 | // make sure one region is always available |
|
|
207 | region *rgn = new region; |
|
|
208 | rgn->name = "<builtin>"; |
|
|
209 | rgn->longname = "Built-in Region"; |
|
|
210 | regions.push_back (rgn); |
|
|
211 | } |
|
|
212 | } |
|
|
213 | |
|
|