Skip to content

Get, set, browse team colors with Lua#6832

Merged
JohnAFernandez merged 2 commits into
scp-fs2open:masterfrom
MjnMixael:team_colors_followup
Jul 26, 2025
Merged

Get, set, browse team colors with Lua#6832
JohnAFernandez merged 2 commits into
scp-fs2open:masterfrom
MjnMixael:team_colors_followup

Conversation

@MjnMixael

@MjnMixael MjnMixael commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

Proper follow-up to #6802 which was a quick and dirty way to get the basic features BtA wanted in 25.0.0. Since the feature freeze still hasn't started and I'm back from 2 weeks of vacation, here's a proper follow-up that fully implements Team Colors in Lua. Browse available colors in tb.TeamColors with the following members.

  • Name (string)
  • BaseColor (color object)
  • StripeColor (color object)

ParsedObjects and Ships can get and set the team color (the latter is instant. A FUNC would be needed to allow the fade, but there's already a SEXP for that so I opted to skip it for now).

The render methods now take a team color object rather than a team color string name. Since this has only been in the API for a few days, I'm thinking this is an ok change.

EDIT: I'm hopeful this can make the 25.0.0 cut for BtA.

@MjnMixael MjnMixael added scripting A feature or issue related to LUA scripting Requested by Active Mod A feature request that has been requested by a mod that is actively in development. labels Jul 14, 2025
@MjnMixael MjnMixael added this to the Release 25.0 milestone Jul 14, 2025

@JohnAFernandez JohnAFernandez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is actually pretty straightforward. It looks big, but it's mostly just changing to object instead of strings.

@wookieejedi

Copy link
Copy Markdown
Member

Will plan to merge this later today

@JohnAFernandez JohnAFernandez merged commit b49dbfe into scp-fs2open:master Jul 26, 2025
20 checks passed
@MjnMixael MjnMixael deleted the team_colors_followup branch July 26, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Requested by Active Mod A feature request that has been requested by a mod that is actively in development. scripting A feature or issue related to LUA scripting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants