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

Mission API #2809

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft

Mission API #2809

wants to merge 18 commits into from

Conversation

WatchTheFort
Copy link
Member

Work done

@Psyborg8's work done on the mission API:

  • Implement additional triggers and actions
  • Refactor trigger and action parameter checking code
  • Lots of code cleanup

Test steps

  • Enable the main mission API gadget api_missions
  • Start up a skirmish against an InactiveAI
  • Check that the triggers and actions in singleplayer/test_mission.lua are hit

Psyborg8 and others added 18 commits January 12, 2024 13:44
- Removed all allocations and string concatenation made in widget:DrawScreen, the messages never change after game start so this was unnecessary
- Moved scaling calculations  from widget:DrawScreen to widget:ViewResize. This is the only time the size will change

Reduced runtime allocation to 0, from ~1500 kB/s, and reduced usage by ~1%
- Fixed styling
- Blink was repeatedly reformatting string each frame unnecessarily
- spawnUnits and despawnUnits now handle quanitity
- Added validation checking for unit, unitDef, vec3 and direction parameter types
- Added actions_defs.lua for storing parameter enums
- TrackedUnits is now always an array to simplify implementations, and allow single units to be added to a tracked name
Implemented UnitExists, UnitNotExists, UnitKilled, UnitCaptured, UnitEnteredLocation, ConstructionStarted and Construction Finished triggers
Implemented Custom action
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.

None yet

2 participants