View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0001196 | OpenClonk | Engine - C4Script | public | 2014-12-28 20:02 | 2014-12-28 21:19 | ||||||||
Reporter | Maikel | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | feature | Reproducibility | N/A | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0001196: Assign values to local variables using functions | ||||||||||||
Description | This would allow for cleaner code like this: local PictureTransformation = Trans_Mul(Trans_Rotate(25, 0, 1, 0), Trans_Scale(625)); Instead of this: protected func Definition(def) { SetProperty("PictureTransformation", Trans_Mul(Trans_Rotate(25, 0, 1, 0), Trans_Scale(625)), def); } | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
![]() |
|
Sven2 (developer) 2014-12-28 21:16 Last edited: 2014-12-28 21:19 |
Sounds potentially very error-prone, since such functions could not use local variables themselves. Also, consider e.g.: local foo = Random(100); That would mean script engine initialization would affect and depend on the sync state, which might cause difficulties on stuff like network runtime join synchronization. So it's probably not hard to implement, but might introduce subtle bugs if not done right. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-28 20:02 | Maikel | New Issue | |
2014-12-28 21:16 | Sven2 | Note Added: 0003297 | |
2014-12-28 21:19 | Sven2 | Note Edited: 0003297 | View Revisions |