44 for (; ol; ol = ol->
next) {
48 LOG(
llevError,
"Internal error in trigger_connect. No object associated with link id (%u) (cause='%s'.\n", ol->
id, (cause && cause->
name) ? cause->
name :
"");
114 for (part = tmp; tmp != NULL; tmp = tmp->
more) {
169 int tot, any_down = 0, old_value = op->
value;
196 if ((ab->move_type&tmp->
move_on) || ab->move_type == 0)
197 tot += ab->weight*
NROF(ab)+ab->carrying;
222 if (op->
value != old_value) {
237 for (ol = obp->
link; ol; ol = ol->
next) {
239 LOG(
llevError,
"Internal error in update_button (%s (%dx%d):%u, connected %ld).\n",
241 ol->
ob ? ol->
ob->
x : -1,
242 ol->
ob ? ol->
ob->
y : -1,
288 #define ARCH_SACRIFICE(xyz) ((xyz)->slaying) 289 #define NROF_SACRIFICE(xyz) ((uint32_t)(xyz)->stats.food) 401 wanted -= tmp->nrof*tmp->value;
414 *toremove =
NROF(sacrifice);
426 wanted = tmp->nrof*tmp->value;
431 wanted = rest/tmp->value;
438 if (rest >
NROF(tmp)) {
448 LOG(
llevError,
"check_altar_sacrifice on %s: found objects to sacrifice, but couldn't remove them??\n", altar->
map->
path);
472 LOG(
llevError,
"BUG: operate_altar(): altar has no map\n");
524 int push = 0, tot = 0;
539 if ((tmp->move_type&op->
move_on) || tmp->move_type == 0) {
540 tot += tmp->weight*
NROF(tmp)+tmp->carrying;
552 if (in_movement || !push)
562 object *head = tmp->head ? tmp->head : tmp;
578 if (in_movement || !push)
607 return cause == NULL;
666 LOG(
llevError,
"Tried to add button-link without map.\n");
684 obp->
value = connected;
702 if (op->
map == NULL) {
703 LOG(
llevError,
"remove_button_link() in object without map.\n");
707 LOG(
llevError,
"remove_button_linked() in unlinked object.\n");
712 for (olp = &obp->
link; (ol = *olp); olp = &ol->
next)
721 LOG(
llevError,
"remove_button_linked(): couldn't find object.\n");
740 for (ol = obp->
link; ol; ol = ol->
next)
741 if (ol->
ob == button && ol->
id == button->
count)
762 for (ol = obp->
link; ol; ol = ol->
next)
763 if (ol->
ob == button && ol->
id == button->
count)
805 && (!trig->
race || (tmp->arch->name == trig->
race))
806 && (!trig->
title || (tmp->title == trig->
title))
841 }
else if (!match && !trig->
last_sp)
863 for (ol = obp->
link; ol; ol = ol->
next) {
#define SET_ANIMATION(ob, newanim)
const char * object_get_value(const object *op, const char *const key)
static uint32_t NROF(const object *const ob)
void query_base_name(const object *op, int plural, char *buf, size_t size)
void free_objectlink(objectlink *ol)
objectlink * get_objectlink(void)
void object_update(object *op, int action)
#define FLAG_ACTIVATE_ON_PUSH
#define FOR_ABOVE_FINISH()
#define FOR_ABOVE_PREPARE(op_, it_)
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
#define MSG_TYPE_DIALOG_ALTAR
#define FLAG_ACTIVATE_ON_RELEASE
void move_firewall(object *op)
object * object_decrease_nrof(object *op, uint32_t i)
#define object_decrease_nrof_by_one(xyz)
#define NUM_ANIMATIONS(ob)
int execute_event(object *op, int eventcode, object *activator, object *third, const char *message, int fix)
oblinkpt * get_objectlinkpt(void)
void LOG(LogLevel logLevel, const char *format,...)
method_ret ob_trigger(object *op, object *cause, int state)
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
void push(String_Array *array, const char *string)
void object_update_speed(object *op)
#define FOR_INV_PREPARE(op_, it_)
void object_remove(object *op)