Incidencia #42684

Lua: vision checking and editing

Abrir Fecha: 2021-07-31 02:51 Última actualización: 2022-04-09 07:14

Informador:
Propietario:
(Ninguno)
Estado:
Open
Componente:
Hito:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Ninguno
Fichero:
Ninguno

Details

Sub-task of #42501 but has a separate meaning, in commercial games we can get territory map from a hut (see http://forum.freeciv.org/f/viewtopic.php?f=13&t=91188).

Common API: int (Unit_Type).vision_radius_sq

Client API: bool (Tile).is_seen (known can be checked by .terrain ~= nil but may et a special method)

Server API:

  • bool (Player):can_see(Tile tile, string vlayer = NULL) -- normal vision by default, may supply "Subsurface" or "Stealth"
  • bool (Player):can_see(Unit unit) -- Maybe these two can_see() methods should go to common code but in clients they will lie a lot
  • bool (Player):knows_map(Tile tile)
  • void (Player):give_map_radius_sq(Tile tile, int radius = 1)
  • void (Player):give_map(Tile tile, int dist = 1)
  • void (Player):forget_map_radius_sq(Tile tile, int radius = 1)
  • void (Player):forget_map(Tile tile, int dist = 1)

Ticket History (3/3 Histories)

2021-07-31 02:51 Updated by: ihnatus
  • New Ticket "Lua: vision checking and editing" created
2021-10-03 06:30 Updated by: cazfi
Comentario

I've split #42973 ( Tile:show() & Tile:hide() ) and #42974 (default.lua hut code to reveal map) from this.

2022-04-09 07:14 Updated by: cazfi
  • Hito Update from S3_1 d3f to S3_2 d3f
  • Componente Update from General to Scripting API

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar