-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,shared_bank_update].cs2
72 lines (72 loc) · 2.43 KB
/
[proc,shared_bank_update].cs2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// 5269
[proc,shared_bank_update](component $component0, component $component1, component $component2, int $int3, component $component4, int $comsubid5, component $component6)
def_int $int7 = calc((if_getwidth($component1) - 8 * 36) / 7 + 36);
def_int $int8 = -1;
def_int $int9 = -1;
def_int $int10 = 0;
def_int $int11 = 0;
def_int $int12 = ~bankmain_searching;
def_obj $obj13 = null;
def_int $int14 = 0;
while ($int14 < $int3) {
if (cc_find($component1, $int14) = ^true) {
$obj13 = inv_getobj(inv_659, $int14);
if ($obj13 ! null) {
$int11 = calc($int11 + 1);
}
if ($int12 = 1) {
if ($obj13 ! null & ~bankmain_filteritem($obj13) = 1) {
cc_sethide(false);
cc_setposition(calc($int10 % 8 * $int7), calc($int10 / 8 * $int7), ^setpos_abs_left, ^setpos_abs_top);
~shared_bank_drawitem($obj13, inv_getnum(inv_659, $int14), $int3, $component0, $component1, $component2);
$int10, $int8, $int9 = calc($int10 + 1), cc_gety, cc_gety;
} else {
cc_sethide(true);
}
} else {
cc_sethide(false);
cc_setposition(calc($int14 % 8 * $int7), calc($int14 / 8 * $int7), ^setpos_abs_left, ^setpos_abs_top);
if (~shared_bank_drawitem($obj13, inv_getnum(inv_659, $int14), $int3, $component0, $component1, $component2) = 1) {
$int8 = cc_gety;
}
$int9 = cc_gety;
}
}
$int14 = calc($int14 + 1);
}
if_settext(~tostring_spacer($int11, ","), $component6);
def_string $string0 = "";
if ($int12 = 1) {
$string0 = ~bankmain_filterstring;
if (string_length($string0) > 0) {
if (cc_find($component4, $comsubid5) = ^true) {
cc_settext("Showing items: <col=ff0000><$string0></col>");
}
if (%varcint5 = 11) {
if_settext("Show items whose names contain the following text: (<~tostring_spacer($int10, ",")> found)", interface_162:41);
}
} else {
if (cc_find($component4, $comsubid5) = ^true) {
cc_settext("Showing items: <col=ff0000>*</col>");
}
if (%varcint5 = 11) {
if_settext("Show items whose names contain the following text:", interface_162:41);
}
}
} else if (cc_find($component4, $comsubid5) = ^true) {
cc_settext("Group Storage");
}
if ($int8 ! -1) {
$int8 = calc($int8 + 32);
} else {
$int8 = 0;
}
if ($int9 ! -1) {
$int9 = calc($int9 + 32);
} else {
$int9 = 0;
}
def_int $int15 = ~min($int9, calc($int8 + 2 * $int7));
def_int $int16 = 90;
def_int $int17 = calc($int7 * (($int3 + 7) / 8 - 1) + 32 + $int16);
~shared_bank_setsize(if_getlayer($component0), $component0, $component1, $component2, $int15, $int17, $int16);