-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #274: Force light_environment to use the required SunSpreadAngle …
…casing.
- Loading branch information
1 parent
80a75a9
commit c03754a
Showing
4 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""This keyvalue is case-sensitive, force the required casing.""" | ||
from hammeraddons.bsp_transform import Context, trans | ||
|
||
|
||
@trans('FGD - Fix Sun Spread Angle') | ||
def light_sun_spread_angle(ctx: Context) -> None: | ||
"""Force case-sensitivity on this keyvalue.""" | ||
for ent in ctx.vmf.by_class['light_environment'] | ctx.vmf.by_class['light_directional']: | ||
ent['SunSpreadAngle'] = ent.pop('sunspreadangle') | ||
print(dict(ent.items())) |