HomeWildfire Games

Pull Diplomacy out of cmpPlayer.
Needs VerificationrP27722

Description

Pull Diplomacy out of cmpPlayer.

Who says only players should be able to conduct diplomacy?
Also separation of concerns, more maintainable files.

Differential revision: https://code.wildfiregames.com/D4921
Comments by: @elexis, @Stan
Refs. #5894

Event Timeline

wraitii raised a concern with this commit.Jun 22 2023, 12:01 PM
wraitii added a subscriber: wraitii.

This appears to error, per gameboy and myself https://wildfiregames.com/forum/topic/107586-an-error-occurred/#comment-553741 (I bisected it to this commit)

Can reproduce by starting Jebel Barka like so:

binaries/system/pyrogenesis -autostart="random/jebel_barkal" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=1:petra -autostart-ai=2:petra -autostart-player=1
This commit now has outstanding concerns.Jun 22 2023, 12:01 PM
phosit added a subscriber: phosit.Sep 3 2023, 9:33 AM

@wraitii Your error is fixed with D5060 i think.

There are other errors when saving and loading a game: https://wildfiregames.com/forum/topic/108069-diplomacy-broken-since-rev-27722

/ps/trunk/binaries/data/mods/public/simulation/components/Diplomacy.js
21

Changing for...in to for...of fixes it.
Patch By: elexis

phosit added inline comments.Sep 3 2023, 4:37 PM
/ps/trunk/binaries/data/mods/public/simulation/components/Diplomacy.js
21

Might not be a complete patch.

Freagarach requested verification of this commit.Sep 4 2023, 3:07 PM

Thanks for the reports (and the proposed fix). :)

This commit now requires verification by auditors.Sep 4 2023, 3:07 PM