HomeWildfire Games

Adds a "properties"-property to resources and let mods be able to prevent…
AuditedrP22970

Description

Adds a "properties"-property to resources and let mods be able to prevent resources from being bartered, traded and/or tributed.

Comments by: elexis, Stan`, Nescio

Reviewed By: wraitii, Angen

Fixes #4370

Differential Revision: https://code.wildfiregames.com/D1846

Event Timeline

wraitii added a subscriber: Itms.Sep 22 2019, 4:55 PM

-_- Forgot to write 'Patch By: Freagarach', sorry.

@Itms Any chance Phabricator could be updated to add that to the default diff text?

Its okay, if one is interested in who the author is they can look at the diff ;)

bb raised a concern with this commit.Sep 22 2019, 9:41 PM
bb added a subscriber: bb.
bb added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/ai/petra/diplomacyManager.js
83

I suspect this to come from here:

WARNING: JavaScript warning: simulation/ai/petra/diplomacyManager.js line 83
reference to undefined property availableResources[res]

This replay does not warn on r22969 but does on r22970:

This commit now has outstanding concerns.Sep 22 2019, 9:41 PM
Freagarach added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/ai/petra/diplomacyManager.js
81

of D2319.

wraitii requested verification of this commit.Sep 23 2019, 10:45 AM
This commit now requires verification by auditors.Sep 23 2019, 10:45 AM
Freagarach added inline comments.Sep 29 2019, 4:13 PM
/ps/trunk/binaries/data/mods/public/simulation/components/Player.js
824

Should this be GetCodes()? Because it would be possible to tribute via a script.

elexis raised a concern with this commit.Feb 27 2020, 10:14 AM
elexis added a subscriber: elexis.
elexis added inline comments.
/ps/trunk/source/simulation2/components/tests/test_scripts.h
62

ricotz reported this errors out when running the tests without public mod:

In TestComponentScripts::test_global_scripts:
/build/0ad-0.0.24~r23514/source/simulation2/components/tests/test_scripts.h:62: Error: Expected ((vfs::GetPathnames(g_VFS, L"globalscripts/tests/", L"test_*.js", paths)) == INFO::OK), found (-110100 != 0)

http://irclogs.wildfiregames.com/2020-02/2020-02-27-QuakeNet-%230ad-dev.log

This commit now has outstanding concerns.Feb 27 2020, 10:14 AM
elexis removed an auditor: elexis.Apr 23 2020, 2:09 PM

Since rP23598 skips the globalscripts test if testing without public mod.

bb accepted this commit.May 1 2020, 1:10 PM

concern appears fixed

All concerns with this commit have now been addressed.May 1 2020, 1:10 PM