HomeWildfire Games

Split treasures from ResourceSupply.

Description

Split treasures from ResourceSupply.

Removes some hardcoding and allows for easier modding of treasures.

Refs.: #5888
Differential revision: D3303
Comments by: @Imarok, @Nescio, @Stan, @wraitii

Event Timeline

Stan added a comment.May 5 2021, 7:46 PM

It seems TreasureCollecter should TreasureCollector the former doesn't seem to be an english word at all. Could also have been TreasureGatherer.

Oops, you're right!
Well, I've mostly chosen the Collect[e|o]r for its explicit difference from resource gathering.

Angen raised a concern with this commit.Jul 13 2021, 10:36 AM
Angen added a subscriber: Angen.
Angen added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/Treasure.js
73
This commit now has outstanding concerns.Jul 13 2021, 10:36 AM
All concerns with this commit have now been addressed.Jul 13 2021, 6:51 PM
Angen raised a concern with this commit.Aug 1 2021, 7:11 PM

Another one.
Order missing for formationcontroller causing formationcontroller going to individual state so breaking it.
https://wildfiregames.com/forum/topic/39973-a25-feedbacks-from-testing/page/15/?tab=comments#comment-444979
Steps to reproduce:

  1. make formation
  2. order to collect treasure
  3. ignored because formation controller went to individual state

bug 3.1 formation controller is out of formation controller state
bug 3.2 members are not responding until reformed with new formation

UnitAI.prototype.GetBestAttackAgainst = function(target, allowCapture)
{
	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
	if (!cmpAttack)
		return undefined;
	if (this.IsFormationController()) {
		error("Formation controller in GetBestAttackAgainst()");
		return undefined;
	}
	return cmpAttack.GetBestAttackAgainst(target, allowCapture);
};

will result in ERROR: Formation controller in GetBestAttackAgainst()

This commit now has outstanding concerns.Aug 1 2021, 7:11 PM
Angen resigned from this commit.Fri, Aug 27, 9:21 PM
Angen removed an auditor: Angen.
This commit no longer requires audit.Fri, Aug 27, 9:21 PM