https://wiki.wesnoth.org/index.php?title=LuaAPI/wesnoth/schedule&feed=atom&action=history
LuaAPI/wesnoth/schedule - Revision history
2024-03-29T08:36:59Z
Revision history for this page on the wiki
MediaWiki 1.31.16
https://wiki.wesnoth.org/index.php?title=LuaAPI/wesnoth/schedule&diff=68291&oldid=prev
Celtic Minstrel: Add context specifiers to each entry
2021-07-04T23:35:59Z
<p>Add context specifiers to each entry</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 23:35, 4 July 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l4" >Line 4:</td>
<td colspan="2" class="diff-lineno">Line 4:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== wesnoth.schedule.get_time_of_day ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== wesnoth.schedule.get_time_of_day ===</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* '''wesnoth.schedule.get_time_of_day'''(''reference'', [''for turn'']) &rarr; ''time of day info''</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <ins class="diffchange diffchange-inline">{{LuaGameOnly}} </ins>'''wesnoth.schedule.get_time_of_day'''(''reference'', [''for turn'']) &rarr; ''time of day info''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Returns the schedule information. The ''reference'' can be any of the following:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Returns the schedule information. The ''reference'' can be any of the following:</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l40" >Line 40:</td>
<td colspan="2" class="diff-lineno">Line 40:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== wesnoth.schedule.get_illumination ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== wesnoth.schedule.get_illumination ===</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* '''wesnoth.schedule.get_illumination'''(''location'', [''for turn'']) &rarr; ''time of day info''</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <ins class="diffchange diffchange-inline">{{LuaGameOnly}} </ins>'''wesnoth.schedule.get_illumination'''(''location'', [''for turn'']) &rarr; ''time of day info''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Like '''get_time_of_day''', but also accounts for modifiers from unit illumination or terrain lighting on the passed hex. The parameters accepted are the same, but if passed nil or a time area ID, it will return the exact same information that '''get_time_of_day''' returns.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Like '''get_time_of_day''', but also accounts for modifiers from unit illumination or terrain lighting on the passed hex. The parameters accepted are the same, but if passed nil or a time area ID, it will return the exact same information that '''get_time_of_day''' returns.</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l48" >Line 48:</td>
<td colspan="2" class="diff-lineno">Line 48:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== wesnoth.schedule.replace ===</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== wesnoth.schedule.replace ===</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* '''wesnoth.schedule.replace'''(''new schedule'')</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <ins class="diffchange diffchange-inline">{{LuaGameOnly}} </ins>'''wesnoth.schedule.replace'''(''new schedule'')</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Replaces the global scenario schedule with a new schedule.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Replaces the global scenario schedule with a new schedule.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Lua Reference]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Lua Reference]]</div></td></tr>
</table>
Celtic Minstrel
https://wiki.wesnoth.org/index.php?title=LuaAPI/wesnoth/schedule&diff=68184&oldid=prev
Celtic Minstrel: Categorize
2021-06-30T02:29:33Z
<p>Categorize</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 02:29, 30 June 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l51" >Line 51:</td>
<td colspan="2" class="diff-lineno">Line 51:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Replaces the global scenario schedule with a new schedule.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Replaces the global scenario schedule with a new schedule.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Lua Reference]]</ins></div></td></tr>
</table>
Celtic Minstrel
https://wiki.wesnoth.org/index.php?title=LuaAPI/wesnoth/schedule&diff=68140&oldid=prev
Celtic Minstrel: Document wesnoth.schedule
2021-06-25T02:37:25Z
<p>Document wesnoth.schedule</p>
<p><b>New page</b></p><div><br />
The <tt>schedule</tt> module contains functions to query and manipulate the time of day schedule. In addition to the functions in this module, the [[../#wesnoth.current|wesnoth.current.schedule]] object represents the active schedule itself.<br />
<br />
=== wesnoth.schedule.get_time_of_day ===<br />
<br />
* '''wesnoth.schedule.get_time_of_day'''(''reference'', [''for turn'']) &rarr; ''time of day info''<br />
<br />
Returns the schedule information. The ''reference'' can be any of the following:<br />
<br />
* a location - returns the information for that hex, accounting for any time areas<br />
* a time area ID - returns the information for that time area<br />
* nil - returns the information for the global scenario schedule<br />
<br />
The second parameter is the turn number for which to return the information, which defaults to the current turn. This function does not account for any illumination type effects (either unit abilities or terrain lighting) that might alter the effective time of day - use [[#wesnoth.schedule.get_illumination|get_illumination]] instead if you need that.<br />
<br />
The function returns a table with these named fields:<br />
<br />
* ''time_of_day''.'''id''' &rarr; ''ID''<br />
<br />
The ID of the [time] tag.<br />
<br />
* ''time_of_day''.'''lawful_bonus''' &rarr; ''bonus''<br />
<br />
The lawful bonus on this hex.<br />
<br />
* ''time_of_day''.'''bonus_modified''' &rarr; ''bonus''<br />
<br />
The difference between '''lawful_bonus''' and the base lawful bonus from the [time] tag. For '''get_time_of_day''', this is always 0, but for '''get_illumination''', it may be non-zero.<br />
<br />
* ''time_of_day''.'''red''' &rarr; ''integer''<br />
* ''time_of_day''.'''green''' &rarr; ''integer''<br />
* ''time_of_day''.'''blue''' &rarr; ''integer''<br />
* ''time_of_day''.'''image''' &rarr; ''image path''<br />
* ''time_of_day''.'''mask''' &rarr; ''image path''<br />
* ''time_of_day''.'''sound''' &rarr; ''sound path''<br />
* ''time_of_day''.'''name''' &rarr; ''visible name''<br />
<br />
All the information on how the time of day is shown to the player.<br />
<br />
=== wesnoth.schedule.get_illumination ===<br />
<br />
* '''wesnoth.schedule.get_illumination'''(''location'', [''for turn'']) &rarr; ''time of day info''<br />
<br />
Like '''get_time_of_day''', but also accounts for modifiers from unit illumination or terrain lighting on the passed hex. The parameters accepted are the same, but if passed nil or a time area ID, it will return the exact same information that '''get_time_of_day''' returns.<br />
<br />
This only considers modifiers based on the current state of the map. If you wanted to perform a "what if" check to determine what the illumination would become after a unit moves, you would need to move the unit, call this function, and then move it back where it started. Similarly, if you wanted to consider the illumination after a hypothetical terrain change, you would need to change the terrain, call the function, and then change it back.<br />
<br />
=== wesnoth.schedule.replace ===<br />
<br />
* '''wesnoth.schedule.replace'''(''new schedule'')<br />
<br />
Replaces the global scenario schedule with a new schedule.</div>
Celtic Minstrel