// Function from file: chronosuit.dm public void new_camera(Ent_Static user = null) { if (this.camera != null) { GlobalFuncs.qdel(this.camera); } this.camera = new Obj_Effect_ChronosCam(user); this.camera.holder = user; this.camera.chronosuit = this; ((dynamic)user).remote_control = this.camera; return; }
// Function from file: chronosuit.dm public void chronowalk(Obj_Effect_ChronosCam location = null) { Ent_Static user = null; dynamic from_turf = null; dynamic to_turf = null; double distance = 0; double phase_in_ds = 0; ByTable nonsafe_slots = null; dynamic slot = null; dynamic slot_item = null; user = this.loc; if (this.activated && !this.teleporting && user != null && user is Mob_Living_Carbon_Human && location != null && user.loc != null && location.loc != null && ((dynamic)user).wear_suit == this && Lang13.Bool(((dynamic)user).stat) == false) { this.teleporting = true; from_turf = GlobalFuncs.get_turf(user); to_turf = GlobalFuncs.get_turf(location); distance = GlobalFuncs.cheap_hypotenuse(Convert.ToInt32(from_turf.x), Convert.ToInt32(from_turf.y), Convert.ToInt32(to_turf.x), Convert.ToInt32(to_turf.y)); phase_in_ds = distance * 2; if (this.camera != null) { this.camera.remove_target_ui(); } if (this.teleport_now.button != null) { this.teleport_now.button.UpdateIcon(); } nonsafe_slots = new ByTable(new object [] { 6, 1, 4, 5 }); foreach (dynamic _a in Lang13.Enumerate(nonsafe_slots)) { slot = _a; slot_item = ((Mob)user).get_item_by_slot(slot); if (Lang13.Bool(slot_item) && !this.chronosafe_items.Contains(slot_item.type) && ((Mob)user).unEquip(slot_item)) { ((dynamic)user).WriteMsg("<span class='notice'>Your " + slot_item.name + " got left behind.</span>"); } } ((dynamic)user).ExtinguishMob(); if (Lang13.Bool(((dynamic)user).buckled)) { ((Ent_Dynamic)((dynamic)user).buckled).unbuckle_mob(); } this.phase_underlay = this.create_phase_underlay(user); this.hands_nodrop_states = 0; if (Lang13.Bool(((dynamic)user).l_hand)) { this.hands_nodrop_states |= (Lang13.Bool(((dynamic)user).l_hand.flags & 2) ? true : false) ?1:0; ((dynamic)user).l_hand.flags |= 2; } if (Lang13.Bool(((dynamic)user).r_hand)) { this.hands_nodrop_states |= (Lang13.Bool(((dynamic)user).r_hand.flags & 2) ? 2 : 0); ((dynamic)user).r_hand.flags |= 2; } ((dynamic)user).animate_movement = 0; ((dynamic)user).changeNext_move(phase_in_ds + 8); ((dynamic)user).notransform = 1; ((dynamic)user).anchored = 1; ((dynamic)user).Stun(Double.PositiveInfinity); Icon13.Animate(new ByTable().Set(1, user).Set("color", "#00ccee").Set("time", 3)); Task13.Schedule(3, (Task13.Closure)(() => { if (this.teleporting && this.activated && user != null && this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay))) { Icon13.Animate(new ByTable().Set(1, user).Set("alpha", 0).Set("time", 2)); Icon13.Animate(new ByTable().Set(1, this.phase_underlay).Set("alpha", 255).Set("time", 2)); Task13.Sleep(2); if (this.teleporting && this.activated && user != null && this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay))) { this.phase_underlay.loc = to_turf; user.loc = to_turf; Icon13.Animate(new ByTable().Set(1, user).Set("alpha", 255).Set("time", phase_in_ds)); Icon13.Animate(new ByTable().Set(1, this.phase_underlay).Set("alpha", 0).Set("time", phase_in_ds)); Task13.Sleep(((int)(phase_in_ds))); if (this.teleporting && this.activated && this.phase_underlay != null && !Lang13.Bool(GlobalFuncs.qdeleted(this.phase_underlay))) { Icon13.Animate(new ByTable().Set(1, user).Set("color", "#ffffff").Set("time", 3)); Task13.Sleep(3); } } } if (this.teleporting && user != null && !Lang13.Bool(GlobalFuncs.qdeleted(user))) { user.loc = to_turf; this.finish_chronowalk(); } return; })); } return; }