summaryrefslogtreecommitdiff
path: root/fonts
ModeNameSize
-rw-r--r--Arimo-Bold.ttf420920logplain
-rw-r--r--Arimo-BoldItalic.ttf417668logplain
-rw-r--r--Arimo-Italic.ttf421372logplain
-rw-r--r--Arimo-LICENSE.txt114logplain
-rw-r--r--Arimo-Regular.ttf436876logplain
-rw-r--r--Cousine-Bold.ttf288272logplain
-rw-r--r--Cousine-BoldItalic.ttf265104logplain
-rw-r--r--Cousine-Italic.ttf262524logplain
-rw-r--r--Cousine-LICENSE.txt118logplain
-rw-r--r--Cousine-Regular.ttf309040logplain
-rw-r--r--DroidSansFallbackFull-LICENSE.txt577logplain
-rw-r--r--DroidSansFallbackFull.ttf4529044logplain
-rw-r--r--mono_dejavu_sans_10.xml257014logplain
-rw-r--r--mono_dejavu_sans_100.png56121logplain
-rw-r--r--mono_dejavu_sans_11.xml263644logplain
-rw-r--r--mono_dejavu_sans_110.png67613logplain
-rw-r--r--mono_dejavu_sans_12.xml268932logplain
-rw-r--r--mono_dejavu_sans_120.png73938logplain
-rw-r--r--mono_dejavu_sans_14.xml269188logplain
-rw-r--r--mono_dejavu_sans_140.png89073logplain
-rw-r--r--mono_dejavu_sans_16.xml275642logplain
-rw-r--r--mono_dejavu_sans_160.png101939logplain
-rw-r--r--mono_dejavu_sans_18.xml279962logplain
-rw-r--r--mono_dejavu_sans_180.png122274logplain
-rw-r--r--mono_dejavu_sans_20.xml282588logplain
-rw-r--r--mono_dejavu_sans_200.png138662logplain
-rw-r--r--mono_dejavu_sans_22.xml283950logplain
-rw-r--r--mono_dejavu_sans_220.png152844logplain
-rw-r--r--mono_dejavu_sans_24.xml286626logplain
-rw-r--r--mono_dejavu_sans_240.png170247logplain
-rw-r--r--mono_dejavu_sans_26.xml289710logplain
-rw-r--r--mono_dejavu_sans_260.png190156logplain
-rw-r--r--mono_dejavu_sans_28.xml292596logplain
-rw-r--r--mono_dejavu_sans_280.png200848logplain
-rw-r--r--mono_dejavu_sans_4.xml237740logplain
-rw-r--r--mono_dejavu_sans_40.png15668logplain
-rw-r--r--mono_dejavu_sans_6.xml245472logplain
-rw-r--r--mono_dejavu_sans_60.png29291logplain
-rw-r--r--mono_dejavu_sans_8.xml251876logplain
-rw-r--r--mono_dejavu_sans_80.png45552logplain
-rw-r--r--mono_dejavu_sans_9.xml254016logplain
-rw-r--r--mono_dejavu_sans_90.png50995logplain
class="hl opt">; float result_wear = 0.0; std::string result_main_group = ""; int level = itemgroup_get(groups, "level"); //infostream<<"level="<<level<<std::endl; for(std::map<std::string, ToolGroupCap>::const_iterator i = tp->groupcaps.begin(); i != tp->groupcaps.end(); ++i){ const std::string &name = i->first; //infostream<<"group="<<name<<std::endl; const ToolGroupCap &cap = i->second; int rating = itemgroup_get(groups, name); float time = 0; bool time_exists = cap.getTime(rating, &time); if(!result_diggable || time < result_time){ if(cap.maxlevel >= level && time_exists){ result_diggable = true; int leveldiff = cap.maxlevel - level; result_time = time / MYMAX(1, leveldiff); if(cap.uses != 0) result_wear = 1.0 / cap.uses / pow(3.0, (double)leveldiff); else result_wear = 0; result_main_group = name; } } } //infostream<<"result_diggable="<<result_diggable<<std::endl; //infostream<<"result_time="<<result_time<<std::endl; //infostream<<"result_wear="<<result_wear<<std::endl; if(time_from_last_punch < tp->full_punch_interval){ float f = time_from_last_punch / tp->full_punch_interval; //infostream<<"f="<<f<<std::endl; result_time /= f; result_wear /= f; } u16 wear_i = 65535.*result_wear; return DigParams(result_diggable, result_time, wear_i, result_main_group); } DigParams getDigParams(const ItemGroupList &groups, const ToolCapabilities *tp) { return getDigParams(groups, tp, 1000000); } HitParams getHitParams(const ItemGroupList &armor_groups, const ToolCapabilities *tp, float time_from_last_punch) { s16 damage = 0; float full_punch_interval = tp->full_punch_interval; for(std::map<std::string, s16>::const_iterator i = tp->damageGroups.begin(); i != tp->damageGroups.end(); ++i){ s16 armor = itemgroup_get(armor_groups, i->first); damage += i->second * rangelim(time_from_last_punch / full_punch_interval, 0.0, 1.0) * armor / 100.0; } return HitParams(damage, 0); } HitParams getHitParams(const ItemGroupList &armor_groups, const ToolCapabilities *tp) { return getHitParams(armor_groups, tp, 1000000); } PunchDamageResult getPunchDamage( const ItemGroupList &armor_groups, const ToolCapabilities *toolcap, const ItemStack *punchitem, float time_from_last_punch ){ bool do_hit = true; { if(do_hit && punchitem){ if(itemgroup_get(armor_groups, "punch_operable") && (toolcap == NULL || punchitem->name == "")) do_hit = false; } if(do_hit){ if(itemgroup_get(armor_groups, "immortal")) do_hit = false; } } PunchDamageResult result; if(do_hit) { HitParams hitparams = getHitParams(armor_groups, toolcap, time_from_last_punch); result.did_punch = true; result.wear = hitparams.wear; result.damage = hitparams.hp; } return result; }