Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add production support to Lua API, port gdi04a, gdi04b and intervention missions #6762

Merged
merged 6 commits into from Oct 18, 2014

Conversation

obrakmann
Copy link
Contributor

No description provided.

"If an actionFunc is given, it will be called as actionFunc(Actor[] actors) once " +
"production of all actors has been completed. The actors array is guaranteed to " +
"only contain alive actors.")]
public bool BuildMix(string[] actorTypes, LuaFunction actionFunc = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this method name. Could we remove the method above, and call this one Build instead? I don't think its unreasonable to expect scripts to call e.g. { "e1", "e1", "e1" } if they want to build multiple of a unit, as this is how the reinforcements code already works.

@pchote
Copy link
Member

pchote commented Oct 15, 2014

From a comment on the website:

There is a bug, in C&C mission selection there is a mission called "take Białystok" and on map it shows Belarus, but BIałystock is in Poland. Map from "Get the rods back (b)" is for "take Białystok"

Could you fix this here, too?

@obrakmann
Copy link
Contributor Author

updated

}

[Desc("Start repairs on this building. `repairer` can be an allied player.")]
public void RepairBuilding(Player repairer = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to rename this to BeginRepairing and add a matching EndRepairing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is scope creep for this pr, but we should also add equivalent methods for powering down and selling structures before the release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to do that in a separate pr that I had planned

@obrakmann
Copy link
Contributor Author

Updated

[Desc("Checks whether the factory is currently producing anything on the queue that produces this type of actor.")]
public bool IsProducing(string actorType)
{
var queue = queues.Where(q => GetBuildableInfo(actorType).Queue.Contains(q.Info.Type)).FirstOrDefault();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have issues if there are multiple queues of the same type on the actor. I suggest something like:

if (triggers.Triggers[Trigger.OnProduction].Any())
    return true;

return queues.Where(q => GetBuildableInfo(actorType).Queue.Contains(q.Info.Type))
    .Any(q => queue.CurrentItem() != null);

@pchote
Copy link
Member

pchote commented Oct 17, 2014

Error in GDI04a, after moving units into the Nod base after first destroying the hand of nod from the ridge:
Exception of typeEluant.LuaException: [string "BindingSupport.lua"]:30: Actor 'hand (dead)' does not define a property 'Build'.

@pchote
Copy link
Member

pchote commented Oct 17, 2014

The three chinooks that are triggered in GDI04b will land on top of each other.
screen shot 2014-10-18 at 11 00 44

@pchote
Copy link
Member

pchote commented Oct 17, 2014

GDI04B has the same issue with dead hand.

@obrakmann
Copy link
Contributor Author

Updated

@pchote
Copy link
Member

pchote commented Oct 18, 2014

👍 for the C# code, and tested (and successfully completed) the GDI04 missions. I haven't put a lot of effort into testing Intervention.

@Mailaender
Copy link
Member

Needs a rebase and some adjustments due to #6776.

@abcdefg30
Copy link
Member

You should disable engineer bridge repair on intervention.
interventionbridge

@Mailaender
Copy link
Member

As I said in IRC this should be fixed in general #4354. We will probably want to fix the bridge linking here instead in the map. There is a valid reason to go to the village and station some AA troops.

@obrakmann
Copy link
Contributor Author

Updated and rebased. Removed the bridge repair ability from e6s and added a try/catch block to the new trigger.

@Mailaender
Copy link
Member

I just got stuck on the main island on Intervention with no buildings I could sell:

image

Nevermind: I forgot to harvest on the start island.

@Mailaender
Copy link
Member

👍 on the trigger scripting. The winning scenario works fine.

Mailaender added a commit that referenced this pull request Oct 18, 2014
Add production support to Lua API, port gdi04a, gdi04b and intervention missions
@Mailaender Mailaender merged commit c7a9be9 into OpenRA:bleed Oct 18, 2014
@Mailaender
Copy link
Member

Lua API changes

@Mailaender
Copy link
Member

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants