Ticket #44772

Lua control of diplomatic states

Open Date: 2022-06-07 23:41 Last Update: 2024-09-19 05:10

Reporter:
(Anonymous)
Owner:
(None)
Status:
Open
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

Add functions Player.get_diplo_state(player) and Player.set_diplo_state(player, state) where Player.get_diplo_state(player) gets the diplomatic state between Player and player, returning a string like "War", "Peace", or "Ceasefire", and Player.set_diplo_state(player, state) sets the diplomatic state between the two players to the state argument's value

Ticket History (3/7 Histories)

2022-06-07 23:41 Updated by: None
  • New Ticket "Lua control of diplomatic states" created
2022-06-08 08:56 Updated by: cazfi
2022-06-08 17:18 Updated by: ihnatus
Comment

I think the API should also support other things that are supported by "DiplRel" requirement (like "Gives Shared Vision"). Example patch I once made here.

2022-07-09 07:58 Updated by: cazfi
Comment

Reply To ihnatus

I think the API should also support other things that are supported by "DiplRel" requirement

One such thing would be "HasTeamEmbassy" that should be added in #45073. People using research information API from #45068 would need it.

2024-08-25 07:17 Updated by: cazfi
2024-08-25 07:22 Updated by: cazfi
Comment

Reply To ihnatus

I think the API should also support other things that are supported by "DiplRel" requirement (like "Gives Shared Vision").

So the original submission's simple get.diplo_state() won't work, as there is multiple states active concurrently.

2024-09-19 05:10 Updated by: cazfi
Comment

Player:diplstate(other player): https://redmine.freeciv.org/issues/876

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login