// Function from file: abduction.dm public override bool check_finished( ) { int?team_number = null; Obj_Machinery_Abductor_Console con = null; Objective objective = null; if (!this.finished) { team_number = null; team_number = 1; while ((team_number ?? 0) <= (this.abductor_teams ?? 0)) { con = this.get_team_console(team_number); objective = this.team_objectives[team_number]; if ((con.experiment.points ?? 0) >= Convert.ToDouble(objective.target_amount)) { GlobalVars.SSshuttle.emergency.request(null, 0.5); this.finished = true; return(base.check_finished()); } team_number++; } } return(base.check_finished()); }
// Function from file: abduction.dm public override bool declare_completion( ) { int?team_number = null; Obj_Machinery_Abductor_Console console = null; Objective objective = null; dynamic team_name = null; team_number = null; team_number = 1; while ((team_number ?? 0) <= (this.abductor_teams ?? 0)) { console = this.get_team_console(team_number); objective = this.team_objectives[team_number]; team_name = this.team_names[team_number]; if ((console.experiment.points ?? 0) >= Convert.ToDouble(objective.target_amount)) { Game13.WriteMsg("<span class='greenannounce'>" + team_name + " team fullfilled its mission!</span>"); } else { Game13.WriteMsg("<span class='boldannounce'>" + team_name + " team failed its mission.</span>"); } team_number++; } base.declare_completion(); return(true); }
// Function from file: abduction.dm public void equip_agent(dynamic agent = null, int?team_number = null) { dynamic S = null; Obj_Machinery_Abductor_Console console = null; Obj_Item_Clothing_Suit_Armor_Abductor_Vest V = null; if (!Lang13.Bool(team_number)) { S = agent.dna.species; team_number = Lang13.IntNullable(S.team); } console = this.get_team_console(team_number); V = new Obj_Item_Clothing_Suit_Armor_Abductor_Vest(agent); if (console != null) { console.vest = V; V.flags |= 2; } ((Mob)agent).equip_to_slot_or_del(V, 13); ((Mob)agent).equip_to_slot_or_del(new Obj_Item_Weapon_AbductorBaton(agent), 18); ((Mob)agent).equip_to_slot_or_del(new Obj_Item_Weapon_Gun_Energy_Alien(agent), 6); ((Mob)agent).equip_to_slot_or_del(new Obj_Item_Device_Abductor_Silencer(agent), 18); ((Mob)agent).equip_to_slot_or_del(new Obj_Item_Clothing_Head_Helmet_Abductor(agent), 11); return; }
// Function from file: abduction.dm public void equip_scientist(dynamic scientist = null, int?team_number = null) { dynamic S = null; Obj_Machinery_Abductor_Console console = null; Obj_Item_Device_Abductor_Gizmo G = null; Obj_Item_Weapon_Implant_Abductor beamplant = null; if (!Lang13.Bool(team_number)) { S = scientist.dna.species; team_number = Lang13.IntNullable(S.team); } console = this.get_team_console(team_number); G = new Obj_Item_Device_Abductor_Gizmo(scientist); if (console != null) { console.gizmo = G; G.console = console; } ((Mob)scientist).equip_to_slot_or_del(G, 18); beamplant = new Obj_Item_Weapon_Implant_Abductor(scientist); beamplant.implant(scientist); return; }
// Function from file: abduction_gear.dm public override int implant(dynamic source = null, dynamic user = null) { Obj_Machinery_Abductor_Console console = null; dynamic H = null; dynamic S = null; if (base.implant((object)(source), (object)(user)) != 0) { if (source is Mob_Living_Carbon_Human) { H = source; if (H.dna.species.id == "abductor") { S = H.dna.species; console = this.get_team_console(Lang13.IntNullable(S.team)); this.home = console.pad; } } if (!(this.home != null)) { console = this.get_team_console(Lang13.IntNullable(Rand13.Pick(new object [] { 1, 2, 3, 4 }))); this.home = console.pad; } return(1); } return(0); }
// Function from file: abduction.dm public Obj_Effect_Landmark_Abductor_Console(dynamic loc = null) : base((object)(loc)) { Obj_Machinery_Abductor_Console c = null; c = new Obj_Machinery_Abductor_Console(this.loc); c.team = this.team ?1:0; Task13.Schedule(5, (Task13.Closure)(() => { c.Initialize(); return; })); GlobalFuncs.qdel(this); return; }
// Function from file: abduction.dm public Obj_Machinery_Abductor_Console get_team_console(int?team = null) { Obj_Machinery_Abductor_Console console = null; Obj_Machinery_Abductor_Console c = null; foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Abductor_Console))) { c = _a; if (c.team == team) { console = c; break; } } return(console); }