// Function from file: monkey.dm public override int assess_threat(Mob_Living_SimpleAnimal_Bot judgebot = null, string lasercolor = null) { int threatcount = 0; if (judgebot.emagged == 2) { return(10); } threatcount = 0; if (!Lang13.Bool(lasercolor) && Lang13.Bool(((dynamic)judgebot).idcheck)) { threatcount += 4; } if (Lang13.Bool(lasercolor)) { if (lasercolor == "b") { if (this.r_hand is Obj_Item_Weapon_Gun_Energy_Laser_Redtag || this.l_hand is Obj_Item_Weapon_Gun_Energy_Laser_Redtag) { threatcount += 4; } } if (lasercolor == "r") { if (this.r_hand is Obj_Item_Weapon_Gun_Energy_Laser_Bluetag || this.l_hand is Obj_Item_Weapon_Gun_Energy_Laser_Bluetag) { threatcount += 4; } } return(threatcount); } if (Lang13.Bool(((dynamic)judgebot).weaponscheck)) { if (Lang13.Bool(((dynamic)judgebot).check_for_weapons(this.l_hand))) { threatcount += 4; } if (Lang13.Bool(((dynamic)judgebot).check_for_weapons(this.r_hand))) { threatcount += 4; } } if (GlobalFuncs.isloyal(this)) { threatcount -= 1; } return(threatcount); }
// Function from file: ion_storm.dm public override bool start( ) { Mob_Living_Silicon_Ai M = null; dynamic message = null; Mob_Living_SimpleAnimal_Bot bot = null; foreach (dynamic _a in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_Silicon_Ai))) { M = _a; if (M.stat != 2 && M.see_in_dark != 0) { message = GlobalFuncs.generate_ion_law(this.ionMessage); if (Lang13.Bool(message)) { M.add_ion_law(message); M.WriteMsg("<br>"); M.WriteMsg("<span class='danger'>" + message + " ...LAWS UPDATED</span>"); M.WriteMsg("<br>"); } } } if (Lang13.Bool(this.botEmagChance)) { foreach (dynamic _b in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_SimpleAnimal_Bot))) { bot = _b; if (Rand13.PercentChance(this.botEmagChance ?? 0)) { bot.emag_act(); } } } return(false); }
// Function from file: revenant_abilities.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; dynamic T = null; Mob_Living_SimpleAnimal_Bot bot = null; Mob_Living_Carbon_Human human = null; Obj thing = null; Mob_Living_Silicon_Robot S = null; if (this.attempt_cast(thearea)) { foreach (dynamic _e in Lang13.Enumerate(targets)) { T = _e; Task13.Schedule(0, (Task13.Closure)(() => { foreach (dynamic _a in Lang13.Enumerate(T.contents, typeof(Mob_Living_SimpleAnimal_Bot))) { bot = _a; if (!(bot.emagged != 0)) { GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), bot.loc); bot.locked = false; bot.open = true; bot.emag_act(); } } foreach (dynamic _b in Lang13.Enumerate(T.contents, typeof(Mob_Living_Carbon_Human))) { human = _b; if (human == thearea) { continue; } human.WriteMsg("<span class='revenwarning'>You feel " + Rand13.Pick(new object [] { "your sense of direction flicker out", "a stabbing pain in your head", "your mind fill with static" }) + ".</span>"); GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), human.loc); human.emp_act(1); } foreach (dynamic _c in Lang13.Enumerate(T.contents, typeof(Obj))) { thing = _c; if (thing is Obj_Machinery_Dominator || thing is Obj_Machinery_Power_Apc || thing is Obj_Machinery_Power_Smes) { continue; } if (Rand13.PercentChance(20)) { if (Rand13.PercentChance(50)) { GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), thing.loc); } thing.emag_act(null); } else if (!(thing is Obj_Machinery_Clonepod)) { thing.emp_act(1); } } foreach (dynamic _d in Lang13.Enumerate(T.contents, typeof(Mob_Living_Silicon_Robot))) { S = _d; GlobalFuncs.playsound(S, "sound/machines/warning-buzzer.ogg", 50, 1); GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Revenant), S.loc); S.spark_system.start(); S.emp_act(1); } return; })); } } return(false); }
// Function from file: alien.dm public override int assess_threat(Mob_Living_SimpleAnimal_Bot judgebot = null, string lasercolor = null) { return(-10); }
// Function from file: cart.dm public string bot_control( ) { Mob_Living_SimpleAnimal_Bot Bot = null; dynamic MULE = null; dynamic Load = null; dynamic current_turf = null; int zlevel = 0; int botcount = 0; if (Lang13.Bool(this.active_bot)) { this.menu += new Txt("<B>").item(this.active_bot).str("</B><BR> Status: (<A href='byond://?src=").Ref(this).str(";op=control;bot=").Ref(this.active_bot).str("'><img src=pda_refresh.png><i>refresh</i></A>)<BR>").ToString(); this.menu += "Model: " + this.active_bot.model + "<BR>"; this.menu += "Location: " + GlobalFuncs.get_area(this.active_bot) + "<BR>"; this.menu += "Mode: " + ((Mob_Living_SimpleAnimal_Bot)this.active_bot).get_mode(); if (this.active_bot.allow_pai) { this.menu += "<BR>pAI: "; if (Lang13.Bool(this.active_bot.paicard) && Lang13.Bool(this.active_bot.paicard.pai)) { this.menu += "" + this.active_bot.paicard.pai.name; if (((Obj)this.active_bot.bot_core).allowed(Task13.User)) { this.menu += new Txt(" (<A href='byond://?src=").Ref(this).str(";op=ejectpai'><i>eject</i></A>)").ToString(); } } else { this.menu += "<i>none</i>"; } } if (Convert.ToInt32(this.active_bot.bot_type) == 2) { MULE = this.active_bot; Load = MULE.load; this.menu += "<BR>Current Load: " + (!Lang13.Bool(Load) ? "<i>none</i>" : new Txt().item(Load.name).str(" (<A href='byond://?src=").Ref(this).str(";mule=unload'><i>unload</i></A>)").ToString()) + "<BR>"; this.menu += new Txt("Destination: ").item((Lang13.Bool(MULE.destination) ? MULE.destination : "<i>None</i>")).str(" (<A href='byond://?src=").Ref(this).str(";mule=destination'><i>set</i></A>)<BR>").ToString(); this.menu += new Txt("Set ID: ").item(MULE.suffix).str(" <A href='byond://?src=").Ref(this).str(";mule=setid'><i> Modify</i></A><BR>").ToString(); this.menu += "Power: " + (Lang13.Bool(MULE.cell) ? ((Obj_Item_Weapon_StockParts_Cell)MULE.cell).percent() : 0) + "%<BR>"; this.menu += "Home: " + (!Lang13.Bool(MULE.home_destination) ? ((dynamic)("<i>none</i>")) : MULE.home_destination) + "<BR>"; this.menu += new Txt("Delivery Reporting: <A href='byond://?src=").Ref(this).str(";mule=report'>").item((MULE.report_delivery ? "(<B>On</B>)" : "(<B>Off</B>)")).str("</A><BR>").ToString(); this.menu += new Txt("Auto Return Home: <A href='byond://?src=").Ref(this).str(";mule=autoret'>").item((MULE.auto_return ? "(<B>On</B>)" : "(<B>Off</B>)")).str("</A><BR>").ToString(); this.menu += new Txt("Auto Pickup Crate: <A href='byond://?src=").Ref(this).str(";mule=autopick'>").item((MULE.auto_pickup ? "(<B>On</B>)" : "(<B>Off</B>)")).str("</A><BR><BR>").ToString(); this.menu += new Txt("[<A href='byond://?src=").Ref(this).str(";mule=stop'>Stop</A>] ").ToString(); this.menu += new Txt("[<A href='byond://?src=").Ref(this).str(";mule=go'>Proceed</A>] ").ToString(); this.menu += new Txt("[<A href='byond://?src=").Ref(this).str(";mule=home'>Return Home</A>]<BR>").ToString(); } else { this.menu += new Txt("<BR>[<A href='byond://?src=").Ref(this).str(";op=patroloff'>Stop Patrol</A>] ").ToString(); this.menu += new Txt("[<A href='byond://?src=").Ref(this).str(";op=patrolon'>Start Patrol</A>] ").ToString(); this.menu += new Txt("[<A href='byond://?src=").Ref(this).str(";op=summon'>Summon Bot</A>]<BR>").ToString(); this.menu += "Keep an ID inserted to upload access codes upon summoning."; } this.menu += new Txt("<HR><A href='byond://?src=").Ref(this).str(";op=botlist'><img src=pda_back.png>Return to bot list</A>").ToString(); } else { this.menu += new Txt("<BR><A href='byond://?src=").Ref(this).str(";op=botlist'><img src=pda_refresh.png>Scan for active bots</A><BR><BR>").ToString(); current_turf = GlobalFuncs.get_turf(this); zlevel = Convert.ToInt32(current_turf.z); botcount = 0; foreach (dynamic _a in Lang13.Enumerate(GlobalVars.living_mob_list, typeof(Mob_Living_SimpleAnimal_Bot))) { Bot = _a; if (!Lang13.Bool(Bot.on) || Bot.z != zlevel || Bot.remote_disabled || !((this.bot_access_flags & Bot.bot_type) != 0)) { continue; } this.menu += new Txt("<A href='byond://?src=").Ref(this).str(";op=control;bot=").Ref(Bot).str("'><b>").item(Bot.name).str("</b> (").item(Bot.get_mode()).str(")<BR>").ToString(); botcount++; } if (!(botcount != 0)) { this.menu += "No bots found.<BR>"; return(null); } } return(this.menu); }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static dynamic get_path_to( Mob_Living_SimpleAnimal_Bot start = null, dynamic end = null, Mob_Living_SimpleAnimal_Bot atom = null, System.Reflection.MethodInfo dist = null, bool maxnodes = false, int? maxnodedepth = null, bool? mintargetdist = null, System.Reflection.MethodInfo adjacent = null, Ent_Item_Weapon_Card_Id id = null, dynamic exclude = null, bool? simulated_only = null ) { dynamic path = null; if ( maxnodedepth == null ) { maxnodedepth = 30; } if ( adjacent == null ) { adjacent = typeof(Tile).GetMethod( "reachableAdjacentTurfs" ); } if ( id == null ) { id = null; } if ( exclude == null ) { exclude = null; } if ( simulated_only == null ) { simulated_only = true; } path = GlobalFuncs.AStar( start, end, atom, dist, maxnodes, maxnodedepth, mintargetdist, adjacent, id, exclude, simulated_only ); if ( !Lang13.Bool( path ) ) { path = new ByTable(); } return path; }