last of tg tweaks for now.

rune blood dna is runtiming but eh....
This commit is contained in:
Aurorablade
2016-05-15 23:09:48 -04:00
parent ce69938a65
commit c3ee3192ba
11 changed files with 41 additions and 131 deletions
+11 -24
View File
@@ -1,34 +1,21 @@
/proc/make_bit_triplet()
var/list/num_sample = list(1, 2, 3, 4, 5, 6, 7, 8, 9)
var/result = 0
for(var/i = 0, i < 3, i++)
var/num = pick(num_sample)
num_sample -= num
result += (1 << num)
return result
var/list/word_to_uristrune_table = null
/proc/word_to_uristrune_bit(word)
if(word_to_uristrune_table == null)
word_to_uristrune_table = list()
var/bit = 1
while(length(word))
var/w = word
word_to_uristrune_table[w] = bit
word -= w
bit <<= 1
return word_to_uristrune_table[word]
/proc/get_uristrune_cult(word1)
/proc/get_uristrune_cult(word)
var/animated
if(word1)
if(word)
animated = 1
else
animated = 0
var/bits = word_to_uristrune_bit(word1)
var/bits = make_bit_triplet()
return get_uristrune(bits, animated)