Skip to content

Duplicately named and unsafe to upvalue moho functions #2

@ChessBerry

Description

@ChessBerry

Some moho functions in different files have the same name. E.g.
CSlideManipulator:SetSpeed(speed)
and
CRotateManipulator:SetSpeed(self, degrees_per_second)
are both "SetSpeed" functions. In the above case you can maybe distinguish between them by the number of arguments, but there are quite a few more of them.

From the sim part of the moho functions the duplicates are:
{'CanAttackTarget', 'GetFactionIndex', 'IsOpponentAIRunning', 'AddAgentFalloffForce', 'GetBlueprint', 'SetResourceCap', 'Stop', 'base', 'GetSkirmishBase', 'IsMoving', 'SetHeadingPitch', 'GetCurrentTargetPos', 'SetEnabled', 'GetLauncher', 'GetVelocity', 'PlaySound', 'IsEnabled', 'RemoveBuildRestriction', 'GetMaxHealth', 'CreateProjectile', 'SetSpeed', 'Destroy', 'GetPersonality', 'AddBuildRestriction', 'GetWeaponCount', 'SetAcceleration', 'AddResourceManagerType', 'SetRegenRate', 'print', 'GetHealth', 'SetGoal', 'GetPosition', 'Enable'}

"base" and "GetBlueprint" appear quite a few times, both of which we don't want to touch anyway though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions