Mercurial > hg > batmud > ggrtf
annotate gm-rpouch.tf @ 1686:db1a3e72c1d1 default tip
Update to match in-game changes ('help item conditions').
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 18 May 2024 21:25:57 +0300 |
parents | 356c3c26aee6 |
children |
rev | line source |
---|---|
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 ;; |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 ;; GgrTF::RegPouch - Reagent pouch management and liting |
1655
356c3c26aee6
Get rid of ISO-8859-1 in copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
3 ;; (C) Copyright 2008-2015 Matti Hamalainen (Ggr) |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 ;; |
1454
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
6 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
7 ;; This program is free software; you can redistribute it and/or |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
8 ;; modify it under the terms of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
9 ;; version 2 as published by the Free Software Foundation. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
10 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
11 ;; This program is distributed in the hope that it will be useful, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
14 ;; file "COPYING.txt" for more details. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
15 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
16 ;; You should have received a copy of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
17 ;; along with this program; if not, write to the Free Software |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
19 ;; MA 02110-1301 USA. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
20 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1392
diff
changeset
|
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 ;; |
1276
51c340df904a
Update copyrights, version requirements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1035
diff
changeset
|
23 ;; NOTICE! This file requires GgrTF (version 0.6.15 or later) to be loaded. |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 ;; |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 /loaded GgrTF::RegPouch |
1035
c10f8a59a2e3
Use module depencies for checking required parent modules.
Matti Hamalainen <ccr@tnsp.org>
parents:
1026
diff
changeset
|
26 /test prdefmodule("RegPouch") |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 ;; Bindings and settings |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 /prdeftoggle -n"reglite" -d"Lite/prettify reagent pouch" |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 /set opt_reglite=on |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 /prdefgbind -s"rpouch" -c"/rpouch" |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 ;; Helper for reagent pouch |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 /set rpouch_get=0 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 /set rpouch_regs= |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 |
1392
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
44 /def -i grpouch_close =\ |
1334 | 45 /if (rpouch_save!~"" & rpouch_save >= 0)\ |
46 /test tfclose(rpouch_save)%;\ | |
1392
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
47 /set rpouch_save=-1%;\ |
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
48 /endif |
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
49 |
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
50 /def -i -F -msimple -t"It is labeled as 'pussi'." grpouch_fgrab =\ |
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
51 /grpouch_close%;\ |
1334 | 52 /set rpouch_save=$[tfopen(strcat(HOME,"/public_html/reagents.txt"),"w")] |
53 | |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 /def -i grpouch_report =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 /if (regmatch("^[0-9]+$",{1}))\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 /let _nval=%{1}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 /elseif ({1}=~"One") /let _nval=1%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 /elseif ({1}=~"Two") /let _nval=2%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
59 /elseif ({1}=~"Three") /let _nval=3%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 /elseif ({1}=~"Four") /let _nval=4%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 /elseif ({1}=~"Five") /let _nval=5%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 /elseif ({1}=~"Six") /let _nval=6%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 /elseif ({1}=~"Seven") /let _nval=7%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
64 /elseif ({1}=~"Eight") /let _nval=8%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
65 /elseif ({1}=~"Nine") /let _nval=9%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
66 /else /gerror Invalid value in '%{1}' in grpouch_report(%{*})%;/break%;/endif%;\ |
1024
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
67 /set rpouch_total_pwr=$[rpouch_total_pwr + {2}]%;\ |
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
68 /set rpouch_total_std=$[rpouch_total_std + {3}]%;\ |
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
69 /set rpouch_total_por=$[rpouch_total_por + {4}]%;\ |
1334 | 70 /if (rpouch_save!~"" & rpouch_save >= 0)\ |
71 /let _line=%{2}|%{6}%;\ | |
72 /test tfwrite(rpouch_save, _line)%;\ | |
73 /endif%;\ | |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
74 /if (rpouch_get)\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
75 /set rpouch_%{rpouch_name}_%{7}=%{2}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
76 /substitute -ag%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
77 /else \ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
78 /if (opt_reglite=~"on")\ |
1603
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
79 /if (regmatch("^(Electrocution|Lava Blast|Golden Arrow|Acid Blast|Cold Ray|Summon Carnal Spores|Blast Vacuum)$", {6}))\ |
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
80 /let _nmcol=@{BCgreen}%;\ |
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
81 /elseif (regmatch("^(Lava Storm|Magic Eruption|Lightning Storm|Acid Storm|Hailstorm|Killing Cloud|Vacuum Globe)$", {6}))\ |
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
82 /let _nmcol=@{Cred}%;\ |
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
83 /else \ |
1604 | 84 /let _nmcol=@{BCblue}%;\ |
1603
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
85 /endif%;\ |
b3c55b5994a6
Improve reagent pouch mangler output by using different colours for
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
86 /substitute -p @{BCyellow}$[pad(_nval,6)]@{n} | %{_nmcol}$[pad({6},-25)]@{n} (@{BCred}$[pad({2},6)]@{n},@{Cgreen}$[pad({3},5)]@{n},@{Cyellow}$[pad({4},5)]@{n}) @{BCgray}($[prsubstr({8},columns()-55)])@{n}%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
87 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
88 /endif |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
89 |
1334 | 90 /def -i -Erpouch_get -p9999 -F -mregexp -t"^(It looks .*(heavy|weight)\.|This is a large pouch for the storing of reagents|reagents over reboots in this.|Syntax: store <item> in <this>| +extract .amount. <item>| +set_default_reagent|transfer .number. .reagent.|Some commands allow the use of|It is labeled as |The label can be set with |[Ii]t is surrounded by )" grpouch_gag =\ |
1026 | 91 /set rpouch_st=0%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
92 /substitute -ag |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
93 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
94 /def -i -p9999 -F -msimple -t"The pouch contains:" grpouch_start =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 /set rpouch_st=1%;\ |
1024
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
96 /set rpouch_total_pwr=0%;\ |
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
97 /set rpouch_total_std=0%;\ |
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
98 /set rpouch_total_por=0%;\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
99 /substitute -ag |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
100 |
1334 | 101 /def -i -Erpouch_get -p999 -F -msimple -t"You see nothing special." grpouch_end2 =\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
102 /set rpouch_st=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
103 /set rpouch_get=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
104 /msq @{BCred}No such reagent pouch@{n} '@{BCgreen}%{rpouch_target}@{n}'! |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
105 |
938 | 106 /def -i -p999 -F -mregexp -t"^This item is in " grpouch_end =\ |
1392
2e1e5d2d4ce7
rpouch: Fix the occasional "tfclose: : bad handle" error when handling random containers.
Matti Hamalainen <ccr@tnsp.org>
parents:
1334
diff
changeset
|
107 /grpouch_close%;\ |
1025
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
108 /if (rpouch_st & !rpouch_get)\ |
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
109 /let _nval=$[rpouch_total_pwr + rpouch_total_std + rpouch_total_por]%;\ |
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
110 /if (opt_reglite=~"on")\ |
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
111 /echo -p @{BCyellow}$[pad(_nval,6)]@{n} | @{BCgreen}$[pad("TOTAL",-25)]@{n} (@{BCred}$[pad(rpouch_total_pwr,6)]@{n},@{Cgreen}$[pad(rpouch_total_std,5)]@{n},@{Cyellow}$[pad(rpouch_total_por,5)]@{n})%;\ |
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
112 /else \ |
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
113 /echo -p Total: @{BCwhite}%{rpouch_total_pwr} power@{n}, %{rpouch_total_std} standard, %{rpouch_total_por} poor.%;\ |
b88f3e77d0b4
Fix showing of total values only to be printed when actually handling a reagent pouch.
Matti Hamalainen <ccr@tnsp.org>
parents:
1024
diff
changeset
|
114 /endif%;\ |
1024
1ad897c55386
Add showing of total number of reagents (power, standard, poor).
Matti Hamalainen <ccr@tnsp.org>
parents:
1022
diff
changeset
|
115 /endif%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
116 /set rpouch_st=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
117 /if (rpouch_get) /substitute -ag%;/eval /repeat -1 1 /%{rpouch_dest}%;/endif |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
118 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
119 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
120 ;; Define reagents and mangler macros |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
121 /def -i gdefrpouch =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
122 /let _tmps=$[replace(" ","_",tolower({3}))]%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
123 /set rpouch_regs=%{rpouch_regs} %{_tmps}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
124 /set rpouch_reg_%{_tmps}=%{2}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
125 /prdefivar rpouch_set_%{_tmps} 0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
126 /def -i -p9999 -Erpouch_st==1 -mregexp -t"^(One|Two|Three|Four|Five|Six|Seven|Eight|Nine|[0-9]+) (%{1}) \\(([0-9]+) power, ([0-9]+) standard, ([0-9]+) poor\\)$$" grpouch_%{_tmps} =\ |
904
8145ea5098eb
Improve reagent pouch output by showing singular reagent name.
Matti Hamalainen <ccr@tnsp.org>
parents:
882
diff
changeset
|
127 /test grpouch_report({P1},{P3},{P4},{P5},{P2},"%{3}","%{_tmps}","%{2}") |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
128 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
129 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
130 /test gdefrpouch("handfuls? of olivine powder", "Olivine powder", "Acid Blast") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
131 /test gdefrpouch("stone cubes?", "Stone cube", "Acid Shield") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
132 /test gdefrpouch("pairs? of interlocked bloodstone rings","Interlocked rings", "Acid Storm") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
133 /test gdefrpouch("small highsteel discs?", "Highsteel disc", "Armour of Aether") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
134 /test gdefrpouch("tiny leather bags? \(empty\)","Leather bag", "Aura of Wind") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
135 /test gdefrpouch("bronze marbles?", "Bronze marble", "Blast Vacuum") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
136 /test gdefrpouch("steel arrowheads?", "Steel arrowhead", "Cold Ray") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
137 /test gdefrpouch("small pieces? of electrum wire","Electrum wire", "Electrocution") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
138 /test gdefrpouch("small glass cones?", "Glass cone", "Flame Shield") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
139 /test gdefrpouch("grey fur triangles?", "Fur triangle", "Frost Shield") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
140 /test gdefrpouch("copper rods?", "Copper rod", "Golden Arrow") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
141 /test gdefrpouch("handfuls? of onyx gravel", "Onyx gravel", "Hailstorm") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
142 /test gdefrpouch("ebony tubes?", "Ebony tube", "Killing Cloud") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
143 /test gdefrpouch("granite spheres?", "Granite sphere", "Lava Blast") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
144 /test gdefrpouch("blue cobalt cups? \(empty\)", "Cobalt cup", "Lava Storm") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
145 /test gdefrpouch("small iron rods?", "Iron rod", "Lightning Shield") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
146 /test gdefrpouch("clusters? of tungsten wires", "Tungsten wire", "Lightning Storm") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
147 /test gdefrpouch("tiny platinum hammers?", "Platinum hammer", "Magic Eruption") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
148 /test gdefrpouch("quartz prisms?", "Quartz prism", "Repulsor Aura") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
149 /test gdefrpouch("tiny amethyst crystals?", "Amethyst crystal", "Shield of Detoxification") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
150 /test gdefrpouch("silvery bark chips?", "Bark chip", "Summon Carnal Spores") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
151 /test gdefrpouch("small brass fans?", "Small brass fan", "Vacuum Globe") |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
152 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
153 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
154 /def -i grpouch_list =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
155 /msw ,---------------,%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
156 /msw | @{BCgreen}GgrTF@{n} @{Cyellow}RP List@{n} |%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
157 /msw +---------------+----------------------------------+--------.%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
158 /msw | @{BCgreen}Spell name@{n} | @{BCyellow}Reagent@{n} | @{BCwhite}Stock@{n} |%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
159 /msw +---------------------------+----------------------+--------+%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
160 /let _rp_total=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
161 /while ({#})\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
162 /let _rp_name=$[prgetval(strcat("rpouch_reg_",{1}))]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
163 /let _rp_num=$[prgetval(strcat("rpouch_set_",{1}))]%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
164 /let _rp_rname=$[replace("_"," ",{1})]%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
165 /let _rp_total=$[_rp_total + _rp_num]%;\ |
936 | 166 /msw | @{Cgreen}$[prsubipad(_rp_rname,25)]@{n} | @{Cyellow}$[prsubipad(_rp_name,20)]@{n} | $[pad(_rp_num,6)] |%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
167 /shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
168 /done%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
169 /msw +--------------------------------------------------+--------+%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
170 /msw | Total reagents to be stocked ................... | @{BCgreen}$[pad(_rp_total,6)]@{n} |%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
171 /msw `--------------------------------------------------+--------' |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
172 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
173 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
174 /def -i grpouch_adjust =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
175 /let _rval=%{1}%;/shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
176 /let _rnum=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
177 /while ({#})\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
178 /let _rp_nset=$[prgetval(strcat("rpouch_set_",{1}))]%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
179 /if (_rp_nset > 0)\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
180 /set rpouch_set_%{1}=%{_rval}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
181 /let _rnum=$[_rnum+1]%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
182 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
183 /shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
184 /done%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
185 /msq Adjusted @{BCgreen}%{_rnum}@{n} set pouch reagents to @{BCwhite}%{_rval}@{n}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
186 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
187 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
188 /def -i grpouch_clear =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
189 /let _rval=%{1}%;/shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
190 /while ({#})\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
191 /set rpouch_%{_rval}_%{1}=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
192 /shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
193 /done |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
194 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
195 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
196 /def -i grpouch_set_all =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
197 /let _rval=%{1}%;/shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
198 /msq Setting all reagents to %{_rval}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
199 /while ({#})\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
200 /set rpouch_set_%{1}=%{_rval}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
201 /shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
202 /done |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
203 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
204 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
205 ;; Contents of "from" pouch got, now get contents of "to" pouch |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
206 /def -i grpouch_fill1 =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
207 /set rpouch_dest=grpouch_fill2%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
208 /set rpouch_name=to%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
209 /set rpouch_target=%{rpouch_to}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
210 @@look at %{rpouch_to} |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
211 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
212 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
213 ;; We now have contents of both pouches .. start moving. |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
214 /def -i grpouch_fill2 =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
215 /set rpouch_get=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
216 /set rpouch_dest=%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
217 /grpouch_move %{rpouch_regs} |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
218 |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
219 |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
220 /def -i grpouch_move =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
221 /if (rpouch_mode=~"check")\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
222 /msw ,-----------------------------. ,---------.%;\ |
938 | 223 /msw | Would transfer following... | | Needs |%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
224 /msw +----------------------+-------------------------------------------+---------+%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
225 /else \ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
226 /msq Moving reagents ...%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
227 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
228 /let _rnum=0%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
229 /while ({#})\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
230 /let _rp_name=$[tolower(prgetval(strcat("rpouch_reg_",{1})))]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
231 /let _rp_nfrom=$[prgetval(strcat("rpouch_from_",{1}))]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
232 /let _rp_nto=$[prgetval(strcat("rpouch_to_",{1}))]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
233 /let _rp_nset=$[prgetval(strcat("rpouch_set_",{1}))]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
234 /if (rpouch_mode=~"move")\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
235 /if (_rp_nfrom > 0)\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
236 /msq Transferring all '%{_rp_name}'%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
237 @@transfer all %{_rp_name} from %{rpouch_from} to %{rpouch_to} take power%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
238 /endif%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
239 /else \ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
240 /let _rwant=$[_rp_nset - _rp_nto]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
241 /if (_rwant > 0)\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
242 /let _vbuy=$[_rwant - _rp_nfrom]%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
243 /if (_vbuy > 0)\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
244 /let _vmove=%{_rp_nfrom}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
245 /let _vcol=BCred%;\ |
963 | 246 /let _vstr=Contains %{_rp_nto}, %{_rp_nset} wanted (%{_rp_nfrom} avail)%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
247 /else \ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
248 /let _vbuy=0%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
249 /let _vmove=%{_rwant}%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
250 /let _vcol=BCgreen%;\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
251 /let _vstr=Moving %{_rwant} of %{_rp_nfrom}%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
252 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
253 /if (rpouch_mode=~"check")\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
254 /msw | @{Cyellow}$[prsubipad(_rp_name,20)]@{n} | @{%{_vcol}}$[prsubipad(_vstr,41)]@{n} | @{%{_vcol}}$[pad(_vbuy,7)]@{n} |%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
255 /else \ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
256 /if (_vmove > 0)\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
257 /msq Transferring %{_vmove} x '%{_rp_name}' (wanted %{_rwant})%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
258 @@transfer %{_vmove} %{_rp_name} from %{rpouch_from} to %{rpouch_to} take power%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
259 /endif%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
260 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
261 /let _rnum=$[_rnum+1]%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
262 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
263 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
264 /shift%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
265 /done%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
266 /if (rpouch_mode=~"check")\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
267 /msw +-------------------+--+-------------------------------------------+---------'%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
268 /msw | @{BCwhite}$[pad(_rnum,5)]@{n} types total |%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
269 /msw `-------------------'%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
270 /else \ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
271 /msq Done.%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
272 /endif |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
273 |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
274 |
1563
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
275 ;@command /rpouch |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
276 ;@desc Prints a short help text with basic syntaxes of the commands. |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
277 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
278 ;@command /rpouch check <dst pouch> from <src pouch> [in <container>] |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
279 ;@desc Checks and shows a list of reagents to be stocked into "dst pouch" |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
280 ;@desc from "src pouch" with current settings. Source pouch can optionally be |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
281 ;@desc in container (such as a chest). |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
282 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
283 ;@command /rpouch fill <dst pouch> from <src pouch> [in <container>] |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
284 ;@desc Like 'check' but instead of a list, moves reagents to "dst pouch" |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
285 ;@desc to match the current settings. |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
286 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
287 ;@command /rpouch move <dst pouch> from <src pouch> [in <container>] |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
288 ;@desc Moves ALL power reagents from "src pouch" to "dst pouch". |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
289 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
290 ;@command /rpouch set <spell> <amount> |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
291 ;@desc Set amount of reagents to stock for given spell. (Like "rset", |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
292 ;@desc but takes spell name instead.) |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
293 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
294 ;@command /rpouch rset <reagent> <amount> |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
295 ;@desc Set amount of given reagent to be stocked. (Like "set", but takes |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
296 ;@desc reagent name instead.) |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
297 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
298 ;@command /rpouch adjust <amount> |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
299 ;@desc ??? |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
300 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
301 ;@command /rpouch all <amount> |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
302 ;@desc Unconditionally sets number of ALL reagents to be stocked to |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
303 ;@desc given amount. |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
304 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
305 ;@command /rpouch list |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
306 ;@desc Shows a list of current settings (e.g. how many of each reagent to stock.) |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
307 |
d8c04a55d1d4
Move reagent pouch command documentation to tfdoc inline docs.
Matti Hamalainen <ccr@tnsp.org>
parents:
1472
diff
changeset
|
308 |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
309 ;; Main command interface |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
310 /def -i rpouch =\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
311 /let _args=$[tolower({*})]%;\ |
1022
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
312 /if (regmatch("^(fill|check|move) +([A-Za-z0-9_-][A-Za-z0-9_ -]+) +from +([A-Za-z0-9_][A-Za-z0-9_ -]+)$", _args))\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
313 /set rpouch_mode=%{P1}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
314 /set rpouch_to=%{P2}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
315 /set rpouch_from=%{P3}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
316 /if (rpouch_mode=~"fill")\ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
317 /msq @{BCwhite}Filling reagents from@{n} '@{BCgreen}%{rpouch_from}@{n}' @{BCwhite}to@{n} '@{BCred}%{rpouch_to}@{n}'%;\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
318 /elseif (rpouch_mode=~"check")\ |
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
319 /msq @{BCwhite}Checking reagents in@{n} '@{BCgreen}%{rpouch_from}@{n}' @{BCwhite}<->@{n} '@{BCred}%{rpouch_to}@{n}'%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
320 /else \ |
964
222cf2a9c00e
Clean up reagent pouch handling code and add a 'move' option for moving all reagents from one pouch to another.
Matti Hamalainen <ccr@tnsp.org>
parents:
963
diff
changeset
|
321 /msq @{BCwhite}Moving ALL reagents from@{n} '@{BCgreen}%{rpouch_from}@{n}' @{BCwhite}to@{n} '@{BCred}%{rpouch_to}@{n}'%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
322 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
323 /msq Getting pouch contents, please wait...%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
324 /grpouch_clear to %{rpouch_regs}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
325 /grpouch_clear from %{rpouch_regs}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
326 /set rpouch_get=1%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
327 /set rpouch_dest=grpouch_fill1%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
328 /set rpouch_name=from%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
329 /set rpouch_target=%{rpouch_from}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
330 @@look at %{rpouch_from}%;\ |
938 | 331 /elseif (regmatch("^(rset|set) +([A-Za-z][A-Za-z ]+) ([0-9]+)", _args))\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
332 /if ({P1}=~"set")\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
333 /let _tmps=$[replace(" ","_",tolower({P2}))]%;\ |
965
2ea446854c3d
Oops, one "/eval /set" had been accidentally left in. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents:
964
diff
changeset
|
334 /let _rpas=$[prgetval(strcat("rpouch_reg_",_tmps))]%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
335 /if (_rpas!~"")\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
336 /msq Reagent '@{Cgreen}%{_tmps}@{n}' (@{Cyellow}%{_rpas}@{n}) set to @{BCwhite}%{P3}@{n}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
337 /set rpouch_set_%{_tmps}=%{P3}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
338 /else \ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
339 /msq @{BCred}No such spell@{n} '@{BCwhite}%{P2}@{n}'!%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
340 /endif%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
341 /else \ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
342 /gerror This setting does not work yet!%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
343 /endif%;\ |
935
59e4cb71bfac
Improve output and loosen command parsing a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
904
diff
changeset
|
344 /elseif (regmatch("^adjust +([0-9]+)", _args))\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
345 /grpouch_adjust %{P1} %{rpouch_regs}%;\ |
935
59e4cb71bfac
Improve output and loosen command parsing a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
904
diff
changeset
|
346 /elseif (regmatch("^all +([0-9]+)", _args))\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
347 /grpouch_set_all %{P1} %{rpouch_regs}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
348 /elseif (_args=~"list")\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
349 /grpouch_list %{rpouch_regs}%;\ |
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
350 /else \ |
935
59e4cb71bfac
Improve output and loosen command parsing a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
904
diff
changeset
|
351 /msw ,-------------------------------.%;\ |
59e4cb71bfac
Improve output and loosen command parsing a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
904
diff
changeset
|
352 /msw | @{BCgreen}GgrTF@{n} - @{Cyellow}Reagent Pouch Manager@{n} |%;\ |
1022
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
353 /msw +-------------------------------+------------------------------------------.%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
354 /msw | /rpouch @{BCwhite}(fill|check|move)@{n} @{Cgreen}<to pouch>@{n} [@{BCwhite}in@{n} @{Cyellow}<A>@{n}] @{BCwhite}from@{n} @{Cred}<from pouch>@{n} [@{BCwhite}in@{n} @{Cyellow}<B>@{n}] |%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
355 /msw | /rpouch @{BCwhite}set@{n} @{Cgreen}<spell>@{n} <amount> |%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
356 /msw | /rpouch @{BCwhite}rset@{n} @{Cgreen}<reagent>@{n} <amount> |%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
357 /msw | /rpouch @{BCwhite}adjust@{n} @{Cgreen}<amount>@{n} |%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
358 /msw | /rpouch @{BCwhite}all@{n} @{Cgreen}<amount>@{n} |%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
359 /msw | /rpouch @{BCwhite}list@{n} |%;\ |
8e30c522e128
Widen some number columns a bit; Allow "rpouch move A in B from B in C" type syntaxes.
Matti Hamalainen <ccr@tnsp.org>
parents:
965
diff
changeset
|
360 /msw `--------------------------------------------------------------------------'%;\ |
882
04abd37e4751
Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
361 /endif |