Advertisement
Guest User

Untitled

a guest
Jan 16th, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.29 KB | None | 0 0
  1. # combined
  2. VarAction2(
  3.     feature=INDUSTRY_TILE,
  4.     ref_id=229,
  5.     related_scope=False,
  6.     ranges={(1, 0): CB(0)},
  7.     default=Ref(229),
  8.     code='''
  9.        TEMP[14] = random_bits
  10.        TEMP[13] = terrain_type == 4
  11.        TEMP[127] = 0
  12.        TEMP[129] = (TEMP[128] = construction_state != 3) ^ 1
  13.        TEMP[130] = TEMP[127] * TEMP[129]
  14.        TEMP[127] = TEMP[128] + TEMP[130]
  15.        TEMP[132] = (TEMP[131] = TEMP[13] == 0) ^ 1
  16.        TEMP[133] = TEMP[127] * TEMP[132]
  17.        TEMP[117] = TEMP[131] + TEMP[133]
  18.        TEMP[135] = (TEMP[134] = TEMP[13] == 1) ^ 1
  19.        TEMP[136] = TEMP[127] * TEMP[135]''',
  20. )
  21.  
  22.  
  23. # raw
  24. VarAction2(
  25.     feature=INDUSTRY_TILE,
  26.     ref_id=229,
  27.     related_scope=False,
  28.     ranges={(1, 0): CB(0)},
  29.     default=Ref(229),
  30.     code='''
  31.        TEMP[14] = random_bits
  32.        TEMP[13] = cmp(terrain_type, 4) & 1
  33.        TEMP[127] = 0
  34.        TEMP[129] = (TEMP[128] = cmp(construction_state, 3) & 1 ^ 1) ^ 1
  35.        TEMP[130] = TEMP[127] * TEMP[129]
  36.        TEMP[127] = TEMP[128] + TEMP[130]
  37.        TEMP[132] = (TEMP[131] = cmp(TEMP[13], 0) & 1) ^ 1
  38.        TEMP[133] = TEMP[127] * TEMP[132]
  39.        TEMP[117] = TEMP[131] + TEMP[133]
  40.        TEMP[135] = (TEMP[134] = cmp(TEMP[13], 1) & 1) ^ 1
  41.        TEMP[136] = TEMP[127] * TEMP[135]''',
  42. )
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement