diff --git a/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/DefCore.txt b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/DefCore.txt new file mode 100644 index 000000000..d3752b050 --- /dev/null +++ b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/DefCore.txt @@ -0,0 +1,15 @@ +[DefCore] +id=Attacher +Version=8,0 +Category=C4D_Object +Width=8 +Height=12 +Offset=-4,-6 +Vertices=4 +VertexX=-1,-1,-3,3 +VertexY=1,5,-2,-2 +VertexFriction=80,80,80,80 +Value=8 +Mass=15 +Rotate=1 + diff --git a/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Graphics.mesh b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Graphics.mesh new file mode 100644 index 000000000..989382cd4 Binary files /dev/null and b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Graphics.mesh differ diff --git a/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Hammer.skeleton b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Hammer.skeleton new file mode 100644 index 000000000..94c29374a Binary files /dev/null and b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Hammer.skeleton differ diff --git a/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Script.c b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Script.c new file mode 100644 index 000000000..3f791cbcf --- /dev/null +++ b/planet/Tests.ocf/ClonkAttachments.ocs/Dummy.ocd/Script.c @@ -0,0 +1,16 @@ +/** + Attachment dummy +*/ + + +/*-- Display --*/ + +public func GetCarryMode(object clonk, bool idle) +{ + return CARRY_Belt; +} + +func Definition(def) +{ + SetProperty("PictureTransformation", Trans_Rotate(20, 1, 0, 1), def); +} diff --git a/planet/Tests.ocf/ClonkAttachments.ocs/Script.c b/planet/Tests.ocf/ClonkAttachments.ocs/Script.c index ebfbae9d5..1e6f70132 100644 --- a/planet/Tests.ocf/ClonkAttachments.ocs/Script.c +++ b/planet/Tests.ocf/ClonkAttachments.ocs/Script.c @@ -257,7 +257,7 @@ global func Test1_Run() if (corpse) corpse.Visibility = VIS_None; if (collector) collector.Visibility = VIS_None; if (item) item->Enter(test.test1_store); - RemoveAll(Find_ID(Rock)); + RemoveAll(Find_ID(Attacher)); test.test1_index += 1; return; } @@ -302,7 +302,7 @@ global func Test1_Run() if (test.test1_corpse_display[index] == nil) { - test.test1_corpse_display[index] = Test1_IsAttached(corpse, attachment_id); + test.test1_corpse_display[index] = Test1_IsAttached(corpse, attachment_id + 1); // the corpse also had the attacher } if (item->Contained() != collector) @@ -327,9 +327,9 @@ global func Test1_Run() test.test1_corpse[index] = corpse = CreateObject(Clonk, cursor->GetX() + 100, cursor->GetY(), script_plr); item->SetPosition(corpse->GetX(), corpse->GetY()); corpse->Collect(test.test1_item[index]); - corpse->CreateContents(Rock); // Create something else, so that the item is not displayed as a hand item - corpse->ShiftContents(nil, Rock); - corpse->FindContents(Rock).Visibility = VIS_None; + corpse->CreateContents(Attacher); // Create something else, so that the actual item is displayed in the quick slot + corpse->ShiftContents(nil, Attacher); + //corpse->FindContents(Attacher).Visibility = VIS_None; Wait(collect_delay); } }