Feature #792 » 0020-Unhardcode-wld.map-from-can_unit_deboard_or_be_unloa.patch
| common/movement.c | ||
|---|---|---|
|     return FALSE; | ||
|   case TDT_ALIGHT: | ||
|     return can_unit_exist_at_tile(nmap, punit, unit_tile(punit)) | ||
|       && can_unit_deboard_or_be_unloaded(punit, ptrans); | ||
|       && can_unit_deboard_or_be_unloaded(nmap, punit, ptrans); | ||
|   case TDT_ALWAYS: | ||
|     return TRUE; | ||
|   } | ||
| common/unit.c | ||
|---|---|---|
|   Return TRUE iff the given unit can leave its current transporter without | ||
|   doing any other action or move. | ||
| **************************************************************************/ | ||
| bool can_unit_deboard_or_be_unloaded(const struct unit *pcargo, | ||
| bool can_unit_deboard_or_be_unloaded(const struct civ_map *nmap, | ||
|                                      const struct unit *pcargo, | ||
|                                      const struct unit *ptrans) | ||
| { | ||
|   const struct civ_map *nmap = &(wld.map); | ||
|   if (!pcargo || !ptrans) { | ||
|     return FALSE; | ||
|   } | ||
| common/unit.h | ||
|---|---|---|
| bool could_unit_load(const struct unit *pcargo, const struct unit *ptrans); | ||
| bool can_unit_load(const struct unit *punit, const struct unit *ptrans); | ||
| bool can_unit_unload(const struct unit *punit, const struct unit *ptrans); | ||
| bool can_unit_deboard_or_be_unloaded(const struct unit *pcargo, | ||
| bool can_unit_deboard_or_be_unloaded(const struct civ_map *nmap, | ||
|                                      const struct unit *pcargo, | ||
|                                      const struct unit *ptrans); | ||
| bool can_unit_teleport(const struct civ_map *nmap, const struct unit *punit); | ||
| bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit); | ||