// Function from file: gang_pen.dm public override int implant(dynamic source = null, dynamic user = null) { Obj_Item_Weapon_Implant I = null; bool?success = null; if (base.implant((object)(source), (object)(user)) != 0) { foreach (dynamic _a in Lang13.Enumerate(source, typeof(Obj_Item_Weapon_Implant))) { I = _a; if (I != this) { GlobalFuncs.qdel(I); } } if (!Lang13.Bool(source.mind) || Convert.ToInt32(source.stat) == 2) { return(0); } success = null; if (((GameMode)GlobalVars.ticker.mode).get_gangsters().Contains(source.mind)) { if (((GameMode)GlobalVars.ticker.mode).remove_gangster(source.mind, false, 1)) { success = true; } } else { success = true; } if (source is Mob_Living_Carbon_Human) { if (!(success == true)) { ((Ent_Static)source).visible_message("<span class='warning'>" + source + " seems to resist the implant!</span>", "<span class='warning'>You feel the influence of your enemies try to invade your mind!</span>"); } } GlobalFuncs.qdel(this); return(-1); } return(0); }
// Function from file: pins.dm public override bool pin_auth(dynamic user = null) { Obj_Item_Weapon_Implant I = null; foreach (dynamic _a in Lang13.Enumerate(user, typeof(Obj_Item_Weapon_Implant))) { I = _a; if (this.req_implant != null && I.imp_in == user && I.type == this.req_implant) { return(true); } } return(false); }
// Function from file: implanter.dm public override bool attack(dynamic M = null, dynamic user = null, bool?def_zone = null) { dynamic T = null; if (!(M is Mob_Living_Carbon)) { return(false); } if (Lang13.Bool(user) && this.imp != null) { if (M != user) { ((Ent_Static)M).visible_message("<span class='warning'>" + user + " is attemping to implant " + M + ".</span>"); } T = GlobalFuncs.get_turf(M); if (Lang13.Bool(T) && (M == user || GlobalFuncs.do_after(user, 50))) { if (Lang13.Bool(user) && Lang13.Bool(M) && GlobalFuncs.get_turf(M) == T && this != null && this.imp != null) { if (this.imp.implant(M, user) != 0) { if (M == user) { user.WriteMsg("<span class='notice'>You implant yourself.</span>"); } else { ((Ent_Static)M).visible_message("" + user + " has implanted " + M + ".", "<span class='notice'>" + user + " implants you.</span>"); } this.imp = null; this.update_icon(); } } } } return(false); }