// Function from file: bottle.dm public void smash(dynamic target = null, dynamic user = null, bool?ranged = null) { ranged = ranged ?? false; dynamic new_location = null; Obj_Item_Weapon_BrokenBottle B = null; Icon I = null; new_location = GlobalFuncs.get_turf(this.loc); B = new Obj_Item_Weapon_BrokenBottle(new_location); if (ranged == true) { B.loc = new_location; } else { user.drop_item(); ((Mob)user).put_in_active_hand(B); } B.icon_state = this.icon_state; I = new Icon("icons/obj/drinks.dmi", this.icon_state); I.Blend(B.broken_outline, 3, Rand13.Int(5), 1); I.SwapColor("#ff00dcff", "#00000000"); B.icon = I; if (this.isGlass) { if (Rand13.PercentChance(33)) { new Obj_Item_Weapon_Shard(new_location); } GlobalFuncs.playsound(this, "shatter", 70, 1); } else { B.name = "broken carton"; B.force = 0; B.throwforce = 0; B.desc = "A carton with the bottom half burst open. Might give you a papercut."; } this.transfer_fingerprints_to(B); GlobalFuncs.qdel(this); return; }
// Function from file: icons.dm public void MaxColors(dynamic icon = null) { Icon I = null; Icon J = null; if (icon is Icon) { I = new Icon(icon); } else { I = new Icon(this); I.Blend("#000000", 3); I.SwapColor("#000000", null); I.Blend(icon, 3); } J = new Icon(this); J.Opaque(); I.Blend(J, 1); this.Blend(I, 5); return; }