Skip to content

Keyvalues / properties from data files return incorrect color values. #346

Description

@vinci6k

Running the following script on dm_runoff in HL2DM:

# ../fog_test/fog_test.py

# Source.Python
from entities.entity import Entity


fog = Entity.find('env_fog_controller')
prop_color = fog.get_property_color('m_fog.colorSecondary')


print(f'prop: {prop_color}\nkeyv: {fog.fog_color2}')

Gives these results:

prop:FFFFFF00
keyv:FF95FF00

When I added m_fog.colorSecondary to CFogController.ini, I was getting the raw color value (long) instead of a Color instance.
So then I hardcoded the property to use Color as the type - turns out that returns the same value as the above mentioned keyvalue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions