-
Notifications
You must be signed in to change notification settings - Fork 0
/
[proc,storage_side_update].cs2
48 lines (48 loc) · 1.54 KB
/
[proc,storage_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
// 2148
[proc,storage_side_update](enum $enum0, component $component1, obj $obj2, string $text0, int $int3)
def_int $int4 = 0;
def_namedobj $namedobj5 = null;
$int4, $namedobj5 = ~storage_getcarried($enum0, $obj2);
def_int $colour6 = 0xbb0000;
if ($int4 > 0) {
$colour6 = 0x20df20;
}
if (cc_find($component1, $int3) = ^true & .cc_find($component1, calc($int3 + 1)) = ^true) {
cc_settext($text0);
cc_setcolour($colour6);
.cc_setcolour($colour6);
.cc_settext(~magic_tostring($int4));
}
if (cc_find($component1, calc($int3 + 2)) = ^true) {
cc_setobject_nonum($namedobj5, $int4);
}
if_setopbase("<col=ff9040><oc_name($namedobj5)></col>", $component1);
if_clearops($component1);
if_setop(10, "Examine", $component1);
def_int $int7 = enum(obj, int, $enum0, $obj2);
if ($int7 <= 1) {
if_setop(1, "Store", $component1);
} else {
switch_int (~get_selected_quantity($enum0)) {
case 0 :
if_setop(1, "Store-1", $component1);
if_setop(2, "Store-5", $component1);
if_setop(3, "Store-X", $component1);
if_setop(4, "Store-All", $component1);
case 1 :
if_setop(1, "Store-5", $component1);
if_setop(2, "Store-1", $component1);
if_setop(3, "Store-X", $component1);
if_setop(4, "Store-All", $component1);
case 3 :
if_setop(1, "Store-X", $component1);
if_setop(2, "Store-1", $component1);
if_setop(3, "Store-5", $component1);
if_setop(4, "Store-All", $component1);
case 2 :
if_setop(1, "Store-All", $component1);
if_setop(2, "Store-1", $component1);
if_setop(3, "Store-5", $component1);
if_setop(4, "Store-X", $component1);
}
}