void create() { ::create(); set_name("rat"); if (random(10) > 5) { set_short("fat rat"); set_level(random(5)+9); } else { set_short("small rat"); set_level(random(5)+6); } set_race("rat"); set_body_type("feline"); if (random(10) > 5) { set_gender("female"); } else { set_gender("male"); } set_class("animal"); set_subclass("fast"); set_id(({ "rat", query_short() }));
GtkWidget * init_window(FileContainer *file_container) { GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), file_container->path); set_class(window, "window"); return window; }
void acl_init(void) { iks *policy; iks *model; int class_no; int e; // parse security policy file e = iks_load("/etc/comar/security-policy.xml", &policy); if (e) { log_error("Cannot process security policy file '%s', error %d\n", "/etc/comar/security-policy.xml", e); return; } if (iks_strcmp(iks_name(policy), "comarSecurityPolicy") != 0) { log_error("Not a security policy file '%s'\n", "/etc/comar/security-policy.xml"); return; } // call permissions on the model model = iks_find(policy, "model"); if (model) { class_no = -1; while (model_next_class(&class_no)) { set_class(model, class_no); } } }
void Sub12::actual_read(const std::string & data) { if (data.size() >= 22) { set_class(data[0]); set_pka(data[1]); set_fingerprint(data.substr(2, 20)); } }
void create() { ::create(); set_name("peacekeeper"); set_short("an armoured peacekeeper"); set_level(20); set_class("monk"); set_race("human"); set_body_type("human"); set_gender("male"); set_id(({ "keeper", "peacekeeper", "soldier", "guard" }));
ToolBar::ToolBar(GUIComponent *parent) : GUIComponent(parent, CssStr::ToolBar::type_name), impl(new ToolBar_Impl) { set_class("horizontal", true); impl->toolbar = this; func_process_message().set(impl.get(), &ToolBar_Impl::on_process_message); func_render().set(impl.get(), &ToolBar_Impl::on_render); func_resized().set(impl.get(), &ToolBar_Impl::on_resized); impl->create_parts(); }
void create(){ ::create(); set_name("Jill"); set_short("Jill is here, fetching some water"); set_long("A young girl named Jill"); set_race("human"); set_body_type("human"); set_level(7); set_gender("female"); set_class("fighter"); set_id(({"jill" "girl"}));
Object* ObjectMemory::new_object_typed(Class* cls, size_t bytes, object_type type) { Object* obj; obj = allocate_object(bytes); set_class(obj, cls); obj->obj_type = type; obj->RequiresCleanup = type_info[type]->instances_need_cleanup; return obj; }
void create(){ ::create(); set_name("spook"); set_short("A Spook"); set_long("An ugly little spook. "); set_level(35); set_race("spook"); set_body_type("human"); set_class("clergy"); set_subclass("monk"); set_id(({"spook"}));
void create() { ::create(); set_name("Captain"); set_short("A Captain of Malcolm's army, plotting the next move."); set_long("The captain of his brigade, he controls how his set of troops act in combat."); set("aggressive",20); set_class("fighter"); set_swarm("soldier"); set_level(57); set_id(({"soldier","captain"}));
GtkScrolledWindow * init_scroll_container() { GtkWidget *scroll_container = gtk_scrolled_window_new(NULL, NULL); set_class(scroll_container, "editor-window"); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scroll_container), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS ); return GTK_SCROLLED_WINDOW(scroll_container); }
GtkSourceView * init_buffer_view(GtkSourceBuffer *source_buffer) { GtkSourceView *source_view = GTK_SOURCE_VIEW(gtk_source_view_new_with_buffer(source_buffer)); set_class(GTK_WIDGET(source_view), "editor"); gtk_text_view_set_left_margin(GTK_TEXT_VIEW(source_view), 4); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(source_view), GTK_WRAP_CHAR); gtk_source_view_set_draw_spaces(source_view, GTK_SOURCE_DRAW_SPACES_TAB); gtk_source_view_set_auto_indent(source_view, TRUE); gtk_source_view_set_indent_on_tab(source_view, TRUE); //gtk_source_view_set_show_line_numbers(source_view, TRUE); return source_view; }
static void create() { ::create(); set_name("a bloodletting knife"); add_id("knife"); set_long("A surgeon knife drenched in blood."); set_class(11); set_value(866); set_damage_type("pierce"); set_weight(1); add_property("metal"); add_hook("__wield",store_fp("do_wield")); add_hook("__remove",store_fp("do_unwield")); }
void create() { int hp; ::create(); set_name("ogre"); set_short("a big ogre"); set_long("Even bigger than most ogres, this one has huge muscles " "all over his body. His rags barely cover his body."); set_gender("male"); set_race("ogre"); set_body_type("human"); set_alignment(-600); set_class("fighter"); set_subclass("berserker"); set_spells( ({ "headbutt", "pummel", "rush", "brawn" }) );
PopupMenuWindow::PopupMenuWindow(const PopupMenu &menu, const Point &screen_position, GUIComponent *owner) : GUIComponent(owner, create_toplevel_description(), CssStr::PopupMenuWindow::type_name), menu(menu), selected(-1) { set_class(menu.get_class(), true); create_parts(); Rect rect_pos(screen_position, calc_desired_size()); set_window_geometry(rect_pos); set_visible(true, false); func_close().set(this, &PopupMenuWindow::on_close); }
void create() { ::create(); set_name("Scorpion King"); set_short("The Scorpion King"); set_long("This is the Scorpion King. Although he was " "frozen and buried, he was dug up by the spawn of " "Rejik. He is still alive however, and is willing " "to kill anyone who threatens his guild."); set_race("gnoll"); set_body_type("gnoll"); set_level(30); set_class("mage"); set_subclass("wizard"); set_id(({ "king", "guild guard", "scorpian king" }));
static void create() { ::create(); set_name("sword"); set_short("katana"); add_id("sword"); set_long("This is a well forged twohanded katana.\n"); set_class(20); set_weight(7); set_type("twohanded"); set_value(600); set_damage_type("slash"); add_property("steel"); }
void create() { int hp; ::create(); set_name("ogre"); set_short("a green ogre"); set_long("The skin of this ogre is a dull green. Matted black hair " "hangs on all sides of his head."); set_gender("male"); set_race("ogre"); set_body_type("human"); set_alignment(-700); set_class("fighter"); set_subclass("antipaladin"); set_spells( ({ "headbutt", "slash", "whip", "shadowburst" }) );
void create() { int hp; ::create(); set_name("ogre"); set_short("an ogre"); set_long("This ogre is big and hairy. His thick grey skin is " "covered in patches of dirt, but his eyes shine with an odd " "degree of intelligence."); set_gender("male"); set_race("ogre"); set_body_type("human"); set_alignment(-800); set_class("mage"); set_subclass("necromancer"); set_spells( ({ "plague", "disease", "shadowburst", "siphon" }) );
void create_object(void) { set_name("shortsword"); add_id("sword"); add_id("darkling shortsword"); set_short("a darkling shortsword"); set_long("A well made short sword with a small steel plate engraved " + "with a mark of a black dragon on it's pommel.\n"); set_value(10); set_weight(2); set_type("shortblade"); set_class(12); set_material("steel"); set_property("average"); }
void create_object(void) { set_name("sword"); add_id("longsword"); add_id("darkling longsword"); set_short("a darkling longsword"); set_long("A long sword made of black steel. The steel is smooth and " + "hard, and looks very sharp. On the pommel is a small steel " + "plate engraved with a mark of a black dragon.\n"); set_value(20); set_weight(2); set_type("longblade"); set_class(16); set_material("steel"); set_property("average"); }
void create_object(void) { set_short("A strangely shaped mandolin"); set_long("A black mandolin with a strange shape and a pointy head. It " + "seems to be solid, not hollow like mandolins usually are, " + "and when you strum it it makes a strange, distorted sound.\n"); set_name("mandolin"); add_id("strangely shaped mandolin"); add_id("black mandolin"); set_class(8); set_weight(2); set_value(30); set_material("wood"); set_type("blunt"); set_property("poor"); }
void create_object(void) { set_name("fishingpole"); add_id("fishing pole"); add_id("pole"); set_short("A fishing pole"); set_long("A nice, long, wooden fishing pole. You bet you could catch some "+ "fine fish with this pole wielded!\n"); set_value(5); set_weight(1); set_type("blunt"); set_class(5); set_material("wood"); set_property("poor"); set_wield_func(TO); set_hit_func(TO); }
void create() { ::create(); set_name("Axe of Khorne"); set_short("a huge axe covered with runes"); set_long("The Axe of Khorne is only used by the most devoted and " + "powerful of Khornes champions. It has runes engraved all " + "over its surface, and you can barely hold it in your hands " + "due to the power it contains."); add_id("axe"); set_class(20); set_value(10000); set_weight(6); set_damage_type("chop"); set_type("twohanded"); set_break_chance(1); set_break_msg("The axe explodes in an inferno of flames.\n"); set_broken_desc("This was once a truly amazing weapon."); add_property(({ "tagged", "hidden" }));
void create_object(void) { set_name("sword"); add_id("twohanded sword"); add_id("black twohanded sword"); set_short("a black twohanded sword"); set_long("A large twohanded sword made of shining black steel. It is " + "razor sharp and the blade reflects the light on an odd, " + "smooth way. Spidery runes run up and down the lenght of the " + "blade, and on it's pommel is a small steel plate engraved " + "with a mark of a black dragon. This is truly a magnificent " + "weapon.\n"); set_value(76); set_weight(4); set_type("twohanded"); set_class(26); set_material("steel"); set_property("good"); }
s8 wl_shell_surface_req(struct client *c,s32 shell_surface_slot,struct msg *m) { s8 r; switch(m->req_op){ case WL_SHELL_SURFACE_PONG: r=pong(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_MOVE: r=move(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_RESIZE: r=resize(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_SET_TOP_LEVEL: LOG_WIRE("client(%d):shell_surface::set_top_level shell_surface_id=%u\n", c->so,m->req[0]); r=shell_surface_set_top_level(c,shell_surface_slot); break; case WL_SHELL_SURFACE_SET_TRANSIENT: r=set_transient(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_SET_FULLSCREEN: r=set_fullscreen(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_SET_POPUP: r=set_popup(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_SET_MAXIMISED: r=set_maximised(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_SET_TITLE: r=set_title(c,shell_surface_slot,m); break; case WL_SHELL_SURFACE_SET_CLASS: r=set_class(c,shell_surface_slot,m); break; default: PERR("client(%d):fatal:shell surface unknown opcode %u\n",c->so,m->req_op); r=LWL_ERR; }; return r; }
void QWaylandShellSurface::setClassName(const char *className) { set_class(className); }
bool ClassInstanceData::tool_cmd(ToolCom * com, const char * args, BrowserNode * bn, const QString & comment) { if (((unsigned char) args[-1]) >= firstSetCmd) { if (!bn->is_writable() && !root_permission()) com->write_ack(FALSE); else { switch ((unsigned char) args[-1]) { case setTypeCmd: set_class((BrowserClass *) com->get_id(args)); break; case setAttributeCmd: { BrowserAttribute * at = (BrowserAttribute *) com->get_id(args); bool find = FALSE; Q3ValueList<SlotAttr>::Iterator it_attr; for (it_attr = attributes.begin(); it_attr != attributes.end(); ++it_attr) { SlotAttr & slot_attr = *it_attr; if (slot_attr.att == at) { find = TRUE; if (*args == 0) // remove it attributes.remove(it_attr); else // replace it slot_attr.value = args; break; } } if (! find) { // add it Q3PtrList<BrowserClass> l; cl->get_all_parents(l); l.append(cl); if (at->deletedp() || (l.findRef((BrowserClass *) at->parent()) == -1)) { // illegal com->write_ack(FALSE); return TRUE; } attributes.append(SlotAttr(at, args)); } } break; case addRelationCmd: if (! change_rel(com, args, TRUE)) return TRUE; break; case removeRelationCmd: if (! change_rel(com, args, FALSE)) return TRUE; break; default: return BasicData::tool_cmd(com, args, bn, comment); } // ok case bn->modified(); modified(); com->write_ack(TRUE); } } else { switch ((unsigned char) args[-1]) { case attributesCmd: if (args[0] == 0) { com->write_unsigned(attributes.count()); Q3ValueList<SlotAttr>::Iterator it; for (it = attributes.begin(); it != attributes.end(); ++it) { const SlotAttr & slot = *it; slot.att->write_id(com); com->write_string(slot.value); } } else { // get all available attributes BrowserNodeList l; BrowserNode * bn; cl->get_attrs(l); com->write_unsigned(l.count()); for (bn = l.first(); bn != 0; bn = l.next()) bn->write_id(com); } break; case relationsCmd: { BrowserClassInstance * other = (BrowserClassInstance *) com->get_id(args); if (other == 0) { com->write_unsigned(relations.count()); Q3ValueList<SlotRel>::Iterator it; for (it = relations.begin(); it != relations.end(); ++it) { const SlotRel & slot = *it; ((slot.is_a) ? slot.rel->get_start() : slot.rel->get_end()) ->write_id(com); slot.value->write_id(com); } } else { // get all available relations Q3PtrList<BrowserRelation> l; BrowserRelation * r; cl->get_rels(((ClassInstanceData *)other->get_data())->cl, l); com->write_unsigned(l.count()); for (r = l.first(); r != 0; r = l.next()) r->write_id(com); } } break; default: return BasicData::tool_cmd(com, args, bn, comment); } } return TRUE; }
GtkEntry * init_tag() { GtkWidget *tag = gtk_entry_new(); set_class(tag, "tag"); return GTK_ENTRY(tag); }
void DataFrameSubsetVisitors::structure(List& x, int nrows, CharacterVector classes) const { copy_most_attributes(x, data); set_class(x, classes); set_rownames(x, nrows); x.names() = visitor_names; }