sm-plugins/_entWatch4/scripting/CItem.inc
zaCade 2238db206c entWatch4: Update to class instead of struct enum.
And some other cleanup stuff.
2018-11-13 17:34:17 +01:00

299 lines
4.4 KiB
SourcePawn

#if defined entWatch_class_item_included
#endinput
#endif
#define entWatch_class_item_included
methodmap CItem < Basic
{
public CItem()
{
Basic myclass = new Basic();
myclass.SetString("sName", "");
myclass.SetString("sShort", "");
myclass.SetString("sColor", "");
myclass.SetString("sFilter", "");
myclass.SetInt("iButtonID", 0);
myclass.SetInt("iWeaponID", 0);
myclass.SetInt("iTriggerID", 0);
myclass.SetInt("iOwner", INVALID_ENT_REFERENCE);
myclass.SetInt("iButton", INVALID_ENT_REFERENCE);
myclass.SetInt("iWeapon", INVALID_ENT_REFERENCE);
myclass.SetInt("iTrigger", INVALID_ENT_REFERENCE);
myclass.SetInt("iDisplay", 0);
myclass.SetInt("iMode", 0);
myclass.SetInt("iMaxUses", 0);
myclass.SetInt("iCooldown", 0);
myclass.SetInt("iTimesUsed", 0);
myclass.SetInt("iTimeReady", 0);
return view_as<CItem>(myclass);
}
public bool GetName(char[] buffer, int length)
{
return this.GetString("sName", buffer, length);
}
public void SetName(const char[] buffer)
{
this.SetString("sName", buffer);
}
public bool GetShort(char[] buffer, int length)
{
return this.GetString("sShort", buffer, length);
}
public void SetShort(const char[] buffer)
{
this.SetString("sShort", buffer);
}
public bool GetColor(char[] buffer, int length)
{
return this.GetString("sColor", buffer, length);
}
public void SetColor(const char[] buffer)
{
this.SetString("sColor", buffer);
}
public bool GetFilter(char[] buffer, int length)
{
return this.GetString("sFilter", buffer, length);
}
public void SetFilter(const char[] buffer)
{
this.SetString("sFilter", buffer);
}
property int iButtonID
{
public get()
{
return this.GetInt("iButtonID");
}
public set(int value)
{
this.SetInt("iButtonID", value);
}
}
property int iWeaponID
{
public get()
{
return this.GetInt("iWeaponID");
}
public set(int value)
{
this.SetInt("iWeaponID", value);
}
}
property int iTriggerID
{
public get()
{
return this.GetInt("iTriggerID");
}
public set(int value)
{
this.SetInt("iTriggerID", value);
}
}
property int iOwner
{
public get()
{
return this.GetInt("iOwner");
}
public set(int value)
{
this.SetInt("iOwner", value);
}
}
property int iButton
{
public get()
{
return this.GetInt("iButton");
}
public set(int value)
{
this.SetInt("iButton", value);
}
}
property int iWeapon
{
public get()
{
return this.GetInt("iWeapon");
}
public set(int value)
{
this.SetInt("iWeapon", value);
}
}
property int iTrigger
{
public get()
{
return this.GetInt("iTrigger");
}
public set(int value)
{
this.SetInt("iTrigger", value);
}
}
property int iDisplay
{
public get()
{
return this.GetInt("iDisplay");
}
public set(int value)
{
this.SetInt("iDisplay", value);
}
}
property int iMode
{
public get()
{
return this.GetInt("iMode");
}
public set(int value)
{
this.SetInt("iMode", value);
}
}
property int iMaxUses
{
public get()
{
return this.GetInt("iMaxUses");
}
public set(int value)
{
this.SetInt("iMaxUses", value);
}
}
property int iCooldown
{
public get()
{
return this.GetInt("iCooldown");
}
public set(int value)
{
this.SetInt("iCooldown", value);
}
}
property int iTimesUsed
{
public get()
{
return this.GetInt("iTimesUsed");
}
public set(int value)
{
this.SetInt("iTimesUsed", value);
}
}
property int iTimeReady
{
public get()
{
return this.GetInt("iTimeReady");
}
public set(int value)
{
this.SetInt("iTimeReady", value);
}
}
property bool bOwner
{
public get()
{
return view_as<bool>(this.iOwner != INVALID_ENT_REFERENCE);
}
}
property bool bButton
{
public get()
{
return view_as<bool>(this.iButton != INVALID_ENT_REFERENCE);
}
}
property bool bWeapon
{
public get()
{
return view_as<bool>(this.iWeapon != INVALID_ENT_REFERENCE);
}
}
property bool bTrigger
{
public get()
{
return view_as<bool>(this.iTrigger != INVALID_ENT_REFERENCE);
}
}
property bool bDisplayEventMessages
{
public get()
{
return view_as<bool>(this.iDisplay & (1<<0));
}
}
property bool bDisplayActivateMessages
{
public get()
{
return view_as<bool>(this.iDisplay & (1<<1));
}
}
property bool bDisplayInterface
{
public get()
{
return view_as<bool>(this.iDisplay & (1<<2));
}
}
}