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 lua functions for Ion Cannon and Nuclear Missile #14790

Merged
merged 2 commits into from Jul 4, 2018

Conversation

Projects
None yet
5 participants
@MustaphaTR
Copy link
Member

MustaphaTR commented Feb 6, 2018

Testcases adds a nuke to RA shellmap and ion cannon firing on Nod9.

@abcdefg30

This comment has been minimized.

Copy link
Member

abcdefg30 commented Feb 6, 2018

This was once rejected at #11030.

@MustaphaTR

This comment has been minimized.

Copy link
Member Author

MustaphaTR commented Feb 6, 2018

I think this worths to add to be later removed, because i don't think normal weapons/armaments for nuke and ion cannon will happen soon.

@GraionDilach

This comment has been minimized.

Copy link
Contributor

GraionDilach commented Feb 6, 2018

TBH, the AttackOrderPower implementation and setup are terrible, so I wouldn't suggest using it for a global setup (besides, AS-FireArmamentPower just tops it in many areas).

@pchote
Copy link
Member

pchote left a comment

It seems unlikely that these powers will be removed any time soon, so we may as well implement support for mappers in the meantime.

SendIonCannon(self, order.TargetLocation);
}

public void SendIonCannon(Actor self, CPos targetLocation)

This comment has been minimized.

@pchote

pchote May 21, 2018

Member

Can we please call this Activate(Actor self, CPos targetLocation) instead?

SendNuke(self, self.World.Map.CenterOfCell(order.TargetLocation));
}

public void SendNuke(Actor self, WPos targetPosition)

This comment has been minimized.

@pchote

pchote May 21, 2018

Member

Can we please call this Activate(Actor self, CPos targetLocation) instead?

}

[Desc("Activate the actor's IonCannonPower.")]
public void SendIonCannon(CPos target)

This comment has been minimized.

@pchote

pchote May 21, 2018

Member

Can we please call this ActivateIonCannon instead?

}

[Desc("Activate the actor's NukePower.")]
public void SendNuke(CPos target)

This comment has been minimized.

@pchote

pchote May 21, 2018

Member

Can we please call this ActivateNukePower instead?

@MustaphaTR MustaphaTR force-pushed the MustaphaTR:ion-nuke-lua branch from 4e91f17 to 2eac68f May 21, 2018

@MustaphaTR

This comment has been minimized.

Copy link
Member Author

MustaphaTR commented May 21, 2018

Updated.

@GraionDilach
Copy link
Contributor

GraionDilach left a comment

👍

@@ -176,6 +176,10 @@ WorldLoaded = function()
soviets = Player.GetPlayer("Soviets")
viewportOrigin = Camera.Position

Trigger.AfterDelay(DateTime.Seconds(10), function()
MissileSilo.SendNuke(Actor303.Location)

This comment has been minimized.

@Mailaender

Mailaender Jul 1, 2018

Member
Fatal Lua Error: [string "BindingSupport.lua"]:30: Actor 'mslo' does not define a property 'SendNuke'
  at OpenRA.Scripting.ScriptContext.FatalError (System.String message) [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Mods.Common.Scripting.TriggerGlobal+<AfterDelay>c__AnonStorey0.<>m__0 () [0x00000] in <8519c22846ec4f12b51f5d7177d1eefa>:0 
  at OpenRA.Effects.DelayedAction.<Tick>m__0 (OpenRA.World w) [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.World.Tick () [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Game.InnerLogicTick (OpenRA.Network.OrderManager orderManager) [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Game.LogicTick () [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Game.Loop () [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Game.Run () [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Game.InitializeAndRun (System.String[] args) [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0 
  at OpenRA.Program.Main (System.String[] args) [0x00000] in <4dbc9595f4ec4242bf7648a430506bc4>:0

This comment has been minimized.

@Mailaender

Mailaender Jul 1, 2018

Member

Changing it to ActivateNukePower fixes it.

This comment has been minimized.

@MustaphaTR

MustaphaTR Jul 1, 2018

Author Member

I renamed the properties as pchote wanted but forgot to update testcase. Shouldn't be much problem as it is just testcase. Can you test by manually updating it?

Edit: Yeah, it should. As i said just wrong on part of testcase and not really related to PR itself.

@Mailaender

This comment has been minimized.

Copy link
Member

Mailaender commented Jul 1, 2018

Works as promised. ✔️ Waiting for the testcases to be removed.

@MustaphaTR MustaphaTR force-pushed the MustaphaTR:ion-nuke-lua branch from 2eac68f to f024da7 Jul 2, 2018

@MustaphaTR

This comment has been minimized.

Copy link
Member Author

MustaphaTR commented Jul 2, 2018

Updated, removed the testcase.

@Mailaender Mailaender merged commit 51c207d into OpenRA:bleed Jul 4, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Mailaender

This comment has been minimized.

Copy link
Member

Mailaender commented Jul 4, 2018

@MustaphaTR MustaphaTR deleted the MustaphaTR:ion-nuke-lua branch Jul 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.