QOL feature: Elemental Coating auto-use.
This commit is contained in:
parent
cf3d42f1ee
commit
9e0acada23
6 changed files with 62 additions and 2 deletions
|
|
@ -114,6 +114,8 @@ nosave int swwm_sewercount = 0; // I'm sorry Civvie
|
|||
server bool swwm_ondemandammo = false; // don't spawn ammo for unavailable weapons
|
||||
user float swwm_bumpstrength = 1.0; // intensity of fov bumping
|
||||
server bool swwm_nomagdrop = true; // does not drop spent magazines (the "environmentally conscious" option)
|
||||
user bool swwm_autousebarrier = true; // auto-use elemental coating when standing on damaging floors
|
||||
server int swwm_enforceautousebarrier = 0; // enforced auto-use for coating
|
||||
|
||||
// minimap settings
|
||||
nosave bool swwm_mm_enable = true; // show a minimap below the score counter
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ SWWM_BUMP = "FOV Bump Strength";
|
|||
SWWM_ENGINE = "Engine";
|
||||
SWWM_ITEMGLOWS = "Distant Items Glow";
|
||||
SWWM_NOMAGDROP = "Drop Spent Mags";
|
||||
SWWM_BARRIERUSE = "Automatically Use Coating";
|
||||
SWWM_SVBARRIERUSE = "Enforce Coating Auto-Use";
|
||||
SWWM_MMTITLE = "Minimap Settings";
|
||||
SWWM_MM_ENABLE = "Show Minimap";
|
||||
SWWM_MM_ROTATE = "Rotate Minimap";
|
||||
|
|
@ -340,6 +342,8 @@ TOOLTIP_SWWM_BUMPSTRENGTH = "Controls how strong the bumping of the FOV is from
|
|||
TOOLTIP_SWWM_ENGINE = "Don't touch this.";
|
||||
TOOLTIP_SWWM_ITEMGLOWS = "If enabled, items that are far away from the player will display a shimmering glow (requires a map restart to take full effect).";
|
||||
TOOLTIP_SWWM_NOMAGDROP = "By default, the Demolitionist will be somewhat environmentally conscious and not leave spent magazines lying around. Enable if you prefer the added clutter.";
|
||||
TOOLTIP_SWWM_AUTOUSEBARRIER = "When enabled, elemental coating will be automatically used as needed if standing on damaging floors.";
|
||||
TOOLTIP_SWWM_ENFORCEAUTOUSEBARRIER = "Enforce a specific coating auto-use setting for all players, or respects per-player settings.";
|
||||
TOOLTIP_SWWM_MM_ENABLE = "Displays a minimap under the score counter.";
|
||||
TOOLTIP_SWWM_MM_ROTATE = "Rotates the minimap view.";
|
||||
TOOLTIP_SWWM_MM_GRID = "Shows a 128x128 grid on the minimap.";
|
||||
|
|
|
|||
|
|
@ -196,6 +196,8 @@ SWWM_BUMP = "Intensidad de Sacudida de FOV";
|
|||
SWWM_ENGINE = "Motor";
|
||||
SWWM_ITEMGLOWS = "Los Ítems Lejanos Brillan";
|
||||
SWWM_NOMAGDROP = "Tirar Cargadores Usados";
|
||||
SWWM_BARRIERUSE = "Usar Revestimiento Automáticamente";
|
||||
SWWM_SVBARRIERUSE = "Forzar Auto-Uso de Revestimiento";
|
||||
SWWM_MMTITLE = "Opciones de Minimapa";
|
||||
SWWM_MM_ENABLE = "Mostrar Minimapa";
|
||||
SWWM_MM_ROTATE = "Rotar Minimapa";
|
||||
|
|
@ -339,6 +341,8 @@ TOOLTIP_SWWM_BUMPSTRENGTH = "Controla lo intensa que es la sacudida del FOV por
|
|||
TOOLTIP_SWWM_ENGINE = "No toques esto.";
|
||||
TOOLTIP_SWWM_ITEMGLOWS = "Al activar, los ítems que se encuentren lejos del jugador mostrarán un ligero destello (requiere un reinicio del mapa para tener efecto completamente).";
|
||||
TOOLTIP_SWWM_NOMAGDROP = "Por defecto, la Demolicionista será un poco consciente con el medio ambiente y no dejará cargadores usados por ahí. Activa si prefieres la basura adicional.";
|
||||
TOOLTIP_SWWM_AUTOUSEBARRIER = "Cuando esto está activado, el revestimiento elemental será usado automáticamente si es necesario al estar en suelos dañinos.";
|
||||
TOOLTIP_SWWM_ENFORCEAUTOUSEBARRIER = "Fuerza una opción específica de auto-uso de revestimiento para todos los jugadores, o respeta la opción de cada uno.";
|
||||
TOOLTIP_SWWM_MM_ENABLE = "Muestra un minimapa bajo el contador de puntuación.";
|
||||
TOOLTIP_SWWM_MM_ROTATE = "Gira la vista del minimapa.";
|
||||
TOOLTIP_SWWM_MM_GRID = "Muestra una cuadrícula de 128x128 en el minimapa.";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.1pre r10 \cu(Tue 7 Sep 00:39:49 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.1pre r10 \cu(2021-09-07 00:39:49)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.1pre r10 \cu(Tue 7 Sep 00:44:35 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.1pre r10 \cu(2021-09-07 00:44:35)\c-";
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ OptionMenu "SWWMOptionMenu"
|
|||
Option "$SWWM_ARMORUSE", "swwm_autousearmor", "YesNo"
|
||||
Option "$SWWM_HEALTHUSE", "swwm_autousehealth", "YesNo"
|
||||
Option "$SWWM_AMMOUSE", "swwm_autouseammo", "YesNo"
|
||||
Option "$SWWM_BARRIERUSE", "swwm_autousebarrier", "YesNo"
|
||||
Option "$SWWM_SINGLEFIRST", "swwm_singlefirst", "YesNo"
|
||||
Option "$SWWM_EARBUSTER", "swwm_earbuster", "YesNo"
|
||||
Option "$SWWM_BUSTERPAUSE", "swwm_cbtpause", "YesNo"
|
||||
|
|
@ -194,6 +195,7 @@ OptionMenu "SWWMOptionMenu"
|
|||
Option "$SWWM_SVARMORUSE", "swwm_enforceautousearmor", "SWWMEnforce"
|
||||
Option "$SWWM_SVHEALTHUSE", "swwm_enforceautousehealth", "SWWMEnforce"
|
||||
Option "$SWWM_SVAMMOUSE", "swwm_enforceautouseammo", "SWWMEnforce"
|
||||
Option "$SWWM_SVBARRIERUSE", "swwm_enforceautousebarrier", "SWWMEnforce"
|
||||
Option "$SWWM_OTHERVOICE", "swwm_othervoice", "YesNo"
|
||||
StaticText " "
|
||||
StaticText "$SWWM_MCTITLE", "Blue"
|
||||
|
|
|
|||
|
|
@ -2170,6 +2170,8 @@ Class EBarrier : Inventory
|
|||
Mixin SWWMRespawn;
|
||||
Mixin SWWMPickupGlow;
|
||||
|
||||
int terrainwait;
|
||||
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
if ( pickup && !deathmatch ) return false;
|
||||
|
|
@ -2204,6 +2206,52 @@ Class EBarrier : Inventory
|
|||
tracer.target = self;
|
||||
tracer.FloatBobPhase = FloatBobPhase;
|
||||
}
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
// check terrain for auto-use
|
||||
let b = Powerup(Owner.FindInventory("BarrierPower"));
|
||||
if ( b && (b.EffectTics > 5) )
|
||||
{
|
||||
terrainwait = 20;
|
||||
return;
|
||||
}
|
||||
bool damageterrain = false;
|
||||
// check any 3d floors first
|
||||
for ( int i=0; i<Owner.CurSector.Get3DFloorCount(); i++ )
|
||||
{
|
||||
F3DFloor ff = Owner.CurSector.Get3DFloor(i);
|
||||
if ( !(ff.flags&(F3DFloor.FF_EXISTS|F3DFloor.FF_SWIMMABLE)) ) continue;
|
||||
if ( (ff.model.DamageAmount <= 0) || (ff.model.damageinterval <= 0) ) continue;
|
||||
if ( ff.top.ZAtPoint(Owner.pos.xy) <= Owner.pos.z ) continue;
|
||||
if ( ff.bottom.ZAtPoint(Owner.pos.xy) >= (Owner.pos.z+Owner.Height) ) continue;
|
||||
damageterrain = true;
|
||||
break;
|
||||
}
|
||||
if ( !damageterrain && (Owner.pos.z <= Owner.floorz) )
|
||||
{
|
||||
if ( (Owner.floorsector.damageamount > 0) && (Owner.floorsector.damageinterval > 0) ) damageterrain = true;
|
||||
else
|
||||
{
|
||||
let t = Owner.GetFloorTerrain();
|
||||
if ( t && (t.DamageAmount > 0) && (t.DamageTimeMask > 0) )
|
||||
damageterrain = true;
|
||||
}
|
||||
}
|
||||
if ( !damageterrain )
|
||||
{
|
||||
terrainwait = max(0,terrainwait-1);
|
||||
return;
|
||||
}
|
||||
else terrainwait++;
|
||||
if ( terrainwait <= 20 ) return;
|
||||
terrainwait = 0;
|
||||
bool shouldautouse = false;
|
||||
if ( swwm_enforceautousebarrier == 1 ) shouldautouse = true;
|
||||
else if ( swwm_enforceautousebarrier == -1 ) shouldautouse = false;
|
||||
else shouldautouse = CVar.GetCVar('swwm_autousebarrier',Owner.player).GetBool();
|
||||
if ( shouldautouse ) Owner.UseInventory(self);
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue