forked from github/server
Newlines in mistake-Meldungen mag Magellan nicht
This commit is contained in:
parent
18153f5614
commit
e8746177bc
|
@ -149,13 +149,13 @@ gm_create(const tnode * tnext, const char * str, void * data, struct order * ord
|
||||||
const char * iname = getstrtoken();
|
const char * iname = getstrtoken();
|
||||||
const item_type * itype = finditemtype(iname, u->faction->locale);
|
const item_type * itype = finditemtype(iname, u->faction->locale);
|
||||||
if (itype==NULL) {
|
if (itype==NULL) {
|
||||||
mistake(u, ord, "Unbekannter Gegenstand.\n", 0);
|
mistake(u, ord, "Unbekannter Gegenstand.", 0);
|
||||||
} else {
|
} else {
|
||||||
attrib * a = a_find(permissions, &at_gmcreate);
|
attrib * a = a_find(permissions, &at_gmcreate);
|
||||||
|
|
||||||
while (a && a->data.v!=(void*)itype) a=a->nexttype;
|
while (a && a->data.v!=(void*)itype) a=a->nexttype;
|
||||||
if (a) i_change(&u->items, itype, i);
|
if (a) i_change(&u->items, itype, i);
|
||||||
else mistake(u, ord, "Diesen Gegenstand darf deine Partei nicht machen.\n", 0);
|
else mistake(u, ord, "Diesen Gegenstand darf deine Partei nicht machen.", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ gm_gate(const tnode * tnext, const char * str, void * data, struct order * ord)
|
||||||
region * r = findregion(x, y);
|
region * r = findregion(x, y);
|
||||||
building * b = findbuilding(id);
|
building * b = findbuilding(id);
|
||||||
if (b==NULL || r==NULL || p!=rplane(b->region) || p!=rplane(r)) {
|
if (b==NULL || r==NULL || p!=rplane(b->region) || p!=rplane(r)) {
|
||||||
mistake(u, ord, "Dieses Gebäude kann die Einheit nicht umwandeln.\n", 0);
|
mistake(u, ord, "Dieses Gebäude kann die Einheit nicht umwandeln.", 0);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
|
@ -216,7 +216,7 @@ gm_terraform(const tnode * tnext, const char * str, void * data, struct order *
|
||||||
const terrain_type * terrain;
|
const terrain_type * terrain;
|
||||||
|
|
||||||
if (r==NULL || p!=rplane(r)) {
|
if (r==NULL || p!=rplane(r)) {
|
||||||
mistake(u, ord, "Diese Region kann die Einheit nicht umwandeln.\n", 0);
|
mistake(u, ord, "Diese Region kann die Einheit nicht umwandeln.", 0);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
|
@ -246,16 +246,16 @@ gm_teleport(const tnode * tnext, const char * str, void * data, struct order * o
|
||||||
region * r = findregion(x, y);
|
region * r = findregion(x, y);
|
||||||
|
|
||||||
if (r==NULL || p!=rplane(r)) {
|
if (r==NULL || p!=rplane(r)) {
|
||||||
mistake(u, ord, "In diese Region kann die Einheit nicht teleportieren.\n", 0);
|
mistake(u, ord, "In diese Region kann die Einheit nicht teleportieren.", 0);
|
||||||
} else if (to==NULL) {
|
} else if (to==NULL) {
|
||||||
mistake(u, ord, "Die Einheit wurde nicht gefunden.\n", 0);
|
mistake(u, ord, "Die Einheit wurde nicht gefunden.", 0);
|
||||||
} else if (rplane(to->region)!=rplane(r) && !ucontact(to, u)) {
|
} else if (rplane(to->region)!=rplane(r) && !ucontact(to, u)) {
|
||||||
mistake(u, ord, "Die Einheit hat uns nicht kontaktiert.\n", 0);
|
mistake(u, ord, "Die Einheit hat uns nicht kontaktiert.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmtele"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmtele"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else move_unit(to, r, NULL);
|
else move_unit(to, r, NULL);
|
||||||
}
|
}
|
||||||
|
@ -272,12 +272,12 @@ gm_messageplane(const tnode * tnext, const char * str, void * data, struct order
|
||||||
const struct plane * p = rplane(u->region);
|
const struct plane * p = rplane(u->region);
|
||||||
const char * zmsg = igetstrtoken(str);
|
const char * zmsg = igetstrtoken(str);
|
||||||
if (p==NULL) {
|
if (p==NULL) {
|
||||||
mistake(u, ord, "In diese Ebene kann keine Nachricht gesandt werden.\n", 0);
|
mistake(u, ord, "In diese Ebene kann keine Nachricht gesandt werden.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmmsgr"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmmsgr"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message * msg = msg_message("msg_event", "string", zmsg);
|
message * msg = msg_message("msg_event", "string", zmsg);
|
||||||
|
@ -310,7 +310,7 @@ gm_messagefaction(const tnode * tnext, const char * str, void * data, struct ord
|
||||||
plane * p = rplane(u->region);
|
plane * p = rplane(u->region);
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmmsgr"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmmsgr"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (f!=NULL) {
|
if (f!=NULL) {
|
||||||
|
@ -323,7 +323,7 @@ gm_messagefaction(const tnode * tnext, const char * str, void * data, struct ord
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mistake(u, ord, "An diese Partei kann keine Nachricht gesandt werden.\n", 0);
|
mistake(u, ord, "An diese Partei kann keine Nachricht gesandt werden.", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -341,12 +341,12 @@ gm_messageregion(const tnode * tnext, const char * str, void * data, struct orde
|
||||||
region * r = findregion(x, y);
|
region * r = findregion(x, y);
|
||||||
|
|
||||||
if (r==NULL || p!=rplane(r)) {
|
if (r==NULL || p!=rplane(r)) {
|
||||||
mistake(u, ord, "In diese Region kann keine Nachricht gesandt werden.\n", 0);
|
mistake(u, ord, "In diese Region kann keine Nachricht gesandt werden.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmmsgr"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmmsgr"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_message(&r->msgs, msg_message("msg_event", "string", msg));
|
add_message(&r->msgs, msg_message("msg_event", "string", msg));
|
||||||
|
@ -368,12 +368,12 @@ gm_killunit(const tnode * tnext, const char * str, void * data, struct order * o
|
||||||
region * r = target->region;
|
region * r = target->region;
|
||||||
|
|
||||||
if (r==NULL || p!=rplane(r)) {
|
if (r==NULL || p!=rplane(r)) {
|
||||||
mistake(u, ord, "In dieser Region kann niemand getötet werden.\n", 0);
|
mistake(u, ord, "In dieser Region kann niemand getötet werden.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmkill"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmkill"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
scale_number(target, 0);
|
scale_number(target, 0);
|
||||||
|
@ -398,7 +398,7 @@ gm_killfaction(const tnode * tnext, const char * str, void * data, struct order
|
||||||
plane * p = rplane(u->region);
|
plane * p = rplane(u->region);
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmkill"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmkill"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (f!=NULL) {
|
if (f!=NULL) {
|
||||||
|
@ -415,7 +415,7 @@ gm_killfaction(const tnode * tnext, const char * str, void * data, struct order
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mistake(u, ord, "Aus dieser Partei kann niemand gelöscht werden.\n", 0);
|
mistake(u, ord, "Aus dieser Partei kann niemand gelöscht werden.", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -439,12 +439,12 @@ gm_messageunit(const tnode * tnext, const char * str, void * data, struct order
|
||||||
r = target->region;
|
r = target->region;
|
||||||
|
|
||||||
if (r==NULL || p!=rplane(r)) {
|
if (r==NULL || p!=rplane(r)) {
|
||||||
mistake(u, ord, "In diese Region kann keine Nachricht gesandt werden.\n", 0);
|
mistake(u, ord, "In diese Region kann keine Nachricht gesandt werden.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmmsgu"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmmsgu"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
add_message(&target->faction->msgs,
|
add_message(&target->faction->msgs,
|
||||||
|
@ -467,15 +467,15 @@ gm_give(const tnode * tnext, const char * str, void * data, struct order * ord)
|
||||||
|
|
||||||
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
||||||
/* unknown or in another plane */
|
/* unknown or in another plane */
|
||||||
mistake(u, ord, "Die Einheit wurde nicht gefunden.\n", 0);
|
mistake(u, ord, "Die Einheit wurde nicht gefunden.", 0);
|
||||||
} else if (itype==NULL || i_get(u->items, itype)==0) {
|
} else if (itype==NULL || i_get(u->items, itype)==0) {
|
||||||
/* unknown or not enough */
|
/* unknown or not enough */
|
||||||
mistake(u, ord, "So einen Gegenstand hat die Einheit nicht.\n", 0);
|
mistake(u, ord, "So einen Gegenstand hat die Einheit nicht.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmgive"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmgive"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int i = i_get(u->items, itype);
|
int i = i_get(u->items, itype);
|
||||||
|
@ -502,15 +502,15 @@ gm_take(const tnode * tnext, const char * str, void * data, struct order * ord)
|
||||||
|
|
||||||
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
||||||
/* unknown or in another plane */
|
/* unknown or in another plane */
|
||||||
mistake(u, ord, "Die Einheit wurde nicht gefunden.\n", 0);
|
mistake(u, ord, "Die Einheit wurde nicht gefunden.", 0);
|
||||||
} else if (itype==NULL || i_get(to->items, itype)==0) {
|
} else if (itype==NULL || i_get(to->items, itype)==0) {
|
||||||
/* unknown or not enough */
|
/* unknown or not enough */
|
||||||
mistake(u, ord, "So einen Gegenstand hat die Einheit nicht.\n", 0);
|
mistake(u, ord, "So einen Gegenstand hat die Einheit nicht.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmtake"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmtake"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int i = i_get(to->items, itype);
|
int i = i_get(to->items, itype);
|
||||||
|
@ -537,18 +537,18 @@ gm_skill(const tnode * tnext, const char * str, void * data, struct order * ord)
|
||||||
|
|
||||||
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
if (to==NULL || rplane(to->region) != rplane(u->region)) {
|
||||||
/* unknown or in another plane */
|
/* unknown or in another plane */
|
||||||
mistake(u, ord, "Die Einheit wurde nicht gefunden.\n", 0);
|
mistake(u, ord, "Die Einheit wurde nicht gefunden.", 0);
|
||||||
} else if (skill==NOSKILL || skill==SK_MAGIC || skill==SK_ALCHEMY) {
|
} else if (skill==NOSKILL || skill==SK_MAGIC || skill==SK_ALCHEMY) {
|
||||||
/* unknown or not enough */
|
/* unknown or not enough */
|
||||||
mistake(u, ord, "Dieses Talent ist unbekannt, oder kann nicht erhöht werden.\n", 0);
|
mistake(u, ord, "Dieses Talent ist unbekannt, oder kann nicht erhöht werden.", 0);
|
||||||
} else if (num<0 || num>30) {
|
} else if (num<0 || num>30) {
|
||||||
/* sanity check failed */
|
/* sanity check failed */
|
||||||
mistake(u, ord, "Der gewählte Wert ist nicht zugelassen.\n", 0);
|
mistake(u, ord, "Der gewählte Wert ist nicht zugelassen.", 0);
|
||||||
} else {
|
} else {
|
||||||
/* checking permissions */
|
/* checking permissions */
|
||||||
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
attrib * permissions = a_find(u->faction->attribs, &at_permissions);
|
||||||
if (!permissions || !has_permission(permissions, atoi36("gmskil"))) {
|
if (!permissions || !has_permission(permissions, atoi36("gmskil"))) {
|
||||||
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.\n", 0);
|
mistake(u, ord, "Unzureichende Rechte für diesen Befehl.", 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
set_level(to, skill, num);
|
set_level(to, skill, num);
|
||||||
|
|
Loading…
Reference in New Issue