changeset 987:2adb9435411f

Added some chest creation helper macros.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 01 Apr 2009 00:39:13 +0000
parents 39bdd68b628f
children 930c1485903f
files gm-merchant.tf
diffstat 1 files changed, 32 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gm-merchant.tf	Wed Apr 01 00:05:46 2009 +0000
+++ b/gm-merchant.tf	Wed Apr 01 00:39:13 2009 +0000
@@ -457,3 +457,35 @@
 /def -i -msimple -t"It would be a pain to force through the reinforcements." gchest_reinf7 = /test gchest_report({*},7,8)
 /def -i -msimple -t"Just a final touch and the reinforcement is fully complete." gchest_reinf8 = /test gchest_report({*},8,8)
 
+
+;; Chest creation helper
+/def -i cbuild =\
+	/if ({#}>0) /set mcc_mat=%{1}%;/endif%;\
+	/if ({#}>1) /set mcc_chest=%{-1}%;/endif%;\
+	/if (mcc_chest=~"") /set mcc_chest=chest%;/endif%;\
+	/if (mcc_mat!~"")\
+		/msq Building '%{mcc_chest}' hull from '%{mcc_mat}' ...%;\
+		@@get %{mcc_mat}%;\
+		@@use chest creation at build %{mcc_chest} hull from %{mcc_mat}%;\
+	/else \
+		/msq No chest building material set or specified!%;\
+	/endif
+
+/def -i creinf =\
+	/if ({#}>0) /set mcc_rmat=%{1}%;/endif%;\
+	/if ({#}>1) /set mcc_chest=%{-1}%;/endif%;\
+	/if (mcc_chest=~"") /set mcc_chest=chest%;/endif%;\
+	/if (mcc_mat!~"")\
+		/msq Reinforcing '%{mcc_chest}' hull from '%{mcc_rmat}' ...%;\
+		@@get %{mcc_rmat}%;\
+		@@use chest creation at reinforce %{mcc_chest} hull with %{mcc_rmat}%;\
+	/else \
+		/msq No chest building material set or specified!%;\
+	/endif
+
+/def -i ccomplete =\
+	/if ({#}>0) /set mcc_chest=%{*}%;/endif%;\
+	/if (mcc_chest=~"") /set mcc_chest=chest%;/endif%;\
+	/msq Completing '%{mcc_chest}' ...%;\
+	@@use chest creation at complete %{mcc_chest}
+