- scriptified Strife's coins.
- added a String class to allow attaching methods to the builtin string type. This works by checking if the left side of the member accessor is a string and just replacing the tyoe in this one place, all the rest is automatic.
This commit is contained in:
parent
d2ce78fae7
commit
9064a5b0ac
17 changed files with 222 additions and 34 deletions
|
|
@ -46,6 +46,8 @@
|
|||
#include "p_maputl.h"
|
||||
#include "gi.h"
|
||||
#include "p_terrain.h"
|
||||
#include "gstrings.h"
|
||||
#include "zstring.h"
|
||||
|
||||
static TArray<FPropertyInfo*> properties;
|
||||
static TArray<AFuncDesc> AFTable;
|
||||
|
|
@ -826,3 +828,19 @@ DEFINE_ACTION_FUNCTION(DObject, GameType)
|
|||
PARAM_PROLOGUE;
|
||||
ACTION_RETURN_INT(gameinfo.gametype);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FStringTable, Localize)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_STRING(label);
|
||||
ACTION_RETURN_STRING(GStrings(label));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FString, Replace)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FString);
|
||||
PARAM_STRING(s1);
|
||||
PARAM_STRING(s2);
|
||||
self->Substitute(*s1, *s2);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue