summaryrefslogtreecommitdiffstats
path: root/Items.c4d/Sensors.c4d/RC.c4d
diff options
context:
space:
mode:
Diffstat (limited to 'Items.c4d/Sensors.c4d/RC.c4d')
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/ActMap.txt4
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/DefCore.txt21
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/Graphics.pngbin0 -> 2347 bytes
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/Graphics.svg311
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/Names.txt2
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/Script.c721
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/StringTblDE.txt39
-rw-r--r--Items.c4d/Sensors.c4d/RC.c4d/StringTblUS.txt39
8 files changed, 1137 insertions, 0 deletions
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/ActMap.txt b/Items.c4d/Sensors.c4d/RC.c4d/ActMap.txt
new file mode 100644
index 0000000..4fd7110
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/ActMap.txt
@@ -0,0 +1,4 @@
+[Action]
+Name=Active
+FacetBase=1
+Facet=0,12,2,105,5,-105
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/DefCore.txt b/Items.c4d/Sensors.c4d/RC.c4d/DefCore.txt
new file mode 100644
index 0000000..1a6fc10
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/DefCore.txt
@@ -0,0 +1,21 @@
+[DefCore]
+id=RC7I
+Name=Remote control
+Version=4,9,5
+Category=C4D_Object|C4D_SelectHomebase|C4D_SelectKnowledge|C4D_SelectMaterial
+Width=12
+Height=12
+Offset=-6,-6
+Mass=10
+Value=5
+Components=METL=1
+Picture=12,0,52,52
+Vertices=2
+VertexX=1,-1
+VertexFriction=100
+Grab=2
+Collectible=1
+MaxUserSelect=10
+Rotate=1
+Rebuy=1
+NoPushEnter=1
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/Graphics.png b/Items.c4d/Sensors.c4d/RC.c4d/Graphics.png
new file mode 100644
index 0000000..6c18bce
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/Graphics.png
Binary files differ
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/Graphics.svg b/Items.c4d/Sensors.c4d/RC.c4d/Graphics.svg
new file mode 100644
index 0000000..e1cbd28
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/Graphics.svg
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64"
+ version="1.1"
+ height="64"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="Graphics.svg">
+ <sodipodi:namedview
+ pagecolor="#d82c2c"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1051"
+ id="namedview46"
+ showgrid="false"
+ inkscape:zoom="1.84375"
+ inkscape:cx="70.392402"
+ inkscape:cy="228.58413"
+ inkscape:window-x="2010"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer1-3" />
+ <defs
+ id="defs5455">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective4190" />
+ <linearGradient
+ id="linearGradient4176"
+ osb:paint="solid">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop4178" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4417"
+ xlink:href="#linearGradient4159"
+ y1="24"
+ y2="7.999974"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(384.42761,521.11928)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4449"
+ xlink:href="#linearGradient4219"
+ y1="532.79797"
+ y2="526.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(-0.14381833,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4467"
+ xlink:href="#linearGradient4159"
+ y1="533.79797"
+ y2="523.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(-0.14381833,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4499"
+ xlink:href="#linearGradient4159"
+ y1="536.79797"
+ y2="532.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(0.85621167,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4529"
+ xlink:href="#linearGradient4219"
+ y1="20"
+ y2="18"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(384.42761,521.11928)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4219">
+ <stop
+ style="stop-color:#999a9c"
+ id="stop4221" />
+ <stop
+ offset="1"
+ style="stop-color:#f4f5f5"
+ id="stop4223" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4159">
+ <stop
+ style="stop-color:#2a2c2f"
+ id="stop4161" />
+ <stop
+ offset="1"
+ style="stop-color:#424649"
+ id="stop4163" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4347">
+ <stop
+ style="stop-color:#f33777"
+ id="stop4349" />
+ <stop
+ offset="1"
+ style="stop-color:#fd2d65"
+ id="stop4351" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4280">
+ <stop
+ style="stop-color:#c0392b"
+ id="stop4282" />
+ <stop
+ offset="1"
+ style="stop-color:#e74c3c"
+ id="stop4284" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4264">
+ <stop
+ style="stop-color:#2980b9"
+ id="stop4266" />
+ <stop
+ offset="1"
+ style="stop-color:#3498db"
+ id="stop4268" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4255">
+ <stop
+ style="stop-color:#27ae60"
+ id="stop4257" />
+ <stop
+ offset="1"
+ style="stop-color:#2ecc71"
+ id="stop4259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4725"
+ xlink:href="#linearGradient4264"
+ y1="532.79797"
+ y2="530.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(-0.14381833,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4733"
+ xlink:href="#linearGradient4255"
+ y1="528.79797"
+ y2="526.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(-0.14381833,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4741"
+ xlink:href="#linearGradient4280"
+ y1="530.79797"
+ y2="528.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(-0.14381833,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4749"
+ xlink:href="#linearGradient4347"
+ y1="530.79797"
+ y2="528.79797"
+ gradientUnits="userSpaceOnUse"
+ x2="0"
+ gradientTransform="translate(-0.14381833,5.3212782)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4219"
+ id="linearGradient4188"
+ x1="400.45703"
+ y1="523.32343"
+ x2="400.95703"
+ y2="523.32343"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(14.174709,0,0,14.174709,-5281.1937,-6964.4697)" />
+ </defs>
+ <metadata
+ id="metadata5458">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Capa 1"
+ inkscape:groupmode="layer"
+ id="layer1-3"
+ transform="matrix(2 0 0 2 -769.14286 -1031.596)">
+ <path
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4188);stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 398.71188,533.2502 0,-159.52542"
+ id="path4174"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/media/oldarch/home/maxmitti/clonk/TodsStuff.c4d/DTSensors.c4d/Items.c4d/Sensors.c4d/RC.c4d/path4174.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <circle
+ cx="393.42761"
+ cy="535.11926"
+ style="fill:#e3dbdb;stroke-width:0.1;stroke-linecap:square"
+ id="ellipse4246"
+ r="0" />
+ <g
+ id="g4324"
+ inkscape:export-filename="/media/oldarch/home/maxmitti/clonk/TodsStuff.c4d/DTSensors.c4d/Items.c4d/Sensors.c4d/RC.c4d/Portrait.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <g
+ transform="translate(-1.7157267,3.0447673)"
+ id="g4220">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4417);stroke-width:0.1;stroke-linecap:square"
+ id="path4220"
+ d="m 388.42761,535.11928 -0.9414,7.52539 c -0.0385,0.15529 -0.0581,0.31463 -0.0586,0.47461 0,1.10457 0.89543,2 2,2 0.59429,-5.5e-4 1.15756,-0.26536 1.53711,-0.72266 l 0.002,0.004 5.46094,-6.28124 z m 24,0 -8,3 5.46094,6.28125 0.002,-0.004 c 0.37951,0.45729 0.94277,0.7221 1.53706,0.72265 1.10457,0 2,-0.89543 2,-2 -4.8e-4,-0.15998 -0.0202,-0.31932 -0.0586,-0.47461 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4467);stroke-width:0.1;stroke-linecap:square"
+ id="rect4234"
+ d="m 394.42761,529.11928 c -3.31371,0 -6,2.68629 -6,6 0,3.31371 2.68629,6 6,6 1.17775,-10e-4 2.32909,-0.34898 3.31055,-1 l 5.3789,0 c 0.98146,0.65102 2.13281,0.9988 3.31055,1 3.31371,0 6,-2.68629 6,-6 0,-3.31371 -2.68629,-6 -6,-6 l -5,0 -2,0 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4733);stroke-width:0.1;stroke-linecap:square"
+ id="path4717"
+ d="m 407.42761,532.11928 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4749);stroke-width:0.1;stroke-linecap:square"
+ id="path4715"
+ d="m 405.42761,534.11928 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4741);stroke-width:0.1;stroke-linecap:square"
+ id="path4713"
+ d="m 409.42761,534.11928 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4725);stroke-width:0.1;stroke-linecap:square"
+ id="path4268"
+ d="m 407.42761,536.11928 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4449);stroke-width:0.1;stroke-linecap:square"
+ id="rect4297"
+ d="m 392.42761,532.11928 0,2 -2,0 0,2 2,0 0,2 2,0 0,-2 2,0 0,-2 -2,0 0,-2 -2,0 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4499);stroke-width:0.033333;stroke-linecap:square"
+ id="circle4489"
+ d="m 397.42761,538.11928 a 2,2 0 0 0 -2,2 2,2 0 0 0 2,2 2,2 0 0 0 2,-2 2,2 0 0 0 -2,-2 z m 6,0 a 2,2 0 0 0 -2,2 2,2 0 0 0 2,2 2,2 0 0 0 2,-2 2,2 0 0 0 -2,-2 z" />
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient4529);stroke-width:0.1;stroke-linecap:square"
+ id="path4518"
+ d="m 397.42761,539.11928 a 0.99999398,0.99999398 0 0 0 -1,1 0.99999398,0.99999398 0 0 0 1,1 0.99999398,0.99999398 0 0 0 1,-1 0.99999398,0.99999398 0 0 0 -1,-1 z m 6,0 a 1.000006,1.000006 0 0 0 -1,1 1.000006,1.000006 0 0 0 1,1 1.000006,1.000006 0 0 0 1,-1 1.000006,1.000006 0 0 0 -1,-1 z" />
+ </g>
+ <rect
+ ry="1.25"
+ rx="1.25"
+ y="522.57532"
+ x="385.71188"
+ height="26"
+ width="26"
+ id="rect4231"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/Names.txt b/Items.c4d/Sensors.c4d/RC.c4d/Names.txt
new file mode 100644
index 0000000..51b0792
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/Names.txt
@@ -0,0 +1,2 @@
+DE:Fernsteuerung
+US:Remote control
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/Script.c b/Items.c4d/Sensors.c4d/RC.c4d/Script.c
new file mode 100644
index 0000000..933d875
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/Script.c
@@ -0,0 +1,721 @@
+#strict 2
+#include SN7I
+
+local viewTarget;
+local user;
+local controlTimer;
+local realAttachPos;
+
+// _enum(RC7I_Control_, L, LS, LD, LR, R, RS, RD, RR, U, US, UD, UR, D, DS, DD, DR, T, TS, TD, TR, Q, QS, QD, QR, S, SS, SD, SR, Z, ZS, ZD, ZR, V)
+static const RC7I_Control_L = 0;
+static const RC7I_Control_LS = 1;
+static const RC7I_Control_LD = 2;
+static const RC7I_Control_LR = 3;
+static const RC7I_Control_R = 4;
+static const RC7I_Control_RS = 5;
+static const RC7I_Control_RD = 6;
+static const RC7I_Control_RR = 7;
+static const RC7I_Control_U = 8;
+static const RC7I_Control_US = 9;
+static const RC7I_Control_UD = 10;
+static const RC7I_Control_UR = 11;
+static const RC7I_Control_D = 12;
+static const RC7I_Control_DS = 13;
+static const RC7I_Control_DD = 14;
+static const RC7I_Control_DR = 15;
+static const RC7I_Control_T = 16;
+static const RC7I_Control_TS = 17;
+static const RC7I_Control_TD = 18;
+static const RC7I_Control_TR = 19;
+static const RC7I_Control_Q = 20;
+static const RC7I_Control_QS = 21;
+static const RC7I_Control_QD = 22;
+static const RC7I_Control_QR = 23;
+static const RC7I_Control_S = 24;
+static const RC7I_Control_SS = 25;
+static const RC7I_Control_SD = 26;
+static const RC7I_Control_SR = 27;
+static const RC7I_Control_Z = 28;
+static const RC7I_Control_ZS = 29;
+static const RC7I_Control_ZD = 30;
+static const RC7I_Control_ZR = 31;
+static const RC7I_Control_V = 32;
+
+func GetControlName(int ctrl)
+{
+ return ["$Left$" ,
+ "$LeftSingle$" ,
+ "$LeftDouble$" ,
+ "$LeftReleased$" ,
+ "$Right$" ,
+ "$RightSingle$" ,
+ "$RightDouble$" ,
+ "$RightReleased$" ,
+ "$Up$" ,
+ "$UpSingle$" ,
+ "$UpDouble$" ,
+ "$UpReleased$" ,
+ "$Down$" ,
+ "$DownSingle$" ,
+ "$DownDouble$" ,
+ "$DownReleased$" ,
+ "$Throw$" ,
+ "$ThrowSingle$" ,
+ "$ThrowDouble$" ,
+ "$ThrowReleased$" ,
+ "$Dig$" ,
+ "$DigSingle$" ,
+ "$DigDouble$" ,
+ "$DigReleased$" ,
+ "$Special$" ,
+ "$SpecialSingle$" ,
+ "$SpecialDouble$" ,
+ "$SpecialReleased$" ,
+ "$Special2$" ,
+ "$Special2Single$" ,
+ "$Special2Double$" ,
+ "$Special2Released$" ,
+ "$Update$"
+ ][ctrl];
+}
+
+func Triggers()
+{
+ return [["$Left$" ],
+ ["$LeftSingle$" ],
+ ["$LeftDouble$" ],
+ ["$LeftReleased$" ],
+ ["$Right$" ],
+ ["$RightSingle$" ],
+ ["$RightDouble$" ],
+ ["$RightReleased$" ],
+ ["$Up$" ],
+ ["$UpSingle$" ],
+ ["$UpDouble$" ],
+ ["$UpReleased$" ],
+ ["$Down$" ],
+ ["$DownSingle$" ],
+ ["$DownDouble$" ],
+ ["$DownReleased$" ],
+ ["$Throw$" ],
+ ["$ThrowSingle$" ],
+ ["$ThrowDouble$" ],
+ ["$ThrowReleased$" ],
+ ["$Dig$" ],
+ ["$DigSingle$" ],
+ ["$DigDouble$" ],
+ ["$DigReleased$" ],
+ ["$Special$" ],
+ ["$SpecialSingle$" ],
+ ["$SpecialDouble$" ],
+ ["$SpecialReleased$" ],
+ ["$Special2$" ],
+ ["$Special2Single$" ],
+ ["$Special2Double$" ],
+ ["$Special2Released$" ],
+ ["$Update$" ]];
+}
+
+global func IsRemoteControllable(object controller)
+{
+ return GetOCF() & OCF_Grab;
+}
+
+global func RemoteControlMap(object controller)
+{
+ if(this->~IsRemoteControllable(controller))
+ {
+ if(GetOCF() & OCF_Grab)
+ {
+ return
+ [
+ [RC7I_Control_L, "ControlLeft" ],
+ [RC7I_Control_LS, "ControlLeftSingle" ],
+ [RC7I_Control_LD, "ControlLeftDouble" ],
+ [RC7I_Control_LR, "ControlLeftReleased" ],
+ [RC7I_Control_R, "ControlRight" ],
+ [RC7I_Control_RS, "ControlRightSingle" ],
+ [RC7I_Control_RD, "ControlRightDouble" ],
+ [RC7I_Control_RR, "ControlRightReleased" ],
+ [RC7I_Control_U, "ControlUp" ],
+ [RC7I_Control_US, "ControlUpSingle" ],
+ [RC7I_Control_UD, "ControlUpDouble" ],
+ [RC7I_Control_UR, "ControlUpReleased" ],
+ [RC7I_Control_D, "ControlDown" ],
+ [RC7I_Control_DS, "ControlDownSingle" ],
+ [RC7I_Control_DD, "ControlDownDouble" ],
+ [RC7I_Control_DR, "ControlDownReleased" ],
+ [RC7I_Control_T, "ControlThrow" ],
+ [RC7I_Control_TS, "ControlThrowSingle" ],
+ [RC7I_Control_TD, "ControlThrowDouble" ],
+ [RC7I_Control_TR, "ControlThrowReleased" ],
+ [RC7I_Control_Q, "ControlDig" ],
+ [RC7I_Control_QS, "ControlDigSingle" ],
+ [RC7I_Control_QD, "ControlDigDouble" ],
+ [RC7I_Control_QR, "ControlDigReleased" ],
+ [RC7I_Control_S, "ControlSpecial" ],
+ [RC7I_Control_SS, "ControlSpecialSingle" ],
+ [RC7I_Control_SD, "ControlSpecialDouble" ],
+ [RC7I_Control_SR, "ControlSpecialReleased" ],
+ [RC7I_Control_Z, "ControlSpecial2" ],
+ [RC7I_Control_ZS, "ControlSpecial2Single" ],
+ [RC7I_Control_ZD, "ControlSpecial2Double" ],
+ [RC7I_Control_ZR, "ControlSpecial2Released" ],
+ [RC7I_Control_V, "ControlUpdate" ],
+ [RC7I_Control_L, BindCallback(RC7I->Callback("UpdateTargetDir"), [Bind(this), Bind(DIR_Left)]), "$ChangeDirLeft$"],
+ [RC7I_Control_R, BindCallback(RC7I->Callback("UpdateTargetDir"), [Bind(this), Bind(DIR_Right)]), "$ChangeDirRight$"],
+ [RC7I_Control_S, BindCallback(RC7I->Callback("ShiftTargetContents"), [Bind(this)]), "$ShiftContents$"],
+ [RC7I_Control_SD, BindCallback(RC7I->Callback("ShiftTargetContents"), [Bind(this)]), "$ShiftContents$"]
+ ];
+ }
+ else if(GetOCF() & OCF_Entrance)
+ {
+ return
+ [
+ [RC7I_Control_L, "ContainedLeft" ],
+ [RC7I_Control_LS, "ContainedLeftSingle" ],
+ [RC7I_Control_LD, "ContainedLeftDouble" ],
+ [RC7I_Control_LR, "ContainedLeftReleased" ],
+ [RC7I_Control_R, "ContainedRight" ],
+ [RC7I_Control_RS, "ContainedRightSingle" ],
+ [RC7I_Control_RD, "ContainedRightDouble" ],
+ [RC7I_Control_RR, "ContainedRightReleased" ],
+ [RC7I_Control_U, "ContainedUp" ],
+ [RC7I_Control_US, "ContainedUpSingle" ],
+ [RC7I_Control_UD, "ContainedUpDouble" ],
+ [RC7I_Control_UR, "ContainedUpReleased" ],
+ [RC7I_Control_D, "ContainedDown" ],
+ [RC7I_Control_DS, "ContainedDownSingle" ],
+ [RC7I_Control_DD, "ContainedDownDouble" ],
+ [RC7I_Control_DR, "ContainedDownReleased" ],
+ [RC7I_Control_T, "ContainedThrow" ],
+ [RC7I_Control_TS, "ContainedThrowSingle" ],
+ [RC7I_Control_TD, "ContainedThrowDouble" ],
+ [RC7I_Control_TR, "ContainedThrowReleased" ],
+ [RC7I_Control_Q, "ContainedDig" ],
+ [RC7I_Control_QS, "ContainedDigSingle" ],
+ [RC7I_Control_QD, "ContainedDigDouble" ],
+ [RC7I_Control_QR, "ContainedDigReleased" ],
+ [RC7I_Control_V, "ContainedUpdate" ],
+ [RC7I_Control_S, BindCallback(RC7I->Callback("ShiftTargetContents"), [Bind(this)]), "$ShiftContents$"],
+ [RC7I_Control_SD, BindCallback(RC7I->Callback("ShiftTargetContents"), [Bind(this)]), "$ShiftContents$"]
+ ];
+ }
+ }
+}
+
+
+func Setup(object caller, int &menuIndex)
+{
+ AddMenuItem("$AddControlTarget$", "AutoTarget", GetID(), caller, 0, caller, 0, C4MN_Add_ForceNoDesc);
+ ++menuIndex;
+ AddMenuItem("$SetViewObject$", "SelectViewObject", GetID(), caller, 0, caller, 0, C4MN_Add_ForceNoDesc);
+ ++menuIndex;
+ return true;
+}
+
+func GetPossibleTargets(object caller)
+{
+ return FindObjects((caller || this)->Find_AtPoint(), Find_Not(Find_Hostile(GetOwner(this))), Find_Func("IsRemoteControllable", this), Find_NoContainer(), Find_Exclude(this));
+}
+
+func AutoTarget(id id, object caller)
+{
+ var objs = GetPossibleTargets(caller);
+ var ret = caller->~CreateSelectionMenu("AddTarget", objs, GetID(), SelectTargetText(), this);
+ return ret;
+}
+
+func SelectViewObject(id id, object caller)
+{
+ var objs = GetPossibleTargets(caller);
+ var ret = caller->~CreateSelectionMenu("SetViewObject", objs, GetID(), SelectTargetText(), this);
+ if(ret && viewTarget)
+ {
+ AddMenuItem(RemoveTargetText(), "SetViewObject", GetID(), caller, 0, 0, 0, C4MN_Add_ForceNoDesc);
+ }
+ return ret;
+}
+
+func SetViewObject(id id, object obj)
+{
+ viewTarget = obj;
+}
+
+func Activate(object caller)
+{
+ if(!triggerCallbacks || !GetLength(triggerCallbacks))
+ {
+ _Setup(caller);
+ return true;
+ }
+ else if(caller)
+ {
+ user = caller;
+ caller->Exit(this);
+ realAttachPos = attachPos;
+ RemoteControlTimer(true);
+ controlTimer = AddTimer("RemoteControlTimer", 1);
+ SetCursor(GetController(caller), this);
+ if(viewTarget)
+ {
+ SetViewCursor(GetController(caller), viewTarget);
+ caller->CreateSelectMark()->MarkObject(viewTarget, 35);
+ }
+ SetCommand(caller, "Grab", this);
+ ExecuteCommand(caller);
+ SetAction("Active");
+ return true;
+ }
+ else if(!Attached())
+ {
+ return ControlDigDouble(caller, ...);
+ }
+}
+
+func ControlDigDouble(object caller)
+{
+ if(user || (caller && (GetProcedure(caller) != "PUSH" || GetActionTarget(0, caller) != this) && Contained() != caller))
+ {
+ Trigger(RC7I_Control_QD, caller || user, ...);
+ return true;
+ }
+ else if(Attached())
+ {
+ return Activate(caller, ...);
+ }
+}
+
+func RemoteControlTimer(bool first)
+{
+ if(!first && (GetProcedure(user) != "PUSH" || GetActionTarget(0, user) != this || !user))
+ {
+ SetCursor(GetOwner(user), user);
+ }
+ else
+ {
+ if(!GetPlrView(GetController(user)) && viewTarget && (first || !GetPlayerVal("MouseControl", "Player", GetController(user))))
+ {
+ SetPlrView(GetController(user), viewTarget);
+ }
+ SetSpeed();
+ if(viewTarget)
+ {
+ user->SetDir(GetX(viewTarget) > GetX(user));
+ }
+ SetR((2 * GetDir(user) - 1) * 30);
+ attachPos = [GetX(user) + (2 * GetDir(user) - 1) * 5, GetY(user)];
+ if(!Attached())
+ {
+ SetPosition(attachPos[0], attachPos[1]);
+ }
+ }
+}
+
+func AllowEntrance() { return !user; }
+
+func ControlUpdate(object caller)
+{
+ if(user || (caller && Contained() != caller))
+ {
+ return Trigger(RC7I_Control_V, user || caller, ...);
+ }
+}
+
+func ControlLeft(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_L, caller || user, ...);
+ }
+}
+
+func ControlLeftSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_LS, caller || user, ...);
+ }
+}
+
+func ControlLeftDouble(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_LD, caller || user, ...);
+ }
+}
+
+func ControlLeftReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_LR, caller || user, ...);
+ }
+}
+
+func ControlRight(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_R, caller || user, ...);
+ }
+}
+
+func ControlRightSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_RS, caller || user, ...);
+ }
+}
+
+func ControlRightDouble(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_RD, caller || user, ...);
+ }
+}
+
+func ControlRightReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_RR, caller || user, ...);
+ }
+}
+
+func ControlUp(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_U, caller || user, ...);
+ }
+}
+
+func ControlUpSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_US, caller || user, ...);
+ }
+}
+
+func ControlUpDouble(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_UD, caller || user, ...);
+ }
+}
+
+func ControlUpReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_UR, caller || user, ...);
+ }
+}
+
+func ControlDown(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_D, caller || user, ...);
+ }
+}
+
+func ControlDownSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_DS, caller || user, ...);
+ }
+}
+
+func ControlDownDouble(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_DD, caller || user, ...);
+ }
+}
+
+func ControlDownReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_DR, caller || user, ...);
+ }
+}
+
+func ControlThrow(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_T, caller || user, ...);
+ }
+}
+
+func ControlThrowSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_TS, caller || user, ...);
+ }
+}
+
+func ControlThrowDouble(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_TD, caller || user, ...);
+ }
+}
+
+func ControlThrowReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_TR, caller || user, ...);
+ }
+}
+
+func ControlDig(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_Q, caller || user, ...);
+ }
+}
+
+func ControlDigSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_QS, caller || user, ...);
+ }
+}
+
+func ControlDigReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_QD, caller || user, ...);
+ }
+}
+
+func ControlSpecial(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_S, caller || user, ...);
+ }
+}
+
+func ControlSpecialSingle(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_SS, caller || user, ...);
+ }
+}
+
+func ControlSpecialDouble(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_SD, caller || user, ...);
+ }
+}
+
+func ControlSpecialReleased(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_SR, caller || user, ...);
+ }
+}
+
+func ControlSpecial2(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_Z, caller || user, ...);
+ }
+}
+
+func ControlSpecial2Single(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_ZS, caller || user, ...);
+ }
+}
+
+func ControlSpecial2Double(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_ZD, caller || user, ...);
+ }
+}
+
+func ControlSpecial2Released(object caller)
+{
+ if((caller && Contained() != caller) || user)
+ {
+ return Trigger(RC7I_Control_ZR, caller || user, ...);
+ }
+}
+
+
+func UpdateTargetDir(object target, int dir)
+{
+ if(GetXDir(target) == 0)
+ {
+ SetDir(dir, target);
+ }
+}
+
+func ShiftTargetContents(object target)
+{
+ ShiftContents(target, false, 0, true);
+}
+
+func AddTarget(id id, object obj)
+{
+ if(!triggerCallbacks && !viewTarget)
+ {
+ SetViewObject(id, obj);
+ }
+ for(var mapping in obj->RemoteControlMap(this))
+ {
+ AddTargetAction(mapping[0], obj, [mapping[2] || GetControlName(mapping[0]), mapping[1]]);
+ }
+}
+
+func CrewSelection(bool deselect)
+{
+ if(deselect)
+ {
+ if(user)
+ {
+ SetViewCursor(GetController(user), 0);
+ }
+ SetCursor(GetController(user), user);
+ if(!Attached())
+ {
+ SetCommand(user, "UnGrab");
+ }
+ user = 0;
+ SetCategory(GetCategory(0, GetID()));
+ if(!Attached())
+ {
+ SetAction("Idle");
+ SetR(0);
+ }
+ if(controlTimer)
+ {
+ RemoveTimer(controlTimer);
+ attachPos = realAttachPos;
+ }
+ }
+}
+
+func Selection()
+{
+ if(viewTarget)
+ {
+ PlayerMessage(GetOwner(Contained()), "%s: {{%i}} %s%s", Contained(), TargetText(), GetID(viewTarget), GetName(viewTarget), ((!desc || !descVisible) && "") || "|");
+ Contained()->CreateSelectMark()->MarkObject(viewTarget, 35);
+ }
+}
+
+func Entrance(object container)
+{
+ if(GetOCF(container) & OCF_CrewMember)
+ {
+ Selection();
+ }
+}
+
+global func FxIntJnRAimTimer(object target, int number, int time)
+{
+ // Controller weg?
+ var controller = EffectVar(2, target, number);
+ if(!controller) return(-1);
+
+ // Controller muss Fahrzeug anfassen
+ if(target)
+ if(target->GetCategory() & C4D_Vehicle)
+ if(controller->GetProcedure() != "PUSH" || (controller->GetActionTarget() != target && GetID(controller->GetActionTarget()) != RC7I))
+ return FX_Execute_Kill;
+
+ if(target)
+ target->AimConf(EffectVar(0, target, number), EffectVar(1, target, number), EffectVar(2, target, number));
+ else if(EffectVar(3, target, number))
+ AimConf(EffectVar(0, target, number), EffectVar(1, target, number), EffectVar(2, target, number), EffectVar(3, target, number));
+ else
+ // Global call via eval()?
+ ;
+}
+
+func Attach(object caller)
+{
+ if(!user)
+ {
+ SetAction("Active");
+ var dir;
+ if(viewTarget)
+ {
+ dir = GetX(viewTarget) > GetX();
+ }
+ else
+ {
+ dir = Random(2);
+ }
+ SetR((dir * 2 - 1) * 30);
+ }
+ SetPosition(GetX(caller) + (2 * GetDir(caller) - 1) * 5, GetY(caller));
+}
+
+func Detach()
+{
+ if(!user)
+ {
+ SetAction("Idle");
+ SetR(0);
+ }
+}
+
+func AttachCondition() { return !user; }
+
+func DetachCondition() { return !user; }
+
+func IsRemoteControllable() { return true; }
+
+
+global func CreateMenu(sym, object menuObject)
+{
+ var mObj = menuObject || this;
+ var actionTarget = GetActionTarget(0, menuObject);
+ if(menuObject && menuObject->GetProcedure() == "PUSH" && GetID(actionTarget) == RC7I && LocalN("user", actionTarget) == menuObject)
+ {
+ menuObject = actionTarget;
+ }
+ return _inherited(sym, menuObject, ...);
+}
+
+global func AddMenuItem(caption, command, sym, object menuObject)
+{
+ var mObj = menuObject || this;
+ var actionTarget = GetActionTarget(0, menuObject);
+ if(menuObject && menuObject->GetProcedure() == "PUSH" && GetID(actionTarget) == RC7I && LocalN("user", actionTarget) == menuObject)
+ {
+ menuObject = actionTarget;
+ }
+ return _inherited(caption, command, sym, menuObject, ...);
+
+}
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/StringTblDE.txt b/Items.c4d/Sensors.c4d/RC.c4d/StringTblDE.txt
new file mode 100644
index 0000000..c4bbecb
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/StringTblDE.txt
@@ -0,0 +1,39 @@
+Left=Links
+LeftSingle=Einfach Links
+LeftDouble=Doppelt Links
+LeftReleased=Links loslassen
+Right=Rechts
+RightSingle=Einfach Rechts
+RightDouble=Doppelt Rechts
+RightReleased=Rechts loslassen
+Up=Hoch
+UpSingle=Einfach Hoch
+UpDouble=Doppelt Hoch
+UpReleased=Hoch loslassen
+Down=Runter
+DownSingle=Einfach Runter
+DownDouble=Doppelt Runter
+DownReleased=Runter loslassen
+Throw=Werfen
+ThrowSingle=Einfach Werfen
+ThrowDouble=Doppelt Werfen
+ThrowReleased=Werfen loslassen
+Dig=Graben
+DigSingle=Einfach Graben
+DigDouble=Doppelt Graben
+DigReleased=Graben loslassen
+Special=Spezial
+SpecialSingle=Einfach Spezial
+SpecialDouble=Doppelt Spezial
+SpecialReleased=Spezial loslassen
+Special2=Spezial 2
+Special2Single=Einfach Spezial 2
+Special2Double=Doppelt Spezial 2
+Special2Released=Spezial 2 loslassen
+Update=Steuerungsupdate
+ChangeDirLeft=Blickrichtung links
+ChangeDirRight=Blickrichtung rechts
+ShiftContents=Inventarwechsel
+
+AddControlTarget=Steuerziel hinzufügen
+SetViewObject=Sichtobjekt wählen
diff --git a/Items.c4d/Sensors.c4d/RC.c4d/StringTblUS.txt b/Items.c4d/Sensors.c4d/RC.c4d/StringTblUS.txt
new file mode 100644
index 0000000..fe37386
--- /dev/null
+++ b/Items.c4d/Sensors.c4d/RC.c4d/StringTblUS.txt
@@ -0,0 +1,39 @@
+Left=Left
+LeftSingle=Left single
+LeftDouble=Left double
+LeftReleased=Left released
+Right=Right
+RightSingle=Right single
+RightDouble=Right double
+RightReleased=Right released
+Up=Up
+UpSingle=Up single
+UpDouble=Up double
+UpReleased=Up released
+Down=Down
+DownSingle=Down single
+DownDouble=Down double
+DownReleased=Down released
+Throw=Throw
+ThrowSingle=Throw single
+ThrowDouble=Throw double
+ThrowReleased=Throw released
+Dig=Dig
+DigSingle=Dig single
+DigDouble=Dig double
+DigReleased=Dig released
+Special=Special
+SpecialSingle=Special single
+SpecialDouble=Special double
+SpecialReleased=Special released
+Special2=Special 2
+Special2Single=Special 2 single
+Special2Double=Special 2 double
+Special2Released=Special 2 released
+Update=Control update
+ChangeDirLeft=Direction left
+ChangeDirRight=Direction right
+ShiftContents=Shift contents
+
+AddControlTarget=Add control target
+SetViewObject=Select view object