ソースを参照

[Changed] Add a function to choose a random descriptive word

ADCSux 2 年 前
コミット
2fc175e828
1 ファイル変更9 行追加0 行削除
  1. 9 0
      locations/body_desc.qsrc

+ 9 - 0
locations/body_desc.qsrc

@@ -19,6 +19,15 @@ if $ARGS[0] = '':
 	gs $this, 'glasses'
 end
 
+if $ARGS[0] = 'ChooseDescWord':
+	!{
+		This function picks a random descriptive word from $ARGS array and returns back the word
+		To implement, call func($this, 'ChooseDescWord', [desc word1], [desc word2], [desc word3], etc.)
+		return a string
+	}
+	$result = $ARGS[rand(2, arrsize('$ARGS')-1)]
+end
+
 if $ARGS[0] = 'throat':
     if pcs_throat = 0:
 		$pcs_throat = 'You have a chaste <a href="exec:view''images/pc/body/throat/th0.jpg''">mouth</a>.'