From b416d03c682f34d7f670a9ce14c677896b5f126e Mon Sep 17 00:00:00 2001 From: otta8634 Date: Wed, 1 Jan 2025 13:41:56 +0800 Subject: [PATCH] Add turrets to the guide 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. --- qcsrc/common/turrets/cl_turrets.qc | 2 +- qcsrc/common/turrets/config.qc | 4 ++-- qcsrc/common/turrets/sv_turrets.qc | 2 +- qcsrc/common/turrets/turret.qh | 13 +++++++++++-- qcsrc/common/turrets/turret/ewheel.qc | 12 ++++++++++++ qcsrc/common/turrets/turret/ewheel.qh | 2 +- qcsrc/common/turrets/turret/flac.qc | 16 +++++++++++++++- qcsrc/common/turrets/turret/flac.qh | 2 +- qcsrc/common/turrets/turret/fusionreactor.qc | 14 +++++++++++++- qcsrc/common/turrets/turret/fusionreactor.qh | 2 +- qcsrc/common/turrets/turret/hellion.qc | 14 +++++++++++++- qcsrc/common/turrets/turret/hellion.qh | 2 +- qcsrc/common/turrets/turret/hk.qc | 12 ++++++++++++ qcsrc/common/turrets/turret/hk.qh | 2 +- qcsrc/common/turrets/turret/machinegun.qc | 11 +++++++++++ qcsrc/common/turrets/turret/machinegun.qh | 2 +- qcsrc/common/turrets/turret/mlrs.qc | 13 +++++++++++++ qcsrc/common/turrets/turret/mlrs.qh | 2 +- qcsrc/common/turrets/turret/phaser.qc | 13 ++++++++++++- qcsrc/common/turrets/turret/phaser.qh | 2 +- qcsrc/common/turrets/turret/plasma.qc | 15 ++++++++++++++- qcsrc/common/turrets/turret/plasma.qh | 2 +- qcsrc/common/turrets/turret/plasma_dual.qc | 15 ++++++++++++++- qcsrc/common/turrets/turret/plasma_dual.qh | 2 +- qcsrc/common/turrets/turret/tesla.qc | 13 ++++++++++++- qcsrc/common/turrets/turret/tesla.qh | 2 +- qcsrc/common/turrets/turret/walker.qc | 14 ++++++++++++++ qcsrc/common/turrets/turret/walker.qh | 2 +- 28 files changed, 182 insertions(+), 25 deletions(-) diff --git a/qcsrc/common/turrets/cl_turrets.qc b/qcsrc/common/turrets/cl_turrets.qc index 219b23318..081d8003e 100644 --- a/qcsrc/common/turrets/cl_turrets.qc +++ b/qcsrc/common/turrets/cl_turrets.qc @@ -216,7 +216,7 @@ void turret_construct(entity this, bool isnew) 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); diff --git a/qcsrc/common/turrets/config.qc b/qcsrc/common/turrets/config.qc index 14c51be66..777cda91b 100644 --- a/qcsrc/common/turrets/config.qc +++ b/qcsrc/common/turrets/config.qc @@ -65,13 +65,13 @@ void Dump_Turret_Settings() 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 diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index cc9700c0a..9a9a902c2 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -1356,7 +1356,7 @@ bool turret_initialize(entity this, Turret tur) 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; diff --git a/qcsrc/common/turrets/turret.qh b/qcsrc/common/turrets/turret.qh index d46d54f58..700e67a66 100644 --- a/qcsrc/common/turrets/turret.qh +++ b/qcsrc/common/turrets/turret.qh @@ -8,7 +8,9 @@ CLASS(Turret, Object) /** 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 */ @@ -23,7 +25,7 @@ CLASS(Turret, Object) 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)) { @@ -52,6 +54,13 @@ CLASS(Turret, Object) #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: diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index 702662357..974af4a7a 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -241,3 +241,15 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it)) } #endif // CSQC +#ifdef MENUQC +#include + +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 diff --git a/qcsrc/common/turrets/turret/ewheel.qh b/qcsrc/common/turrets/turret/ewheel.qh index 8a78d37be..a73c465bf 100644 --- a/qcsrc/common/turrets/turret/ewheel.qh +++ b/qcsrc/common/turrets/turret/ewheel.qh @@ -12,7 +12,7 @@ CLASS(EWheel, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/flac.qc b/qcsrc/common/turrets/turret/flac.qc index 6a81bc2c9..8deafec9d 100644 --- a/qcsrc/common/turrets/turret/flac.qc +++ b/qcsrc/common/turrets/turret/flac.qc @@ -12,4 +12,18 @@ METHOD(Flac, tr_setup, void(Flac this, entity it)) it.target_select_flags |= TFL_TARGETSELECT_NOTURRETS | TFL_TARGETSELECT_MISSILESONLY; } -#endif +#endif // SVQC +#ifdef MENUQC +#include +#include +#include + +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 diff --git a/qcsrc/common/turrets/turret/flac.qh b/qcsrc/common/turrets/turret/flac.qh index 9892cbba3..16330edf2 100644 --- a/qcsrc/common/turrets/turret/flac.qh +++ b/qcsrc/common/turrets/turret/flac.qh @@ -10,7 +10,7 @@ CLASS(Flac, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/fusionreactor.qc b/qcsrc/common/turrets/turret/fusionreactor.qc index 32ac81d58..81a531065 100644 --- a/qcsrc/common/turrets/turret/fusionreactor.qc +++ b/qcsrc/common/turrets/turret/fusionreactor.qc @@ -51,4 +51,16 @@ METHOD(FusionReactor, tr_setup, void(FusionReactor this, entity it)) 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 diff --git a/qcsrc/common/turrets/turret/fusionreactor.qh b/qcsrc/common/turrets/turret/fusionreactor.qh index 0723ba582..42ab95c06 100644 --- a/qcsrc/common/turrets/turret/fusionreactor.qh +++ b/qcsrc/common/turrets/turret/fusionreactor.qh @@ -8,7 +8,7 @@ CLASS(FusionReactor, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/hellion.qc b/qcsrc/common/turrets/turret/hellion.qc index 15dc36b3d..8452cb024 100644 --- a/qcsrc/common/turrets/turret/hellion.qc +++ b/qcsrc/common/turrets/turret/hellion.qc @@ -20,4 +20,16 @@ METHOD(Hellion, tr_setup, void(Hellion this, entity it)) it.ammo_flags = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE; } -#endif +#endif // SVQC +#ifdef MENUQC +#include + +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 diff --git a/qcsrc/common/turrets/turret/hellion.qh b/qcsrc/common/turrets/turret/hellion.qh index 23aaa4abc..a3b964430 100644 --- a/qcsrc/common/turrets/turret/hellion.qh +++ b/qcsrc/common/turrets/turret/hellion.qh @@ -10,7 +10,7 @@ CLASS(Hellion, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/hk.qc b/qcsrc/common/turrets/turret/hk.qc index ba2e89c2c..51d3b26b9 100644 --- a/qcsrc/common/turrets/turret/hk.qc +++ b/qcsrc/common/turrets/turret/hk.qc @@ -45,3 +45,15 @@ bool turret_hk_addtarget(entity this, entity e_target,entity e_sender) } #endif // SVQC +#ifdef MENUQC +#include + +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 diff --git a/qcsrc/common/turrets/turret/hk.qh b/qcsrc/common/turrets/turret/hk.qh index 29060a61d..34a454716 100644 --- a/qcsrc/common/turrets/turret/hk.qh +++ b/qcsrc/common/turrets/turret/hk.qh @@ -12,7 +12,7 @@ CLASS(HunterKiller, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/machinegun.qc b/qcsrc/common/turrets/turret/machinegun.qc index a2ee1def6..73da02f9a 100644 --- a/qcsrc/common/turrets/turret/machinegun.qc +++ b/qcsrc/common/turrets/turret/machinegun.qc @@ -14,3 +14,14 @@ METHOD(MachineGunTurret, tr_setup, void(MachineGunTurret this, entity it)) } #endif // SVQC +#ifdef MENUQC +#include + +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 diff --git a/qcsrc/common/turrets/turret/machinegun.qh b/qcsrc/common/turrets/turret/machinegun.qh index 99b1f79e4..4250e2834 100644 --- a/qcsrc/common/turrets/turret/machinegun.qh +++ b/qcsrc/common/turrets/turret/machinegun.qh @@ -10,7 +10,7 @@ CLASS(MachineGunTurret, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/mlrs.qc b/qcsrc/common/turrets/turret/mlrs.qc index 2315012b1..49d87523e 100644 --- a/qcsrc/common/turrets/turret/mlrs.qc +++ b/qcsrc/common/turrets/turret/mlrs.qc @@ -25,3 +25,16 @@ METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it)) } #endif // SVQC +#ifdef MENUQC +#include + +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 diff --git a/qcsrc/common/turrets/turret/mlrs.qh b/qcsrc/common/turrets/turret/mlrs.qh index 0c7c98f9d..075a1acba 100644 --- a/qcsrc/common/turrets/turret/mlrs.qh +++ b/qcsrc/common/turrets/turret/mlrs.qh @@ -10,7 +10,7 @@ CLASS(MLRSTurret, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/phaser.qc b/qcsrc/common/turrets/turret/phaser.qc index 9c93a6e89..1706c3ba3 100644 --- a/qcsrc/common/turrets/turret/phaser.qc +++ b/qcsrc/common/turrets/turret/phaser.qc @@ -42,4 +42,15 @@ bool turret_phaser_firecheck(entity this) 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 diff --git a/qcsrc/common/turrets/turret/phaser.qh b/qcsrc/common/turrets/turret/phaser.qh index 0901f5c79..de70502cd 100644 --- a/qcsrc/common/turrets/turret/phaser.qh +++ b/qcsrc/common/turrets/turret/phaser.qh @@ -10,7 +10,7 @@ CLASS(PhaserTurret, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/plasma.qc b/qcsrc/common/turrets/turret/plasma.qc index 66000939e..0b2ef14d8 100644 --- a/qcsrc/common/turrets/turret/plasma.qc +++ b/qcsrc/common/turrets/turret/plasma.qc @@ -43,4 +43,17 @@ METHOD(PlasmaTurret, tr_setup, void(PlasmaTurret this, entity it)) turret_do_updates(it); } -#endif +#endif // SVQC +#ifdef MENUQC +#include +#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 diff --git a/qcsrc/common/turrets/turret/plasma.qh b/qcsrc/common/turrets/turret/plasma.qh index bc38f6ffd..29225670b 100644 --- a/qcsrc/common/turrets/turret/plasma.qh +++ b/qcsrc/common/turrets/turret/plasma.qh @@ -10,7 +10,7 @@ CLASS(PlasmaTurret, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/plasma_dual.qc b/qcsrc/common/turrets/turret/plasma_dual.qc index 920f88ad2..38336b13a 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qc +++ b/qcsrc/common/turrets/turret/plasma_dual.qc @@ -31,4 +31,17 @@ METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it)) it.tur_head.frame = 0; } -#endif +#endif // SVQC +#ifdef MENUQC +#include +#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 diff --git a/qcsrc/common/turrets/turret/plasma_dual.qh b/qcsrc/common/turrets/turret/plasma_dual.qh index 299475cd0..f97b582ce 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qh +++ b/qcsrc/common/turrets/turret/plasma_dual.qh @@ -17,7 +17,7 @@ CLASS(DualPlasmaTurret, PlasmaTurret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/tesla.qc b/qcsrc/common/turrets/turret/tesla.qc index 4c27bc9ac..e3fba0634 100644 --- a/qcsrc/common/turrets/turret/tesla.qc +++ b/qcsrc/common/turrets/turret/tesla.qc @@ -85,4 +85,15 @@ bool turret_tesla_firecheck(entity this) 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 diff --git a/qcsrc/common/turrets/turret/tesla.qh b/qcsrc/common/turrets/turret/tesla.qh index 6f01737be..29cd0a298 100644 --- a/qcsrc/common/turrets/turret/tesla.qh +++ b/qcsrc/common/turrets/turret/tesla.qh @@ -10,7 +10,7 @@ CLASS(TeslaCoil, Turret) /* 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) \ diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 8e347f962..8777c3a5c 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -640,3 +640,17 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it)) } #endif // CSQC +#ifdef MENUQC +#include +#include + +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 diff --git a/qcsrc/common/turrets/turret/walker.qh b/qcsrc/common/turrets/turret/walker.qh index 466040468..5da7e9fd6 100644 --- a/qcsrc/common/turrets/turret/walker.qh +++ b/qcsrc/common/turrets/turret/walker.qh @@ -12,7 +12,7 @@ CLASS(WalkerTurret, Turret) /* 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) \ -- 2.39.5