X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=libs%2FLib_items_store.java;h=b1e4eca7199598c6c92be2fb40e2a5570292b5ff;hp=75245bb80c3390126c3419b6b400113c87673ab5;hb=4983aa70fea163453968255c36b0689cfb412463;hpb=bddd811f24b5890310e09e93a33600a58db39ec9 diff --git a/libs/Lib_items_store.java b/libs/Lib_items_store.java index 75245bb..b1e4eca 100644 --- a/libs/Lib_items_store.java +++ b/libs/Lib_items_store.java @@ -1,8 +1,5 @@ class Lib_items_store { - /*Items*/ - static byte[] item_info; - /*Craft*/ static byte[] [] craftIN_item; static byte[] [] craftIN_sum; @@ -10,24 +7,6 @@ class Lib_items_store static int[] craftOUT_sum; static byte[] craftOUT_flag; - /*Tools*/ - static byte[] tool_type; - static byte[] tool_lvl; - static byte[] tool_speed; - static byte[] tool_damg; - - /* Items */ - - public static void resetitems(int len) - { - item_info = new byte[len]; - } - - public static void setitemdata(int id, int type, int tex, int max, int info, int flags) - { - item_info[id] = (byte) info; - } - /*Craft*/ public static void resetcrafts(int len) { @@ -143,54 +122,4 @@ class Lib_items_store return craftOUT_flag[id] & 0xFF; } catch(Exception e) { return 0xFF;} } - -/*Tools*/ - public static void resettools(int len) - { - try { - tool_type = new byte[len]; - tool_lvl = new byte[len]; - tool_speed = new byte[len]; - tool_damg = new byte[len]; - } catch(Exception e) {e.printStackTrace();} - } - - public static void settooldata(int id, int tool, int lvl, int speed, int damg) - { - try { - tool_type[id] = (byte) tool; - tool_lvl[id] = (byte) lvl; - tool_speed[id] = (byte) speed; - tool_damg[id] = (byte) damg; - } catch(Exception e) {e.printStackTrace();} - } - - public static int gettooltype(int id) - { - try { - return tool_type[item_info[id]]; - } catch(Exception e) { return 0;} - } - - public static int gettoollvl(int id) - { - try { - return tool_lvl[item_info[id]]; - } catch(Exception e) { return 0;} - } - - public static int gettoolspeed(int id) - { - try { - return tool_speed[item_info[id]]; - } catch(Exception e) { return 0;} - } - - public static int gettooldamg(int id) - { - try { - return tool_damg[item_info[id]]; - } catch(Exception e) { return 0;} - } - }