public override bool f_action(Mob_Living_Silicon_Robot R = null) { dynamic T = null; if (base.f_action(R)) { return(false); } T = Lang13.FindIn(typeof(Obj_Item_Weapon_Gun_Energy_Disabler_Cyborg), R.module.modules); if (!Lang13.Bool(T)) { Task13.User.WriteMsg("<span class='notice'>There's no disabler in this unit!</span>"); return(false); } if (T.charge_delay <= 2) { R.WriteMsg("<span class='notice'>A cooling unit is already installed!</span>"); Task13.User.WriteMsg("<span class='notice'>There's no room for another cooling unit!</span>"); return(false); } T.charge_delay = Num13.MaxInt(2, T.charge_delay - 4); return(true); }
// Function from file: robot.dm public Wires_Robot(Mob_Living_Silicon_Robot holder = null) : base(holder) { this.wires = new ByTable(new object [] { "ai", "camera", "lawsync", "lockdown" }); this.add_duds(2); // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; return; }
// Function from file: robot.dm public Hud_Robot(Mob_Living_Silicon_Robot owner = null) : base(owner) { Mob mymobR = null; Obj_Screen _using = null; // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!; mymobR = this.mymob; _using = new Obj_Screen_Robot_Radio(); _using.screen_loc = "EAST-1:28,SOUTH+1:7"; this.static_inventory.Add(_using); _using = new Obj_Screen_Robot_Module1(); _using.screen_loc = "CENTER-2:16,SOUTH:5"; this.static_inventory.Add(_using); ((dynamic)mymobR).inv1 = _using; _using = new Obj_Screen_Robot_Module2(); _using.screen_loc = "CENTER-1 :16,SOUTH:5"; this.static_inventory.Add(_using); ((dynamic)mymobR).inv2 = _using; _using = new Obj_Screen_Robot_Module3(); _using.screen_loc = "CENTER :16,SOUTH:5"; this.static_inventory.Add(_using); ((dynamic)mymobR).inv3 = _using; _using = new Obj_Screen_Ai_ImageTake(); _using.screen_loc = "CENTER+3:21,SOUTH:5"; this.static_inventory.Add(_using); _using = new Obj_Screen_Ai_ImageView(); _using.screen_loc = "CENTER+4:21,SOUTH:5"; this.static_inventory.Add(_using); _using = new Obj_Screen_Ai_Sensors(); _using.screen_loc = "CENTER-3:16, SOUTH:5"; this.static_inventory.Add(_using); _using = new Obj_Screen_Robot_Lamp(); _using.screen_loc = "CENTER-4:16, SOUTH:5"; this.static_inventory.Add(_using); ((dynamic)mymobR).lamp_button = _using; _using = new Obj_Screen_Robot_Thrusters(); _using.screen_loc = "CENTER-5:16, SOUTH:5"; this.static_inventory.Add(_using); ((dynamic)mymobR).thruster_button = _using; _using = new Obj_Screen_ActIntent_Robot(); _using.icon_state = this.mymob.a_intent; this.static_inventory.Add(_using); this.action_intent = _using; this.healths = new Obj_Screen_Healths_Robot(); this.infodisplay.Add(this.healths); this.mymob.hands = new Obj_Screen_Robot_Module(); this.mymob.hands.screen_loc = "CENTER+1:16,SOUTH:5"; this.static_inventory.Add(this.mymob.hands); this.module_store_icon = new Obj_Screen_Robot_Store(); this.module_store_icon.screen_loc = "CENTER+2:16,SOUTH:5"; this.pull_icon = new Obj_Screen_Pull(); this.pull_icon.icon = "icons/mob/screen_cyborg.dmi"; this.pull_icon.update_icon(this.mymob); this.pull_icon.screen_loc = "EAST-2:26,SOUTH+1:7"; this.hotkeybuttons.Add(this.pull_icon); this.zone_select = new Obj_Screen_ZoneSel_Robot(); this.zone_select.update_icon(this.mymob); this.static_inventory.Add(this.zone_select); return; }
// Function from file: objective.dm public override int check_completion( ) { Mob_Living_Silicon_Ai A = null; int counter = 0; Mob_Living_Silicon_Robot R = null; if (!(this.owner.current is Mob_Living_Silicon_Ai)) { return(0); } A = this.owner.current; counter = 0; foreach (dynamic _a in Lang13.Enumerate(A.connected_robots, typeof(Mob_Living_Silicon_Robot))) { R = _a; if (R.stat != 2) { counter++; } } if (counter < 8) { return(0); } return(1); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { Obj_Item_Weapon_Pickaxe_Drill_Cyborg D = null; Obj_Item_Weapon_Shovel S = null; if (base.f_action(R)) { return(false); } foreach (dynamic _a in Lang13.Enumerate(R.module.modules, typeof(Obj_Item_Weapon_Pickaxe_Drill_Cyborg))) { D = _a; GlobalFuncs.qdel(D); } foreach (dynamic _b in Lang13.Enumerate(R.module.modules, typeof(Obj_Item_Weapon_Shovel))) { S = _b; GlobalFuncs.qdel(S); } R.module.modules.Add(new Obj_Item_Weapon_Pickaxe_Drill_Cyborg_Diamond(R.module)); R.module.rebuild(); return(true); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { if (base.f_action(R)) { return(false); } R.fully_replace_character_name(R.name, this.heldname); return(true); }
// Function from file: supermatter.dm public override dynamic attack_robot(Mob_Living_Silicon_Robot user = null) { if (this.Adjacent(user)) { return(this.attack_hand(user)); } else { user.WriteMsg("<span class='warning'>You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update.</span>"); } return(null); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { if (base.f_action(R)) { return(false); } if (R.emagged) { return(false); } R.SetEmagged(true); return(true); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { if (base.f_action(R)) { return(false); } if (Lang13.Bool(R.ionpulse)) { Task13.User.WriteMsg("<span class='notice'>This unit already has ion thrusters installed!</span>"); return(false); } R.ionpulse = GlobalVars.TRUE; return(true); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { if (base.f_action(R)) { return(false); } if (R.speed < 0) { R.WriteMsg("<span class='notice'>A VTEC unit is already installed!</span>"); Task13.User.WriteMsg("<span class='notice'>There's no room for another VTEC unit!</span>"); return(false); } R.speed = -2; return(true); }
public virtual bool f_action(Mob_Living_Silicon_Robot R = null) { if (R.stat == 2) { Task13.User.WriteMsg("<span class='notice'>" + this + " will not function on a deceased cyborg.</span>"); return(true); } if (this.module_type != null && !Lang13.Bool(((dynamic)this.module_type).IsInstanceOfType(R.module))) { R.WriteMsg("Upgrade mounting error! No suitable hardpoint detected!"); Task13.User.WriteMsg("There's no mounting point for the module!"); return(true); } return(false); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { Obj_Item_Weapon_Storage_Bag_Ore_Cyborg S = null; if (base.f_action(R)) { return(false); } foreach (dynamic _a in Lang13.Enumerate(R.module.modules, typeof(Obj_Item_Weapon_Storage_Bag_Ore_Cyborg))) { S = _a; GlobalFuncs.qdel(S); } R.module.modules.Add(new Obj_Item_Weapon_Storage_Bag_Ore_Holding(R.module)); R.module.rebuild(); return(true); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { dynamic U = null; if (base.f_action(R)) { return(false); } U = Lang13.FindIn(typeof(Obj_Item_Borg_Upgrade_Selfrepair), R); if (Lang13.Bool(U)) { Task13.User.WriteMsg("<span class='warning'>This unit is already equipped with a self-repair module.</span>"); return(false); } this.cyborg = R; this.icon_state = "selfrepair_off"; this.action_button_name = "Toggle Self-Repair"; return(true); }
// Function from file: rechargestation.dm public override dynamic close_machine(Ent_Static target = null) { Mob_Living_Silicon_Robot R = null; if (!Lang13.Bool(this.panel_open)) { foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Mob_Living_Silicon_Robot))) { R = _a; R.forceMove(this); this.occupant = R; this.use_power = 2; this.add_fingerprint(R); break; } this.state_open = 0; this.density = true; this.update_icon(); } return(null); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { if (base.f_action(R)) { return(false); } R.notify_ai(2); R.uneq_all(); R.hands.icon_state = "nomod"; R.icon_state = "robot"; GlobalFuncs.qdel(R.module); R.module = null; R.modtype = "robot"; R.designation = "Default"; R.updatename( ); R.update_icons(); R.update_headlamp(); R.speed = 0; R.ionpulse = GlobalVars.FALSE; R.magpulse = GlobalVars.FALSE; R.status_flags |= 8; return(true); }
public override bool f_action(Mob_Living_Silicon_Robot R = null) { Mob_Dead_Observer ghost = null; if (Convert.ToDouble(R.health) < 0) { Task13.User.WriteMsg("<span class='warning'>You have to repair the cyborg before using this module!</span>"); return(false); } if (!Lang13.Bool(R.key)) { foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Dead_Observer))) { ghost = _a; if (ghost.mind != null && ghost.mind.current == R) { R.key = ghost.key; } } } R.notify_ai(1); R.stat = 1; R.update_stat(); if (R.camera != null && !((Wires)R.wires).is_cut("camera")) { R.camera.toggle_cam(R, false); } GlobalVars.dead_mob_list.Remove(R); GlobalVars.living_mob_list.Add(R); return(true); }
// Function from file: robot_parts.dm public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null) { dynamic M = null; Obj_Item_Weapon_Ed209Assembly B = null; dynamic M2 = null; dynamic BM = null; Mob_Living_Silicon_Robot O = null; base.attackby((object)(A), (object)(user), _params, silent, replace_spent); if (A is Obj_Item_Stack_Sheet_Metal && !Lang13.Bool(this.l_arm) && !Lang13.Bool(this.r_arm) && !Lang13.Bool(this.l_leg) && !Lang13.Bool(this.r_leg) && !Lang13.Bool(this.chest) && !Lang13.Bool(this.head)) { M = A; if (Lang13.Bool(M.use(1))) { B = new Obj_Item_Weapon_Ed209Assembly(); B.loc = GlobalFuncs.get_turf(this); user.WriteMsg("<span class='notice'>You arm the robot frame.</span>"); if (((Mob)user).get_inactive_hand() == this) { ((Mob)user).unEquip(this); ((Mob)user).put_in_inactive_hand(B); } GlobalFuncs.qdel(this); } else { user.WriteMsg("<span class='warning'>You need one sheet of metal to start building ED-209!</span>"); return(null); } } if (A is Obj_Item_RobotParts_LLeg) { if (Lang13.Bool(this.l_leg)) { return(null); } if (!((Mob)user).unEquip(A)) { return(null); } A.loc = this; this.l_leg = A; this.updateicon(); } if (A is Obj_Item_RobotParts_RLeg) { if (Lang13.Bool(this.r_leg)) { return(null); } if (!((Mob)user).unEquip(A)) { return(null); } A.loc = this; this.r_leg = A; this.updateicon(); } if (A is Obj_Item_RobotParts_LArm) { if (Lang13.Bool(this.l_arm)) { return(null); } if (!((Mob)user).unEquip(A)) { return(null); } A.loc = this; this.l_arm = A; this.updateicon(); } if (A is Obj_Item_RobotParts_RArm) { if (Lang13.Bool(this.r_arm)) { return(null); } if (!((Mob)user).unEquip(A)) { return(null); } A.loc = this; this.r_arm = A; this.updateicon(); } if (A is Obj_Item_RobotParts_Chest) { if (Lang13.Bool(this.chest)) { return(null); } if (Lang13.Bool(A.wired) && Lang13.Bool(A.cell)) { if (!((Mob)user).unEquip(A)) { return(null); } A.loc = this; this.chest = A; this.updateicon(); } else if (!Lang13.Bool(A.wired)) { user.WriteMsg("<span class='warning'>You need to attach wires to it first!</span>"); } else { user.WriteMsg("<span class='warning'>You need to attach a cell to it first!</span>"); } } if (A is Obj_Item_RobotParts_Head) { if (Lang13.Bool(this.head)) { return(null); } if (Lang13.Bool(A.flash2) && Lang13.Bool(A.flash1)) { if (!((Mob)user).unEquip(A)) { return(null); } A.loc = this; this.head = A; this.updateicon(); } else { user.WriteMsg("<span class='warning'>You need to attach a flash to it first!</span>"); } } if (A is Obj_Item_Device_Multitool) { if (this.check_completion()) { this.Interact(user); } else { user.WriteMsg("<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>"); } } if (A is Obj_Item_Device_Mmi) { M2 = A; if (this.check_completion()) { if (!(this.loc is Tile)) { user.WriteMsg("<span class='warning'>You can't put the MMI in, the frame has to be standing on the ground to be perfectly precise!</span>"); return(null); } if (!Lang13.Bool(M2.brainmob)) { user.WriteMsg("<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose!</span>"); return(null); } BM = M2.brainmob; if (!Lang13.Bool(BM.key) || !Lang13.Bool(BM.mind)) { user.WriteMsg("<span class='warning'>The mmi indicates that their mind is completely unresponsive; there's no point!</span>"); return(null); } if (!Lang13.Bool(BM.client)) { user.WriteMsg("<span class='warning'>The mmi indicates that their mind is currently inactive; it might change!</span>"); return(null); } if (Convert.ToInt32(BM.stat) == 2 || Lang13.Bool(M2.brain) && M2.brain.damaged_brain) { user.WriteMsg("<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"); return(null); } if (GlobalFuncs.jobban_isbanned(BM, "Cyborg")) { user.WriteMsg("<span class='warning'>This MMI does not seem to fit!</span>"); return(null); } O = new Mob_Living_Silicon_Robot(GlobalFuncs.get_turf(this.loc)); if (!(O != null)) { return(null); } if (!((Mob)user).unEquip(A)) { return(null); } if (M2.syndiemmi) { this.aisync = false; this.lawsync = false; O.laws = new AiLaws_SyndicateOverride(); } O.invisibility = 0; O.custom_name = this.created_name; O.locked = this.panel_locked; if (!this.aisync) { this.lawsync = false; O.connected_ai = null; } else { O.notify_ai(1); if (Lang13.Bool(this.forced_ai)) { O.connected_ai = this.forced_ai; } } if (!this.lawsync && !M2.syndiemmi) { O.lawupdate = false; O.make_laws(); } ((GameMode)GlobalVars.ticker.mode).remove_antag_for_borging(BM.mind); ((Mind)BM.mind).transfer_to(O); if (O.mind != null && Lang13.Bool(O.mind.special_role)) { O.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead."); O.WriteMsg("<span class='userdanger'>You have been robotized!</span>"); O.WriteMsg("<span class='danger'>You must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.</span>"); } O.job = "Cyborg"; O.cell = this.chest.cell; this.chest.cell.loc = O; this.chest.cell = null; A.loc = O; if (Lang13.Bool(O.mmi)) { GlobalFuncs.qdel(O.mmi); } O.mmi = A; O.updatename(); GlobalFuncs.feedback_inc("cyborg_birth", 1); this.loc = O; O.robot_suit = this; if (!this.locomotion) { O.lockcharge = true; O.update_canmove(); O.WriteMsg("<span class='warning'>Error: Servo motors unresponsive.</span>"); } } else { user.WriteMsg("<span class='warning'>The MMI must go in after everything else!</span>"); } } if (A is Obj_Item_Weapon_Pen) { user.WriteMsg("<span class='warning'>You need to use a multitool to name " + this + "!</span>"); } return(null); }
// 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); }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static Mob_Living wabbajack( dynamic M = null ) { dynamic Robot = null; Ent_Item W = null; Mob_Living new_mob = null; dynamic randomize = null; dynamic robot = null; Mob_Living D = null; Mob_Living Robot2 = null; Mob_Living Slime = null; dynamic beast = null; dynamic animal = null; Preferences A = null; Mob_Living H = null; ByTable all_species = null; dynamic speciestype = null; dynamic S = null; if ( M is Mob_Living ) { if ( M is Mob_Living && Lang13.Int( M.stat ) != 2 ) { if ( Lang13.Bool( M.notransform ) ) { return null; } M.notransform = 1; M.canmove = 0; M.icon = null; ((dynamic)M.overlays).Cut(); M.invisibility = 101; if ( M is Mob_Living_Silicon_Robot ) { Robot = M; if ( Lang13.Bool( Robot.mmi ) ) { GlobalFuncs.qdel( Robot.mmi ); } ((dynamic)Robot).notify_ai( 1 ); } else { W = null; foreach (dynamic _a in M ) { if ( !( _a is Ent_Item ) ) { continue; } W = _a; if ( W is Ent_Item_Weapon_Implant ) { GlobalFuncs.qdel( W ); continue; } ((dynamic)W).layer = Temp13.initial( ((dynamic)W).layer ); ((dynamic)W).loc = M.loc; W.dropped( M ); }; } new_mob = null; randomize = Rand13.pick(new object [] { "monkey", "robot", "slime", "xeno", "humanoid", "animal" }); dynamic _f = randomize; // Was a switch-case, sorry for the mess. if ( _f=="monkey" ) { new_mob = new Mob_Living_Carbon_Monkey( M.loc ); new_mob.languages |= 1; } else if ( _f=="robot" ) { robot = Rand13.pick(new object [] { "cyborg", "syndiborg", "drone" }); dynamic _b = robot; // Was a switch-case, sorry for the mess. if ( _b=="cyborg" ) { new_mob = new Mob_Living_Silicon_Robot( M.loc ); } else if ( _b=="syndiborg" ) { new_mob = new Mob_Living_Silicon_Robot_Syndicate( M.loc ); } else if ( _b=="drone" ) { new_mob = new Mob_Living_SimpleAnimal_Drone( M.loc ); D = new_mob; ((dynamic)D).update_drone_hack(); }; if ( new_mob is Mob_Living_Silicon ) { ((dynamic)new_mob).gender = M.gender; new_mob.invisibility = 0; new_mob.job = "Cyborg"; Robot2 = new_mob; ((dynamic)Robot2).mmi = new Ent_Item_Device_Mmi( new_mob ); ((dynamic)((dynamic)Robot2).mmi).transfer_identity( M ); } else { new_mob.languages |= 1; } } else if ( _f=="slime" ) { new_mob = new Mob_Living_SimpleAnimal_Slime( M.loc ); if ( Rand13.percentChance( 50 ) ) { Slime = new_mob; ((dynamic)Slime).is_adult = 1; } new_mob.languages |= 1; } else if ( _f=="xeno" ) { if ( Rand13.percentChance( 50 ) ) { new_mob = new Mob_Living_Carbon_Alien_Humanoid_Hunter( M.loc ); } else { new_mob = new Mob_Living_Carbon_Alien_Humanoid_Sentinel( M.loc ); } new_mob.languages |= 1; } else if ( _f=="animal" ) { if ( Rand13.percentChance( 50 ) ) { beast = Rand13.pick(new object [] { "carp", "bear", "mushroom", "statue", "bat", "goat", "killertomato", "spiderbase", "spiderhunter", "blobbernaut", "magicarp", "chaosmagicarp" }); dynamic _c = beast; // Was a switch-case, sorry for the mess. if ( _c=="carp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp( M.loc ); } else if ( _c=="bear" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Bear( M.loc ); } else if ( _c=="mushroom" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Mushroom( M.loc ); } else if ( _c=="statue" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Statue( M.loc ); } else if ( _c=="bat" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Bat( M.loc ); } else if ( _c=="goat" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Retaliate_Goat( M.loc ); } else if ( _c=="killertomato" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Killertomato( M.loc ); } else if ( _c=="spiderbase" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider( M.loc ); } else if ( _c=="spiderhunter" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Poison_GiantSpider_Hunter( M.loc ); } else if ( _c=="blobbernaut" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Blob_Blobbernaut( M.loc ); } else if ( _c=="magicarp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged( M.loc ); } else if ( _c=="chaosmagicarp" ) { new_mob = new Mob_Living_SimpleAnimal_Hostile_Carp_Ranged_Chaos( M.loc ); }; } else { animal = Rand13.pick(new object [] { "parrot", "corgi", "crab", "pug", "cat", "mouse", "chicken", "cow", "lizard", "chick", "fox", "butterfly" }); dynamic _d = animal; // Was a switch-case, sorry for the mess. if ( _d=="parrot" ) { new_mob = new Mob_Living_SimpleAnimal_Parrot( M.loc ); } else if ( _d=="corgi" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Corgi( M.loc ); } else if ( _d=="crab" ) { new_mob = new Mob_Living_SimpleAnimal_Crab( M.loc ); } else if ( _d=="pug" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Dog_Pug( M.loc ); } else if ( _d=="cat" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Cat( M.loc ); } else if ( _d=="mouse" ) { new_mob = new Mob_Living_SimpleAnimal_Mouse( M.loc ); } else if ( _d=="chicken" ) { new_mob = new Mob_Living_SimpleAnimal_Chicken( M.loc ); } else if ( _d=="cow" ) { new_mob = new Mob_Living_SimpleAnimal_Cow( M.loc ); } else if ( _d=="lizard" ) { new_mob = new Mob_Living_SimpleAnimal_Lizard( M.loc ); } else if ( _d=="fox" ) { new_mob = new Mob_Living_SimpleAnimal_Pet_Fox( M.loc ); } else if ( _d=="butterfly" ) { new_mob = new Mob_Living_SimpleAnimal_Butterfly( M.loc ); } else { new_mob = new Mob_Living_SimpleAnimal_Chick( M.loc ); }; } new_mob.languages |= 1; } else if ( _f=="humanoid" ) { new_mob = new Mob_Living_Carbon_Human( M.loc ); A = new Preferences(); new ByTable().set( 1, new_mob ).set( "icon_updates", 0 ).apply( A.GetType().GetMethod( "copy_to" ) ); H = new_mob; if ( Rand13.percentChance( 50 ) ) { all_species = new ByTable(); speciestype = null; foreach (dynamic _e in Lang13.get_all_types( typeof(Species) ) - typeof(Species) ) { speciestype = _e; S = Lang13.call( speciestype ); if ( !Lang13.Bool( S.dangerous_existence ) ) { all_species += speciestype; } }; new ByTable().set( 1, Rand13.pick( all_species ) ).set( "icon_update", 0 ).apply( H.GetType().GetMethod( "set_species" ) ); H.real_name = ((dynamic)((dynamic)H).dna.species).random_name( ((dynamic)H).gender, 1 ); } ((dynamic)H).update_body(); H.update_hair(); ((dynamic)H).update_mutcolor(); ((dynamic)((dynamic)H).dna).update_dna_identity(); } else { return null; }; new_mob.attack_log = M.attack_log; M.attack_log += "[" + GlobalFuncs.time_stamp() + "] <font color='orange'>" + M.real_name + " (" + M.ckey + ") became " + new_mob.real_name + ".</font>"; new_mob.a_intent = "harm"; if ( Lang13.Bool( M.mind ) ) { ((dynamic)M.mind).transfer_to( new_mob ); } else { ((dynamic)new_mob).key = M.key; } ((dynamic)new_mob).write( "<B>Your form morphs into that of a " + randomize + ".</B>" ); GlobalFuncs.qdel( M ); return new_mob; } } return null; }
// Range: -1 Access: 0 Flags: ( 0, 4, 255 ) public static void sql_report_cyborg_death( Mob_Living_Silicon_Robot H = null ) { dynamic T = null; dynamic placeofdeath = null; dynamic podname = null; string sqlname = null; string sqlkey = null; string sqlpod = null; string sqlspecial = null; string sqljob = null; string laname = null; string lakey = null; string sqltime = null; string coord = null; DBQuery query = null; string err = null; if ( !GlobalVars.config.sql_enabled ) { return; } if ( !( H != null ) ) { return; } if ( !Lang13.Bool( ((dynamic)H).key ) || !Lang13.Bool( H.mind ) ) { return; } T = ((dynamic)H).loc; placeofdeath = GlobalFuncs.get_area( T.loc ); podname = placeofdeath.name; sqlname = GlobalFuncs.sanitizeSQL( H.real_name ); sqlkey = GlobalFuncs.sanitizeSQL( ((dynamic)H).key ); sqlpod = GlobalFuncs.sanitizeSQL( podname ); sqlspecial = GlobalFuncs.sanitizeSQL( H.mind.special_role ); sqljob = GlobalFuncs.sanitizeSQL( H.mind.assigned_role ); if ( H.lastattacker != null ) { laname = GlobalFuncs.sanitizeSQL( H.lastattacker.real_name ); lakey = GlobalFuncs.sanitizeSQL( ((dynamic)H.lastattacker).key ); } sqltime = String13.formatTime( Game13.realtime, "YYYY-MM-DD hh:mm:ss" ); coord = "" + ((dynamic)H).x + ", " + ((dynamic)H).y + ", " + ((dynamic)H).z; GlobalFuncs.establish_db_connection(); if ( !GlobalVars.dbcon.IsConnected() ) { GlobalFuncs.log_game( "SQL ERROR during death reporting. Failed to connect." ); } else { query = GlobalVars.dbcon.NewQuery( "INSERT INTO " + GlobalFuncs.format_table_name( "death" ) + " (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('" + sqlname + "', '" + sqlkey + "', '" + sqljob + "', '" + sqlspecial + "', '" + sqlpod + "', '" + sqltime + "', '" + laname + "', '" + lakey + "', '" + ((dynamic)H).gender + "', " + H.getBruteLoss() + ", " + H.getFireLoss() + ", " + H.brainloss + ", " + H.getOxyLoss() + ", '" + coord + "')" ); if ( !query.Execute() ) { err = query.ErrorMsg(); GlobalFuncs.log_game( "SQL ERROR during death reporting. Error : [" + err + "]\n" ); } } return; }
// Function from file: cyborg.dm public override void BorgCtrlClick(Mob_Living_Silicon_Robot user = null) { this.AICtrlClick(); return; }
// Function from file: ticker.dm public bool declare_completion( ) { bool station_evacuated = false; int num_survivors = 0; int num_escapees = 0; dynamic Player = null; StationState end_state = null; int station_integrity = 0; Mob_Living_Silicon_Ai aiPlayer = null; string robolist = null; Mob_Living_Silicon_Robot robo = null; Mob_Living_Silicon_Robot robo2 = null; dynamic handler = null; ByTable total_antagonists = null; Mind Mind = null; string temprole = null; dynamic i = null; string dellog = null; dynamic path = null; if (GlobalVars.SSshuttle.emergency.mode >= 5) { station_evacuated = true; } num_survivors = 0; num_escapees = 0; Game13.WriteMsg("<BR><BR><BR><FONT size=3><B>The round has ended.</B></FONT>"); foreach (dynamic _a in Lang13.Enumerate(GlobalVars.mob_list)) { Player = _a; if (Lang13.Bool(Player.mind) && !(Player is Mob_NewPlayer)) { if (Convert.ToInt32(Player.stat) != 2 && !(Player is Mob_Living_Carbon_Brain)) { num_survivors++; if (station_evacuated) { if (!((Ent_Static)Player).onCentcom() && !((Ent_Static)Player).onSyndieBase()) { Player.WriteMsg("<font color='blue'><b>You managed to survive, but were marooned on " + GlobalFuncs.station_name() + "...</b></FONT>"); } else { num_escapees++; Player.WriteMsg("<font color='green'><b>You managed to survive the events on " + GlobalFuncs.station_name() + " as " + Player.real_name + ".</b></FONT>"); } } else { Player.WriteMsg("<font color='green'><b>You managed to survive the events on " + GlobalFuncs.station_name() + " as " + Player.real_name + ".</b></FONT>"); } } else { Player.WriteMsg("<font color='red'><b>You did not survive the events on " + GlobalFuncs.station_name() + "...</b></FONT>"); } } } end_state = new StationState(); end_state.count(); station_integrity = Num13.MinInt(((int)(Num13.Round(GlobalVars.start_state.score(end_state) * 100, 0.1))), 100); Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Shift Duration: <B>" + Num13.Floor(Game13.time / 36000) + ":" + GlobalFuncs.add_zero("" + Game13.time / 600 % 60, 2) + ":" + Game13.time / 100 % 6 + Game13.time / 100 % 10 + "</B>"); Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Station Integrity: <B>" + (this.mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "" + station_integrity + "%") + "</B>"); if (GlobalVars.joined_player_list.len != 0) { Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Total Population: <B>" + GlobalVars.joined_player_list.len + "</B>"); if (station_evacuated) { Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Evacuation Rate: <B>" + num_escapees + " (" + Num13.Round(num_escapees / GlobalVars.joined_player_list.len * 100, 0.1) + "%)</B>"); } Game13.WriteMsg("<BR>" + GlobalVars.TAB + "Survival Rate: <B>" + num_survivors + " (" + Num13.Round(num_survivors / GlobalVars.joined_player_list.len * 100, 0.1) + "%)</B>"); } Game13.WriteMsg("<BR>"); foreach (dynamic _c in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Silicon_Ai))) { aiPlayer = _c; if (aiPlayer.stat != 2 && aiPlayer.mind != null) { Game13.WriteMsg("<b>" + aiPlayer.name + " (Played by: " + aiPlayer.mind.key + ")'s laws at the end of the round were:</b>"); aiPlayer.show_laws(true); } else if (aiPlayer.mind != null) { Game13.WriteMsg("<b>" + aiPlayer.name + " (Played by: " + aiPlayer.mind.key + ")'s laws when it was deactivated were:</b>"); aiPlayer.show_laws(true); } Game13.WriteMsg("<b>Total law changes: " + aiPlayer.law_change_counter + "</b>"); if (aiPlayer.connected_robots.len != 0) { robolist = "<b>" + aiPlayer.real_name + "'s minions were:</b> "; foreach (dynamic _b in Lang13.Enumerate(aiPlayer.connected_robots, typeof(Mob_Living_Silicon_Robot))) { robo = _b; if (robo.mind != null) { robolist += "" + robo.name + (robo.stat != 0 ? " (Deactivated) (Played by: " + robo.mind.key + "), " : " (Played by: " + robo.mind.key + "), "); } } Game13.WriteMsg("" + robolist); } } foreach (dynamic _d in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Silicon_Robot))) { robo2 = _d; if (!Lang13.Bool(robo2.connected_ai) && robo2.mind != null) { if (robo2.stat != 2) { Game13.WriteMsg("<b>" + robo2.name + " (Played by: " + robo2.mind.key + ") survived as an AI-less borg! Its laws were:</b>"); } else { Game13.WriteMsg("<b>" + robo2.name + " (Played by: " + robo2.mind.key + ") was unable to survive the rigors of being a cyborg without an AI. Its laws were:</b>"); } if (robo2 != null) { robo2.laws.show_laws(typeof(Game13)); } } } this.mode.declare_completion(); foreach (dynamic _e in Lang13.Enumerate(Lang13.GetTypes("/datum/game_mode/proc"))) { handler = _e; if (String13.FindIgnoreCase("" + handler, "auto_declare_completion_", 1, 0) != 0) { Lang13.Call(Lang13.BindFunc(this.mode, handler), this.force_ending); } } total_antagonists = new ByTable(); foreach (dynamic _f in Lang13.Enumerate(this.minds, typeof(Mind))) { Mind = _f; temprole = Mind.special_role; if (Lang13.Bool(temprole)) { if (total_antagonists.Contains(temprole)) { total_antagonists[temprole] += ", " + Mind.name + "(" + Mind.key + ")"; } else { total_antagonists.Add(temprole); total_antagonists[temprole] += ": " + Mind.name + "(" + Mind.key + ")"; } } } GlobalFuncs.log_game("Antagonists at round end were..."); foreach (dynamic _g in Lang13.Enumerate(total_antagonists)) { i = _g; GlobalFuncs.log_game("" + i + "s" + total_antagonists[i] + "."); } if (GlobalVars.SSgarbage.didntgc.len != 0) { dellog = ""; foreach (dynamic _h in Lang13.Enumerate(GlobalVars.SSgarbage.didntgc)) { path = _h; dellog += "Path : " + path + " \n"; dellog += "Failures : " + GlobalVars.SSgarbage.didntgc[path] + " \n"; } Game13.log.WriteMsg(dellog); } return(true); }
// Function from file: shadowling_abilities.dm public override bool cast(dynamic targets = null, dynamic thearea = null, dynamic user = null) { thearea = thearea ?? Task13.User; dynamic T = null; Obj_Item F = null; Obj_Machinery_Light L = null; Obj_Machinery_Computer C = null; Obj_Effect_Glowshroom G = null; Mob_Living H = null; Mob_Living_Silicon_Robot borgie = null; if (!this.shadowling_check(thearea) && !this.admin_override) { this.revert_cast(); return(false); } thearea.WriteMsg("<span class='shadowling'>You silently disable all nearby lights.</span>"); foreach (dynamic _g in Lang13.Enumerate(targets)) { T = _g; foreach (dynamic _a in Lang13.Enumerate(T.contents, typeof(Obj_Item))) { F = _a; this.extinguishItem(F); } foreach (dynamic _b in Lang13.Enumerate(T.contents, typeof(Obj_Machinery_Light))) { L = _b; L.on = false; L.visible_message("<span class='warning'>" + L + " flickers and falls dark.</span>"); L.update(false); } foreach (dynamic _c in Lang13.Enumerate(T.contents, typeof(Obj_Machinery_Computer))) { C = _c; C.SetLuminosity(0); C.visible_message("<span class='warning'>" + C + " grows dim, its screen barely readable.</span>"); } foreach (dynamic _d in Lang13.Enumerate(Map13.FetchInRangeExcludeThis(thearea, 7), typeof(Obj_Effect_Glowshroom))) { G = _d; G.visible_message("<span class='warning'>" + G + " withers away!</span>"); GlobalFuncs.qdel(G); } foreach (dynamic _e in Lang13.Enumerate(T.contents, typeof(Mob_Living))) { H = _e; this.extinguishMob(H); } foreach (dynamic _f in Lang13.Enumerate(T.contents, typeof(Mob_Living_Silicon_Robot))) { borgie = _f; borgie.update_headlamp(true); } } return(false); }
// Function from file: robot.dm public override dynamic interact(dynamic user = null, bool?flag1 = null) { dynamic dat = null; int robots = 0; Mob_Living_Silicon_Robot R = null; Browser popup = null; if (this.z > 6) { user.WriteMsg("<span class='boldannounce'>Unable to establish a connection</span>: ΓΏ\"You're too far away from the station!"); return(null); } ((Mob)user).set_machine(this); robots = 0; foreach (dynamic _a in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Silicon_Robot))) { R = _a; if (!this.can_control(user, R)) { continue; } robots++; dat += "" + R.name + " |"; if (R.stat != 0) { dat += " Not Responding |"; } else if (!R.canmove) { dat += " Locked Down |"; } else { dat += " Operating Normally |"; } if (!R.canmove) { } else if (Lang13.Bool(R.cell)) { dat += " Battery Installed (" + R.cell.charge + "/" + R.cell.maxcharge + ") |"; } else { dat += " No Cell Installed |"; } if (R.module != null) { dat += " Module Installed (" + R.module.name + ") |"; } else { dat += " No Module Installed |"; } if (Lang13.Bool(R.connected_ai)) { dat += " Slaved to " + R.connected_ai.name + " |"; } else { dat += " Independent from AI |"; } if (user is Mob_Living_Silicon || Lang13.Bool(GlobalFuncs.IsAdminGhost(Task13.User))) { if ((user is Mob_Living_Silicon && GlobalFuncs.is_special_character(user) != 0 || Lang13.Bool(GlobalFuncs.IsAdminGhost(Task13.User))) && !R.emagged) { dat += new Txt("<A href='?src=").Ref(this).str(";magbot=").Ref(R).str("'>(<font color=blue><i>Hack</i></font>)</A> ").ToString(); } } dat += new Txt("<A href='?src=").Ref(this).str(";stopbot=").Ref(R).str("'>(<font color=green><i>").item((R.canmove ? "Lockdown" : "Release")).str("</i></font>)</A> ").ToString(); dat += new Txt("<A href='?src=").Ref(this).str(";killbot=").Ref(R).str("'>(<font color=red><i>Destroy</i></font>)</A>").ToString(); dat += "<BR>"; } if (!(robots != 0)) { dat += "No Cyborg Units detected within access parameters."; } popup = new Browser(user, "computer", "Cyborg Control Console", 400, 500); popup.set_content(dat); popup.set_title_image(((Mob)user).browse_rsc_icon(this.icon, this.icon_state)); popup.open(); return(null); }