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 SetComputerBarrier #1684

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

kubaau
Copy link
Contributor

@kubaau kubaau commented Jul 23, 2024

Adds SetComputerBarrier LUA function which works like !GLOBAL_SET_COMPUTER_BARRIER did in S2 RTX scripts. This makes it possible to script old campaigns much more simply than with the tools previously available.

Flow86
Flow86 previously approved these changes Jul 23, 2024
@kubaau
Copy link
Contributor Author

kubaau commented Jul 23, 2024

Force-pushed clang-tidy fix:

-for(auto bldSite : bldSites)
+for(noBuildingSite* bldSite : bldSites)

@Flow86
Copy link
Member

Flow86 commented Jul 25, 2024

Force-pushed clang-tidy fix:

-for(auto bldSite : bldSites)
+for(noBuildingSite* bldSite : bldSites)

you still can use auto - but you have to use auto* bldSite : bldSites) to make tidy happy

Flow86
Flow86 previously approved these changes Jul 25, 2024
@Spikeone
Copy link
Member

It'd be great to: have this in multiplayer (if that doesn't already work), for players and a "lift" function as well, that way one could "nicely" block a player in a custom campaign

@kubaau
Copy link
Contributor Author

kubaau commented Jul 26, 2024

It'd be great to: have this in multiplayer (if that doesn't already work), for players and a "lift" function as well, that way one could "nicely" block a player in a custom campaign

This implementation only works for AIs. Implementing this for each player (or lifting restrictions) would not be difficult, but this particular implementation is only basically a mirror of S2 campaign AI behavior.

@Flamefire Flamefire merged commit ed50fcd into Return-To-The-Roots:master Sep 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants