forked from Mirrors/openclonk
make setting loaded public in musket and grenade launcher
parent
ca265103bb
commit
255429d3e0
|
@ -108,9 +108,7 @@ func ControlUseStart(object clonk, int x, int y)
|
|||
// Callback from the clonk when loading is finished
|
||||
public func FinishedLoading(object clonk)
|
||||
{
|
||||
// Change picture to indicate being loaded.
|
||||
this.PictureTransformation = Trans_Mul(Trans_Translate(-3000, 3000, 4000),Trans_Rotate(-45,0,0,1),Trans_Rotate(130,0,1,0));
|
||||
loaded = true;
|
||||
SetLoaded();
|
||||
if(holding) clonk->StartAim(this);
|
||||
return holding; // false means stop here and reset the clonk
|
||||
}
|
||||
|
@ -199,6 +197,14 @@ func RejectCollect(id shotid, object shot)
|
|||
if(!(shot->~IsGrenadeLauncherAmmo())) return true;
|
||||
}
|
||||
|
||||
public func SetLoaded()
|
||||
{
|
||||
loaded = true;
|
||||
// Change picture to indicate being loaded.
|
||||
this.PictureTransformation = Trans_Mul(Trans_Translate(-3000, 3000, 4000),Trans_Rotate(-45,0,0,1),Trans_Rotate(130,0,1,0));
|
||||
return;
|
||||
}
|
||||
|
||||
public func IsLoaded() { return loaded; }
|
||||
|
||||
// Can only be stacked with same state: loaded vs. non-loaded.
|
||||
|
|
|
@ -106,8 +106,7 @@ func ControlUseStart(object clonk, int x, int y)
|
|||
// Callback from the clonk when loading is finished
|
||||
public func FinishedLoading(object clonk)
|
||||
{
|
||||
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(500,1000,-000),Trans_Rotate(130,0,1,0),Trans_Rotate(20,0,0,1)));
|
||||
loaded = true;
|
||||
SetLoaded();
|
||||
if(holding) clonk->StartAim(this);
|
||||
return holding; // false means stop here and reset the clonk
|
||||
}
|
||||
|
@ -183,6 +182,14 @@ func RejectCollect(id shotid, object shot)
|
|||
if(!(shot->~IsMusketAmmo())) return true;
|
||||
}
|
||||
|
||||
public func SetLoaded()
|
||||
{
|
||||
loaded = true;
|
||||
// Change picture to indicate being loaded.
|
||||
this.PictureTransformation = Trans_Mul(Trans_Translate(500,1000,-000),Trans_Rotate(130,0,1,0),Trans_Rotate(20,0,0,1));
|
||||
return;
|
||||
}
|
||||
|
||||
public func IsLoaded() { return loaded; }
|
||||
|
||||
// Can only be stacked with same state: loaded vs. non-loaded.
|
||||
|
|
Loading…
Reference in New Issue