Add help messages for most of the deprecated stuff in ZScript.

This commit is contained in:
nashmuhandes 2020-03-10 16:31:21 +08:00 committed by alexey.lysiuk
parent f46e80e2b4
commit 7a141f3aa3
9 changed files with 66 additions and 66 deletions

View file

@ -339,17 +339,17 @@ class Actor : Thinker native
//int ConversationRoot; // THe root of the current dialogue
// deprecated things.
native readonly deprecated("2.3") double X;
native readonly deprecated("2.3") double Y;
native readonly deprecated("2.3") double Z;
native readonly deprecated("2.3") double VelX;
native readonly deprecated("2.3") double VelY;
native readonly deprecated("2.3") double VelZ;
native readonly deprecated("2.3") double MomX;
native readonly deprecated("2.3") double MomY;
native readonly deprecated("2.3") double MomZ;
native deprecated("2.3") double ScaleX;
native deprecated("2.3") double ScaleY;
native readonly deprecated("2.3", "Use Pos.X instead") double X;
native readonly deprecated("2.3", "Use Pos.Y instead") double Y;
native readonly deprecated("2.3", "Use Pos.Z instead") double Z;
native readonly deprecated("2.3", "Use Vel.X instead") double VelX;
native readonly deprecated("2.3", "Use Vel.Y instead") double VelY;
native readonly deprecated("2.3", "Use Vel.Z instead") double VelZ;
native readonly deprecated("2.3", "Use Vel.X instead") double MomX;
native readonly deprecated("2.3", "Use Vel.Y instead") double MomY;
native readonly deprecated("2.3", "Use Vel.Z instead") double MomZ;
native deprecated("2.3", "Use Scale.X instead") double ScaleX;
native deprecated("2.3", "Use Scale.Y instead") double ScaleY;
//FStrifeDialogueNode *Conversation; // [RH] The dialogue to show when this actor is used.;
@ -596,7 +596,7 @@ class Actor : Thinker native
native static int ApplyDamageFactors(class<Inventory> itemcls, Name damagetype, int damage, int defdamage);
native void RemoveFromHash();
native void ChangeTid(int newtid);
deprecated("3.8") static int FindUniqueTid(int start = 0, int limit = 0)
deprecated("3.8", "Use Level.FindUniqueTid() instead") static int FindUniqueTid(int start = 0, int limit = 0)
{
return level.FindUniqueTid(start, limit);
}
@ -906,7 +906,7 @@ class Actor : Thinker native
return true;
}
deprecated("2.3") void A_FaceConsolePlayer(double MaxTurnAngle = 0) {}
deprecated("2.3", "This function does nothing and is only for Zandronum compatibility") void A_FaceConsolePlayer(double MaxTurnAngle = 0) {}
void A_SetSpecial(int spec, int arg0 = 0, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0)
{
@ -1052,18 +1052,18 @@ class Actor : Thinker native
native void A_Wander(int flags = 0);
native void A_Look2();
deprecated("2.3") native void A_BulletAttack();
deprecated("2.3", "Use A_CustomBulletAttack() instead") native void A_BulletAttack();
native void A_WolfAttack(int flags = 0, sound whattoplay = "weapons/pistol", double snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, double runspeed = 160.0, class<Actor> pufftype = "BulletPuff");
deprecated("4.3") native clearscope void A_PlaySound(sound whattoplay = "weapons/pistol", int slot = CHAN_BODY, double volume = 1.0, bool looping = false, double attenuation = ATTN_NORM, bool local = false, double pitch = 0.0);
deprecated("4.3", "Use A_StartSound() instead") native clearscope void A_PlaySound(sound whattoplay = "weapons/pistol", int slot = CHAN_BODY, double volume = 1.0, bool looping = false, double attenuation = ATTN_NORM, bool local = false, double pitch = 0.0);
native clearscope void A_StartSound(sound whattoplay, int slot = CHAN_BODY, int flags = 0, double volume = 1.0, double attenuation = ATTN_NORM, double pitch = 0.0, double startTime = 0.0);
native void A_SoundVolume(int slot, double volume);
native void A_SoundPitch(int slot, double pitch);
deprecated("2.3") void A_PlayWeaponSound(sound whattoplay) { A_StartSound(whattoplay, CHAN_WEAPON); }
deprecated("2.3", "Use A_StartSound(<sound>, CHAN_WEAPON) instead") void A_PlayWeaponSound(sound whattoplay) { A_StartSound(whattoplay, CHAN_WEAPON); }
native void A_StopSound(int slot = CHAN_VOICE); // Bad default but that's what is originally was...
void A_StopAllSounds() { A_StopSounds(0,0); }
native void A_StopSounds(int chanmin, int chanmax);
deprecated("2.3") native void A_PlaySoundEx(sound whattoplay, name slot, bool looping = false, int attenuation = 0);
deprecated("2.3") native void A_StopSoundEx(name slot);
deprecated("2.3", "Use A_StartSound() instead") native void A_PlaySoundEx(sound whattoplay, name slot, bool looping = false, int attenuation = 0);
deprecated("2.3", "Use A_StopSound() instead") native void A_StopSoundEx(name slot);
native clearscope bool IsActorPlayingSound(int channel, Sound snd = 0);
native void A_SeekerMissile(int threshold, int turnmax, int flags = 0, int chance = 50, int distance = 10);
native action state A_Jump(int chance, statelabel label, ...);
@ -1084,7 +1084,7 @@ class Actor : Thinker native
native void A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);
native void A_DropInventory(class<Inventory> itemtype, int amount = -1);
native void A_SetBlend(color color1, double alpha, int tics, color color2 = 0, double alpha2 = 0.);
deprecated("2.3") native void A_ChangeFlag(string flagname, bool value);
deprecated("2.3", "Use 'b<FlagName> = [true/false]' instead") native void A_ChangeFlag(string flagname, bool value);
native void A_ChangeCountFlags(int kill = FLAG_NO_CHANGE, int item = FLAG_NO_CHANGE, int secret = FLAG_NO_CHANGE);
native void A_RaiseMaster(int flags = 0);
native void A_RaiseChildren(int flags = 0);
@ -1120,10 +1120,10 @@ class Actor : Thinker native
native void A_SetAngle(double angle = 0, int flags = 0, int ptr = AAPTR_DEFAULT);
native void A_SetPitch(double pitch, int flags = 0, int ptr = AAPTR_DEFAULT);
native void A_SetRoll(double roll, int flags = 0, int ptr = AAPTR_DEFAULT);
deprecated("2.3") native void A_SetUserVar(name varname, int value);
deprecated("2.3") native void A_SetUserArray(name varname, int index, int value);
deprecated("2.3") native void A_SetUserVarFloat(name varname, double value);
deprecated("2.3") native void A_SetUserArrayFloat(name varname, int index, double value);
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserVar(name varname, int value);
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserArray(name varname, int index, int value);
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserVarFloat(name varname, double value);
deprecated("2.3", "User variables are deprecated in ZScript. Actor variables are directly accessible") native void A_SetUserArrayFloat(name varname, int index, double value);
native void A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake");
native void A_QuakeEx(int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, sound sfx = "world/quake", int flags = 0, double mulWaveX = 1, double mulWaveY = 1, double mulWaveZ = 1, int falloff = 0, int highpoint = 0, double rollIntensity = 0, double rollWave = 0);
action native void A_SetTics(int tics);

