Skip to content
Permalink
Browse files

Test #1974: Improved test

The test can now actually reproduce the bug before it was fixed, and proves that it does not appear anymore now that it is fixed.
  • Loading branch information
gitMarky committed Jan 15, 2018
1 parent 601ca11 commit 4db6300789cd990b87cf9b8076ac7f88d7ce954e
@@ -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

Binary file not shown.
Binary file not shown.
@@ -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);
}
@@ -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);
}
}

0 comments on commit 4db6300

Please sign in to comment.
You can’t perform that action at this time.