[13:56:12] Dominus: Marzo, I've been asked by AgentOrangeGuy if we could add an intrinsic to get the day number.
[13:56:23] Dominus: this could be easy to add like this, right?
[13:56:31] Dominus: USECODE_INTRINSIC(get_day) {
[13:56:31] Dominus: ignore_unused_variable_warning(num_parms, parms);
[13:56:31] Dominus: Usecode_value u(gclock->get_day());
[13:56:31] Dominus: return u;
[13:56:31] Dominus: }
[13:59:10] Dominus: (and alos add it to ucinternal.h, and replace an USECODE_INTRINSIC_PTR(UNKNOWN), in the *game*intrinsics.h files' UCC part)
[14:18:22] Dominus: full patch https://pastebin.com/Vjkb2quJ
[14:25:40] Marzo: And the documentation part; for consistency, I would call it game_day
[14:26:15] Marzo: For what is worth, I generally do the documentation on the Seven Towers side, then generate a text version of it, and put this generated version in Exult
[14:27:23] Dominus: so the exult_intrinsics.txt is generated from Seven Towers?
[14:27:29] Marzo: Yes
[14:27:36] Marzo: Well, mostly
[14:28:01] Marzo: In the last version, since my editor is configured to remove trailing whitespace, it ended up without trailing whitespace
[14:28:17] Marzo: But other than that, it is generated from Seven Towers
[14:29:41] Marzo: The advantage of doing it that way is that I can have clickable links in highlighted usecode that takes you to a intrinsic's documentation
[14:30:00] Marzo: As well as having a single, monolithic document with all of them
[14:30:51] Marzo: To be fair, I am thinking of redoing the whole thing in markdown nowadays
[14:31:49] Dominus: I see. I'll try to figure out how to generate this from the seven towers part and rewrite it to "game_day". Most I can trace back from what you did yesterday for close_gumps2
[14:31:57] Marzo: If you were paying attention, when I added those new intrinsics, I first made a commit to exult-web, then fixed it to work because I made some mistakes, then I made the commit to Exult
[14:33:14] Marzo: Basically, you can search for game_day intrinsic and replicate what it does
[14:35:26] Marzo: You will want to edit geshi/ucc.php for syntax highlighting, add files named usecode/intrinsics/game_day.dat and usecode/intrinsics/defs/game_day.dat based on the equivalents for game_hour, and edit usecode/reference/intrinsic_relations.dat to add game_day in the list of related entries for game_hour, game_minute, part_of_day, and advance_time, as well as adding an entry for itself
[14:37:11] Marzo: And, as I said, I would prefer the name 'game_day" for consistency with the related 'game_hour' and 'game_minute' intrinsics
[14:37:26] Marzo: And patch looks fine
[14:39:01] Marzo: For what is worth, we can have up to 65356 different intrinsics; the game:intrinsics.h files have only 256 entries, but that is not a hard limit
[14:45:21] Dominus: I *was* wondering why you added it to Seven Towers first yesterday :)
[15:04:39] Marzo: Back when I was on Linux, I would make the change locally, fire up a php server, and get the updated doc before committing
[15:04:51] Marzo: I haven't had the motivation to get that to work on Windows yet
[15:05:40] Marzo: Although I imagine I could do it in wsl instead
[17:04:03] Dominus: hmm...
[17:05:50] github-actions: exult/refs/heads/master 1c51feb1d507325a2aa20350bc3a353acccb4f0a https://github.com/exult/exult/actions/runs/1941623973 The Linux build succeeded.
[17:07:43] github-actions: exult/refs/heads/master 1c51feb1d507325a2aa20350bc3a353acccb4f0a https://github.com/exult/exult/actions/runs/1941623976 The Mac OSX build succeeded.
[17:10:01] Dominus: sooooo.... wheeee!!!! I added an intrinsic :)
[17:16:34] Dominus: Marzo: I just noticed on the Seven Towers front page: "A big thanks goes to Wizardry Dragon for hosting this site."
[17:17:34] Dominus: and the two validator links below that don't work anymore
[17:19:24] Dominus: actually seem to work now
[17:19:52] Dominus: the first one at least