-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,bankside_bag_draw].cs2
41 lines (41 loc) · 1.35 KB
/
[proc,bankside_bag_draw].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
// 3744
[proc,bankside_bag_draw](component $component0, inv $inv1)
cc_deleteall($component0);
def_int $size2 = inv_size($inv1);
def_obj $obj3 = null;
def_int $int4 = 0;
def_int $size5 = 0;
while ($size5 < $size2) {
cc_create($component0, ^iftype_graphic, $size5);
$obj3 = inv_getobj($inv1, $size5);
if ($obj3 ! null) {
$int4 = calc($int4 + 1);
cc_sethide(false);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($size5 % 4 * (36 + 8)), calc($size5 / 4 * (32 + 1)), ^setpos_abs_left, ^setpos_abs_top);
cc_setoutline(1);
cc_setgraphicshadow(0x333333);
cc_setobject($obj3, inv_getnum($inv1, $size5));
cc_settrans(0);
cc_setop(1, "Deposit-1");
cc_setop(2, "Deposit-5");
cc_setop(3, "Deposit-All");
cc_setop(4, "Deposit-X");
cc_setop(10, "Examine");
cc_setonop("cc_settrans_temporarily(event_com, event_comsubid, 150, 0)");
cc_setopbase("<col=ff9040><oc_name($obj3)></col>");
} else {
cc_sethide(true);
}
$size5 = calc($size5 + 1);
}
if ($int4 <= 0) {
cc_create($component0, ^iftype_text, $size5);
cc_setposition(0, 0, ^setpos_abs_left, ^setpos_abs_top);
cc_setsize(if_getwidth($component0), if_getheight($component0), ^setsize_abs, ^setsize_abs);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 0);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_setcolour(0xff981f);
cc_settext("The bag is empty.");
}