View file

@ -686,18 +686,18 @@ extend class Actor
}
}
deprecated("2.3") void A_MeleeAttack()
deprecated("2.3", "Use CustomMeleeAttack() instead") void A_MeleeAttack()
{
DoAttack(true, false, MeleeDamage, MeleeSound, NULL, 0);
}
deprecated("2.3") void A_MissileAttack()
deprecated("2.3", "Use A_SpawnProjectile() instead") void A_MissileAttack()
{
Class<Actor> MissileType = MissileName;
DoAttack(false, true, 0, 0, MissileType, MissileHeight);
}
deprecated("2.3") void A_ComboAttack()
deprecated("2.3", "Use A_BasicAttack() instead") void A_ComboAttack()
{
Class<Actor> MissileType = MissileName;
DoAttack(true, true, MeleeDamage, MeleeSound, MissileType, MissileHeight);

View file

@ -168,7 +168,7 @@ extend class Actor
private native bool CheckFlag(string flagname, int check_pointer = AAPTR_DEFAULT);
deprecated("2.3") action state A_CheckFlag(string flagname, statelabel label, int check_pointer = AAPTR_DEFAULT)
deprecated("2.3", "Use a combination of direct flag access and SetStateLabel()") action state A_CheckFlag(string flagname, statelabel label, int check_pointer = AAPTR_DEFAULT)
{
return CheckFlag(flagname, check_pointer)? ResolveState(label) : null;
}

View file

@ -443,11 +443,11 @@ class CustomInventory : StateProvider
//---------------------------------------------------------------------------
// This is only here, because these functions were originally exported on Inventory, despite only working for weapons, so this is here to satisfy some potential old mods having called it through CustomInventory.
deprecated("2.3") action void A_GunFlash(statelabel flash = null, int flags = 0) {}
deprecated("2.3") action void A_Lower() {}
deprecated("2.3") action void A_Raise() {}
deprecated("2.3") action void A_CheckReload() {}
deprecated("3.7") action void A_WeaponReady(int flags = 0) {} // this was somehow missed in 2.3 ...
deprecated("2.3", "must be called from Weapon") action void A_GunFlash(statelabel flash = null, int flags = 0) {}
deprecated("2.3", "must be called from Weapon") action void A_Lower() {}
deprecated("2.3", "must be called from Weapon") action void A_Raise() {}
deprecated("2.3", "must be called from Weapon") action void A_CheckReload() {}
deprecated("3.7", "must be called from Weapon") action void A_WeaponReady(int flags = 0) {} // this was somehow missed in 2.3 ...
native bool CallStateChain (Actor actor, State state);
//===========================================================================

View file

@ -2718,7 +2718,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
native clearscope bool HasWeaponsInSlot(int slot) const;
// The actual implementation is on PlayerPawn where it can be overridden. Use that directly in the future.
deprecated("3.7") bool MorphPlayer(playerinfo p, Class<PlayerPawn> spawntype, int duration, int style, Class<Actor> enter_flash = null, Class<Actor> exit_flash = null)
deprecated("3.7", "MorphPlayer() should be used on a PlayerPawn object") bool MorphPlayer(playerinfo p, Class<PlayerPawn> spawntype, int duration, int style, Class<Actor> enter_flash = null, Class<Actor> exit_flash = null)
{
if (mo != null)
{
@ -2728,7 +2728,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
}
// This somehow got its arguments mixed up. 'self' should have been the player to be unmorphed, not the activator
deprecated("3.7") bool UndoPlayerMorph(playerinfo player, int unmorphflag = 0, bool force = false)
deprecated("3.7", "UndoPlayerMorph() should be used on a PlayerPawn object") bool UndoPlayerMorph(playerinfo player, int unmorphflag = 0, bool force = false)
{
if (player.mo != null)
{
@ -2737,7 +2737,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
return false;
}
deprecated("3.7") void DropWeapon()
deprecated("3.7", "DropWeapon() should be used on a PlayerPawn object") void DropWeapon()
{
if (mo != null)
{
@ -2745,7 +2745,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
}
}
deprecated("3.7") void BringUpWeapon()
deprecated("3.7", "BringUpWeapon() should be used on a PlayerPawn object") void BringUpWeapon()
{
if (mo) mo.BringUpWeapon();
}

View file

@ -45,7 +45,7 @@ struct _ native // These are the global variables, the struct is only here to av
native readonly int Net_Arbitrator;
native ui BaseStatusBar StatusBar;
native readonly Weapon WP_NOCHANGE;
deprecated("3.8") native readonly bool globalfreeze;
deprecated("3.8", "Use Actor.isFrozen() or Level.isFrozen() instead") native readonly bool globalfreeze;
native int LocalViewPitch;
native readonly @MusPlayingInfo musplaying;
native readonly bool generic_ui;
@ -110,7 +110,7 @@ struct TexMan
};
native static TextureID CheckForTexture(String name, int usetype, int flags = TryAny);
deprecated("3.8") static void ReplaceTextures(String from, String to, int flags)
deprecated("3.8", "Use Level.ReplaceTextures() instead") static void ReplaceTextures(String from, String to, int flags)
{
level.ReplaceTextures(from, to, flags);
}
@ -242,7 +242,7 @@ struct Screen native
// This is a leftover of the abandoned Inventory.DrawPowerup method.
deprecated("2.5") static ui void DrawHUDTexture(TextureID tex, double x, double y)
deprecated("2.5", "Use StatusBar.DrawTexture() instead") static ui void DrawHUDTexture(TextureID tex, double x, double y)
{
statusBar.DrawTexture(tex, (x, y), BaseStatusBar.DI_SCREEN_RIGHT_TOP, 1., (32, 32));
}
@ -436,15 +436,15 @@ class Object native
native static String G_SkillName();
native static int G_SkillPropertyInt(int p);
native static double G_SkillPropertyFloat(int p);
deprecated("3.8") static vector3, int G_PickDeathmatchStart()
deprecated("3.8", "Use Level.PickDeathMatchStart() instead") static vector3, int G_PickDeathmatchStart()
{
return level.PickDeathmatchStart();
}
deprecated("3.8") static vector3, int G_PickPlayerStart(int pnum, int flags = 0)
deprecated("3.8", "Use Level.PickPlayerStart() instead") static vector3, int G_PickPlayerStart(int pnum, int flags = 0)
{
return level.PickPlayerStart(pnum, flags);
}
deprecated("4.3") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0);
deprecated("4.3", "Use S_StartSound() instead") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0);
native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0, float startTime = 0.0);
native static void S_PauseSound (bool notmusic, bool notsfx);
native static void S_ResumeSound (bool notsfx);
@ -530,7 +530,7 @@ class ThinkerIterator : Object native
class ActorIterator : Object native
{
deprecated("3.8") static ActorIterator Create(int tid, class<Actor> type = "Actor")
deprecated("3.8", "Use Level.CreateActorIterator() instead") static ActorIterator Create(int tid, class<Actor> type = "Actor")
{
return level.CreateActorIterator(tid, type);
}
@ -716,7 +716,7 @@ struct LevelLocals native
native readonly bool polygrind;
native readonly bool nomonsters;
native readonly bool allowrespawn;
deprecated("3.8") native bool frozen;
deprecated("3.8", "Use Level.isFrozen() instead") native bool frozen;
native readonly bool infinite_flight;
native readonly bool no_dlg_freeze;
native readonly bool keepfullinventory;
@ -740,7 +740,7 @@ struct LevelLocals native
native static void MakeScreenShot();
native static void MakeAutoSave();
native void WorldDone();
deprecated("3.8") static void RemoveAllBots(bool fromlist) { /* intentionally left as no-op. */ }
deprecated("3.8", "This function does nothing") static void RemoveAllBots(bool fromlist) { /* intentionally left as no-op. */ }
native ui Vector2 GetAutomapPosition();
native void SetInterMusic(String nextmap);
native String FormatMapName(int mapnamecolor);
@ -761,7 +761,7 @@ struct LevelLocals native
native clearscope Sector PointInSector(Vector2 pt) const;
native clearscope bool IsPointInLevel(vector3 p) const;
deprecated("3.8") clearscope static bool IsPointInMap(vector3 p)
deprecated("3.8", "Use Level.IsPointInLevel() instead") clearscope static bool IsPointInMap(vector3 p)
{
return level.IsPointInLevel(p);
}
@ -925,15 +925,15 @@ struct StringStruct native
native String Mid(int pos = 0, int len = 2147483647) const;
native void Truncate(int newlen);
native void Remove(int index, int remlen);
deprecated("4.1") native String CharAt(int pos) const;
deprecated("4.1") native int CharCodeAt(int pos) const;
deprecated("4.1", "use Left() or Mid() instead") native String CharAt(int pos) const;
deprecated("4.1", "use ByteAt() instead") native int CharCodeAt(int pos) const;
native int ByteAt(int pos) const;
native String Filter();
native int IndexOf(String substr, int startIndex = 0) const;
deprecated("3.5.1") native int LastIndexOf(String substr, int endIndex = 2147483647) const;
deprecated("3.5.1", "use RightIndexOf() instead") native int LastIndexOf(String substr, int endIndex = 2147483647) const;
native int RightIndexOf(String substr, int endIndex = 2147483647) const;
deprecated("4.1") native void ToUpper();
deprecated("4.1") native void ToLower();
deprecated("4.1", "use MakeUpper() instead") native void ToUpper();
deprecated("4.1", "use MakeLower() instead") native void ToLower();
native String MakeUpper() const;
native String MakeLower() const;
native static int CharUpper(int ch);
@ -1005,7 +1005,7 @@ class Floor : MovingFloor native
genFloorChg
};
deprecated("3.8") static bool CreateFloor(sector sec, int floortype, line ln, double speed, double height = 0, int crush = -1, int change = 0, bool crushmode = false, bool hereticlower = false)
deprecated("3.8", "Use Level.CreateFloor() instead") static bool CreateFloor(sector sec, int floortype, line ln, double speed, double height = 0, int crush = -1, int change = 0, bool crushmode = false, bool hereticlower = false)
{
return level.CreateFloor(sec, floortype, ln, speed, height, crush, change, crushmode, hereticlower);
}
@ -1051,7 +1051,7 @@ class Ceiling : MovingCeiling native
crushSlowdown = 2
}
deprecated("3.8") static bool CreateCeiling(sector sec, int type, line ln, double speed, double speed2, double height = 0, int crush = -1, int silent = 0, int change = 0, int crushmode = crushDoom)
deprecated("3.8", "Use Level.CreateCeiling() instead") static bool CreateCeiling(sector sec, int type, line ln, double speed, double speed2, double height = 0, int crush = -1, int silent = 0, int change = 0, int crushmode = crushDoom)
{
return level.CreateCeiling(sec, type, ln, speed, speed2, height, crush, silent, change, crushmode);
}

