Times are UTC Toggle Colours
01:41:22 *** dihedral has quit IRC 01:49:07 *** dihedral has joined #openttd.dev 07:55:07 *** Supercheese has quit IRC 08:03:46 *** Alberth has joined #openttd.dev 08:03:46 *** ChanServ sets mode: +v Alberth 12:08:24 *** frosch123 has joined #openttd.dev 12:08:24 *** ChanServ sets mode: +v frosch123 13:09:42 *** frosch has joined #openttd.dev 13:12:16 *** frosch123 has quit IRC 13:35:48 <Alberth> http://devs.openttd.org/~alberth/diffs/1_add_positioned_news.patch 13:40:23 *** DorpsGek sets mode: +v frosch 13:40:26 <frosch> hmm, i am comparing it to ScriptGoal::New 13:41:14 <frosch> either we should add multiple functions to ScriptGoal instead of using the GoalTpe enum 13:41:21 <frosch> or the news function should use a similar enum 13:42:59 <frosch> ScriptSotryPAge::NewElement also uses an enum 13:45:38 <frosch> functions using "tiles" seem to be named "Location" in most cases, instead of "Position" 13:46:41 <frosch> possibly, instead of adding new funtions, we can extent the old functions, and provide a compatibility thingie in the compat scripts 13:49:37 <Alberth> goaltype-like approach would work too 13:51:55 <frosch> i think i prefer extending the existing function with parameters, and adding a wrapper in the compat_*.nut files 13:52:25 <frosch> also, ScriptStoryPage::UpdateElement looks weird 13:52:36 <frosch> it updates the reference id, but not the type 13:53:16 <frosch> though i do not see a way to fix that in a compatible way 13:54:53 <Alberth> k, will change it, and see what happens :) 14:01:25 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27157 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 14:10:44 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27158 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 14:12:34 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27159 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 14:14:31 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27160 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 14:42:34 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27161 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 14:51:16 <Alberth> should the call still silently drop the reference if it is not valid? 14:52:20 <Alberth> hmm, doesn't make much sense I guess, the text will still talk about that reference 14:54:09 <frosch> problem is that scripts to not really notice when a reference becomes invalid 14:54:38 <frosch> a industry may close just in the moment between the script scanning all industries and updating the news 15:05:49 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27162 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 15:07:20 <Alberth> indeed, but should it skip publishing in such a case, or publish anyway? 15:08:09 <Alberth> it doesn't make a lot of sense, so perhaps not 15:08:18 <frosch> i believe industry closure deletes news referencing to it 15:08:34 <frosch> so, i guess ottd should drop new items with invaild references 15:08:51 <frosch> that way the behaviour is the same if the industry closes 1 tick before/after adding the news item :p 15:09:25 <Alberth> if (!IsValidTile(p2)) return CMD_ERROR; <-- it checks the reference in the command 15:09:40 <Alberth> and refuses to publish it thus 15:10:22 <frosch> ah, so it even tells the script in the return value :) 15:10:42 <Alberth> assuming the referenced thing is mentioned in the news, that would fail too 15:10:52 <Alberth> haven't checked what happens there 15:11:08 <frosch> in the past ottd crashed :p 15:11:34 <frosch> since scripts and since strings from scripts are stored in the save, there are "<invalid thingie>" fallbacks everywhere 15:14:22 <Alberth> doesn't seem to do anything special with invalid references in the parameters 15:18:41 <Alberth> well, since the news system is rejecting it anyway, let's reject the message without ever reaching the cmd code. 15:26:28 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27163 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 15:46:28 <Alberth> should GSController.GetVersion return a 1.5 version if you have eg 1.4 compatibility enabled? 15:49:09 <frosch> why not, returning the script's own value from Info.GetAPIVersion makes no sense 15:49:22 <frosch> s/,/?/ 15:49:29 <frosch> i have a terrible typing day today :) 15:53:07 <Alberth> fair enough 15:55:13 <frosch> oh, also, the 1.4 compatibility does not disable the new 1.5 functions 15:55:20 <frosch> i believe some scripts check the version 15:55:29 <frosch> to use new functions or fall back to older ones 15:55:41 <frosch> but you probably would have to ask zuu about that :) 15:58:00 <Alberth> that's why I was wondering, I do remove the old news function https://paste.openttdcoop.org/pds9lk4i3 line 10 and further 15:58:10 <Alberth> s/old/new/ 15:58:34 <Alberth> assuming that code actually works :p 15:59:34 <frosch> yeah, the compat scripts are funny :p 15:59:57 <frosch> copying a native-function-reference into some placeholder name 16:00:17 <frosch> and then redefining it with something new, which calls the real one again 16:00:23 <Alberth> functions are just first citizens 16:02:11 <Alberth> thus if you check the actual program version, you have to consider the compatibility setting into consideration as well to know what to call :) 16:04:18 <Alberth> such fun! :p 16:04:35 <Alberth> I'll ask Zuu some time :) 16:58:41 <Alberth> http://devs.openttd.org/~alberth/diffs/1_add_positioned_news.patch updated patch 17:08:29 <frosch> looks nice :) 17:09:24 <Alberth> should be took a whole day :p 17:25:30 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27164 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 17:45:18 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27165 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 21:14:39 *** Alberth has left #openttd.dev 23:04:03 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27166 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 23:06:46 *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r27167 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking" 23:22:51 *** frosch has quit IRC