// Function from file: chrono_eraser.dm public void field_connect(Obj_Effect_ChronoField F = null) { Ent_Static user = null; user = this.loc; if (F.gun != null) { if (user is Mob_Living && F.captured != null) { ((dynamic)user).WriteMsg("<span class='alert'><b>FAIL: <i>" + F.captured + "</i> already has an existing connection.</b></span>"); } this.field_disconnect(F); } else { this.startpos = GlobalFuncs.get_turf(this); this.field = F; F.gun = this; if (user is Mob_Living && F.captured != null) { ((dynamic)user).WriteMsg("<span class='notice'>Connection established with target: <b>" + F.captured + "</b></span>"); } } return; }
// Function from file: chrono_eraser.dm public override dynamic on_hit(Ent_Static target = null, double?blocked = null, dynamic hit_zone = null) { Obj_Effect_ChronoField F = null; if (target != null && Lang13.Bool(this.gun) && target is Mob_Living) { F = new Obj_Effect_ChronoField(target.loc, target, this.gun); ((Obj_Item_Weapon_Gun_Energy_ChronoGun)this.gun).field_connect(F); } return(null); }
// Function from file: chrono_eraser.dm public void field_disconnect(Obj_Effect_ChronoField F = null) { Ent_Static user = null; if (F != null && this.field == F) { user = this.loc; if (F.gun == this) { F.gun = null; } if (user is Mob_Living && F.captured != null) { ((dynamic)user).WriteMsg("<span class='alert'>Disconnected from target: <b>" + F.captured + "</b></span>"); } } this.field = null; this.startpos = null; return; }
// Function from file: chrono_eraser.dm public bool field_check(Obj_Effect_ChronoField F = null) { dynamic currentpos = null; Ent_Static user = null; if (F != null) { if (this.field == F) { currentpos = GlobalFuncs.get_turf(this); user = this.loc; if (currentpos == this.startpos && Map13.FetchInView(currentpos, 3).Contains(this.field) && !Lang13.Bool(((dynamic)user).lying) && Lang13.Bool(((dynamic)user).stat) == false) { return(true); } } this.field_disconnect(F); return(false); } return(false); }