Some cleanup.

This commit is contained in:
Mari the Deer 2021-11-23 22:18:41 +01:00
commit 95d92cb8a5
11 changed files with 27 additions and 56 deletions

View file

@ -18,10 +18,8 @@ nosave int swwm_pickduration = 3; // lifespan of pickup messages
server bool swwm_sharekeys = true; // share keys in mp
user bool swwm_autousearmor = true; // automatically use armor items when possible
user bool swwm_autousehealth = true; // automatically use health items when possible
user bool swwm_autouseammo = true; // automatically use ammo fabricators when possible (excl. tier 4)
server int swwm_enforceautousearmor = 0; // 1: server enforces auto use, -1: server enforces no auto use, 0: server respects user setting
server int swwm_enforceautousehealth = 0; // likewise for health
server int swwm_enforceautouseammo = 0; // likewise for fabricators
nosave bool swwm_targeter = true; // show targeter healthbars
nosave bool swwm_targettags = true; // show enemy tags above healthbars
nosave bool swwm_healthnums = true; // show damage/healing numbers

View file

@ -1253,7 +1253,7 @@ SWWM_INTERTIP75 = "Kobolds are small little creechers that go yip.";
SWWM_INTERTIP76 = "I showed you my intermission tip pls respond.";
SWWM_INTERTIP77 = "AAA gaming is rotten to the core, riddled with corporate torture of honest workers. Support small developers whenever you can.";
SWWM_INTERTIP78 = "Xenia > Tux\n\nBring back the cool Linux fox girl. Penguins suck.";
SWWM_INTERTIP79 = "Eliminate fascism.";
SWWM_INTERTIP79 = "Punching fascists is perfectly reasonable.";
SWWM_INTERTIP80 = "Ceci n'est pas un conseil.";
SWWM_INTERTIP81 = "Age only affects appearance, and has no bearing on ability. Gender has no bearing on ability. Everyone has imperfections, prejudice births malcontents, become a dark spirit.\nTime for crab.";
SWWM_INTERTIP82 = "\"IF THE ZOO BANS ME FOR HOLLERING AT THE ANIMALS I WILL FACE GOD AND WALK BACKWARDS INTO HELL\" — dril";

View file

