forked from github/server
Wrong wages for orcs also: - removing some really old GMcommand code.
This commit is contained in:
parent
e681eec072
commit
4bc803ef2c
6 changed files with 13 additions and 37 deletions
|
@ -2917,7 +2917,7 @@ expandwork(region * r)
|
|||
}
|
||||
|
||||
static void
|
||||
work(unit * u, order * ord)
|
||||
work_cmd(unit * u, order * ord)
|
||||
{
|
||||
region * r = u->region;
|
||||
request *o;
|
||||
|
@ -3120,7 +3120,7 @@ produce(void)
|
|||
break;
|
||||
|
||||
case K_WORK:
|
||||
if (playerrace(u->race)) work(u, u->thisorder);
|
||||
if (playerrace(u->race)) work_cmd(u, u->thisorder);
|
||||
else if (playerrace(u->faction->race)) {
|
||||
ADDMSG(&u->faction->msgs,
|
||||
msg_feedback(u, u->thisorder, "race_cantwork", "race", u->race));
|
||||
|
|
|
@ -2807,7 +2807,11 @@ default_wage(const region *r, const faction * f, const race * rc)
|
|||
}
|
||||
|
||||
if (f!=NULL) {
|
||||
wage = wagetable[esize][rc == new_race[RC_ORC]];
|
||||
int index = 0;
|
||||
if (rc==new_race[RC_ORC] || rc==new_race[RC_URUK] || rc==new_race[RC_SNOTLING]) {
|
||||
index = 1;
|
||||
}
|
||||
wage = wagetable[esize][index];
|
||||
if (fspecial(f, FS_URBAN)) {
|
||||
wage += wagetable[esize][3];
|
||||
}
|
||||
|
|
|
@ -1309,9 +1309,9 @@ readregion(FILE * F, short x, short y)
|
|||
if (strcmp(buf, "end")==0) break;
|
||||
res = calloc(sizeof(rawmaterial), 1);
|
||||
res->type = rmt_find(buf);
|
||||
if (res->type==NULL) {
|
||||
log_error(("invalid resourcetype %s in data.\n", buf));
|
||||
}
|
||||
if (res->type==NULL) {
|
||||
log_error(("invalid resourcetype %s in data.\n", buf));
|
||||
}
|
||||
assert(res->type!=NULL);
|
||||
res->level = ri(F);
|
||||
res->amount = ri(F);
|
||||
|
|
|
@ -326,34 +326,6 @@ fix_otherfaction(void)
|
|||
if (count) log_warning(("%u units had otherfaction=own faction.\n", count));
|
||||
}
|
||||
|
||||
extern attrib * make_atgmcreate(const struct item_type * itype);
|
||||
extern attrib * make_atpermissions(void);
|
||||
extern struct attrib_type at_permissions;
|
||||
extern struct attrib_type at_gmcreate;
|
||||
|
||||
|
||||
static void
|
||||
update_gms(void)
|
||||
{
|
||||
faction * f;
|
||||
for (f=factions;f;f=f->next) {
|
||||
attrib * permissions = a_find(f->attribs, &at_permissions);
|
||||
if (permissions) {
|
||||
const char * keys[] = { "gmgate", "gmmsgr", "gmkill", "gmmsgu", NULL };
|
||||
int k;
|
||||
item_t i;
|
||||
for (k=0;keys[k];++k) {
|
||||
add_key((attrib**)&permissions->data.v, atoi36(keys[k]));
|
||||
}
|
||||
for (i=I_LAEN;i!=I_DRACHENBLUT;++i) {
|
||||
attrib * a = a_find((attrib*)permissions->data.v, &at_gmcreate);
|
||||
while (a && a->data.v!=(void*)olditemtype[i]) a=a->nexttype;
|
||||
if (!a) a_add((attrib**)&permissions->data.v, make_atgmcreate(olditemtype[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
fix_demands(void)
|
||||
{
|
||||
|
@ -1003,7 +975,6 @@ korrektur(void)
|
|||
fix_astralplane();
|
||||
fix_firewalls();
|
||||
fix_gates();
|
||||
update_gms();
|
||||
verify_owners(false);
|
||||
/* fix_herbtypes(); */
|
||||
/* In Vin 3+ können Parteien komplett übergeben werden. */
|
||||
|
|
|
@ -307,7 +307,7 @@ overload(const char * name, const object& f)
|
|||
{
|
||||
if (strcmp(name, "wage")==0) {
|
||||
global.functions.wage = &lua_wage;
|
||||
interface.wage = new object(f);;
|
||||
interface.wage = new object(f);
|
||||
} else if (strcmp(name, "maintenance")==0) {
|
||||
global.functions.maintenance = &lua_maintenance;
|
||||
interface.maintenance = new object(f);;
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
<construction skill="forestry" minskill="2" reqsize="1"/>
|
||||
</item>
|
||||
<resourcelimit>
|
||||
<bonus building="sawmill" type="skill" value="1"/>
|
||||
<modifier building="sawmill" type="skill" value="1"/>
|
||||
<modifier building="sawmill" type="material" value="0.5"/>
|
||||
<guard flag="logging"/>
|
||||
<function name="produce" value="lua_produceresource"/>
|
||||
<function name="limit" value="lua_limitresource"/>
|
||||
|
|
Loading…
Reference in a new issue