View file

@ -2,12 +2,12 @@
extend class Object
{
deprecated("2.4") static int GameType()
deprecated("2.4", "Use gameinfo.gametype instead") static int GameType()
{
return gameinfo.gametype;
}
deprecated("2.4") static void C_MidPrint(string fontname, string textlabel, bool bold = false)
deprecated("2.4", "Use Console.MidPrint() instead") static void C_MidPrint(string fontname, string textlabel, bool bold = false)
{
let f = Font.GetFont(fontname);
if (f == null) return;
@ -27,7 +27,7 @@ extend class Actor
//
//==========================================================================
deprecated("3.7") bool CheckClass(class<Actor> checkclass, int ptr_select = AAPTR_DEFAULT, bool match_superclass = false)
deprecated("3.7", "Use GetClass(), type cast, or 'is' operator instead") bool CheckClass(class<Actor> checkclass, int ptr_select = AAPTR_DEFAULT, bool match_superclass = false)
{
let check = GetPointer(ptr_select);
if (check == null || checkclass == null)
@ -52,7 +52,7 @@ extend class Actor
// deprecated because it requires AAPTR to work.
//
//==========================================================================
deprecated("3.7") double GetDistance(bool checkz, int ptr = AAPTR_TARGET) const
deprecated("3.7", "Use Actor.Distance2D() or Actor.Distance3D() instead") double GetDistance(bool checkz, int ptr = AAPTR_TARGET) const
{
let target = GetPointer(ptr);
@ -81,7 +81,7 @@ extend class Actor
//
//==========================================================================
deprecated("3.7") double GetAngle(int flags, int ptr = AAPTR_TARGET)
deprecated("3.7", "Use Actor.AngleTo() instead") double GetAngle(int flags, int ptr = AAPTR_TARGET)
{
let target = GetPointer(ptr);
@ -107,7 +107,7 @@ extend class Actor
//
//==========================================================================
deprecated("3.7") double GetSpriteAngle(int ptr = AAPTR_DEFAULT)
deprecated("3.7", "Use Actor.SpriteAngle instead") double GetSpriteAngle(int ptr = AAPTR_DEFAULT)
{
let target = GetPointer(ptr);
return target? target.SpriteAngle : 0;
@ -122,13 +122,13 @@ extend class Actor
//
//==========================================================================
deprecated("3.7") double GetSpriteRotation(int ptr = AAPTR_DEFAULT)
deprecated("3.7", "Use Actor.SpriteRotation instead") double GetSpriteRotation(int ptr = AAPTR_DEFAULT)
{
let target = GetPointer(ptr);
return target? target.SpriteRotation : 0;
}
deprecated("2.3") void A_CustomMissile(class<Actor> missiletype, double spawnheight = 32, double spawnofs_xy = 0, double angle = 0, int flags = 0, double pitch = 0, int ptr = AAPTR_TARGET)
deprecated("2.3", "Use A_SpawnProjectile() instead") void A_CustomMissile(class<Actor> missiletype, double spawnheight = 32, double spawnofs_xy = 0, double angle = 0, int flags = 0, double pitch = 0, int ptr = AAPTR_TARGET)
{
A_SpawnProjectile(missiletype, spawnheight, spawnofs_xy, angle, flags|CMF_BADPITCH, pitch, ptr);
}
@ -136,7 +136,7 @@ extend class Actor
extend class StateProvider
{
deprecated("2.3") action void A_FireCustomMissile(class<Actor> missiletype, double angle = 0, bool useammo = true, double spawnofs_xy = 0, double spawnheight = 0, int flags = 0, double pitch = 0)
deprecated("2.3", "Use A_FireProjectile() instead") action void A_FireCustomMissile(class<Actor> missiletype, double angle = 0, bool useammo = true, double spawnofs_xy = 0, double spawnheight = 0, int flags = 0, double pitch = 0)
{
A_FireProjectile(missiletype, angle, useammo, spawnofs_xy, spawnheight, flags, -pitch);
}

View file

@ -1,6 +1,6 @@
struct HealthGroup native play
{
deprecated("3.8") static clearscope HealthGroup Find(int id)
deprecated("3.8", "Use Level.FindHealthGroup() instead") static clearscope HealthGroup Find(int id)
{
return level.FindHealthGroup(id);
}

View file

@ -423,7 +423,7 @@ struct Sector native play
native int GetAttachedCount();
native void RemoveForceField();
deprecated("3.8") static clearscope Sector PointInSector(Vector2 pt)
deprecated("3.8", "Use Level.PointInSector instead") static clearscope Sector PointInSector(Vector2 pt)
{
return level.PointInSector(pt);
}
@ -588,7 +588,7 @@ struct Sector native play
class SectorTagIterator : Object native
{
deprecated("3.8") static SectorTagIterator Create(int tag, line defline = null)
deprecated("3.8", "Use Level.CreateSectorTagIterator() instead") static SectorTagIterator Create(int tag, line defline = null)
{
return level.CreateSectorTagIterator(tag, defline);
}
@ -598,7 +598,7 @@ class SectorTagIterator : Object native
class LineIdIterator : Object native
{
deprecated("3.8") static LineIdIterator Create(int tag)
deprecated("3.8", "Use Level.CreateLineIdIterator() instead") static LineIdIterator Create(int tag)
{
return level.CreateLineIdIterator(tag);
}