@ -1127,7 +1127,7 @@ SWWM_INTERTIP75 = "Los kobolds son pequeñas criaturitas que hacen yip.";
SWWM_INTERTIP76 = "Te he enseñado mi consejo de intermisión contesta pls.";
SWWM_INTERTIP77 = "El gaming AAA está podrido hasta la médula, plagado por la tortura corporativa de trabajadores honestos. Apoya a los pequeños desarrolladores siempre que puedas.";
SWWM_INTERTIP78 = "Xenia > Tux\n\nDevolvednos a la chica zorro molona de Linux. Los pingüinos apestan.";
SWWM_INTERTIP79 = "Elimina el fascismo.";
SWWM_INTERTIP79 = "Abofetear fachas es perfectamente razonable.";
SWWM_INTERTIP81 = "La edad solo afecta a la apariencia, y no tiene relación a la habilidad. El género no tiene relación a la habilidad. Todo el mundo tiene imperfecciones, los prejuicios traen consigo malcontentos, conviertete en un espíritu oscuro.\nHora de cangrejo.";
SWWM_INTERTIP82 = "\"SI EL ZOO ME PROHIBE LA ENTRADA POR GRITAR A LOS ANIMALES PLANTARÉ CARA A DIOS Y CAMINARÉ DE ESPALDAS AL INFIERNO\" — dril";
SWWM_INTERTIP83 = "SWWM GZ es realmente Un Extraño Mod de Armas (Some Weird Weapons Mod) para GZDoom.";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r53 \cu(Sun 7 Nov 11:15:49 CET 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r53 \cu(2021-11-07 11:15:49)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r54 \cu(Tue 23 Nov 22:18:41 CET 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r54 \cu(2021-11-23 22:18:41)\c-";

View file

@ -193,7 +193,6 @@ OptionMenu "SWWMOptionMenu"
Option "$SWWM_MELEEPICKUP", "swwm_meleepickup", "YesNo"
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"
@ -207,7 +206,6 @@ OptionMenu "SWWMOptionMenu"
Option "$SWWM_SKEYS", "swwm_sharekeys", "YesNo"
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 " "

View file

@ -38,6 +38,8 @@ int main( void )
// STARTUP.data.pal : 16 colors, RGB8 (48 bytes)
// NOTCH.data : 16x23, I8 (368 bytes)
// NETNOTCH.data : 4x16, I8 (64 bytes)
// the NOTCH and NETNOTCH files are optional and their processing will
// be skipped if not found
uint8_t pal[48] = {0};
uint8_t startup[4][38400] = {{0}};
uint8_t notch[184] = {0};
@ -68,6 +70,7 @@ int main( void )
fwrite(&startup,1,153600,fout);
fclose(fout);
fin = fopen("NOTCH.data","rb");
if ( !fin ) goto nnotch;
fout = fopen("NOTCH.dat","wb");
// compose 4-bit linear notch image
for ( int i=0; i<184; i++ )
@ -79,7 +82,9 @@ int main( void )
fclose(fin);
fwrite(&notch,1,184,fout);
fclose(fout);
nnotch:
fin = fopen("NETNOTCH.data","rb");
if ( !fin ) return 0;
fout = fopen("NETNOTCH.dat","wb");
// compose 4-bit linear netnotch image
for ( int i=0; i<32; i++ )

View file

@ -2684,7 +2684,7 @@ Class SWWMStatusBar : BaseStatusBar
{
if ( sv_norespawn ) return (1.-dimalph);
alph = clamp((deadtimer-90)/60.,0.,1.);
str = String.Format(StringTable.Localize("$SWWM_URDEDMP"),CPlayer.GetUserName());
str = String.Format(StringTable.Localize("$SWWM_URDEDMP"));
fnt = LangFont(mTewiFont);
len = fnt.StringWidth(str);
xx = int((ss.x-len)/2.);
@ -2696,7 +2696,7 @@ Class SWWMStatusBar : BaseStatusBar
return (1.-dimalph);
}
alph = clamp((deadtimer-140)/60.,0.,1.);
str = String.Format(StringTable.Localize("$SWWM_URDED2"),CPlayer.GetUserName());
str = String.Format(StringTable.Localize("$SWWM_URDED2"));
fnt = LangFont(mTewiFont);
len = fnt.StringWidth(str);
xx = int((ss.x-len)/2.);
@ -2705,7 +2705,7 @@ Class SWWMStatusBar : BaseStatusBar
if ( goner || !swwm_revive )
return (1.-dimalph);
alph = clamp((deadtimer-160)/60.,0.,1.);
str = String.Format(StringTable.Localize("$SWWM_URDED3"),CPlayer.GetUserName());
str = String.Format(StringTable.Localize("$SWWM_URDED3"));
fnt = LangFont(mTewiFont);
len = fnt.StringWidth(str);
xx = int((ss.x-len)/2.);

View file

@ -380,6 +380,17 @@ Class MagAmmo : Inventory abstract
Inventory last;
while ( excess > 0 )
{
// drop full mag if possible
if ( excess >= ClipSize )
{
double ang = FRandom[Junk](0,360);
last = DoDrop(ParentAmmo);
last.SetOrigin(item.pos,false);
last.vel.xy = (cos(ang),sin(ang))*FRandom[Junk](2,5);
excess -= ClipSize;
continue;
}
// drop bullets otherwise
for ( int i=0; i<ammotypes.Size(); i++ )
{
let def = GetDefaultByType(ammotypes[i]);

View file

@ -1620,7 +1620,7 @@ Class LampMoth2 : LampMoth
}
}
Class LampMashiro : SWWMMonster abstract
Class LampMashiro : Actor abstract
{
//
// ~nothing here yet, but she will make an appearance someday~

View file

@ -1,48 +1,5 @@
// enemies 'n stuff
// Future planning, will be filled out with AI stuff and whatnot someday
Class SWWMMonster : Actor abstract
{
// integrated fun tags
virtual clearscope String GetFunTag( String defstr = "" )
{
return GetTag(defstr);
}
// the function that should be overriden in subclasses
virtual int HandleLocationalDamage( Actor inflictor, Actor source, int damage, Name mod, Vector3 HitLocation, int flags = 0, double angle = 0 )
{
return damage;
}
// locational damage support, akin to UE1, but hitlocation will be treated as a relative offset, to make things easier
// this one should be called directly by everything in this mod, when possible
int LocationalDamageMobj( Actor inflictor, Actor source, int damage, Name mod, Vector3 HitLocation, int flags = 0, double angle = 0 )
{
damage = HandleLocationalDamage(inflictor,source,damage,mod,HitLocation,flags,angle);
return Super.DamageMobj(inflictor,source,damage,mod,flags,angle);
}
// "estimated" locational damage for the vanilla DamageMobj
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
{
Vector3 guesspos = (0,0,Height/2.);
// use inflictor if available, as it may be a projectile or hitscan puff
// if damage comes from an item, use owner
// all of this could be done better (or implemented as an engine feature), but whatever
Actor whomst = inflictor?inflictor:source;
if ( whomst is 'Inventory' ) whomst = Inventory(whomst).Owner;
if ( whomst )
{
guesspos = level.Vec3Diff(pos,whomst.Vec3Offset(0,0,whomst.Height/2));
guesspos.x = clamp(guesspos.x,-radius,radius);
guesspos.y = clamp(guesspos.y,-radius,radius);
guesspos.z = clamp(guesspos.z,0,height);
}
return LocationalDamageMobj(inflictor,source,damage,mod,guesspos,flags,angle);
}
}
// Less mean-spirited Keen
Class SWWMHangingKeen : Actor
{

View file

@ -828,7 +828,6 @@ Class SWWMUtility
// because GetTag() returns the localized string, we need to do things the hard way
static play String GetFunTag( Actor a, String defstr = "" )
{
if ( a is 'SWWMMonster' ) return SWWMMonster(a).GetFunTag(defstr);
// look up any fun tag services
let si = ServiceIterator.Find("FunTagService");
Service sv;
@ -1159,9 +1158,12 @@ Class SWWMUtility
if ( (!(flags&DE_COUNTENEMIES) || hostile) && (!(flags&DE_COUNTSTEALTH) || inactive) ) nhit++;
int dmg = int(Damage*damagescale);
if ( dmg <= 0 ) continue; // no harm
int oldhp = a.Health;
int basehp = a.GetSpawnHealth();
int ndmg = a.DamageMobj(Source,Instigator,dmg,(DamageType=='')?Source.DamageType:DamageType,DMG_EXPLOSION,atan2(-dir.y,-dir.x));
if ( a && !(flags&DE_NOBLEED) ) a.TraceBleed((ndmg>0)?ndmg:dmg,Source);
if ( (flags&DE_HOWL) && a && (a.Health > 0) && a.bISMONSTER && !Random[DoBlast](0,3) ) a.Howl();
if ( (flags&DE_COUNTFHKILLS) && (oldhp < basehp) ) continue; // was not at full health
if ( (!a || (a.Health <= 0)) && (!(flags&DE_COUNTENEMIES) || hostile) && (!(flags&DE_COUNTSTEALTH) || inactive) ) nkill++;
}
// traverse portals (needed since BlockThingsIterator can't properly cross sector portals in both vertical directions)