Descriptions were somewhat based on scripts/entities.ent from xonotic/xonotic-maps.pk3dir.
Also renamed .turret_name -> .m_name, so the COLORED_NAME macros could work on turrets.
if(this.tur_head == NULL)
this.tur_head = spawn();
- this.netname = tur.turret_name;
+ this.netname = tur.m_name;
setorigin(this, this.origin);
_setmodel(this, tur.model);
heapsort(TUR_CONFIG_COUNT, T_Config_Queue_Swap, T_Config_Queue_Compare, NULL);
// step 4: write queue
- TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, it.turret_name));
+ TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, it.m_name));
for (int j = 0; j < TUR_CONFIG_COUNT; ++j)
TUR_CONFIG_WRITETOFILE(config_queue[j]);
TUR_CONFIG_WRITETOFILE("// }}}\n");
// step 5: debug info
- LOG_INFOF("#%d: %s: %d settings...", i, it.turret_name, TUR_CONFIG_COUNT);
+ LOG_INFOF("#%d: %s: %d settings...", i, it.m_name, TUR_CONFIG_COUNT);
totalsettings += TUR_CONFIG_COUNT;
});
#undef TUR_CONFIG_WRITETOFILE
this.m_id = tur.m_id;
this.active = ACTIVE_ACTIVE;
this.effects = EF_NODRAW;
- this.netname = tur.turret_name;
+ this.netname = tur.m_name;
this.max_health = GetResource(this, RES_HEALTH);
this.target_validate_flags = this.target_select_flags;
this.ammo = this.ammo_max;
/** short name */
ATTRIB(Turret, netname, string);
/** human readable name */
- ATTRIB(Turret, turret_name, string, _("Turret"));
+ ATTRIB(Turret, m_name, string, _("Turret"));
+ /** color */
+ ATTRIB(Turret, m_color, vector, '1 1 1');
/** currently a copy of the model */
ATTRIB(Turret, mdl, string);
/** full name of model */
ATTRIB(Turret, m_maxs, vector, '0 0 0');
METHOD(Turret, display, void(Turret this, void(string name, string icon) returns)) {
- returns(this.turret_name, string_null);
+ returns(this.m_name, string_null);
}
/** (BOTH) setup turret data */
METHOD(Turret, tr_setup, void(Turret this, entity it)) {
#endif
/** (SERVER) dump turret cvars to config in data directory (see: sv_cmd dumpturrets) */
METHOD(Turret, tr_config, void(Turret this)) { }
+
+#ifdef MENUQC
+ METHOD(Turret, describe, string(Turret this)) {
+ TC(Turret, this);
+ return SUPER(Object).describe(this);
+ }
+#endif
ENDCLASS(Turret)
// fields:
}
#endif // CSQC
+#ifdef MENUQC
+#include <common/weapons/weapon/blaster.qh>
+
+METHOD(EWheel, describe, string(EWheel this))
+{
+ TC(Ewheel, this);
+ return sprintf(_("The %s is a mobile turret that rolls around, attacking its targets when they enter its line of sight\n\n"
+ "It attacks by shooting laser beams similar to those of the %s, from both of its two cannons"),
+ COLORED_NAME(this), COLORED_NAME(WEP_BLASTER));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(EWheel, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(EWheel, head_model, string, strcat("models/turrets/", "ewheel-gun1.md3"));
/* netname */ ATTRIB(EWheel, netname, string, "ewheel");
-/* fullname */ ATTRIB(EWheel, turret_name, string, _("eWheel Turret"));
+/* fullname */ ATTRIB(EWheel, m_name, string, _("eWheel Turret"));
ATTRIB(EWheel, m_weapon, Weapon, WEP_EWHEEL);
#define X(BEGIN, P, END, class, prefix) \
it.target_select_flags |= TFL_TARGETSELECT_NOTURRETS | TFL_TARGETSELECT_MISSILESONLY;
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/devastator.qh>
+#include <common/weapons/weapon/electro.qh>
+#include <common/weapons/weapon/mortar.qh>
+
+METHOD(Flac, describe, string(Flac this))
+{
+ TC(Flac, this);
+ return sprintf(_("The %s is a turret similar to flak cannons, instead firing anti-projectile flak shells to take down projectiles fired by its targets\n\n"
+ "The shells it shoots are against projectiles such as the %s secondary fire grenade, %s secondary fire balls, %s rockets, and other missiles"),
+ COLORED_NAME(this), COLORED_NAME(WEP_MORTAR), COLORED_NAME(WEP_ELECTRO), COLORED_NAME(WEP_DEVASTATOR));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(Flac, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(Flac, head_model, string, strcat("models/turrets/", "flac.md3"));
/* netname */ ATTRIB(Flac, netname, string, "flac");
-/* fullname */ ATTRIB(Flac, turret_name, string, _("FLAC Cannon"));
+/* fullname */ ATTRIB(Flac, m_name, string, _("FLAC Cannon"));
ATTRIB(Flac, m_weapon, Weapon, WEP_FLAC);
#define X(BEGIN, P, END, class, prefix) \
it.turret_firecheckfunc = turret_fusionreactor_firecheck;
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+
+METHOD(FusionReactor, describe, string(FusionReactor this))
+{
+ TC(FusionReactor, this);
+ return sprintf(_("The %s is a bit of a unique turret, instead helping out other turrets rather than directly attacking its targets. "
+ "It has no weapon of its own, and instead works by generating power for nearby turrets, so that they can attack their shared targets more often\n\n"
+ "This is the only turret that doesn't directly attack its targets"),
+ COLORED_NAME(this));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(FusionReactor, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(FusionReactor, head_model, string, strcat("models/turrets/", "reactor.md3"));
/* netname */ ATTRIB(FusionReactor, netname, string, "fusreac");
-/* fullname */ ATTRIB(FusionReactor, turret_name, string, _("Fusion Reactor"));
+/* fullname */ ATTRIB(FusionReactor, m_name, string, _("Fusion Reactor"));
ENDCLASS(FusionReactor)
#define X(BEGIN, P, END, class, prefix) \
it.ammo_flags = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE;
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/devastator.qh>
+
+METHOD(Hellion, describe, string(Hellion this))
+{
+ TC(Hellion, this);
+ return sprintf(_("The %s fires homing missiles similar to those of the %s towards its targets\n\n"
+ "Although the missiles usually deal less damage than a %s rocket, the %s has two cannons so it can dish out quite the punch"),
+ COLORED_NAME(this), COLORED_NAME(WEP_DEVASTATOR), COLORED_NAME(WEP_DEVASTATOR), COLORED_NAME(this));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(Hellion, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(Hellion, head_model, string, strcat("models/turrets/", "hellion.md3"));
/* netname */ ATTRIB(Hellion, netname, string, "hellion");
-/* fullname */ ATTRIB(Hellion, turret_name, string, _("Hellion Missile Turret"));
+/* fullname */ ATTRIB(Hellion, m_name, string, _("Hellion Missile Turret"));
ATTRIB(Hellion, m_weapon, Weapon, WEP_HELLION);
#define X(BEGIN, P, END, class, prefix) \
}
#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/devastator.qh>
+
+METHOD(HunterKiller, describe, string(HunterKiller this))
+{
+ TC(HunterKiller, this);
+ return sprintf(_("The %s fires a single powerful homing rocket with the ability to evade obstacles to find its target. "
+ "The rocket it fires is similar to that of the %s"),
+ COLORED_NAME(this), COLORED_NAME(WEP_DEVASTATOR));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(HunterKiller, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(HunterKiller, head_model, string, strcat("models/turrets/", "hk.md3"));
/* netname */ ATTRIB(HunterKiller, netname, string, "hk");
-/* fullname */ ATTRIB(HunterKiller, turret_name, string, _("Hunter-Killer Turret"));
+/* fullname */ ATTRIB(HunterKiller, m_name, string, _("Hunter-Killer Turret"));
ATTRIB(HunterKiller, m_weapon, Weapon, WEP_HK);
#define X(BEGIN, P, END, class, prefix) \
}
#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/machinegun.qh>
+
+METHOD(MachineGunTurret, describe, string(MachineGunTurret this))
+{
+ TC(MachineGunTurret, this);
+ return sprintf(_("As the name suggests, the %s fires bullets in a burst at its targets, similar to the %s"),
+ COLORED_NAME(this), COLORED_NAME(WEP_MACHINEGUN));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(MachineGunTurret, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(MachineGunTurret, head_model, string, strcat("models/turrets/", "machinegun.md3"));
/* netname */ ATTRIB(MachineGunTurret, netname, string, "machinegun");
-/* fullname */ ATTRIB(MachineGunTurret, turret_name, string, _("Machinegun Turret"));
+/* fullname */ ATTRIB(MachineGunTurret, m_name, string, _("Machinegun Turret"));
ATTRIB(MachineGunTurret, m_weapon, Weapon, WEP_TUR_MACHINEGUN);
#define X(BEGIN, P, END, class, prefix) \
}
#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/devastator.qh>
+
+METHOD(MLRSTurret, describe, string(MLRSTurret this))
+{
+ TC(MLRSTurret, this);
+ return sprintf(_("The %s fires a rapid burst of 6 rockets similar to those of the %s towards its targets\n\n"
+ "Getting caught in the line of fire of this turret can be very deadly, "
+ "but thankfully it doesn't shoot if you get too close, so as to not damage itself"),
+ COLORED_NAME(this), COLORED_NAME(WEP_DEVASTATOR));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(MLRSTurret, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(MLRSTurret, head_model, string, strcat("models/turrets/", "mlrs.md3"));
/* netname */ ATTRIB(MLRSTurret, netname, string, "mlrs");
-/* fullname */ ATTRIB(MLRSTurret, turret_name, string, _("MLRS Turret"));
+/* fullname */ ATTRIB(MLRSTurret, m_name, string, _("MLRS Turret"));
ATTRIB(MLRSTurret, m_weapon, Weapon, WEP_TUR_MLRS);
#define X(BEGIN, P, END, class, prefix) \
return turret_firecheck(this);
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+
+METHOD(PhaserTurret, describe, string(PhaserTurret this))
+{
+ TC(PhaserTurret, this);
+ return sprintf(_("The %s is a turret that fires an invisible beam of energy towards its targets\n\n"
+ "Looks are deceiving with the %s, since although the beam of energy can't be seen, it constantly deals damage to and slows down players who intercept its path"),
+ COLORED_NAME(this), COLORED_NAME(this));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(PhaserTurret, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(PhaserTurret, head_model, string, strcat("models/turrets/", "phaser.md3"));
/* netname */ ATTRIB(PhaserTurret, netname, string, "phaser");
-/* fullname */ ATTRIB(PhaserTurret, turret_name, string, _("Phaser Cannon"));
+/* fullname */ ATTRIB(PhaserTurret, m_name, string, _("Phaser Cannon"));
ATTRIB(PhaserTurret, m_weapon, Weapon, WEP_PHASER);
#define X(BEGIN, P, END, class, prefix) \
turret_do_updates(it);
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/electro.qh>
+#include "plasma_dual.qh"
+
+METHOD(PlasmaTurret, describe, string(PlasmaTurret this))
+{
+ TC(PlasmaTurret, this);
+ return sprintf(_("The %s is a turret that fires electric balls forwards, similar to those of the %s\n\n"
+ "It is a weaker version of the %s, which has two electric ball cannons"),
+ COLORED_NAME(this), COLORED_NAME(WEP_ELECTRO), COLORED_NAME(TUR_PLASMA_DUAL));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(PlasmaTurret, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(PlasmaTurret, head_model, string, strcat("models/turrets/", "plasma.md3"));
/* netname */ ATTRIB(PlasmaTurret, netname, string, "plasma");
-/* fullname */ ATTRIB(PlasmaTurret, turret_name, string, _("Plasma Cannon"));
+/* fullname */ ATTRIB(PlasmaTurret, m_name, string, _("Plasma Cannon"));
ATTRIB(PlasmaTurret, m_weapon, Weapon, WEP_PLASMA);
#define X(BEGIN, P, END, class, prefix) \
it.tur_head.frame = 0;
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+#include <common/weapons/weapon/electro.qh>
+#include "plasma.qh"
+
+METHOD(DualPlasmaTurret, describe, string(DualPlasmaTurret this))
+{
+ TC(DualPlasmaTurret, this);
+ return sprintf(_("The %s is a turret that fires electric balls forwards from its two cannons, shooting balls similar to those of the %s\n\n"
+ "It is a stronger version of the %s, which only has one electric ball cannon"),
+ COLORED_NAME(this), COLORED_NAME(WEP_ELECTRO), COLORED_NAME(TUR_PLASMA));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(DualPlasmaTurret, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(DualPlasmaTurret, head_model, string, strcat("models/turrets/", "plasmad.md3"));
/* netname */ ATTRIB(DualPlasmaTurret, netname, string, "plasma_dual");
-/* fullname */ ATTRIB(DualPlasmaTurret, turret_name, string, _("Dual Plasma Cannon"));
+/* fullname */ ATTRIB(DualPlasmaTurret, m_name, string, _("Dual Plasma Cannon"));
ATTRIB(DualPlasmaTurret, m_weapon, Weapon, WEP_PLASMA_DUAL);
#define X(BEGIN, P, END, class, prefix) \
return false;
}
-#endif
+#endif // SVQC
+#ifdef MENUQC
+
+METHOD(TeslaCoil, describe, string(TeslaCoil this))
+{
+ TC(TeslaCoil, this);
+ return sprintf(_("The %s is a turret that electrocutes all who dare come near it, sending powerful high-voltage arcs of lightning to strike its targets\n\n"
+ "Since the arcs of lightning can jump between nearby targets, it is best to just stay away from the %s"),
+ COLORED_NAME(this), COLORED_NAME(this));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(TeslaCoil, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(TeslaCoil, head_model, string, strcat("models/turrets/", "tesla_head.md3"));
/* netname */ ATTRIB(TeslaCoil, netname, string, "tesla");
-/* fullname */ ATTRIB(TeslaCoil, turret_name, string, _("Tesla Coil"));
+/* fullname */ ATTRIB(TeslaCoil, m_name, string, _("Tesla Coil"));
ATTRIB(TeslaCoil, m_weapon, Weapon, WEP_TESLA);
#define X(BEGIN, P, END, class, prefix) \
}
#endif // CSQC
+#ifdef MENUQC
+#include <common/weapons/weapon/devastator.qh>
+#include <common/weapons/weapon/machinegun.qh>
+
+METHOD(WalkerTurret, describe, string(WalkerTurret this))
+{
+ TC(WalkerTurret, this);
+ return sprintf(_("The %s is an arachnid-like walking turret that hunts down its targets\n\n"
+ "It has two weapons, both a machinegun like the %s for medium range combat, and a rocket launcher shooting homing missiles like the %s for long range targets. "
+ "It also has the ability to melee close by targets"),
+ COLORED_NAME(this), COLORED_NAME(WEP_MACHINEGUN), COLORED_NAME(WEP_DEVASTATOR));
+}
+
+#endif // MENUQC
/* model */ ATTRIB_STRZONE(WalkerTurret, model, string, strcat("models/turrets/", this.mdl));
/* head_model */ ATTRIB_STRZONE(WalkerTurret, head_model, string, strcat("models/turrets/", "walker_head_minigun.md3"));
/* netname */ ATTRIB(WalkerTurret, netname, string, "walker");
-/* fullname */ ATTRIB(WalkerTurret, turret_name, string, _("Walker Turret"));
+/* fullname */ ATTRIB(WalkerTurret, m_name, string, _("Walker Turret"));
ATTRIB(WalkerTurret, m_weapon, Weapon, WEP_WALKER);
#define X(BEGIN, P, END, class, prefix) \