// Function from file: shriek.dm public override dynamic sting_action(Mob user = null, Ent_Static target = null) { Mob_Living M = null; Obj_Machinery_Light L = null; foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view(4, user), typeof(Mob_Living))) { M = _a; if (M is Mob_Living_Carbon) { if (!(M.mind != null) || !(M.mind.changeling != null)) { M.adjustEarDamage(0, 30); M.confused += 25; M.Jitter(50); } else { M.WriteMsg(new Sound("sound/effects/screech.ogg")); } } if (M is Mob_Living_Silicon) { M.WriteMsg(new Sound("sound/weapons/flash.ogg")); M.Weaken(Rand13.Int(5, 10)); } } foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(user, 4), typeof(Obj_Machinery_Light))) { L = _b; L.on = true; L.broken(); } GlobalFuncs.feedback_add_details("changeling_powers", "RS"); return(1); }
// Function from file: runes.dm public override void invoke(dynamic user = null) { Mob_Living_Carbon C = null; dynamic N = null; Mob_Living_Carbon M = null; this.visible_message("<span class='warning'>" + this + " briefly bubbles before exploding!</span>"); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, this), typeof(Mob_Living_Carbon))) { C = _a; if (!GlobalFuncs.iscultist(C)) { N = C.null_rod_check(); if (Lang13.Bool(N)) { C.WriteMsg(new Txt("<span class='userdanger'>").The(N).item().str(" suddenly burns hotly before returning to normal!</span>").ToString()); continue; } C.WriteMsg("<span class='cultlarge'>Your blood boils in your veins!</span>"); C.take_overall_damage(51, 51); } } foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(this, 1), typeof(Mob_Living_Carbon))) { M = _b; if (GlobalFuncs.iscultist(M)) { M.apply_damage(15, "brute", Rand13.Pick(new object [] { "l_arm", "r_arm" })); M.WriteMsg("<span class='cultitalic'>" + this + " saps your strength!</span>"); } } GlobalFuncs.explosion(GlobalFuncs.get_turf(this), -1, 0, 1, 5); GlobalFuncs.qdel(this); return; }
// Function from file: mech_bay.dm public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null) { if (this.default_deconstruction_screwdriver(user, "recharge_port-o", "recharge_port", A)) { return(null); } if (this.default_change_direction_wrench(user, A)) { this.recharging_turf = Map13.GetStep(this.loc, this.dir); return(null); } if (this.exchange_parts(user, A)) { return(null); } this.default_deconstruction_crowbar(A); return(null); }
// Function from file: twohanded.dm public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null) { dynamic H = null; H = ((Mob)a).get_inactive_hand(); if (Map13.GetDistance(this, a) > 1) { return(0); } if (H != null) { a.WriteMsg(new Txt("<span class='notice'>").The(this).item().str(" is too cumbersome to carry in one hand!</span>").ToString()); return(null); } this.wield(a); base.attack_hand((object)(a), b, c); return(null); }
// Function from file: flash.dm public override double emp_act(int severity = 0) { Mob_Living_Carbon M = null; if (!this.try_use_flash() || !(this.loc != null)) { return(0); } foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(this.loc, 3), typeof(Mob_Living_Carbon))) { M = _a; this.flash_carbon(M, null, 10, false); } this.burn_out(); base.emp_act(severity); return(0); }
// Function from file: effects_smoke.dm public override int?process(dynamic seconds = null) { Mob_Living L = null; this.lifetime--; if (this.lifetime < 1) { this.kill_smoke(); return(0); } foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, 0), typeof(Mob_Living))) { L = _a; this.smoke_mob(L); } return(1); }
// Function from file: particle_accelerator.dm public override bool AltClick(Mob user = null) { base.AltClick(user); if (user.incapacitated()) { user.WriteMsg("<span class='warning'>You can't do that right now!</span>"); return(false); } if (!(Map13.GetDistance(this, user) <= 1)) { return(false); } else { this.__CallVerb("Rotate Clockwise"); } return(false); }
// Function from file: conveyor2.dm public void broken( ) { dynamic C = null; this.stat |= 1; this.update(); C = Lang13.FindIn(typeof(Obj_Machinery_Conveyor), Map13.GetStep(this, this.dir)); if (Lang13.Bool(C)) { ((Obj_Machinery_Conveyor)C).set_operable(this.dir, this.id, false); } C = Lang13.FindIn(typeof(Obj_Machinery_Conveyor), Map13.GetStep(this, Num13.Rotate(this.dir, 180))); if (Lang13.Bool(C)) { ((Obj_Machinery_Conveyor)C).set_operable(Num13.Rotate(this.dir, 180), this.id, false); } return; }
// Function from file: map_template.dm public ByTable get_affected_turfs(dynamic T = null, int?centered = null) { centered = centered ?? GlobalVars.FALSE; Tile placement = null; Tile corner = null; placement = T; if (Lang13.Bool(centered)) { corner = Map13.GetTile(((int)(placement.x - this.width / 2)), ((int)(placement.y - this.height / 2)), placement.z); if (corner != null) { placement = corner; } } return(Map13.FetchInBlock(placement, Map13.GetTile(((int)(placement.x + this.width)), ((int)(placement.y + this.height)), placement.z))); }
// Function from file: soft_caps.dm public override bool AltClick(Mob user = null) { base.AltClick(user); if (!user.canUseTopic(user)) { user.WriteMsg("<span class='warning'>You can't do that right now!</span>"); return(false); } if (!(Map13.GetDistance(this, user) <= 1)) { return(false); } else { this.flip(user); } return(false); }
// Function from file: others.dm public override void on_reaction(Reagents holder = null, double?created_volume = null) { dynamic location = null; dynamic M = null; EffectSystem_FoamSpread_Metal s = null; location = GlobalFuncs.get_turf(holder.my_atom); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(location, 5))) { M = _a; M.WriteMsg("<span class='danger'>The solution spews out a metallic foam!</span>"); } s = new EffectSystem_FoamSpread_Metal(); s.set_up(created_volume, location, holder, 1); s.start(); holder.clear_reagents(); return; }
// Function from file: secbot.dm public override dynamic Crossed(Ent_Dynamic O = null, dynamic X = null) { Ent_Dynamic C = null; if (O is Mob && Lang13.Bool(this.target)) { C = O; if (!(C is Mob_Living_Carbon) || !(C != null) || Map13.GetDistance(this, this.target) <= 1) { return(null); } C.visible_message("<span class='warning'>" + Rand13.Pick(new object [] { "" + C + " dives out of " + this + "'s way!", "" + C + " stumbles over " + this + "!", "" + C + " jumps out of " + this + "'s path!", "" + C + " trips over " + this + " and falls!", "" + C + " topples over " + this + "!", "" + C + " leaps out of " + this + "'s way!" }) + "</span>"); ((dynamic)C).Weaken(2); return(null); } base.Crossed(O, (object)(X)); return(null); }
// Function from file: medbot.dm public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null) { dynamic current_health = null; if (A is Obj_Item_Weapon_ReagentContainers_Glass) { if (this.locked) { user.WriteMsg("<span class='warning'>You cannot insert a beaker because the panel is locked!</span>"); return(null); } if (!(this.reagent_glass == null)) { user.WriteMsg("<span class='warning'>There is already a beaker loaded!</span>"); return(null); } if (!Lang13.Bool(user.drop_item())) { return(null); } A.loc = this; this.reagent_glass = A; user.WriteMsg("<span class='notice'>You insert " + A + ".</span>"); this.show_controls(user); return(null); } else { current_health = this.health; base.attackby((object)(A), (object)(user), _params, silent, replace_spent); if (Convert.ToDouble(this.health) < Convert.ToDouble(current_health)) { Map13.StepTowards(this, Map13.GetStepAway(this, user, null), 0); } } return(null); }
// Function from file: conveyor2.dm public override int?process(dynamic seconds = null) { int items_moved = 0; Ent_Dynamic A = null; if ((this.stat & 3) != 0) { return(null); } if (!(this.operating != 0)) { return(null); } this.f_use_power(100); this.affecting = this.loc.contents - this; Task13.Sleep(1); items_moved = 0; foreach (dynamic _a in Lang13.Enumerate(this.affecting, typeof(Ent_Dynamic))) { A = _a; if (!Lang13.Bool(A.anchored)) { if (A.loc == this.loc) { Map13.Step(A, ((int)(this.movedir ?? 0))); items_moved++; } } if (items_moved >= 10) { break; } } return(null); }
// Function from file: holy_weapons.dm public void reskin_holy_weapon(dynamic M = null) { dynamic holy_weapons_list = null; ByTable display_names = null; dynamic V = null; dynamic A = null; dynamic choice = null; int index = 0; dynamic A2 = null; dynamic holy_weapon = null; holy_weapons_list = Lang13.GetTypes(typeof(Obj_Item_Weapon_Nullrod)); display_names = new ByTable(); foreach (dynamic _a in Lang13.Enumerate(holy_weapons_list)) { V = _a; A = V; display_names.Add(Lang13.Initial(A, "name")); } choice = Interface13.Input(M, "What theme would you like for your holy weapon?", "Holy Weapon Theme", null, display_names, InputType.Null | InputType.Any); if (!(this != null) || !Lang13.Bool(choice) || Lang13.Bool(M.stat) || !(Map13.GetDistance(M, this) <= 1) || ((Mob)M).restrained() || !Lang13.Bool(M.canmove) || this.reskinned) { return; } index = display_names.Find(choice); A2 = holy_weapons_list[index]; holy_weapon = Lang13.Call(A2); GlobalFuncs.feedback_set_details("chaplain_weapon", "" + choice); if (Lang13.Bool(holy_weapon)) { holy_weapon.reskinned = GlobalVars.TRUE; ((Mob)M).unEquip(this); ((Mob)M).put_in_active_hand(holy_weapon); GlobalFuncs.qdel(this); } return; }
// Function from file: gravitygenerator.dm public void setup_parts( ) { dynamic our_turf = null; ByTable spawn_turfs = null; int count = 0; dynamic T = null; Obj_Machinery_GravityGenerator_Part part = null; our_turf = GlobalFuncs.get_turf(this); spawn_turfs = Map13.FetchInBlock(Map13.GetTile(Convert.ToInt32(our_turf.x - 1), Convert.ToInt32(our_turf.y + 2), Convert.ToInt32(our_turf.z)), Map13.GetTile(Convert.ToInt32(our_turf.x + 1), Convert.ToInt32(our_turf.y), Convert.ToInt32(our_turf.z))); count = 10; foreach (dynamic _a in Lang13.Enumerate(spawn_turfs)) { T = _a; count--; if (T == our_turf) { continue; } part = new Obj_Machinery_GravityGenerator_Part(T); if (count == 5) { this.middle = part; } if (count <= 3) { part.density = false; part.layer = 401; } part.sprite_number = count; part.main_part = this; this.parts.Add(part); part.update_icon(); } return; }
// Function from file: medbeam.dm public override int?process(dynamic seconds = null) { Ent_Static source = null; source = this.loc; if (!this.mounted && !(source is Mob_Living_Carbon_Human)) { this.LoseTarget(); return(null); } if (!Lang13.Bool(this.current_target)) { this.LoseTarget(); return(null); } if (Game13.time <= this.last_check + this.check_delay) { return(null); } this.last_check = Game13.time; if (Map13.GetDistance(source, this.current_target) > this.max_range || !this.los_check(source, this.current_target)) { this.LoseTarget(); if (source is Mob_Living_Carbon_Human) { ((dynamic)source).WriteMsg("<span class='warning'>You lose control of the beam!</span>"); } return(null); } if (Lang13.Bool(this.current_target)) { this.on_beam_tick(this.current_target); } return(null); }
// Function from file: particle_emitter.dm public bool emit_particle(int?strength = null) { strength = strength ?? 0; Obj_Effect_AcceleratedParticle A = null; Tile T = null; if (this.last_shot + this.fire_delay <= Game13.time) { this.last_shot = Game13.time; A = null; T = Map13.GetStep(this, this.dir); switch ((int?)(strength)) { case 0: A = new Obj_Effect_AcceleratedParticle_Weak(T, this.dir); break; case 1: A = new Obj_Effect_AcceleratedParticle(T, this.dir); break; case 2: A = new Obj_Effect_AcceleratedParticle_Strong(T, this.dir); break; case 3: A = new Obj_Effect_AcceleratedParticle_Powerful(T, this.dir); break; } if (A != null) { A.dir = this.dir; return(true); } } return(false); }
// Function from file: blob_reagents.dm public override dynamic damage_reaction(Obj_Effect_Blob B = null, double original_health = 0, dynamic damage = null, dynamic damage_type = null, dynamic cause = null) { Ent_Static A = null; if (Lang13.Bool(damage) && damage_type == "brute" && original_health - Convert.ToDouble(damage) > 0) { if (cause is Mob_Living) { B.visible_message("<span class='warning'><b>The blob retaliates, lashing out!</b></span>"); } foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(B, 1), typeof(Ent_Static))) { A = _a; A.blob_act(); } } return(base.damage_reaction(B, original_health, (object)(damage), (object)(damage_type), (object)(cause))); }
// Function from file: statue.dm public override bool Life( ) { Ent_Static watching = null; base.Life(); if (!(this.client != null) && Lang13.Bool(this.target)) { watching = this.can_be_seen(); if (watching != null && watching != this.target) { if (Map13.GetDistance(watching, this) > Map13.GetDistance(this.target, this)) { this.LoseTarget(); this.GiveTarget(watching); } } } return(false); }
// Function from file: atoms_movable.dm public virtual int Process_Spacemove(dynamic movement_dir = null) { movement_dir = movement_dir ?? 0; if (GlobalFuncs.has_gravity(this)) { return(1); } if (this.pulledby != null) { return(1); } if (Lang13.Bool(Lang13.FindIn(typeof(Obj_Structure_Lattice), Map13.FetchInRange(GlobalFuncs.get_turf(this), 1)))) { return(1); } return(0); }
// Function from file: guardian.dm public override bool Move(dynamic NewLoc = null, int?Dir = null, int step_x = 0, int step_y = 0) { base.Move((object)(NewLoc), Dir, step_x, step_y); if (Lang13.Bool(this.summoner)) { if (Map13.GetDistance(GlobalFuncs.get_turf(this.summoner), GlobalFuncs.get_turf(this)) <= this.range) { return(false); } else { this.WriteMsg("You moved out of range, and were pulled back! You can only move " + this.range + " meters from " + this.summoner.real_name); this.visible_message("<span class='danger'>The " + this + " jumps back to its user.</span>"); GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Guardian_Phase_Out), GlobalFuncs.get_turf(this)); this.forceMove(GlobalFuncs.get_turf(this.summoner)); GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Guardian_Phase), GlobalFuncs.get_turf(this)); } } return(false); }
// Function from file: tanks.dm public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null) { base.attackby((object)(A), (object)(user), _params, silent, replace_spent); this.add_fingerprint(user); if (this.loc is Obj_Item_Assembly) { this.icon = this.loc.icon; // FIXME not really sure what was intended here, but it was f*****g goofy } if (A is Obj_Item_Device_Analyzer && Map13.GetDistance(user, this) <= 1) { this.atmosanalyzer_scan(this.air_contents, user); } if (A is Obj_Item_Device_AssemblyHolder) { this.bomb_assemble(A, user); } return(null); }
// Function from file: swapmaps.dm public void BuildFilledRectangle(Tile T1 = null, Tile T2 = null, dynamic item = null) { dynamic T = null; if (!this.Contains(T1) || !this.Contains(T2)) { return; } T = T1; T1 = Map13.GetTile(Num13.MinInt(T1.x, T2.x), Num13.MinInt(T1.y, T2.y), Num13.MinInt(T1.z, T2.z)); T2 = Map13.GetTile(Num13.MaxInt(Convert.ToInt32(T.x), T2.x), Num13.MaxInt(Convert.ToInt32(T.y), T2.y), Num13.MaxInt(Convert.ToInt32(T.z), T2.z)); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInBlock(T1, T2))) { T = _a; Lang13.Call(item, T); } return; }
// Function from file: alien_powers.dm public override bool fire(Mob user = null) { Ent_Static T = null; Tile U = null; Obj_Item_Projectile_Bullet_Neurotoxin A = null; user.visible_message("<span class='danger'>" + user + " spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>"); T = user.loc; U = Map13.GetStep(user, user.dir); if (!(U is Tile) || !(T is Tile)) { return(false); } A = new Obj_Item_Projectile_Bullet_Neurotoxin(user.loc); A.current = U; A.yo = U.y - T.y; A.xo = U.x - T.x; A.fire(); return(true); }
// Function from file: runes.dm public override void invoke(dynamic user = null) { Mob_Living_Carbon M = null; this.visible_message("<span class='warning'>" + this + " flares up for a moment, and then disappears into itself!</span>"); new Obj_Effect_Timestop_Cult(GlobalFuncs.get_turf(this)); foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(this, 1), typeof(Mob_Living_Carbon))) { M = _a; if (GlobalFuncs.iscultist(M)) { M.apply_damage(20, "brute", "chest"); M.WriteMsg("<span class='cultitalic'>" + this + " temporarily stops your heart from beating!</span>"); } } GlobalFuncs.qdel(this); return; }
// Function from file: vday.dm public override double examine(dynamic user = null) { if (Map13.GetDistance(user, this) <= 1 || user is Mob_Dead_Observer) { if (!(user is Mob_Living_Carbon_Human || user is Mob_Dead_Observer || user is Mob_Living_Silicon)) { Interface13.Browse(user, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + GlobalFuncs.stars(this.message) + "</BODY></HTML>", "window=" + this.name); GlobalFuncs.onclose(user, "" + this.name); } else { Interface13.Browse(user, "<HTML><HEAD><TITLE>" + this.name + "</TITLE></HEAD><BODY>" + this.message + "</BODY></HTML>", "window=" + this.name); GlobalFuncs.onclose(user, "" + this.name); } } else { user.WriteMsg("<span class='notice'>It is too far away.</span>"); } return(0); }
// Function from file: mining_mobs.dm public override void OpenFire(dynamic A = null) { dynamic tturf = null; tturf = GlobalFuncs.get_turf(this.target); if (!(tturf is Tile_Simulated)) { return; } if (Map13.GetDistance(this, this.target) <= 7) { this.visible_message("<span class='warning'>The " + this.name + " digs its tentacles under " + this.target.name + "!</span>"); new Obj_Effect_GoliathTentacle_Original(tturf); this.ranged_cooldown = this.ranged_cooldown_cap; this.icon_state = this.icon_aggro; this.pre_attack = 0; } return; }
// Function from file: cellular.dm public override dynamic defineRegion(dynamic Start = null, dynamic End = null, bool?replace = null) { replace = replace ?? false; dynamic _default = null; int min_x = 0; int max_x = 0; int min_y = 0; int max_y = 0; _default = base.defineRegion((object)(Start), (object)(End), replace); min_x = Num13.MinInt(Convert.ToInt32(Start.x), Convert.ToInt32(End.x)); max_x = Num13.MaxInt(Convert.ToInt32(Start.x), Convert.ToInt32(End.x)); min_y = Num13.MinInt(Convert.ToInt32(Start.y), Convert.ToInt32(End.y)); max_y = Num13.MaxInt(Convert.ToInt32(Start.y), Convert.ToInt32(End.y)); this.width = max_x - min_x; this.height = max_y - min_y; this.start = Map13.GetTile(min_x, min_y, Convert.ToInt32(Start.z)); return(_default); }
// Function from file: space.dm public void update_starlight( ) { Tile_Simulated T = null; if (GlobalVars.config != null) { if (GlobalVars.config.starlight) { foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInBlock(Map13.GetTile(Num13.MaxInt(this.x - 1, 1), Num13.MaxInt(this.y - 1, 1), this.z), Map13.GetTile(Num13.MinInt(this.x + 1, Game13.map_size_x), Num13.MinInt(this.y + 1, Game13.map_size_y), this.z)), typeof(Tile_Simulated))) { T = _a; this.SetLuminosity(4, 1); return; } this.SetLuminosity(0); } } return; }