heasm66 / mdlzork

Different versions of original mainframe Zork reconstructed and patched to run under Confusion.
15 stars 6 forks source link

Debug-commands #RECORD/#UNRECORD #60

Open heasm66 opened 2 weeks ago

heasm66 commented 2 weeks ago

Split out from issue #49.

Torbjörn Andersson wrote:

It might be useful to also have at least the #RECORD / #UNRECORD commands to save a lot of the player's actions.

I don't know about #COMMAND since it's It's already possible to pipe a text file into Confusion. Though at least when I tried it it would complain about an unexpected EOF at the end.

RECORD / #UNRECORD would be pretty simple to implement, I think. Here I've piggy-backed on SCRIPT / UNSCRIPT (so error checking isn't as strict as it should be) because I think things get hairy if both of those can be active at the same time.

Whether or not it's useful is, of course, still open to debate.


diff --git a/mdlzork_810722/patched_confusion/dung.mud b/mdlzork_810722/patched_confusion/dung.mud
index 9498983..eac0e14 100644
--- a/mdlzork_810722/patched_confusion/dung.mud
+++ b/mdlzork_810722/patched_confusion/dung.mud
@@ -3744,6 +3744,11 @@ L;"funny verbs"

<SADD-ACTION "GO-IN" TIME> ;"funny verb for room actions when entering"

+;"Debug commands" + +<SADD-ACTION "#RECO" DO-SCRIPT> +<SADD-ACTION "#UNRE" DO-UNSCRIPT> + ;"ZORK game commands"

<SADD-ACTION "BRIEF" BRIEF> diff --git a/mdlzork_810722/patched_confusion/rooms.mud b/mdlzork_810722/patched_confusion/rooms.mud index 2df516b..03f1176 100644 --- a/mdlzork_810722/patched_confusion/rooms.mud +++ b/mdlzork_810722/patched_confusion/rooms.mud @@ -402,38 +402,48 @@ <FINISH <>>> <FINISH <>>>>

-<DEFINE DO-SCRIPT ("AUX" (CH <>) (UNM ,XUNM) (MUDDLE ,MUDDLE))

-<DEFINE DO-UNSCRIPT ("OPTIONAL" (VERBOSE T))