// Function from file: hostile.dm public bool FindHidden( ) { Ent_Static A = null; if (this.target.loc is Obj_Structure_Closet || this.target.loc is Obj_Machinery_Disposal || this.target.loc is Obj_Machinery_Sleeper) { A = this.target.loc; this.Goto(A, this.move_to_delay, this.minimum_distance); if (A.Adjacent(this.targets_from)) { A.attack_animal(this); } return(true); } return(false); }
// Function from file: hydroponics.dm public virtual ByTable harvest(Mob user = null) { user = user ?? Task13.User; Ent_Static parent = null; double t_amount = 0; ByTable result = null; Ent_Static output_loc = null; dynamic product_name = null; dynamic t_prod = null; parent = this.loc; t_amount = 0; result = new ByTable(); output_loc = (parent.Adjacent(user) ? user.loc : parent.loc); while (t_amount < this.getYield()) { t_prod = Lang13.Call(this.product, output_loc, this.potency); result.Add(t_prod); if (!Lang13.Bool(t_prod)) { return(null); } t_prod.lifespan = this.lifespan; t_prod.endurance = this.endurance; t_prod.maturation = this.maturation; t_prod.production = this.production; t_prod.yield = this.yield; t_prod.potency = this.potency; t_prod.plant_type = this.plant_type; t_amount++; product_name = t_prod.name; } if (this.getYield() >= 1) { GlobalFuncs.feedback_add_details("food_harvested", "" + product_name + "|" + this.getYield()); } ((dynamic)parent).update_tray(); return(result); }
// Function from file: swarmer.dm public override void CtrlClickOn(Ent_Static A = null) { this.face_atom(A); if (!(this.loc is Tile)) { return; } if (this.next_move > Game13.time) { return; } if (!A.Adjacent(this)) { return; } A.swarmer_act(this); return; }
// Function from file: experiment.dm public override bool MouseDrop_T(Ent_Static dropping = null, Mob user = null) { if (user.stat != 0 || Lang13.Bool(user.lying) || !this.Adjacent(user) || !dropping.Adjacent(user) || !(dropping is Mob_Living_Carbon_Human)) { return(false); } if (this.IsAbductor(dropping)) { return(false); } this.close_machine(dropping); return(false); }