summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g
diff options
context:
space:
mode:
authorMittendrein Markus <maxmitti@gmx.net>2016-02-14 19:17:02 +0100
committerMittendrein Markus <maxmitti@gmx.net>2016-02-14 19:17:02 +0100
commit97be09d6ed4935c4558fee4e1776aed963386bff (patch)
treeeae50cdc3214e3b20b7db53e89552bdd1d88be49 /TemplePushing.c4s/System.c4g
parent01f5e944fd7b124f5ac4f37e127345feaee44624 (diff)
downloadtempelschubsen-97be09d6ed4935c4558fee4e1776aed963386bff.tar.gz
tempelschubsen-97be09d6ed4935c4558fee4e1776aed963386bff.zip
Show spells of collected scrolls to teammembers above the clonk
Diffstat (limited to 'TemplePushing.c4s/System.c4g')
-rw-r--r--TemplePushing.c4s/System.c4g/Clonk.c15
-rw-r--r--TemplePushing.c4s/System.c4g/Scroll.c9
2 files changed, 24 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/Clonk.c b/TemplePushing.c4s/System.c4g/Clonk.c
index cad2f5f..64738a5 100644
--- a/TemplePushing.c4s/System.c4g/Clonk.c
+++ b/TemplePushing.c4s/System.c4g/Clonk.c
@@ -4,11 +4,14 @@
#appendto CLNK
+local teamHud;
local rotateInJump;
local removeOnDeath;
protected func Initialize()
{
+ teamHud = CreateObject(THUD);
+ teamHud->Attach(this);
AddEffect("CheckStuck2", this, 20, 1, this);
AddEffect("CheckBurn", this, 101, 0, this);
SetPhysical("Fight", 75000, PHYS_Temporary, this);
@@ -79,6 +82,7 @@ protected func ControlRight()
protected func Death(int killedBy)
{
var ret = _inherited(killedBy);
+ if (teamHud) RemoveObject(teamHud);
if (removeOnDeath) RemoveObject();
return ret;
}
@@ -107,3 +111,14 @@ func FxCheckBurnEffect(string newEffectName, object target, int effectNumber, in
{
if (newEffectName == "Fire" && incineratingObject && incineratingObject->~QueryIncinerateObject(target)) return FX_Effect_Deny;
}
+
+func ShowTeamHUD(string text)
+{
+ if (teamHud) teamHud->Show(text, 72);
+}
+
+func Collection(object obj)
+{
+ obj->~Entrance2(this);
+ return _inherited(obj, ...);
+}
diff --git a/TemplePushing.c4s/System.c4g/Scroll.c b/TemplePushing.c4s/System.c4g/Scroll.c
index 15ae5e0..c9098df 100644
--- a/TemplePushing.c4s/System.c4g/Scroll.c
+++ b/TemplePushing.c4s/System.c4g/Scroll.c
@@ -51,3 +51,12 @@ func SetSpell(id spell)
SetClrModulation(spell->~ScrollColor());
return _inherited(spell, ...);
}
+
+func Entrance2(object pContainer)
+{
+ if (pContainer && GetOCF(pContainer) & OCF_CrewMember)
+ {
+ pContainer->~ShowTeamHUD(Format("{{%i}}", idSpell));
+ }
+ return _inherited(pContainer, ...);
+}