Strict coast ships can't enter tiny island cities
Yes, there is an omission dating back to long ago ("Trireme" flag in 2.6, "CoastStrict" later) that a coast strict unit tests adjacent tiles for being a safe coast but not its own one, so on a one-tile safe coast region it is illegal even if the terrain is safe coast itself and/or city. Even if we test the unit's tile for safe coast, btw, such a unit won't be able to exist in an oceanic city not adjacent to a safe coast, even if it is able to exist on adjacent tiles; that looks like also a bug.
Reply To ihnatus
Even if we test the unit's tile for safe coast, btw, such a unit won't be able to exist in an oceanic city not adjacent to a safe coast, even if it is able to exist on adjacent tiles; that looks like also a bug.
Reading the code, I don't see the same problem with these as with moving to a tile. Related functions check for a safe city's existence *before* considering if unit is a CoastStrict unit outside safe coast.
Wow that was easy. Thanks.
I was checking around and found this in movement.c, bool can_exist_at_tile(...) ...
Maybe a dumb question but would this also need a "&& !pcity" condition in there too?
Reply To (Anonymous)
Wow that was easy. Thanks. I was checking around and found this in movement.c, bool can_exist_at_tile(...) ... /* UTYF_COAST_STRICT unit cannot exist in an ocean tile without access to land. */ if (utype_has_flag(utype, UTYF_COAST_STRICT) && !is_safe_ocean(nmap, ptile)) { return FALSE; } Maybe a dumb question but would this also need a "&& !pcity" condition in there too?
Photo of a boat unit who is unable to enter a tiny island city. https://cdn.discordapp.com/attachments/358555060382203905/861719109272207380/unknown.png
blamed: map.c:is_safe_ocean() and/or the conditional logic in the 3 places in movement.c which include is_safe_ocean in a conditional logic expression