-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path[proc,gnome_create_ingredient].cs2
41 lines (41 loc) · 1.54 KB
/
[proc,gnome_create_ingredient].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
// 3788
[proc,gnome_create_ingredient](obj $obj0, int $total1, int $int2, component $component3, component $component4, int $int5, int $int6, int $int7)(int)
if ($obj0 = null) {
return($int2);
}
def_int $int8 = calc(5 - $int6);
$int8 = calc($int5 / 2 * $int8);
def_int $int9 = 1;
if (inv_total(inv, $obj0) < $total1) {
$int9 = 0;
}
cc_create($component3, ^iftype_model, $int2);
cc_setsize(36, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int5 * $int7 + $int5 / 2 - 36 / 2 + $int8), 26, ^setpos_abs_left, ^setpos_abs_top);
if (inv_total(inv, $obj0) < $total1) {
cc_setobject(~gnome_return_dummy($obj0), 1);
} else {
cc_setobject($obj0, 1);
}
$int2 = calc($int2 + 1);
cc_create($component3, ^iftype_text, $int2);
cc_setsize($int5, 16, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int5 * $int7 + $int8), calc(31 + 32), ^setpos_abs_left, ^setpos_abs_top);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_centre, 10);
if ($int9 = 1) {
cc_settext("<col=00ff00><tostring(inv_total(inv, $obj0))>/<tostring($total1)>");
} else {
cc_settext("<col=9f9f9f><tostring(inv_total(inv, $obj0))>/<tostring($total1)>");
}
$int2 = calc($int2 + 1);
cc_create($component3, ^iftype_text, $int2);
cc_setsize($int5, 32, ^setsize_abs, ^setsize_abs);
cc_setposition(calc($int5 * $int7 + $int8), calc(47 + 32), ^setpos_abs_left, ^setpos_abs_top);
cc_setcolour(0xff981f);
cc_settextfont(p12_full);
cc_settextshadow(true);
cc_settextalign(^settextalign_centre, ^settextalign_top, 10);
cc_settext(oc_name($obj0));
return(calc($int2 + 1));