Skip to content

Comments

Expand utils.lua isObjectType()#2733

Open
oznogon wants to merge 3 commits intodaid:masterfrom
oznogon:expand-isobjecttype
Open

Expand utils.lua isObjectType()#2733
oznogon wants to merge 3 commits intodaid:masterfrom
oznogon:expand-isobjecttype

Conversation

@oznogon
Copy link
Contributor

@oznogon oznogon commented Feb 20, 2026

Stacks on #2732.

  • Detect ExplosionEffect and ElectricExplosionEffect components.
  • Replace color, mesh, and radar trace image checks with component
    property checks.
    • Asteroids are distinguished by Spin and AvoidObject component
      presence instead of mesh path substring check for Astroid
    • Visual Asteroids are distinguished by Spin and lack of
      AvoidObject
    • BlackHoles and WormHoles are distinguished by Gravity component
      damage and wormhole_target properties, instead of by
      BillboardRender texture value
    • SupplyDrops are distinguished by containing Pickup component
      give_* properties with > 0 values, instead of by radar_trace.icon
      being blip.png and radar_trace.color_by_faction being true
    • Missiles and Mines use MissileFlight, MissileHoming, and
      ExplodeOnTimeout (exposed by Expose missile-related components #2732) instead of radar_trace.icon
      and radar_trace.color
  • Reorganize if/elseif structure.

- Detect ExplosionEffect and ElectricExplosionEffect components.
- Replace color, mesh, and radar trace image checks with component
  property checks.
  - Asteroids are distinguished by Spin and AvoidObject component
    presence instead of mesh path substring check for Astroid
  - Visual Asteroids are distinguished by Spin and lack of
    AvoidObject
  - BlackHoles and WormHoles are distinguished by Gravity component
    damage and wormhole_target properties, instead of by
    BillboardRender texture
  - SupplyDrops are distinguished by containing Pickup component
    give_* properties with > 0 values, instead of by radar trace
    being blip.png and radar_trace.color_by_faction being true
  - Missiles and Mines use MissileFlight, MissileHoming, and
    ExplodeOnTimeout instead of radar_trace.icon and
    radar_trace.color
- Reorganize if/elseif structure.
@oznogon oznogon force-pushed the expand-isobjecttype branch from 0881d9f to 1239da6 Compare February 20, 2026 01:15
@oznogon oznogon marked this pull request as draft February 20, 2026 01:15
@oznogon oznogon marked this pull request as ready for review February 21, 2026 21:16
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.

1 participant