-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,farming_tools_side_update].cs2
54 lines (54 loc) · 1.66 KB
/
[proc,farming_tools_side_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
// 1062
[proc,farming_tools_side_update](component $component0, obj $obj1, string $text0, int $int2)
def_int $int3 = 0;
def_namedobj $namedobj4 = null;
$int3, $namedobj4 = ~farming_tools_getcarried($obj1);
def_int $colour5 = 0xbb0000;
if ($int3 > 0) {
$colour5 = 0x20df20;
}
if ($obj1 = watering_can_6797) {
if ($namedobj4 = null) {
$namedobj4 = watering_can_6797;
}
$text0 = oc_name($namedobj4);
}
if (cc_find($component0, $int2) = ^true & .cc_find($component0, calc($int2 + 1)) = ^true) {
cc_settext($text0);
cc_setcolour($colour5);
.cc_setcolour($colour5);
.cc_settext(~magic_tostring($int3));
}
if (cc_find($component0, calc($int2 + 2)) = ^true) {
cc_setobject_nonum($namedobj4, $int3);
}
if_setopbase("<col=ff9040><oc_name($namedobj4)></col>", $component0);
if_clearops($component0);
if_setop(10, "Examine", $component0);
def_int $int6 = enum(obj, int, enum_2193, $obj1);
if ($int6 <= 1) {
if_setop(1, "Store", $component0);
} else {
switch_int (~get_selected_quantity(enum_2193)) {
case 0 :
if_setop(1, "Store-1", $component0);
if_setop(2, "Store-5", $component0);
if_setop(3, "Store-X", $component0);
if_setop(4, "Store-All", $component0);
case 1 :
if_setop(1, "Store-5", $component0);
if_setop(2, "Store-1", $component0);
if_setop(3, "Store-X", $component0);
if_setop(4, "Store-All", $component0);
case 3 :
if_setop(1, "Store-X", $component0);
if_setop(2, "Store-1", $component0);
if_setop(3, "Store-5", $component0);
if_setop(4, "Store-All", $component0);
case 2 :
if_setop(1, "Store-All", $component0);
if_setop(2, "Store-1", $component0);
if_setop(3, "Store-5", $component0);
if_setop(4, "Store-X", $component0);
}
}