-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
Enemy module pt1 #566
Enemy module pt1 #566
Conversation
!DEBUG! !TODO! !NOTE!
// Handle requested infantry | ||
if !(_troops > (_garrison select 2)) then { | ||
// Define one infantry squad for transport | ||
private _squadComp = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should provide some more immersive groups in a later stage.
Leader
Medic
AA/AT
MG
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just for moving amount of infantry from A to B.
For "battlegroups" or similar it'll be dynamic like in the old framework.
// Check via config for enough transport seats and return resulting array | ||
private _validVeh = []; | ||
{ | ||
if ((getNumber (configfile >> "CfgVehicles" >> _x >> "transportSoldier")) >= _amount) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config lookups are performance costly, it could be saved in some namespace, take a look at KPLIB_fnc_common_getIcon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a speed check for pt2 and adjust it, if it's a huge improvement. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, hope it'll work as intended :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config caching thing is minor issue.
LGTM
Description:
As stated in the issue itself, this provides the first part of the enemy module to provide a basic foundation for the future iterations. The currently implemented functions to transfer garrisons can be tested via the debug console.
Example for transfering units from the Feres Outpost military base to Feres:
There is still some rare occurances of "vehicle spawn explosion", even if there is always a "is something already there" check. My assumption is, that it's caused by the fact that we keep calling the spawning, so it maybe can't recognize it sometimes, that there is a vehicle spawned directly before the current one. Would be interesting to test this in the next sprint and maybe find a way to have it running in a capsuled scheduled environment. Reason for this assumption is, that the spawning in general is handled like in the old framework. The only real difference is the (un-)scheduled environment where the spawning happen.
Furthermore this PR contains smaller tweaks outside of the module and a example module structure as template for creating new modules.
Content:
Successfully tested on:
Compatibility checked with: