#include <thing.h>#include <inpc.h>#include <properties.h>#include <moving.h>
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
| #define | NEED_PROTOTYPES |
Funktionen | |
| protected void | create () |
| protected void | create_super () |
| void | AddWeapon (string nm, string path) |
| void | AddArmour (string nm, string path) |
| void | reset () |
| void AddArmour | ( | string | nm, | |
| string | path | |||
| ) |
Definiert in Zeile 42 der Datei items.c.
Benutzt command, M_NOCHECK, ob(), P_ITEMS, QueryProp() und SetProp().
00042 { 00043 object ob; 00044 mixed *it; 00045 00046 if (!path || !nm) return; 00047 if (ob=clone_object(path)) { 00048 ob->move(this_object(),M_NOCHECK); 00049 command("zieh "+nm+" an"); 00050 } 00051 it=QueryProp(P_ITEMS); 00052 if (!pointerp(it) || !sizeof(it)) it=({0}); 00053 it+=({ob,path,nm}); 00054 SetProp(P_ITEMS,it); 00055 }

| void AddWeapon | ( | string | nm, | |
| string | path | |||
| ) |
Definiert in Zeile 27 der Datei items.c.
Benutzt command, M_NOCHECK, ob(), P_ITEMS, QueryProp() und SetProp().
00027 { 00028 object ob; 00029 mixed *it; 00030 00031 if (!path || !nm) return; 00032 if (ob=clone_object(path)) { 00033 ob->move(this_object(),M_NOCHECK); 00034 command("zuecke "+nm); 00035 } 00036 it=QueryProp(P_ITEMS); 00037 if (!pointerp(it) || !sizeof(it)) it=({0}); 00038 it[0]=({ob,path,nm}); 00039 SetProp(P_ITEMS,it); 00040 }

| protected void create | ( | ) |
| protected void create_super | ( | ) |
Definiert in Zeile 23 der Datei items.c.
Benutzt set_next_reset().
00023 { 00024 set_next_reset(-1); 00025 }

| void reset | ( | void | ) |
Definiert in Zeile 57 der Datei items.c.
Benutzt command, i, M_NOCHECK, ob(), P_ITEMS, QueryProp() und x.
00057 { 00058 mixed *it,x; 00059 int i; 00060 object ob; 00061 00062 if (!pointerp(it=QueryProp(P_ITEMS))) return; 00063 for (i=sizeof(it)-1;i>=0;i--) { 00064 x=it[i]; 00065 if (!pointerp(x) || sizeof(x)<3) continue; 00066 if (!objectp(x[0])) { 00067 if (ob=clone_object(x[1])) 00068 ob->move(this_object(),M_NOCHECK); 00069 x[0]=ob; 00070 } 00071 if (objectp(x[0])) { 00072 if (i) 00073 command("zieh "+x[2]+" an"); 00074 else 00075 command("zuecke "+x[2]); 00076 } 00077 } 00078 }

1.6.3