package sig.modules; import java.awt.Graphics; import java.awt.event.WindowEvent; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import javax.imageio.ImageIO; import sig.FileManager; import sig.Module; import sig.sigIRC; import sig.utils.SoundUtils; public class BandoriModule extends Module{ public static BandoriModule bandori_module; public BufferedImage stamp_collection1,stamp_collection2; public static HashMap image_map = new HashMap(); public static HashMap> stamp_map = new HashMap>(); static List active_stamps = new ArrayList(); public BandoriModule(Rectangle2D bounds, String moduleName) { this(bounds,moduleName,true); } public BandoriModule(Rectangle2D bounds, String moduleName, boolean enabled) { super(bounds, moduleName, enabled); Initialize(); } void Initialize() { BandoriModule.bandori_module = this; try { stamp_collection1 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamps1.png")); stamp_collection2 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamps2.png")); } catch (IOException e) { e.printStackTrace(); } image_map.put("kasumi_gogo", new ImageScheme(stamp_collection1,0)); image_map.put("tae_letsplay", new ImageScheme(stamp_collection1,1)); image_map.put("rimi_choco", new ImageScheme(stamp_collection1,2)); image_map.put("saya_bread", new ImageScheme(stamp_collection1,3)); image_map.put("arisa_doki", new ImageScheme(stamp_collection1,4)); image_map.put("ran_same", new ImageScheme(stamp_collection1,5)); image_map.put("moca_youdidit", new ImageScheme(stamp_collection1,6)); image_map.put("himari_heyheyhoh", new ImageScheme(stamp_collection1,7)); image_map.put("tomoe_letsdothis", new ImageScheme(stamp_collection1,8)); image_map.put("tsugumi_wecandoit", new ImageScheme(stamp_collection1,9)); image_map.put("kokoro_happylucky", new ImageScheme(stamp_collection1,10)); image_map.put("kaoru_fleeting", new ImageScheme(stamp_collection1,11)); image_map.put("hagumi_smileyay", new ImageScheme(stamp_collection1,12)); image_map.put("kanon_fuee", new ImageScheme(stamp_collection1,13)); image_map.put("misaki_ready", new ImageScheme(stamp_collection1,14)); image_map.put("aya_fever", new ImageScheme(stamp_collection1,15)); image_map.put("hina_fullcombo", new ImageScheme(stamp_collection1,16)); image_map.put("chisato_planned", new ImageScheme(stamp_collection1,17)); image_map.put("maya_huhehe", new ImageScheme(stamp_collection1,18)); image_map.put("eve_bushido", new ImageScheme(stamp_collection1,19)); image_map.put("yukina_notbad", new ImageScheme(stamp_collection1,20)); image_map.put("sayo_goodwork", new ImageScheme(stamp_collection1,21)); image_map.put("lisa_nextonelastone", new ImageScheme(stamp_collection1,22)); image_map.put("ako_onemoretime", new ImageScheme(stamp_collection1,23)); image_map.put("rinko_jam", new ImageScheme(stamp_collection2,0)); image_map.put("marina_yeahyeah", new ImageScheme(stamp_collection2,1)); //Skip 2. image_map.put("kokoro_moremore", new ImageScheme(stamp_collection2,3)); image_map.put("arisa_huh", new ImageScheme(stamp_collection2,4)); image_map.put("yukina_followmylead", new ImageScheme(stamp_collection2,5)); image_map.put("kaoru_suchalovelyevening", new ImageScheme(stamp_collection2,6)); image_map.put("rimi_congrats", new ImageScheme(stamp_collection2,7)); image_map.put("ran_somethingbigiscoming", new ImageScheme(stamp_collection2,8)); image_map.put("tsugumi_comeon", new ImageScheme(stamp_collection2,9)); image_map.put("tae_fufusocute", new ImageScheme(stamp_collection2,10)); image_map.put("eve_marchintobattle", new ImageScheme(stamp_collection2,11)); image_map.put("saya_illtry", new ImageScheme(stamp_collection2,12)); image_map.put("lisa_imsohappy", new ImageScheme(stamp_collection2,13)); image_map.put("sayo_ohwell", new ImageScheme(stamp_collection2,14)); image_map.put("ako_areyouokay", new ImageScheme(stamp_collection2,15)); image_map.put("chisato_thisissomuchfun", new ImageScheme(stamp_collection2,16)); image_map.put("rinko_theresnoway", new ImageScheme(stamp_collection2,17)); image_map.put("tae_thisisgreat", new ImageScheme(stamp_collection2,18)); image_map.put("moca_thisisgettinginteresting", new ImageScheme(stamp_collection2,19)); image_map.put("kaoru_takemyhand", new ImageScheme(stamp_collection2,20)); image_map.put("kokoro_letsmaketheworldsmile", new ImageScheme(stamp_collection2,21)); stamp_map.put("kasumi_gogo",Arrays.asList("gogo")); stamp_map.put("tae_letsplay",Arrays.asList("playtogether","wanttoplay","multilive","letsplay")); stamp_map.put("rimi_choco",Arrays.asList("choco","cornet")); stamp_map.put("saya_bread",Arrays.asList("bread")); stamp_map.put("arisa_doki",Arrays.asList("doki")); stamp_map.put("ran_same",Arrays.asList("sameasalways","alwayssame","alwaysthesame")); stamp_map.put("moca_youdidit",Arrays.asList("youdidit","congratulations","buns","mocatastic")); stamp_map.put("himari_heyheyhoh",Arrays.asList("heyo","heyheyhoh","heyhey","hihi")); stamp_map.put("tomoe_letsdothis",Arrays.asList("letsdothis","letsdoit")); stamp_map.put("tsugumi_wecandoit",Arrays.asList("wegotthis","wegotit","wecan")); stamp_map.put("kokoro_happylucky",Arrays.asList("happy!","lucky")); stamp_map.put("kaoru_fleeting",Arrays.asList("fleeting")); stamp_map.put("hagumi_smileyay",Arrays.asList("smileyay","yay")); stamp_map.put("kanon_fuee",Arrays.asList("fuee","waa","ree")); stamp_map.put("misaki_ready",Arrays.asList("amready","beenready","ready!")); stamp_map.put("aya_fever",Arrays.asList("fever")); stamp_map.put("hina_fullcombo",Arrays.asList("fc","fullcombo","nomiss","allperfect","notasinglemiss")); stamp_map.put("chisato_planned",Arrays.asList("justasplanned","allplanned","calculated","thatcoming")); stamp_map.put("maya_huhehe",Arrays.asList("hehe","huehe","huehue")); stamp_map.put("eve_bushido",Arrays.asList("bushido")); stamp_map.put("yukina_notbad",Arrays.asList("notbad","veryclose")); stamp_map.put("sayo_goodwork",Arrays.asList("goodwork","goodjob","nicejob","welldone","greatwork","greatjob")); stamp_map.put("lisa_nextonelastone",Arrays.asList("lastone","mylast")); stamp_map.put("ako_onemoretime",Arrays.asList("onemore","goagain","keepgoing","dontstop")); stamp_map.put("rinko_jam",Arrays.asList("lovethissong","jam")); stamp_map.put("marina_yeahyeah",Arrays.asList("yeahyeah","letsgo")); stamp_map.put("kokoro_moremore",Arrays.asList("moremore","iwantmore")); stamp_map.put("arisa_huh",Arrays.asList("huh?","hh?","yy?","aat?","aa?","tt?","nani","nand")); stamp_map.put("yukina_followmylead",Arrays.asList("followmylead","takethelead","guideyou")); stamp_map.put("kaoru_suchalovelyevening",Arrays.asList("goodevening","lovelyevening","beautifulnight","grandnight","wonderfulevening")); stamp_map.put("rimi_congrats",Arrays.asList("grats")); stamp_map.put("ran_somethingbigiscoming",Arrays.asList("somethingbig","iscoming")); stamp_map.put("tsugumi_comeon",Arrays.asList("comeon","dontbeafraid","dontbeshy","tsugurific")); stamp_map.put("tae_fufusocute",Arrays.asList("socute","kawaii","fufu","adorable","cute")); stamp_map.put("eve_marchintobattle",Arrays.asList("marchintobattle","chargeintobattle")); stamp_map.put("saya_illtry",Arrays.asList("illtry","itachance","itatry","atleastonce")); stamp_map.put("lisa_imsohappy",Arrays.asList("ecstatic","sohappy","toohappy")); stamp_map.put("sayo_ohwell",Arrays.asList("ohwell","ahwell","youtried")); stamp_map.put("ako_areyouokay",Arrays.asList("youok","beok","daijou")); stamp_map.put("chisato_thisissomuchfun",Arrays.asList("muchfun","veryfun","reallyfun","extremelyfun","offun")); stamp_map.put("rinko_theresnoway",Arrays.asList("noway")); stamp_map.put("tae_thisisgreat",Arrays.asList("thisisgreat","thisisawesome","thisiswonderful")); stamp_map.put("moca_thisisgettinginteresting",Arrays.asList("gettinginteresting","thingsaregetting","thisisgetting")); stamp_map.put("kaoru_takemyhand",Arrays.asList("takemyhand","allowmeto","demonstrate","romeo")); stamp_map.put("kokoro_letsmaketheworldsmile",Arrays.asList("hhw","happyworld","hellohappy","worldsmile")); } public void run() { for (int i=0;i0; } } class ImageScheme{ BufferedImage base; int stamp_index; //0-23. ImageScheme(BufferedImage base,int index) { this.base=base; this.stamp_index=index; } }